diff --git a/ChangeLog b/ChangeLog index 64ab65b92cb6695a3d1599deaa9ae734a9c04796..a8f56d1e8e29d6f474086d1e463552dbb50622f4 100755 --- a/ChangeLog +++ b/ChangeLog @@ -10536,8 +10536,7 @@ nuttx/libc/mqueue to nuttx/sched/mqueue. Also add syscall support for mq_setattr() and mq_getattr(). This is necessary in protected and kernel builds because in those cases the message queue structure is - protected and cannot be accessed directly from user mode code. Noted - by Jouko Holopainen (2015-06-03). + protected and cannot be accessed directly from user mode code (2015-06-03). * drivers/net/tun.c: TUN driver bug fix. From Max Neklyudov (2015-06-03. * drivers/net/Kconfig, include/nuttx/net/mii.h, and arch/arm/src/lpc17xx/lpc17_ethernet.c: Add support for the Micrel @@ -12392,5 +12391,284 @@ banks. This fixes a race condition where the HW fills a FIFO bank while the SW is busy, resulting in out of sequence USB packets (2016-07-23). + * Freedom-K64F: Add PWM support. From Jordan MacIntyre (2016-07-25). 7.18 2016-xx-xx Gregory Nutt + + * drivers/serial/pty.c, serial.c, usbdev/cdcacm.c, include/nuttx/fs/ioctl.h: + Fix FIONWRITE and add FIONSPACE. All implementations of FIONWRITE + were wrong. FIONWRITE should return the number of bytes waiting in + the outgoing send queue, not the free space. Rather, FIONSPACE should + return the free space in the send queue (2016-07-25). + * lib_dumpbuffer: Now prints a large on-stack buffer first to avoid + problems when the syslog output is prefixed with time. From Pierre- + noel Bouteville (2016-07-27). + * sched/clock and sched/sched: Add standard adjtime() interface and + basic timekeeping support. Normally used with an NTP client to keep + system time in synchronizationi. From Max Neklyudov (Merged on + 20160-07-28). + * arch/arm/src/stm32: Add timekeeping support for the STM32 tickless + mode. From Max Neklyudov (Merged on 20160-07-28). + * Top-Level Makefiles. Fix a chicken-and-egg problem. In the menuconfig + target, the context dependency was executed before kconfig-mconf. + That was necessary because the link at apps/platform/board needed to + be set up before creating the apps/Kconfig file. Otherwise, the + platform Kconfig files would not be included. But this introduces + the chicken-and-egg problem in some configurations. + In particular: (1) An NX graphics configuration is used that requires + auto-generation of source files using cpp, (2) the configuration is + set for Linux, but (3) we are running under Cygwin with (4) a Windows + native toolchain. In this case, POSIX-style symbolic links are set + up but the Windows native toolchain cannot follow them. + The reason we are running 'make menuconfig' is to change from Linux + to Cygwin, but the target fails. During the context phase, NX runs + CPP to generate source files but that fails because the Windows native + toolchain cannot follow the links. Checkmate. + This was fixed by changing all of the make menuconfig (and related) + targets. They no longer depend on context being run. Instead, they + depend only on the dirlinks target. The dirlinks target only sets + up the directory links but does not try to run all of the context + setup; the compiler is never invoked; no code is autogeneraed; and + things work (2016-07-28). + * tools/refresh.sh: Recent complexities added to apps/ means that + configuration needs correct Make.defs file in place in order to + configure properly (2016-07-28). + * tools/kconfig2html.c: Update to handle absolute paths when sourcing + Kconfig files (2016-07-29). + * libc/math: This fixes the following libc/math issues: (1) asin[f l]() + use Newton’s method to converge on a solution. But Newton’s method + converges very slowly (> 500,000 iterations) for values of x close + to 1.0; and, in the case of asinl(), sometimes fails to converge + (loops forever). The attached patch uses an trig identity for + values of x > sqrt(2). The resultant functions converge in no more + than 5 iterations, 6 for asinl(). (2) The NuttX erf[f l]() functions + are based on Chebyshev fitting to a good guess. The problem there’s a + bug in the implementation that causes the functions to blow up with x + near -3.0. This patch fixes that problem. It should be noted that + this method returns the error function erf(x) with fractional error + less than 1.2E-07 and that’s fine for the float version erff(), but + the same method is used for double and long double version which + will yield only slightly better precision. This patch doesn't address + the issue of lower precision for erf() and erfl(). (3) a faster + version of copysignf() for floats is included. From David S. Alessio + (2016-07-30). + * I/O Expander: Remove hard-coded PCA9555 fields from ioexpander.h + definitons. Add support for an attach() method that may be used when + any subset of pin interrupts occur (2016-07-31). + * PCA9555 Driver: Replace the signalling logic with a simple callback + using the new definitons of ioexpander.h. This repartitioning of + functionality is necessary because (1) the I/O expander driver is the + lower-lower part of any driver that uses GPIOs (include the GPIO + driver itself) and should not be interacting directly with the much + higher level application layer. And (2) in order to be compatible + with the GPIO driver (and any arbitrary upper half driver), the + PCA9555 should not directly signal, but should call back into the + upper half. The upper half driver that interacts directly with the + application is the appropriate place to be generating signal + (2016-07-31). + * drivers/ioexpander/skeleton.c: Add a skeleton I/O Expander driver + (based on the PCA9555 driver) (2016-07-31). + * I/O Expander Interface: Encode and extend I/O expander options to + include interrupt configuration (2016-07-31). + * drivers/ioexpander: Add an (untested) TCA64XX I/O Expander driver + leveraged from Project Ara (2016-07-31). + * I/O Expander Interface: Add argument to interrupt callback. Add a + method to detach the interrupt (2016-08-01). + * drivers/ioexpander: Add a GPIO lower-half driver that can be used to + register a GPIO character driver for accessing pins on an I/O expander + (2016-08-01). + * drivers/ioexpander: Add PCF8574 I/O Expander driver. Some cleanup + also of other expander drivers (2016-08-01). + * drivers/ioexpander: GPIO driver: Add IOCTLs to get the pin type and + to unregister a signal handler (2016-08-01). + * configs/sim: Add simulator-based test support for apps/examples/gpio + 2016-08-01). + * drivers/sensors: Add KXJT9 Accelerometer driver from the Motorola + Moto Z MDK (2016-08-02). + * arch/arm/sim: Add a simulated I/O Expander driver (2016-08-03). + * configs/sim: Add logic to set the simulated I/O expander for testing + with apps/examples/gpio (2016-08-03). + * fs/fat: FAT performance improvement. In large files, seeking to a + position from the beginning of the file can be very time consuming. + ftell does lssek(fd, 0, SET_CURR). In that case, that is wasted time + since we are going to seek to the same position. This fix short- + circutes fat_seek() in all cases where we attempt to seek to current + position. Suggested by Nate Weibley (2016-08-03). + * tools/sethost.sh: Add sethost.sh. This is a script that you can use + to quickly change the host platform from Linux to Windows/Cygwin. + Might save you a lot of headaches (2016-08-03). + * arch/arm/src/tiva: Add tiva PWM lower-half driver implementation. + From Young (2016-08-05). + * drivers/spi/spi_transfer.c: Add a helper function that encapsulates + and manages a sequence of SPI transfers (2016-08-05). + * drivers/spi: Add an SPI character driver that will permit access to + the SPI bus for testing purposes. This driver is a simple wrapper + around spi_transfer() (2016-08-05). + * drivers/wireless: Add MFRC522 RFID ISO14443 and Mifare transceiver + driver. From Alan Carvalho de Assis (2016-08-06). + * configs/stm32f103-minimum: Add board support to MFRC522 driver. From + Alan Carvalho de Assis (2016-08-06). + * arch/renesas: Rename arch/sh to arch/renesas (2016-08-06). + * arch/arm/src/efm32, stm32, stm32l4: STM32 and EFM32 SPI drivers + adopted an incompatible conventions somewhere along the line. The + set the number of bits to negative when calling SPI_SETBITS which had + the magical side-effect of setting LSB first order of bit + transmission. This is not only a hokey way to pass control + information but is supported by no other SPI drivers. This change + three things: (1) It adds HWFEAT_LSBFIRST as a new H/W feature. + (2) It changes the implementations of SPI_SETBITS in the STM32 and + EFM32 derivers so that negated bit numbers are simply errors and it + adds the SPI_HWFEATURES method that can set the LSB bit order, and + (3) It changes all calls with negative number of bits from all + drivers: The number of bits is now always positive and SPI_HWFEATURES + is called with HWFEAT_LSBFIRST to set the bit order (2016-08-08). + * arch/arm/src/stm32: Add missing SPI2 and SPI3 support for STM32F3F3. + Add STM32F37XX DMA channel configuration. For STM32F37XX, + SYSCFG_EXTICR_PORTE defined twice. From Alan Carvalho de Assis + (2016-08-08). + * arch/arm/src/stm32: Make stm32_pwr_enablebkp thread safe. From + Max Neklyudov (2016-08-09). + * arch/arm/src/stm32: SAM3/4 GPIO: Enable peripheral clock for GPIO port + when GPIO is configured as input. The value of a GPIO input is only + sampled when the peripheral clock for the port controller the GPIO + resides in is enabled. Therefore we need to enable the clock even when + polling a GPIO. From Wolfgang Reissnegger (2016-08-09). + * arch/arm/src/tiva: Fix two bugs of tiva pwm lower-half driver + implementation. From Young (2016-08-10). + * sched/group: Explicitly initialize the group tg_exitsem with + sem_init(). The existing logic worked because the correct + initialization value is all zero, but it is better to initialize the + semaphore explicitly (2016-08-10). + * arch/arm/stm32: Fix bad pllmul values for STM32F1XX connectivity line. + STM32F1XX connectivity line supports only x4, x5, x6, x7, x8, x9 and + x6.5 values. From Michał Łyszczek (2016-08-11). + * include/nuttx/timers: Add oneshot timer lower half interface + (2016-08-11). + * arch/arm/src/stm32: Add a experimental oneshot, lower-half driver for + STM32 (2016-08-11). + * arch/arm/src/samv7: Add option to support oneshot timer without free- + running timer. Add oneshot lower half driver (2016-08-11). + * arch/arm/src/sama5: Add option to support oneshot timer without free- + running timer. Add oneshot lower half driver (2016-08-11). + * arch/arm/src/sam34: SAM4CM: Add option to support oneshot timer without + free-running timer. Add oneshot lower half driver (2016-08-11). + * arch/arm/src/stm32l4: Add oneshot lower half driver (2016-08-11). + * libc/stdlib: strtod() was not returning endptr on error conditions + (2016-08-11). + * libc/math: floor(), floorf(), and floorl(): Fix logic error. Was not + correctly handling negative integral value (2016-08-11). + * configs/sim: Add a configuration useful for testing Mini Basic + (2016-08-12). + * drivers/timers: Add an upper-half, oneshot timer character driver + (2016-08-12). + * arch/sim/src: Add a simulated oneshot lowerhalf driver (2016-08-12). + * arch/arm/src/stm32: STM32F3 SPI: Fix the number of bit setting for + the F3. That and data packing work differently on the STM32F3 than + for other STM32 parts (2016-08-12). + * arch/arm/stm32 and stm32l4: Enabling SPI DMA loses other bits in CR2 + (2016-08-13). + * arch/arm/src/stm32: STM32F3 SPI: Cannot write always 16-bit value to + DR register because of how the F3 implements data packing (2016-08-13). + * Kinetis: Add support for I2C and RTC. From v01d (phreakuencies) + (2016-08-13). + * teensy 3.x i2c. From v01d (phreakuencies) (2016-08-13). + * SH1106 0.96 OLED module support (SSD1306 compatible) + I2C fixes. + From v01d (phreakuencies) (2016-08-13). + * Add support for SAMV7 DACC module. From iotr Mienkowski (2016-08-15). + * Add oneshot board initialization to stm32f103-minimum. From Alan + Carvalho de Assis (2016-08-15). + * drivers/audio/tone.c: Add Audio Tone Generator for NuttX. From Alan + Carvalho de Assis (2016-08-16). + * configs/stm32f103-minimum: Add board configuration to initialize Audio + Tone Generator. From Alan Carvalho de Assis (2016-08-16). + * STM32F411 and STM32F446 map i2c2_sda_4 to different alternate function + numbers. From Konstantin Berezenko (2016-08-17). + * STM32 DMA Fix: Change stm32 adc dma callback to send channel number + instead of index. From Konstantin Berezenko (2016-08-17). + * SAMA5: Add missing oneshot max_delay method (2016-08-18). + * configs/stm32bufferfly2: Add support for the Kamami stm32butterfly2 + development board with optional ETH phy. From Michał Łyszczek + (2016-08-19). + * libc/misc: Separate XorShift128 PRNG from /dev/urandom and make it + generally available (2016-08-20). + * sched/sched_cpuload_oneshot: Use the oneshot timer with optional + entropy to measure cPU load if so configured (2016-08-20). + * drivers/usbhost/usbhost_composite.c: An an EXPERIMENTAL prototype of + how USB host support for composite devices might be implemented. This + feature is EXPERIMENTAL because (1) it is untested and (2) has some + know design issues that must be addressed before it can be of use + (2016-08-28). + * CXXFLAGS: add -fcheck-new whenever -fno-exceptions is used. From Beat + Küng (2016-08-23). + * tools/mkfsdata.pl was still generating the old-style apps/include + inclusion paths (2016-08-23). + * drivers/sensors: Add drvier for the LIS3MDL 3 axis magnetometer. From + Alexander Entinger (2016-08-23). + * drivers/sensors: Add driver for the MLX90393 3 axis magnetometer. + From Alexander Entinger (2016-08-23). + * drivers/mtd: Add Fujistu MB85RS256B ramtron support. From Beat Küng + (2016-08-23). + * drivers/sensors: Add driver for the LIS3DSH 3 axis accelerometer. From + Alexander Entinger (2016-08-24). + * drivers/sensors: Add driver for the Bosch BMG160 3 axis gyroscope. + From Alexander Entinger (2016-08-24). + * STM32: Add IAR-style STM32F1xx vectors. Tested on STM32F103RB and + STM32F107RC. From Aleksandr Vyhovanec (2016-08-24). + * libc/header files: Add POSIX type sig_atomic_t. From Sebastien + Lorquet (2016-08-24). + * libc/header files: isatty() should be prototypes in unstid.h, not + termios.h. From Sebastien Lorquet (2016-08-24). + * Documentation: Update to NuttX C coding style document with additions + discussing long comments on the right side of a statement or data + definition (2016-08-24). + * LPC43xx serial: Fix typos in LPC43 serial driver. Found by Vytautas + Lukenskas (2016-08-24). + * libc/time: This commit adds the difftime() function. The function + depends on the toolchain-dependent CONFIG_HAVE_DOUBLE so is not + available on tiny platforms. From Sebastien Lorquet (2016-08-24). + * libc/stdio: Add support for remove(). From Sebastien Lorquet + (2016-08-25). + * STM32 OTGFS device: Fix for lost first word from FIFO + + 1) Do not overwrite Reserved Bits in GINTSTS (per ref manual)* + 2) Acknowledge all pending int on entry to ISR that are Only rc_w1* + 3) Do not disable RXFVL* + 4) Loop until RXFVL is cleared* + 5) Only clear the NAK on the endpoint on the + OTGFS_GRXSTSD_PKTSTS_SETUPDONE to not loose the first WORD of + FIFO all the data (Bug Fix) + + Changed marked *are just driver clean up and ensure ints are not lost. + The bug fix is #5 + + Test case open putty and observer the Set/Get LineCoding. Without this + fix #5 the Get will not match the Set, and in fact the data might be + skewed by 4 bytes, that are lost from the FIFO if the + OTGFS_DOEPCTL0_CNAK bit is set in the OTGFS_GRXSTSD_PKTSTS_SETUPRECVD + as opposed to the OTGFS_GRXSTSD_PKTSTS_SETUPDONE + + Set Line Coding DATA1: 4B | 00 c2 01 00 00 00 08 | c8 1B + Get Line Coding DATA1: 4B | .. .. .. .. 00 00 08 c8 .. 00 00 07 | 7a 72 + + From David Sidrane (2016-08-25). + * Add system() to stdlib.h. Actual implementation is in + apps/system/system (2016-08-25). + * include/nuttx/input: Add missing prototype for btn_lower_initialize() + (2016-08-27). + * configs/stm32f103-minimum: Add board config support to SPI LCD module + JLX12864G-086. From Alan Carvalho de Assis (2016-08-28). + * net/tcp: tcp_ipvX_bind() not actually using the ported selected with + port==0. Also removes duplicate call to pkt_input(). Issues noted by + Pascal Speck (2016-08-30). + * STM32 F7: Remove duplicate call to pkt_input from Ethernet driver. + Issues noted by Pascal Speck (2016-08-30). + * STM32L4 OTGFS device: Apply stm32 fix to stm32l4. From Sebastien + Lorquet (2016-08-31). + * drivers/contactless: Remove contactless drivers from drivers/wireless + to drivers contactless. From Sebastien Lorquet (2016-08-31). + * USB host composite is at least partially functional. No longer depends + on CONFIG_EXPERIMENTAL (2016-09-02). + * MTD: Fixed cloned typos in several FLASH drivers. From Aleksandr + Vyhovanec (2016-09-02). + * MTD: SPI-based driver for Macronix MX25L3233F or MX25L6433F. From + Aleksandr Vyhovanec (2016-09-02). diff --git a/Documentation/NuttShell.html b/Documentation/NuttShell.html index 7af455d577e8629d1f277efaea183f50a2e664ae..1d284dbea7af11875bc82f32143bf4ac7db47e94 100644 --- a/Documentation/NuttShell.html +++ b/Documentation/NuttShell.html @@ -8,7 +8,7 @@

NuttShell (NSH)

-

Last Updated: July 20, 2016

+

Last Updated: August 4, 2016

@@ -3277,7 +3277,7 @@ nsh> mkfifo - CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_PIPES + CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_PIPES && CONFIG_DEV_FIFO_SIZE > 0 CONFIG_NSH_DISABLE_MKFIFO diff --git a/Documentation/NuttXCCodingStandard.html b/Documentation/NuttXCCodingStandard.html index e3b3103297aaba92d4d8266f20c81484c0bd19c8..7505acfd13668031597a34c9765678e6e6e5f1b8 100644 --- a/Documentation/NuttXCCodingStandard.html +++ b/Documentation/NuttXCCodingStandard.html @@ -12,7 +12,7 @@

NuttX C Coding Standard

-

Last Updated: July 28, 2015

+

Last Updated: August 24, 2016

@@ -498,8 +498,8 @@

Comments to the Right of Statements. - Comments to the right of statements in C source files are discouraged - If such comments are used, they should at least be aligned so that the comment begins in the same comment on each line. + Comments to the right of statements in C source files are discouraged. + If such comments are used, they should be (1) very short so that they do not exceed the line width (typically 78 characters), (2) fit on one line, and (3) be aligned so that the comment begins in the same comment on each line.

@@ -538,7 +538,7 @@

Comments to the Right of Data Definitions. - Comments to the right of a declaration with an enumeration or structure, on the other hand, are encourage. + Comments to the right of a declaration with an enumeration or structure, on the other hand, are encouraged, provided that the comments are short and do not exceed the maximum line width (usually 78 characters). Columnar alignment of comments is very desireable (but often cannot be achieved without violating the line width).

@@ -586,6 +586,40 @@ struct animals_s
+

+ Long Comments on the Right. + Comments on the right of statements or data definitions must be short and fit on the same line without exceeding the maximum line length. + If a longer comment is needed, then it should appear above the statement of definition rather than to the right of the definition. +

+
+ + + +
+

Incorrect

+
    +  dog = cat; /* This assignment will convert what was at one time a lowly dog into a ferocious feline. */
    +
+
+

Acceptable

+
    +  dog = cat;       /* This assignment will convert what was at one time a
    +                    * lowly dog into a ferocious feline. */
    +
+
+

Preferred

+
    +  /* This assignment will convert what was at one time a lowly dog into a
    +   * ferocious feline.
    +   */
    +
    +  dog = cat;
    +
+
+

+ Note that if the comment is continued on multiple lines, the comment alignment and multi-line comment rules still apply with one exception: The closing */ appears on the same line as the final text of the comment. This exception to the rule is enforced to keep the statements and definitions from becoming to spread out. +

+

Block comments. Block comments are only used to delimit groupings with the overall file organization and should not be used unless the usage is consistent with delimiting logical groupings in the program. diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index bf32596fef06abf761fc20776d12699808bfb4e2..7fa60d4d93b4bc56877b9aa4dec4aec7cfd75952 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -12,7 +12,7 @@

NuttX RTOS Porting Guide

-

Last Updated: June 22, 2016

+

Last Updated: August 31, 2016

@@ -948,22 +948,46 @@ drivers/ | |-- Kconfig | |-- Make.defs | `-- (Common ADC and DAC driver source files) +|-- audio/ +| |-- Kconfig +| |-- Make.defs +| `-- (Common audio device source files) |-- bch/ | |-- Kconfig | |-- Make.defs | `-- (bch driver source files) +|-- contactless/ +| |-- Kconfig +| |-- Make.defs +| `-- (Common contactless device driver source files) |-- input/ | |-- Kconfig | |-- Make.defs | `-- (Common touchscreen and keypad driver source files) +|-- ioexpander/ +| |-- Kconfig +| |-- Make.defs +| `-- (Common I/O expander and GPIO-related driver source files) |-- lcd/ | |-- Kconfig | |-- Make.defs | `-- (Common LCD driver source files) +|-- leds/ +| |-- Kconfig +| |-- Make.defs +| `-- (Common LED device driver source files) +|-- loop/ +| |-- Kconfig +| |-- Make.defs +| `-- (Common loop device driver source files) |-- mmcsd/ | |-- Kconfig | |-- Make.defs | `-- (Common MMC/SD card driver source files) +|-- modem/ +| |-- Kconfig +| |-- Make.defs +| `-- (Common modem driver source files) |-- mtd/ | |-- Kconfig | |-- Make.defs @@ -972,11 +996,19 @@ drivers/ | |-- Kconfig | |-- Make.defs | `-- (Common network driver source files) +|-- pipes/ +| |-- Kconfig +| |-- Make.defs +| `-- (Common pipe and FIFO driver source files) +|-- power/ +| |-- Kconfig +| |-- Make.defs +| `-- (Common power-related driver source files) |-- sensors/ | |-- Kconfig | |-- Make.defs | `-- (Common sensor driver source files) -|-- serial/ +|-- sercomm/ | |-- Kconfig | |-- Make.defs | `-- (Files for the Calypso SERCOMM driver) @@ -984,6 +1016,18 @@ drivers/ | |-- Kconfig | |-- Make.defs | `-- (Common front-end character drivers for chip-specific UARTs) +|-- spi/ +| |-- Kconfig +| |-- Make.defs +| `-- (Common SPI-related drivers and helper fuctions) +|-- syslog/ +| |-- Kconfig +| |-- Make.defs +| `-- (System logging device support) +|-- timers/ +| |-- Kconfig +| |-- Make.defs +| `-- (Timer-based device driver support) |-- usbdev/ | |-- Kconfig | |-- Make.defs @@ -992,6 +1036,10 @@ drivers/ | |-- Kconfig | |-- Make.defs | `-- (Common USB host driver source files) +|-- usbmonitor/ +| |-- Kconfig +| |-- Make.defs +| `-- (USB monitor source files) |-- wireless/ | |-- Kconfig | |-- Make.defs @@ -1088,16 +1136,32 @@ include/ | | `-- (Audio driver header files) | |-binfmt/ | | `-- (Binary format header files) +| |-contactless/ +| | `-- (Contactless driver header files) +| |-crypto/ +| | `-- (Cryptographic support header files) +| |-drivers/ +| | `-- (Miscellaneous driver header files) +| |-eeprom/ +| | `-- (EEPROM driver header files) | |-fs/ | | `-- (File System header files) | |-input/ | | `-- (Input device driver header files) +| |-ioexpander/ +| | `-- (I/O exander and GPIO drvier header files) | |-lcd/ | | `-- (LCD driver header files) +| |-leds/ +| | `-- (LED driver header files) +| |-lib/ +| | `-- (Non-standard C library driver header files) +| |-mm/ +| | `-- (Memory management header files) +| |-modem/ +| | `-- (Modem driver header files) | |-mtd/ | | `-- (Memory technology device header files) -| |-serial/ -| | `-- (Serial driver header files) | |-net/ | | `-- (Networking header files) | |-nx/ @@ -1114,8 +1178,12 @@ include/ | | `-- (SPI driver header files) | |-syslog/ | | `-- (SYSLOG header files) +| |-timers/ +| | `-- (Timer-related driver header files) | |-usb/ | | `-- (USB driver header files) +| |-video/ +| | `-- (Video-related driver header files) | `-wireless/ | `-- (Wireless device driver header files) `- sys/ @@ -1148,16 +1216,28 @@ include/

2.13 nuttx/libxx

diff --git a/Documentation/README.html b/Documentation/README.html index d9199a48271e83f98f5219d49fa39e51af8a0823..4bbe2d956d062f54fa0aee439507ae4558348248 100644 --- a/Documentation/README.html +++ b/Documentation/README.html @@ -31,11 +31,11 @@ nuttx/ | |- arm/ | | `- src | | `- lpc214x/README.txt - | |- sh/ + | |- renesas/ | | |- include/ - | | | `-README.txt + | | | `-README.txt | | |- src/ - | | | `-README.txt + | | | `-README.txt | |- x86/ | | |- include/ | | | `-README.txt diff --git a/Kconfig b/Kconfig index 31f6f54629c6e06315387791765ef34543a4709b..bf1f1c7b4b31ee0a3c8e9cbb0c9077289dbc4d91 100644 --- a/Kconfig +++ b/Kconfig @@ -1367,7 +1367,6 @@ endif # DEBUG_SPI config DEBUG_TIMER bool "Timer Debug Features" default n - depends on TIMER ---help--- Enable timer debug features. diff --git a/Makefile.unix b/Makefile.unix index bb24978897467afabef2d69595393bfabe7a5f95..d1ee224a67ea74a81053268d7437fee03d7b0351 100644 --- a/Makefile.unix +++ b/Makefile.unix @@ -181,7 +181,7 @@ endif BIN = nuttx$(EXEEXT) all: $(BIN) -.PHONY: context clean_context check_context export subdir_clean clean subdir_distclean distclean apps_clean apps_distclean +.PHONY: dirlinks context clean_context check_context export subdir_clean clean subdir_distclean distclean apps_clean apps_distclean # Target used to copy include/nuttx/lib/math.h. If CONFIG_ARCH_MATH_H is # defined, then there is an architecture specific math.h header file @@ -315,6 +315,8 @@ ifneq ($(CONFIG_ARCH_CHIP),) endif dirlinks: include/arch include/arch/board include/arch/chip $(ARCH_SRC)/board $(ARCH_SRC)/chip + $(Q) $(MAKE) -C configs dirlinks TOPDIR="$(TOPDIR)" + $(Q) $(MAKE) -C $(CONFIG_APPS_DIR) dirlinks TOPDIR="$(TOPDIR)" # context # @@ -470,32 +472,32 @@ 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. -do_config: context apps_preconfig +do_config: dirlinks apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf Kconfig config: do_config clean_context -do_oldconfig: context apps_preconfig +do_oldconfig: dirlinks apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf --oldconfig Kconfig oldconfig: do_oldconfig clean_context -do_olddefconfig: context apps_preconfig +do_olddefconfig: dirlinks apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf --olddefconfig Kconfig olddefconfig: do_olddefconfig clean_context -do_menuconfig: context apps_preconfig +do_menuconfig: dirlinks apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-mconf Kconfig menuconfig: do_menuconfig clean_context -do_qconfig: context apps_preconfig +do_qconfig: dirlinks apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-qconf Kconfig qconfig: do_qconfig clean_context -gconfig: context apps_preconfig +gconfig: dirlinks apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-gconf Kconfig gconfig: do_gconfig clean_context diff --git a/Makefile.win b/Makefile.win index 1f30310525ec6784ac9c26df9b1ab8dd27946355..b15052f16cad8716eeb4dc86e171d183b6f8ea1c 100644 --- a/Makefile.win +++ b/Makefile.win @@ -174,7 +174,7 @@ endif BIN = nuttx$(EXEEXT) all: $(BIN) -.PHONY: context clean_context check_context configenv config oldconfig menuconfig export subdir_clean clean subdir_distclean distclean apps_clean apps_distclean +.PHONY: dirlinks context clean_context check_context configenv config oldconfig menuconfig export subdir_clean clean subdir_distclean distclean apps_clean apps_distclean # Target used to copy include\nuttx\math.h. If CONFIG_ARCH_MATH_H is # defined, then there is an architecture specific math.h header file @@ -335,6 +335,8 @@ endif endif dirlinks: include\arch include\arch\board include\arch\chip $(ARCH_SRC)\board $(ARCH_SRC)\chip + $(Q) $(MAKE) -C configs dirlinks TOPDIR="$(TOPDIR)" + $(Q) $(MAKE) -C $(CONFIG_APPS_DIR) dirlinks TOPDIR="$(TOPDIR)" # context # @@ -466,22 +468,22 @@ pass2dep: context tools\mkdeps$(HOSTEXEEXT) # location: http://ymorin.is-a-geek.org/projects/kconfig-frontends. See # misc\tools\README.txt for additional information. -do_config: context apps_preconfig +do_config: dirlinks apps_preconfig $(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-conf Kconfig config: do_config clean_context -do_oldconfig: context apps_preconfig +do_oldconfig: dirlinks apps_preconfig $(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-conf --oldconfig Kconfig oldconfig: do_oldconfig clean_context -do_olddefconfig: context apps_preconfig +do_olddefconfig: dirlinks apps_preconfig $(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-conf --olddefconfig Kconfig olddefconfig: do_olddefconfig clean_context -do_menuconfig: context configenv apps_preconfig +do_menuconfig: dirlinks configenv apps_preconfig $(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-mconf Kconfig menuconfig: do_menuconfig clean_context diff --git a/README.txt b/README.txt index 8991f5d870a9dd8682a793772e41691fdaa91366..3617f874a727ab805b60ac307687db4f715972d4 100644 --- a/README.txt +++ b/README.txt @@ -15,6 +15,7 @@ README - NuttX Configuration Tool - Finding Selections in the Configuration Menus - Reveal Hidden Configuration Options + - Make Sure that You on on the Right Platform - Comparing Two Configurations - Incompatibilities with Older Configurations - NuttX Configuration Tool under DOS @@ -576,6 +577,38 @@ Reveal Hidden Configuration Options cannot be selected and has no value). About all you do is to select the option to see what the dependencies are. +Make Sure that You on on the Right Platform +------------------------------------------- + + Saved configurations may run on Linux, Cygwin (32- or 64-bit), or other + platforms. The platform characteristics can be changed use 'make + menuconfig'. Sometimes this can be confusing due to the differences + between the platforms. Enter sethost.sh + + sethost.sh is a simple script that changes a configuration to your + host platform. This can greatly simplify life if you use many different + configurations. For example, if you are running on Linux and you + configure like this: + + $ cd tools + $ ./configure.sh board/configuration + $ cd .. + + The you can use the following command to both (1) make sure that the + configuration is up to date, AND (2) the configuration is set up + correctly for Linux: + + $ tools/sethost.sh -l + + Or, if you are on a Windows/Cygwin 64-bit platform: + + $ tools/sethost.sh -w + + Other options are available from the help option built into the + script. You can see all options with: + + $ tools/sethost.sh -h + Comparing Two Configurations ---------------------------- @@ -948,9 +981,13 @@ Native Windows Build -------------------- The beginnings of a Windows native build are in place but still not often - used as of this writing. The windows native build logic initiated - if CONFIG_WINDOWS_NATIVE=y is defined in the NuttX configuration file: + used as of this writing. The build was functional but because of lack of + use may find some issues to be resolved with this build configuration. + + The windows native build logic initiated if CONFIG_WINDOWS_NATIVE=y is + defined in the NuttX configuration file: + This build: - Uses all Windows style paths @@ -1213,7 +1250,7 @@ nuttx/ | |- arm/ | | `- src | | `- lpc214x/README.txt - | |- sh/ + | |- renesas/ | | |- include/ | | | `-README.txt | | |- src/ diff --git a/ReleaseNotes b/ReleaseNotes index 27710f0c6b3f607aec147da1070efbfa08b375c1..66e1c712c1e652d5be08c0d5a46a525ef27ccb0a 100644 --- a/ReleaseNotes +++ b/ReleaseNotes @@ -9063,7 +9063,7 @@ detailed bugfix information): for mq_setattr() and mq_getattr(). This is necessary in protected and kernel builds because in those cases the message queue structure is protected and cannot be accessed directly from user - mode code. Noted by Jouko Holopainen. + mode code. * File Systems/Block Drivers/MTD: diff --git a/TODO b/TODO index 9d3309122dce6bd4f5433608878c1437c1dfb8f6..5372b0aec5044cb7c37a920b531f1bdfdc5ad877 100644 --- a/TODO +++ b/TODO @@ -219,7 +219,7 @@ o Task/Scheduler (sched/) Description: Task control information is retained in simple lists. This is completely appropriate for small embedded systems where the number of tasks, N, is relatively small. Most list - operations are O(N). This could become as issue if N gets + operations are O(N). This could become an issue if N gets very large. In that case, these simple lists should be replaced with @@ -819,7 +819,7 @@ o Binary loaders (binfmt/) "Read-Only Data in RAM" at http://nuttx.org/Documentation/NuttXNxFlat.html#limitations). - The newer 4.6.3compiler generated PC relative relocations to the strings: + The newer 4.6.3 compiler generated PC relative relocations to the strings: .L2: .word .LC0-(.LPIC0+4) @@ -927,8 +927,7 @@ o Network (net/, drivers/net) CONFIG_NET_NOINTS). This is really a very bad use of CPU resources; All of the network stack processing should be modified to use a work queue (and, all use of CONFIG_NET_NOINTS=n - should be eliminated). This applies to almost all Ethernet - drivers: + should be eliminated). This applies to many Ethernet drivers: ARCHITECTURE CONFIG_NET_NOINTS? ADDRESS FILTER SUPPORT? C5471 NO NO @@ -1340,6 +1339,8 @@ o Libraries (libc/) UPDATE: 2015-09-01: A fix for the noted problems with asin() has been applied. + 2016-07-30: Numerous fixes and performance improvements from + David Alessio. Status: Open Priority: Low for casual users but clearly high if you need care about @@ -1735,7 +1736,7 @@ o ARM (arch/arm/) upon return. This could be improved as well: If there is no context switch, then the static registers need not be restored because they will not be modified by the called C code. - (see arch/sh/src/sh1/sh1_vector.S for example) + (see arch/renesas/src/sh1/sh1_vector.S for example) Status: Open Priority: Low diff --git a/arch/Kconfig b/arch/Kconfig index fa5bf48edaac40ba39ebdad7f7ad75fc5d50b770..319419bb2d13e9f2781ceed045b25099104e9fbb 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -45,7 +45,7 @@ config ARCH_RGMP RTOS and GPOS on Multi-Processor (RGMP) architecture. See http://rgmp.sourceforge.net/wiki/index.php/Main_Page. -config ARCH_SH +config ARCH_RENESAS bool "Renesas" select ARCH_NOINTC select ARCH_HAVE_INTERRUPTSTACK @@ -83,23 +83,23 @@ endchoice config ARCH string - default "arm" if ARCH_ARM - default "avr" if ARCH_AVR - default "hc" if ARCH_HC - default "mips" if ARCH_MIPS - default "rgmp" if ARCH_RGMP - default "sh" if ARCH_SH - default "sim" if ARCH_SIM - default "x86" if ARCH_X86 - default "z16" if ARCH_Z16 - default "z80" if ARCH_Z80 + default "arm" if ARCH_ARM + default "avr" if ARCH_AVR + default "hc" if ARCH_HC + default "mips" if ARCH_MIPS + default "rgmp" if ARCH_RGMP + default "renesas" if ARCH_RENESAS + default "sim" if ARCH_SIM + default "x86" if ARCH_X86 + default "z16" if ARCH_Z16 + default "z80" if ARCH_Z80 source arch/arm/Kconfig source arch/avr/Kconfig source arch/hc/Kconfig source arch/mips/Kconfig source arch/rgmp/Kconfig -source arch/sh/Kconfig +source arch/renesas/Kconfig source arch/sim/Kconfig source arch/x86/Kconfig source arch/z16/Kconfig diff --git a/arch/README.txt b/arch/README.txt index 114f2f6f1e7e430067cf244458edbc5a37ffada5..bd49fb31a7c2a6b430fdb73cb1f79fd730105b2c 100644 --- a/arch/README.txt +++ b/arch/README.txt @@ -150,11 +150,13 @@ arch/arm - ARM-based micro-controllers 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/armv6-m 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 + arch/arm/src/armv7-r and arch/arm/include/armv7-r MCU support + arch/arm/include/a1x and arch/arm/src/a1x 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 @@ -210,6 +212,16 @@ arch/mips arch/mips/include/pic32mx and arch/mips/src/pic32mx arch/mips/include/pic32mz and arch/mips/src/pic32mz +arch/renesas - Support for Renesas and legacy Hitachi microcontrollers. + This include SuperH and M16C. + + Architecture Support + arch/renesas/include and arch/renesas/src/common + + MCU support + arch/renesas/include/m16c and arch/renesas/src/m16c + arch/renesas/include/sh1 and arch/renesas/src/sh1 + arch/rgmp RGMP stands for RTOS and GPOS on Multi-Processor. RGMP is a project @@ -221,15 +233,6 @@ arch/rgmp See http://rgmp.sourceforge.net/wiki/index.php/Main_Page for further information about RGMP. -arch/sh - SuperH and related Hitachi/Renesas microcontrollers - - Architecture Support - arch/sh/include and arch/sh/src/common - - 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: diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 87282302762904379c8769166c1f6c61508df6af..63af8acafc96f30946a27c8371244ff4b442e1fc 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -51,6 +51,7 @@ config ARCH_CHIP_DM320 config ARCH_CHIP_EFM32 bool "Energy Micro" select ARCH_HAVE_CMNVECTOR + select ARCH_HAVE_SPI_BITORDER select ARMV7M_CMNVECTOR ---help--- Energy Micro EFM32 microcontrollers (ARM Cortex-M). @@ -206,14 +207,15 @@ config ARCH_CHIP_SAM34 config ARCH_CHIP_SAMV7 bool "Atmel SAMV7" select ARCH_HAVE_CMNVECTOR - select ARMV7M_CMNVECTOR select ARCH_CORTEXM7 select ARCH_HAVE_MPU - select ARM_HAVE_MPU_UNIFIED select ARCH_HAVE_RAMFUNCS select ARCH_HAVE_TICKLESS - select ARMV7M_HAVE_STACKCHECK select ARCH_HAVE_I2CRESET + select ARCH_HAVE_SPI_CS_CONTROL + select ARM_HAVE_MPU_UNIFIED + select ARMV7M_CMNVECTOR + select ARMV7M_HAVE_STACKCHECK ---help--- Atmel SAMV7 (ARM Cortex-M7) architectures @@ -221,10 +223,12 @@ config ARCH_CHIP_STM32 bool "STMicro STM32 F1/F2/F3/F4" select ARCH_HAVE_CMNVECTOR select ARCH_HAVE_MPU - select ARM_HAVE_MPU_UNIFIED select ARCH_HAVE_I2CRESET select ARCH_HAVE_HEAPCHECK select ARCH_HAVE_TICKLESS + select ARCH_HAVE_TIMEKEEPING + select ARCH_HAVE_SPI_BITORDER + select ARM_HAVE_MPU_UNIFIED select ARMV7M_HAVE_STACKCHECK ---help--- STMicro STM32 architectures (ARM Cortex-M3/4). @@ -232,12 +236,13 @@ config ARCH_CHIP_STM32 config ARCH_CHIP_STM32F7 bool "STMicro STM32 F7" select ARCH_HAVE_CMNVECTOR - select ARMV7M_CMNVECTOR select ARCH_CORTEXM7 select ARCH_HAVE_MPU - select ARM_HAVE_MPU_UNIFIED select ARCH_HAVE_I2CRESET select ARCH_HAVE_HEAPCHECK + select ARCH_HAVE_SPI_BITORDER + select ARM_HAVE_MPU_UNIFIED + select ARMV7M_CMNVECTOR select ARMV7M_HAVE_STACKCHECK ---help--- STMicro STM32 architectures (ARM Cortex-M7). @@ -245,13 +250,14 @@ config ARCH_CHIP_STM32F7 config ARCH_CHIP_STM32L4 bool "STMicro STM32 L4" select ARCH_HAVE_CMNVECTOR - select ARMV7M_CMNVECTOR select ARCH_CORTEXM4 select ARCH_HAVE_MPU - select ARM_HAVE_MPU_UNIFIED select ARCH_HAVE_I2CRESET select ARCH_HAVE_HEAPCHECK select ARCH_HAVE_TICKLESS + select ARCH_HAVE_SPI_BITORDER + select ARM_HAVE_MPU_UNIFIED + select ARMV7M_CMNVECTOR select ARMV7M_HAVE_STACKCHECK ---help--- STMicro STM32 architectures (ARM Cortex-M4). diff --git a/arch/arm/include/calypso/clock.h b/arch/arm/include/calypso/clock.h index abcfde1d449d947a14904a36f100e5bfea0b95a8..a10a607a5d232d960e1f2861ef101fcab6cd42ef 100644 --- a/arch/arm/include/calypso/clock.h +++ b/arch/arm/include/calypso/clock.h @@ -1,5 +1,5 @@ -#ifndef _CALYPSO_CLK_H -#define _CALYPSO_CLK_H +#ifndef __ARCH_ARM_INCLUDE_CALYPSO_CLOCK_H +#define __ARCH_ARM_INCLUDE_CALYPSO_CLOCK_H #include @@ -64,4 +64,4 @@ void calypso_debugunit(int enable); void calypso_rhea_cfg(uint8_t fac0, uint8_t fac1, uint8_t timeout, uint8_t ws_h, uint8_t ws_l, uint8_t w_en0, uint8_t w_en1); -#endif /* _CALYPSO_CLK_H */ +#endif /* __ARCH_ARM_INCLUDE_CALYPSO_CLOCK_H */ diff --git a/arch/arm/include/calypso/debug.h b/arch/arm/include/calypso/debug.h index 8c7b9aabfbdd132ae439b765f0d4318ec31c4144..9596946775756250a5b5dd9dabef3230503dc9d7 100644 --- a/arch/arm/include/calypso/debug.h +++ b/arch/arm/include/calypso/debug.h @@ -1,5 +1,5 @@ -#ifndef _DEBUG_H -#define _DEBUG_H +#ifndef __ARCH_ARM_INCLUDE_CALYPSO_DEBUG_H +#define __ARCH_ARM_INCLUDE_CALYPSO_DEBUG_H #ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) @@ -28,4 +28,4 @@ #define printd(x, args ...) #endif -#endif /* _DEBUG_H */ +#endif /* __ARCH_ARM_INCLUDE_CALYPSO_DEBUG_H */ diff --git a/arch/arm/include/calypso/defines.h b/arch/arm/include/calypso/defines.h index 3c8732f92f8c086b825e70d7d51c980e41a79e40..4f29560c8332f41b0eba7db613b64b037921b597 100644 --- a/arch/arm/include/calypso/defines.h +++ b/arch/arm/include/calypso/defines.h @@ -1,6 +1,5 @@ - -#ifndef _DEFINES_H -#define _DEFINES_H +#ifndef __ARCH_ARM_INCLUDE_CALYPSO_DEFINES_H +#define __ARCH_ARM_INCLUDE_CALYPSO_DEFINES_H #define __attribute_const__ __attribute__((__const__)) @@ -15,4 +14,4 @@ /* force placement in zero-waitstate memory */ #define __ramtext __section(".ramtext") -#endif /* !_DEFINES_H */ +#endif /* !__ARCH_ARM_INCLUDE_CALYPSO_DEFINES_H */ diff --git a/arch/arm/include/calypso/irq.h b/arch/arm/include/calypso/irq.h index baea3de5a3f690f6b2a6411e6adfb12f03290325..0dda3f312feec579d446f491cd1b04f479fa1398 100644 --- a/arch/arm/include/calypso/irq.h +++ b/arch/arm/include/calypso/irq.h @@ -41,8 +41,8 @@ #error "This file should never be included directly! Use " #endif -#ifndef _CALYPSO_IRQ_H -#define _CALYPSO_IRQ_H +#ifndef __ARCH_ARM_INCLUDE_CALYPSO_IRQ_H +#define __ARCH_ARM_INCLUDE_CALYPSO_IRQ_H #ifndef __ASSEMBLY__ @@ -78,4 +78,4 @@ enum irq_nr { #define IRQ_SYSTIMER IRQ_TIMER2 -#endif /* _CALYPSO_IRQ_H */ +#endif /* __ARCH_ARM_INCLUDE_CALYPSO_IRQ_H */ diff --git a/arch/arm/include/calypso/memory.h b/arch/arm/include/calypso/memory.h index b0a0490cec1c3f8d44714ef9826fed115163be02..a4ce1e890ee2c57b98cdfe61e0814600cc6cc4ee 100644 --- a/arch/arm/include/calypso/memory.h +++ b/arch/arm/include/calypso/memory.h @@ -1,5 +1,5 @@ -#ifndef _MEMORY_H -#define _MEMORY_H +#ifndef __ARCH_ARM_INCLUDE_CALYPSO_MEMORY_H +#define __ARCH_ARM_INCLUDE_CALYPSO_MEMORY_H #define __arch_getb(a) (*(volatile unsigned char *)(a)) #define __arch_getw(a) (*(volatile unsigned short *)(a)) @@ -25,4 +25,4 @@ #define readw(a) __arch_getw(a) #define readl(a) __arch_getl(a) -#endif /* _MEMORY_H */ +#endif /* __ARCH_ARM_INCLUDE_CALYPSO_MEMORY_H */ diff --git a/arch/arm/include/calypso/timer.h b/arch/arm/include/calypso/timer.h index 694e4ebc92efb1d4031508354f4366f9079df243..93a1bd1492508a27af51a76edb776b175badd86b 100644 --- a/arch/arm/include/calypso/timer.h +++ b/arch/arm/include/calypso/timer.h @@ -1,5 +1,5 @@ -#ifndef _CAL_TIMER_H -#define _CAL_TIMER_H +#ifndef __ARCH_ARM_INCLUDE_CALYPSO_TIMER_H +#define __ARCH_ARM_INCLUDE_CALYPSO_TIMER_H /* Enable or Disable a timer */ void hwtimer_enable(int num, int on); @@ -22,4 +22,4 @@ void wdog_reset(void); /* power up the timers */ void hwtimer_init(void); -#endif /* _CAL_TIMER_H */ +#endif /* __ARCH_ARM_INCLUDE_CALYPSO_TIMER_H */ diff --git a/arch/arm/include/calypso/uwire.h b/arch/arm/include/calypso/uwire.h index 19a277bccb5754cb938ce3593e8abe5492936068..0ca6c376ca7c326618db38f025f4a84d531bbfa0 100644 --- a/arch/arm/include/calypso/uwire.h +++ b/arch/arm/include/calypso/uwire.h @@ -1,5 +1,5 @@ -#ifndef _CALYPSO_UWIRE_H -#define _CALYPSO_UWIRE_H +#ifndef __ARCH_ARM_INCLUDE_CALYPSO_UWIRE_H +#define __ARCH_ARM_INCLUDE_CALYPSO_UWIRE_H void uwire_init(void); int uwire_xfer(int cs, int bitlen, const void *dout, void *din); #endif diff --git a/arch/arm/include/lpc214x/irq.h b/arch/arm/include/lpc214x/irq.h index a4737c38d4bade9651ecb5304accf205dd9ae6bf..852dd0c6495f4dd1993c979bf523100b2170f650 100644 --- a/arch/arm/include/lpc214x/irq.h +++ b/arch/arm/include/lpc214x/irq.h @@ -37,8 +37,8 @@ * only indirectly through nuttx/irq.h */ -#ifndef __ARCH_LPC214X_IRQ_H -#define __ARCH_LPC214X_IRQ_H +#ifndef __ARCH_ARM_INCLUDE_LPC214X_IRQ_H +#define __ARCH_ARM_INCLUDE_LPC214X_IRQ_H /**************************************************************************** * Included Files @@ -127,5 +127,5 @@ void up_detach_vector(int vector); #endif #endif -#endif /* __ARCH_LPC214X_IRQ_H */ +#endif /* __ARCH_ARM_INCLUDE_LPC214X_IRQ_H */ diff --git a/arch/arm/include/lpc2378/irq.h b/arch/arm/include/lpc2378/irq.h index 18ef58604b737fa269dc9dbba6febcf9dab137ba..8fa2067fc970ca1be862b1967ca2e02544a32758 100644 --- a/arch/arm/include/lpc2378/irq.h +++ b/arch/arm/include/lpc2378/irq.h @@ -43,8 +43,8 @@ * only indirectly through nuttx/irq.h */ -#ifndef __ARCH_LPC2378_IRQ_H -#define __ARCH_LPC2378_IRQ_H +#ifndef __ARCH_ARM_INCLUDE_LPC2378_IRQ_H +#define __ARCH_ARM_INCLUDE_LPC2378_IRQ_H /**************************************************************************** * Included Files @@ -149,4 +149,4 @@ void up_detach_vector(int vector); #endif #endif -#endif /* __ARCH_LPC2378_IRQ_H */ +#endif /* __ARCH_ARM_INCLUDE_LPC2378_IRQ_H */ diff --git a/arch/arm/src/c5471/chip.h b/arch/arm/src/c5471/chip.h index 580ae075dcd6a8fef32e505b78ef45e2cd249253..e1f40e58d3e9999a08b232b58e0c5787cbc4e561 100644 --- a/arch/arm/src/c5471/chip.h +++ b/arch/arm/src/c5471/chip.h @@ -1,5 +1,5 @@ /**************************************************************************** - * c5471/chip.h + * arch/arm/src/c5471/chip.h * * Copyright (C) 2007 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __C5471_CHIP_H -#define __C5471_CHIP_H +#ifndef __ARCH_ARM_SRC_C5471_CHIP_H +#define __ARCH_ARM_SRC_C5471_CHIP_H /**************************************************************************** * Included Files @@ -368,4 +368,4 @@ * Public Function Prototypes ****************************************************************************/ -#endif /* __C5471_CHIP_H */ +#endif /* __ARCH_ARM_SRC_C5471_CHIP_H */ diff --git a/arch/arm/src/calypso/chip.h b/arch/arm/src/calypso/chip.h index 824fdce8935f609f55780cba31853a8859373972..bea381cc385a082fd86bb136b02e84aaa6b5615a 100644 --- a/arch/arm/src/calypso/chip.h +++ b/arch/arm/src/calypso/chip.h @@ -37,8 +37,8 @@ * ****************************************************************************/ -#ifndef __CALYPSO_CHIP_H -#define __CALYPSO_CHIP_H +#ifndef __ARCH_ARM_SRC_CALYPSO_CHIP_H +#define __ARCH_ARM_SRC_CALYPSO_CHIP_H /**************************************************************************** * Included Files @@ -208,4 +208,4 @@ * Public Function Prototypes ****************************************************************************/ -#endif /* __CALYPSO_CHIP_H */ +#endif /* __ARCH_ARM_SRC_CALYPSO_CHIP_H */ diff --git a/arch/arm/src/dm320/chip.h b/arch/arm/src/dm320/chip.h index 73e53b68317bc91e2cac994345a12ced92f3d117..20c722ab6a1e93c937833babf60d864aa003a5f5 100644 --- a/arch/arm/src/dm320/chip.h +++ b/arch/arm/src/dm320/chip.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __DM320_CHIP_H -#define __DM320_CHIP_H +#ifndef __ARCH_ARM_SRC_DM320_CHIP_H +#define __ARCH_ARM_SRC_DM320_CHIP_H /************************************************************************************ * Included Files @@ -58,4 +58,4 @@ * Inline Functions ************************************************************************************/ -#endif /* __DM320_CHIP_H */ +#endif /* __ARCH_ARM_SRC_DM320_CHIP_H */ diff --git a/arch/arm/src/dm320/dm320_emif.h b/arch/arm/src/dm320/dm320_emif.h index 653e20fe0d5532f4970971a19b48e8e653e0630f..72d4e8947dc5d29d88f91016da5622ac8ca4cf4a 100644 --- a/arch/arm/src/dm320/dm320_emif.h +++ b/arch/arm/src/dm320/dm320_emif.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __DM320_DM320_EMIF_H -#define __DM320_DM320_EMIF_H +#ifndef __ARCH_ARM_SRC_DM320_DM320_EMIF_H +#define __ARCH_ARM_SRC_DM320_DM320_EMIF_H /************************************************************************************ * Included Files @@ -105,4 +105,4 @@ #endif -#endif /* __DM320_DM320_EMIF_H */ +#endif /* __ARCH_ARM_SRC_DM320_DM320_EMIF_H */ diff --git a/arch/arm/src/dm320/dm320_gio.h b/arch/arm/src/dm320/dm320_gio.h index 136e96118ce096717dda1ae61ba41fe3dbecd496..5c0fdc73c3b9f9efa0f740cda30ca9e4dd2d4fbd 100644 --- a/arch/arm/src/dm320/dm320_gio.h +++ b/arch/arm/src/dm320/dm320_gio.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __DM320_DM320GIO_H -#define __DM320_DM320GIO_H +#ifndef __ARCH_ARM_SRC_DM320_DM320_GIO_H +#define __ARCH_ARM_SRC_DM320_DM320_GIO_H /************************************************************************************ * Included Files diff --git a/arch/arm/src/dm320/dm320_intc.h b/arch/arm/src/dm320/dm320_intc.h index f05febb2f953ac5a118f0e6e5f23da64700cf27c..57bc5c1f346d0e90bbaa54f3e133a3dd9f5052f0 100644 --- a/arch/arm/src/dm320/dm320_intc.h +++ b/arch/arm/src/dm320/dm320_intc.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __DM320_DM320_INTC_H -#define __DM320_DM320_INTC_H +#ifndef __ARCH_ARM_SRC_DM320_DM320_INTC_H +#define __ARCH_ARM_SRC_DM320_DM320_INTC_H /************************************************************************************ * Included Files @@ -98,4 +98,4 @@ #endif -#endif /* __DM320_DM320_INTC_H */ +#endif /* __ARCH_ARM_SRC_DM320_DM320_INTC_H */ diff --git a/arch/arm/src/dm320/dm320_memorymap.h b/arch/arm/src/dm320/dm320_memorymap.h index 67923b1507403702bb105d53b86f023431882150..a5db5963615fee61d2d1a6807db12962c9e1dff5 100644 --- a/arch/arm/src/dm320/dm320_memorymap.h +++ b/arch/arm/src/dm320/dm320_memorymap.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __DM320_MEMORYMAP_H -#define __DM320_MEMORYMAP_H +#ifndef __ARCH_ARM_SRC_DM320_DM320_MEMORYMAP_H +#define __ARCH_ARM_SRC_DM320_DM320_MEMORYMAP_H /************************************************************************************ * Included Files @@ -261,4 +261,4 @@ #endif -#endif /* __DM320_MEMORYMAP_H */ +#endif /* __ARCH_ARM_SRC_DM320_DM320_MEMORYMAP_H */ diff --git a/arch/arm/src/dm320/dm320_timer.h b/arch/arm/src/dm320/dm320_timer.h index 2ef40790673b0e4e2a90cc2f6bf2641973d14c5e..5b1830b98c7f975f6d486509179942f69a5ad085 100644 --- a/arch/arm/src/dm320/dm320_timer.h +++ b/arch/arm/src/dm320/dm320_timer.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __DM320_TIMER_H -#define __DM320_TIMER_H +#ifndef __ARCH_ARM_SRC_DM320_DM320_TIMER_H +#define __ARCH_ARM_SRC_DM320_DM320_TIMER_H /************************************************************************************ * Included Files @@ -105,4 +105,4 @@ #endif -#endif /* __DM320_TIMER_H */ +#endif /* __ARCH_ARM_SRC_DM320_DM320_TIMER_H */ diff --git a/arch/arm/src/dm320/dm320_uart.h b/arch/arm/src/dm320/dm320_uart.h index d668489412075518199c52a170475331f8e97dfd..af9c1df91f8ff4001dd187c3194681e9d4a6661e 100644 --- a/arch/arm/src/dm320/dm320_uart.h +++ b/arch/arm/src/dm320/dm320_uart.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __DM320_UART_H -#define __DM320_UART_H +#ifndef __ARCH_ARM_SRC_DM320_DM320_UART_H +#define __ARCH_ARM_SRC_DM320_DM320_UART_H /************************************************************************************ * Included Files @@ -173,4 +173,4 @@ * Inline Functions ************************************************************************************/ -#endif /* __DM320_UART_H */ +#endif /* __ARCH_ARM_SRC_DM320_DM320_UART_H */ diff --git a/arch/arm/src/efm32/efm32_spi.c b/arch/arm/src/efm32/efm32_spi.c index c4dbb3b282d9cf926688eae0b9d0a30e8946095b..0bf2c31a86a6a07b9d9be971e70d93aa204232e2 100644 --- a/arch/arm/src/efm32/efm32_spi.c +++ b/arch/arm/src/efm32/efm32_spi.c @@ -185,6 +185,10 @@ static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency); 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); +#ifdef CONFIG_SPI_HWFEATURES +static int spi_hwfeatures(FAR struct spi_dev_s *dev, + spi_hwfeatures_t features); +#endif static uint8_t spi_status(struct spi_dev_s *dev, enum spi_dev_e devid); #ifdef CONFIG_SPI_CMDDATA static int spi_cmddata(struct spi_dev_s *dev, enum spi_dev_e devid, @@ -218,7 +222,7 @@ static const struct spi_ops_s g_spiops = .setmode = spi_setmode, .setbits = spi_setbits, #ifdef CONFIG_SPI_HWFEATURES - .hwfeatures = 0, + .hwfeatures = spi_hwfeatures, #endif .status = spi_status, #ifdef CONFIG_SPI_CMDDATA @@ -976,47 +980,16 @@ static void spi_setbits(struct spi_dev_s *dev, int nbits) const struct efm32_spiconfig_s *config; uint32_t regval; uint32_t setting; - bool lsbfirst; spiinfo("nbits=%d\n", nbits); DEBUGASSERT(priv && priv->config); config = priv->config; - /* Bit order is encoded by the sign of nbits */ + /* Has the number of bits changed? */ - if (nbits < 0) + if (nbits != priv->nbits) { - /* LSB first */ - - lsbfirst = true; - nbits = -nbits; - } - else - { - /* MSH first */ - - lsbfirst = false; - } - - /* Has the number of bits or the bit order changed? */ - - if (nbits != priv->nbits || lsbfirst != priv->lsbfirst) - { - /* Set the new bit order */ - - regval = spi_getreg(config, EFM32_USART_CTRL_OFFSET); - if (lsbfirst) - { - regval &= ~USART_CTRL_MSBF; - } - else - { - regval |= USART_CTRL_MSBF; - } - - spi_putreg(config, EFM32_USART_CTRL_OFFSET, regval); - /* Select the new number of bits */ switch (nbits) @@ -1086,10 +1059,77 @@ static void spi_setbits(struct spi_dev_s *dev, int nbits) * faster */ - priv->nbits = nbits; + priv->nbits = nbits; + } +} + +/**************************************************************************** + * Name: spi_hwfeatures + * + * Description: + * Set hardware-specific feature flags. + * + * Input Parameters: + * dev - Device-specific state data + * features - H/W feature flags + * + * Returned Value: + * Zero (OK) if the selected H/W features are enabled; A negated errno + * value if any H/W feature is not supportable. + * + ****************************************************************************/ + +#ifdef CONFIG_SPI_HWFEATURES +static int spi_hwfeatures(FAR struct spi_dev_s *dev, spi_hwfeatures_t features) +{ +#ifdef CONFIG_SPI_BITORDER + struct efm32_spidev_s *priv = (struct efm32_spidev_s *)dev; + const struct efm32_spiconfig_s *config; + uint32_t regval; + bool lsbfirst; + + spiinfo("features=%08x\n", features); + + DEBUGASSERT(priv && priv->config); + config = priv->config; + + /* Bit order is encoded by the sign of nbits */ + + lsbfirst = ((features & HWFEAT_LSBFIRST) != 0); + + /* Has the number of bits or the bit order changed? */ + + if (lsbfirst != priv->lsbfirst) + { + /* Set the new bit order */ + + regval = spi_getreg(config, EFM32_USART_CTRL_OFFSET); + if (lsbfirst) + { + regval &= ~USART_CTRL_MSBF; + } + else + { + regval |= USART_CTRL_MSBF; + } + + spi_putreg(config, EFM32_USART_CTRL_OFFSET, regval); + + /* Save the selection so the subsequence re-configurations will be + * faster + */ + priv->lsbfirst = lsbfirst; } + + /* Other H/W features are not supported */ + + return ((features & ~HWFEAT_LSBFIRST) == 0) ? OK : -ENOSYS; +#else + return -ENOSYS; +#endif } +#endif /**************************************************************************** * Name: spi_status diff --git a/arch/arm/src/kinetis/Kconfig b/arch/arm/src/kinetis/Kconfig index 853de44c7dbfdb031f0ee5e4db531de40b2b991d..17923818b5a495dcba8bbe649f1b1e223b47f1cd 100644 --- a/arch/arm/src/kinetis/Kconfig +++ b/arch/arm/src/kinetis/Kconfig @@ -37,94 +37,130 @@ config ARCH_CHIP_MK20DX128VLH5 config ARCH_CHIP_MK20DX64VLH7 bool "MK20DX64VLH7" select ARCH_FAMILY_K20 + select KINETIS_HAVE_I2C1 config ARCH_CHIP_MK20DX128VLH7 bool "MK20DX128VLH7" select ARCH_FAMILY_K20 + select KINETIS_HAVE_I2C1 config ARCH_CHIP_MK20DX256VLH7 bool "MK20DX256VLH7" select ARCH_FAMILY_K20 + select KINETIS_HAVE_I2C1 config ARCH_CHIP_MK40N512VLQ100 bool "MK40N512VLQ100" select ARCH_FAMILY_K40 + select KINETIS_HAVE_I2C1 config ARCH_CHIP_MK40N512VMD100 bool "MK40N512VMD100" select ARCH_FAMILY_K40 + select KINETIS_HAVE_I2C1 config ARCH_CHIP_MK40X128VLQ100 bool "MK40X128VLQ100" select ARCH_FAMILY_K40 + select KINETIS_HAVE_I2C1 config ARCH_CHIP_MK40X128VMD100 bool "MK40X128VMD100" select ARCH_FAMILY_K40 + select KINETIS_HAVE_I2C1 config ARCH_CHIP_MK40X256VLQ100 bool "MK40X256VLQ100" select ARCH_FAMILY_K40 + select KINETIS_HAVE_I2C1 config ARCH_CHIP_MK40X256VMD100 bool "MK40X256VMD100" select ARCH_FAMILY_K40 + select KINETIS_HAVE_I2C1 config ARCH_CHIP_MK60N256VLQ100 bool "MK60N256VLQ100" select ARCH_FAMILY_K60 + select KINETIS_HAVE_I2C1 config ARCH_CHIP_MK60N256VMD100 bool "MK60N256VMD100" select ARCH_FAMILY_K60 + select KINETIS_HAVE_I2C1 + select KINETIS_HAVE_I2C2 config ARCH_CHIP_MK60N512VLL100 bool "MK60N512VLL100" select ARCH_FAMILY_K60 + select KINETIS_HAVE_I2C1 + select KINETIS_HAVE_I2C2 config ARCH_CHIP_MK60N512VLQ100 bool "MK60N512VLQ100" select ARCH_FAMILY_K60 + select KINETIS_HAVE_I2C1 + select KINETIS_HAVE_I2C2 config ARCH_CHIP_MK60N512VMD100 bool "MK60N512VMD100" select ARCH_FAMILY_K60 + select KINETIS_HAVE_I2C1 + select KINETIS_HAVE_I2C2 config ARCH_CHIP_MK60X256VLQ100 bool "MK60X256VLQ100" select ARCH_FAMILY_K60 + select KINETIS_HAVE_I2C1 + select KINETIS_HAVE_I2C2 config ARCH_CHIP_MK60X256VMD100 bool "MK60X256VMD100" select ARCH_FAMILY_K60 + select KINETIS_HAVE_I2C1 + select KINETIS_HAVE_I2C2 config ARCH_CHIP_MK64FN1M0VLL12 bool "MK64FN1M0VLL12" select ARCH_FAMILY_K64 + select KINETIS_HAVE_I2C1 + select KINETIS_HAVE_I2C2 config ARCH_CHIP_MK64FX512VLL12 bool "MK64FX512VLL12" select ARCH_FAMILY_K64 + select KINETIS_HAVE_I2C1 + select KINETIS_HAVE_I2C2 config ARCH_CHIP_MK64FX512VDC12 bool "MK64FX512VDC12" select ARCH_FAMILY_K64 + select KINETIS_HAVE_I2C1 + select KINETIS_HAVE_I2C2 config ARCH_CHIP_MK64FN1M0VDC12 bool "MK64FN1M0VDC12" select ARCH_FAMILY_K64 + select KINETIS_HAVE_I2C1 + select KINETIS_HAVE_I2C2 config ARCH_CHIP_MK64FX512VLQ12 bool "MK64FX512VLQ12" select ARCH_FAMILY_K64 + select KINETIS_HAVE_I2C1 + select KINETIS_HAVE_I2C2 config ARCH_CHIP_MK64FX512VMD12 bool "MK64FX512VMD12" select ARCH_FAMILY_K64 + select KINETIS_HAVE_I2C1 + select KINETIS_HAVE_I2C2 config ARCH_CHIP_MK64FN1M0VMD12 bool "MK64FN1M0VMD12" select ARCH_FAMILY_K64 + select KINETIS_HAVE_I2C1 + select KINETIS_HAVE_I2C2 endchoice @@ -148,6 +184,14 @@ config ARCH_FAMILY_K64 menu "Kinetis Peripheral Support" +config KINETIS_HAVE_I2C1 + bool + default n + +config KINETIS_HAVE_I2C2 + bool + default n + config KINETIS_TRACE bool "Trace" default n @@ -255,12 +299,23 @@ config KINETIS_SPI2 config KINETIS_I2C0 bool "I2C0" default n + select I2C ---help--- Support I2C0 config KINETIS_I2C1 bool "I2C1" default n + select I2C + depends on KINETIS_HAVE_I2C1 + ---help--- + Support I2C1 + +config KINETIS_I2C2 + bool "I2C2" + default n + select I2C + depends on KINETIS_HAVE_I2C2 ---help--- Support I2C1 @@ -418,6 +473,9 @@ config KINETIS_PIT endmenu +menu "Kinetis FTM PWM Configuration" + depends on KINETIS_FTM0 || KINETIS_FTM1 || KINETIS_FTM2 + config KINETIS_FTM0_PWM bool "FTM0 PWM" default n @@ -481,6 +539,8 @@ config KINETIS_FTM2_CHANNEL If FTM2 is enabled for PWM usage, you also need specifies the timer output channel {0,..,1} +endmenu # Kinetis FTM PWM Configuration + menu "Kinetis GPIO Interrupt Configuration" config KINETIS_GPIOIRQ diff --git a/arch/arm/src/kinetis/Make.defs b/arch/arm/src/kinetis/Make.defs index 9d4ea5083abd5ff9a12a6f018de7dd1b3d62233d..bb7f54d87bb7b7530c675a2df9142134268e9c97 100644 --- a/arch/arm/src/kinetis/Make.defs +++ b/arch/arm/src/kinetis/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/kinetis/Make.defs # -# 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 @@ -131,6 +131,14 @@ ifeq ($(CONFIG_PWM),y) CHIP_CSRCS += kinetis_pwm.c endif +ifeq ($(CONFIG_I2C),y) +CHIP_CSRCS += kinetis_i2c.c +endif + +ifeq ($(CONFIG_RTC),y) +CHIP_CSRCS += kinetis_rtc.c +endif + ifeq ($(CONFIG_NET),y) ifeq ($(CONFIG_KINETIS_ENET),y) CHIP_CSRCS += kinetis_enet.c diff --git a/arch/arm/src/kinetis/chip/kinetis_i2c.h b/arch/arm/src/kinetis/chip/kinetis_i2c.h index 94d071727b36e6625a1523b0eeb4d0bae2421bff..71f7624a46bd12943fa24f53f4f0e5ae849b839c 100644 --- a/arch/arm/src/kinetis/chip/kinetis_i2c.h +++ b/arch/arm/src/kinetis/chip/kinetis_i2c.h @@ -78,31 +78,35 @@ #define KINETIS_I2C0_SLTH (KINETIS_I2C0_BASE+KINETIS_I2C_SLTH_OFFSET) #define KINETIS_I2C0_SLTL (KINETIS_I2C0_BASE+KINETIS_I2C_SLTL_OFFSET) -#define KINETIS_I2C1_A1 (KINETIS_I2C1_BASE+KINETIS_I2C_A1_OFFSET) -#define KINETIS_I2C1_F (KINETIS_I2C1_BASE+KINETIS_I2C_F_OFFSET) -#define KINETIS_I2C1_C1 (KINETIS_I2C1_BASE+KINETIS_I2C_C1_OFFSET) -#define KINETIS_I2C1_S (KINETIS_I2C1_BASE+KINETIS_I2C_S_OFFSET) -#define KINETIS_I2C1_D (KINETIS_I2C1_BASE+KINETIS_I2C_D_OFFSET) -#define KINETIS_I2C1_C2 (KINETIS_I2C1_BASE+KINETIS_I2C_C2_OFFSET) -#define KINETIS_I2C1_FLT (KINETIS_I2C1_BASE+KINETIS_I2C_FLT_OFFSET) -#define KINETIS_I2C1_RA (KINETIS_I2C1_BASE+KINETIS_I2C_RA_OFFSET) -#define KINETIS_I2C1_SMB (KINETIS_I2C1_BASE+KINETIS_I2C_SMB_OFFSET) -#define KINETIS_I2C1_A2 (KINETIS_I2C1_BASE+KINETIS_I2C_A2_OFFSET) -#define KINETIS_I2C1_SLTH (KINETIS_I2C1_BASE+KINETIS_I2C_SLTH_OFFSET) -#define KINETIS_I2C1_SLTL (KINETIS_I2C1_BASE+KINETIS_I2C_SLTL_OFFSET) - -#define KINETIS_I2C2_A1 (KINETIS_I2C2_BASE+KINETIS_I2C_A1_OFFSET) -#define KINETIS_I2C2_F (KINETIS_I2C2_BASE+KINETIS_I2C_F_OFFSET) -#define KINETIS_I2C2_C1 (KINETIS_I2C2_BASE+KINETIS_I2C_C1_OFFSET) -#define KINETIS_I2C2_S (KINETIS_I2C2_BASE+KINETIS_I2C_S_OFFSET) -#define KINETIS_I2C2_D (KINETIS_I2C2_BASE+KINETIS_I2C_D_OFFSET) -#define KINETIS_I2C2_C2 (KINETIS_I2C2_BASE+KINETIS_I2C_C2_OFFSET) -#define KINETIS_I2C2_FLT (KINETIS_I2C2_BASE+KINETIS_I2C_FLT_OFFSET) -#define KINETIS_I2C2_RA (KINETIS_I2C2_BASE+KINETIS_I2C_RA_OFFSET) -#define KINETIS_I2C2_SMB (KINETIS_I2C2_BASE+KINETIS_I2C_SMB_OFFSET) -#define KINETIS_I2C2_A2 (KINETIS_I2C2_BASE+KINETIS_I2C_A2_OFFSET) -#define KINETIS_I2C2_SLTH (KINETIS_I2C2_BASE+KINETIS_I2C_SLTH_OFFSET) -#define KINETIS_I2C2_SLTL (KINETIS_I2C2_BASE+KINETIS_I2C_SLTL_OFFSET) +#ifdef CONFIG_KINETIS_HAVE_I2C1 +# define KINETIS_I2C1_A1 (KINETIS_I2C1_BASE+KINETIS_I2C_A1_OFFSET) +# define KINETIS_I2C1_F (KINETIS_I2C1_BASE+KINETIS_I2C_F_OFFSET) +# define KINETIS_I2C1_C1 (KINETIS_I2C1_BASE+KINETIS_I2C_C1_OFFSET) +# define KINETIS_I2C1_S (KINETIS_I2C1_BASE+KINETIS_I2C_S_OFFSET) +# define KINETIS_I2C1_D (KINETIS_I2C1_BASE+KINETIS_I2C_D_OFFSET) +# define KINETIS_I2C1_C2 (KINETIS_I2C1_BASE+KINETIS_I2C_C2_OFFSET) +# define KINETIS_I2C1_FLT (KINETIS_I2C1_BASE+KINETIS_I2C_FLT_OFFSET) +# define KINETIS_I2C1_RA (KINETIS_I2C1_BASE+KINETIS_I2C_RA_OFFSET) +# define KINETIS_I2C1_SMB (KINETIS_I2C1_BASE+KINETIS_I2C_SMB_OFFSET) +# define KINETIS_I2C1_A2 (KINETIS_I2C1_BASE+KINETIS_I2C_A2_OFFSET) +# define KINETIS_I2C1_SLTH (KINETIS_I2C1_BASE+KINETIS_I2C_SLTH_OFFSET) +# define KINETIS_I2C1_SLTL (KINETIS_I2C1_BASE+KINETIS_I2C_SLTL_OFFSET) +#endif + +#ifdef CONFIG_KINETIS_HAVE_I2C2 +# define KINETIS_I2C2_A1 (KINETIS_I2C2_BASE+KINETIS_I2C_A1_OFFSET) +# define KINETIS_I2C2_F (KINETIS_I2C2_BASE+KINETIS_I2C_F_OFFSET) +# define KINETIS_I2C2_C1 (KINETIS_I2C2_BASE+KINETIS_I2C_C1_OFFSET) +# define KINETIS_I2C2_S (KINETIS_I2C2_BASE+KINETIS_I2C_S_OFFSET) +# define KINETIS_I2C2_D (KINETIS_I2C2_BASE+KINETIS_I2C_D_OFFSET) +# define KINETIS_I2C2_C2 (KINETIS_I2C2_BASE+KINETIS_I2C_C2_OFFSET) +# define KINETIS_I2C2_FLT (KINETIS_I2C2_BASE+KINETIS_I2C_FLT_OFFSET) +# define KINETIS_I2C2_RA (KINETIS_I2C2_BASE+KINETIS_I2C_RA_OFFSET) +# define KINETIS_I2C2_SMB (KINETIS_I2C2_BASE+KINETIS_I2C_SMB_OFFSET) +# define KINETIS_I2C2_A2 (KINETIS_I2C2_BASE+KINETIS_I2C_A2_OFFSET) +# define KINETIS_I2C2_SLTH (KINETIS_I2C2_BASE+KINETIS_I2C_SLTH_OFFSET) +# define KINETIS_I2C2_SLTL (KINETIS_I2C2_BASE+KINETIS_I2C_SLTL_OFFSET) +#endif /* Register Bit Definitions *****************************************************************/ @@ -115,12 +119,90 @@ #define I2C_F_ICR_SHIFT (0) /* Bits 0-5: Clock rate */ #define I2C_F_ICR_MASK (0x3f << I2C_F_ICR_SHIFT) +# define I2C_F_ICR(n) ((uint8_t)(n) << I2C_F_ICR_SHIFT) #define I2C_F_MULT_SHIFT (6) /* Bits 6-7: Multiplier factor */ #define I2C_F_MULT_MASK (3 << I2C_F_MULT_SHIFT) # define I2C_F_MULT_1 (0 << I2C_F_MULT_SHIFT) # define I2C_F_MULT_2 (1 << I2C_F_MULT_SHIFT) # define I2C_F_MULT_4 (2 << I2C_F_MULT_SHIFT) +/* From Table 51-54. I2C divider and hold values. Duplicate divider values differ in hold + * times. Refer to the Table 51-54. in the K64 Sub-Family Reference Manual. + */ + +#define I2C_F_DIV20 ((uint8_t)0x00) +#define I2C_F_DIV22 ((uint8_t)0x01) +#define I2C_F_DIV24 ((uint8_t)0x02) +#define I2C_F_DIV26 ((uint8_t)0x03) +#define I2C_F_DIV28 ((uint8_t)0x04) +#define I2C_F_DIV30 ((uint8_t)0x05) +#define I2C_F_DIV34 ((uint8_t)0x06) +#define I2C_F_DIV36 ((uint8_t)0x0a) +#define I2C_F_DIV40_1 ((uint8_t)0x07) +#define I2C_F_DIV41 ((uint8_t)0x08) + +#define I2C_F_DIV32 ((uint8_t)0x09) +#define I2C_F_DIV36 ((uint8_t)0x0a) +#define I2C_F_DIV40_2 ((uint8_t)0x0b) +#define I2C_F_DIV44 ((uint8_t)0x0c) +#define I2C_F_DIV48_1 ((uint8_t)0x0d) +#define I2C_F_DIV56_1 ((uint8_t)0x0e) +#define I2C_F_DIV68 ((uint8_t)0x0f) + +#define I2C_F_DIV48_2 ((uint8_t)0x10) +#define I2C_F_DIV56_2 ((uint8_t)0x11) +#define I2C_F_DIV64 ((uint8_t)0x12) +#define I2C_F_DIV72 ((uint8_t)0x13) +#define I2C_F_DIV80_1 ((uint8_t)0x14) +#define I2C_F_DIV88 ((uint8_t)0x15) +#define I2C_F_DIV104 ((uint8_t)0x16) +#define I2C_F_DIV128_1 ((uint8_t)0x17) + +#define I2C_F_DIV80_2 ((uint8_t)0x18) +#define I2C_F_DIV96 ((uint8_t)0x19) +#define I2C_F_DIV112 ((uint8_t)0x1a) +#define I2C_F_DIV128_2 ((uint8_t)0x1b) +#define I2C_F_DIV144 ((uint8_t)0x1c) +#define I2C_F_DIV160_1 ((uint8_t)0x1d) +#define I2C_F_DIV192_1 ((uint8_t)0x1e) +#define I2C_F_DIV240 ((uint8_t)0x1f) + +#define I2C_F_DIV160_2 ((uint8_t)0x20) +#define I2C_F_DIV192_2 ((uint8_t)0x1e) +#define I2C_F_DIV224 ((uint8_t)0x22) +#define I2C_F_DIV256 ((uint8_t)0x23) +#define I2C_F_DIV288 ((uint8_t)0x24) +#define I2C_F_DIV320_1 ((uint8_t)0x25) +#define I2C_F_DIV384_1 ((uint8_t)0x26) +#define I2C_F_DIV480 ((uint8_t)0x27) + +#define I2C_F_DIV320_2 ((uint8_t)0x28) +#define I2C_F_DIV384_2 ((uint8_t)0x29) +#define I2C_F_DIV448 ((uint8_t)0x2a) +#define I2C_F_DIV512 ((uint8_t)0x2b) +#define I2C_F_DIV576 ((uint8_t)0x2c) +#define I2C_F_DIV640_1 ((uint8_t)0x2d) +#define I2C_F_DIV768_1 ((uint8_t)0x2e) +#define I2C_F_DIV960 ((uint8_t)0x2f) + +#define I2C_F_DIV640_2 ((uint8_t)0x30) +#define I2C_F_DIV768_3 ((uint8_t)0x31) +#define I2C_F_DIV896 ((uint8_t)0x32) +#define I2C_F_DIV1024 ((uint8_t)0x33) +#define I2C_F_DIV1152 ((uint8_t)0x34) +#define I2C_F_DIV1280_1 ((uint8_t)0x35) +#define I2C_F_DIV1536_1 ((uint8_t)0x36) +#define I2C_F_DIV1920 ((uint8_t)0x37) + +#define I2C_F_DIV1280_2 ((uint8_t)0x38) +#define I2C_F_DIV1536_2 ((uint8_t)0x39) +#define I2C_F_DIV1792 ((uint8_t)0x3a) +#define I2C_F_DIV2048 ((uint8_t)0x3b) +#define I2C_F_DIV2304 ((uint8_t)0x3c) +#define I2C_F_DIV2560 ((uint8_t)0x3d) +#define I2C_F_DIV3072 ((uint8_t)0x3e) +#define I2C_F_DIV3840 ((uint8_t)0x3f) + /* I2C Control Register 1 (8-bit) */ #define I2C_C1_DMAEN (1 << 0) /* Bit 0: DMA enable */ @@ -149,6 +231,7 @@ #define I2C_C2_AD_SHIFT (0) /* Bits 0-2: Slave address */ #define I2C_C2_AD_MASK (7 << I2C_C2_AD_SHIFT) +# define I2C_C2_AD(n) ((uint8_t)(n) << I2C_C2_AD_SHIFT) #define I2C_C2_RMEN (1 << 3) /* Bit 3: Range address matching enable */ #define I2C_C2_SBRC (1 << 4) /* Bit 4: Slave baud rate control */ #define I2C_C2_HDRS (1 << 5) /* Bit 5: High drive select */ @@ -156,9 +239,23 @@ #define I2C_C2_GCAEN (1 << 7) /* Bit 7: General call address enable */ /* I2C Programmable Input Glitch Filter register (8-bit) */ + +#if defined(KINETIS_K20) || defined(KINETIS_K40) || defined(KINETIS_K60) +# define I2C_FLT_SHIFT (0) /* Bits 0-4: I2C programmable filter factor */ +# define I2C_FLT_MASK (31 << I2C_FLT_SHIFT) +# define I2C_FLT(n) ((uint8_t)(n) << I2C_FLT_SHIFT) /* Bits 5-7: Reserved */ -#define I2C_FLT_SHIFT (0) /* Bits 0-4: I2C programmable filter factor */ -#define I2C_FLT_MASK (31 << I2C_FLT_SHIFT) +#endif + +#ifdef KINETIS_K64 +# define I2C_FLT_SHIFT (0) /* Bits 0-3: I2C programmable filter factor */ +# define I2C_FLT_MASK (15 << I2C_FLT_SHIFT) +# define I2C_FLT(n) ((uint8_t)(n) << I2C_FLT_SHIFT) +# define I2C_FLT_STARTF (1 << 4) /* I2C bus start detect flag */ +# define I2C_FLT_SSIE (1 << 5) /* I2C bus stop or start interrupt enable */ +# define I2C_FLT_STOPF (1 << 6) /* I2C bus stop detect flag */ +# define I2C_FLT_SHEN (1 << 7) /* Stop hold enable */ +#endif /* I2C Range Address register (8-bit) */ /* Bit 0: Reserved */ diff --git a/arch/arm/src/kinetis/chip/kinetis_rtc.h b/arch/arm/src/kinetis/chip/kinetis_rtc.h index d00c02a6974d9ecd76e138a23677aaad98fd3f0c..948c6ce87719dc21176d860fcf13fdec5270bc0b 100644 --- a/arch/arm/src/kinetis/chip/kinetis_rtc.h +++ b/arch/arm/src/kinetis/chip/kinetis_rtc.h @@ -59,7 +59,7 @@ #define KINETIS_RTC_CR_OFFSET 0x0010 /* RTC Control Register */ #define KINETIS_RTC_SR_OFFSET 0x0014 /* RTC Status Register */ #define KINETIS_RTC_LR_OFFSET 0x0018 /* RTC Lock Register */ -#if defined(KINETIS_K40) || defined(KINETIS_K64) +#if defined(KINETIS_K20) || defined(KINETIS_K40) || defined(KINETIS_K64) # define KINETIS_RTC_IER_OFFSET 0x001c /* RTC Interrupt Enable Register (K40) */ #endif #ifdef KINETIS_K60 @@ -77,7 +77,7 @@ #define KINETIS_RTC_CR (KINETIS_RTC_BASE+KINETIS_RTC_CR_OFFSET) #define KINETIS_RTC_SR (KINETIS_RTC_BASE+KINETIS_RTC_SR_OFFSET) #define KINETIS_RTC_LR (KINETIS_RTC_BASE+KINETIS_RTC_LR_OFFSET) -#if defined(KINETIS_K40) || defined(KINETIS_K64) +#if defined(KINETIS_K20) || defined(KINETIS_K40) || defined(KINETIS_K64) # define KINETIS_RTC_IER (KINETIS_RTC_BASE+KINETIS_RTC_IER_OFFSET) #endif #ifdef KINETIS_K60 @@ -135,13 +135,13 @@ #define RTC_LR_TCL (1 << 3) /* Bit 3: Time Compensation Lock */ #define RTC_LR_CRL (1 << 4) /* Bit 4: Control Register Lock */ #define RTC_LR_SRL (1 << 5) /* Bit 5: Status Register Lock */ -#ifdef KINETIS_K40 +#if defined(KINETIS_K20) || defined(KINETIS_K40) # define RTC_LR_LRL (1 << 6) /* Bit 6: Lock Register Lock (K40) */ #endif /* Bits 7-31: Reserved */ /* RTC Interrupt Enable Register (32-bits, K40) */ -#if defined(KINETIS_K40) || defined(KINETIS_K64) +#if defined(KINETIS_K20) || defined(KINETIS_K40) || defined(KINETIS_K64) # define RTC_IER_TIIE (1 << 0) /* Bit 0: Time Invalid Interrupt Enable */ # define RTC_IER_TOIE (1 << 1) /* Bit 1: Time Overflow Interrupt Enable */ # define RTC_IER_TAIE (1 << 2) /* Bit 2: Time Alarm Interrupt Enable */ diff --git a/arch/arm/src/kinetis/kinetis_alarm.h b/arch/arm/src/kinetis/kinetis_alarm.h new file mode 100644 index 0000000000000000000000000000000000000000..751cfd8cf059b6f5669a090563b478da97931de8 --- /dev/null +++ b/arch/arm/src/kinetis/kinetis_alarm.h @@ -0,0 +1,113 @@ +/**************************************************************************** + * arch/arm/src/kinetis/kinetis_alarm.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Matias v01d + * + * 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_ALARM_H +#define __ARCH_ARM_SRC_KINETIS_ALARM_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include "chip.h" + +#ifdef CONFIG_RTC_ALARM + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +#ifndef __ASSEMBLY__ + +/* The form of an alarm callback */ + +typedef CODE void (*alarmcb_t)(void); + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Name: kinetis_rtc_setalarm + * + * Description: + * Set up an alarm. + * + * Input Parameters: + * tp - the time to set the alarm + * callback - the function to call when the alarm expires. + * + * Returned Value: + * Zero (OK) on success; a negated errno on failure + * + ****************************************************************************/ + +struct timespec; +int kinetis_rtc_setalarm(FAR const struct timespec *tp, alarmcb_t callback); + +/**************************************************************************** + * Name: kinetis_rtc_cancelalarm + * + * Description: + * Cancel a pending alarm alarm + * + * Input Parameters: + * none + * + * Returned Value: + * Zero (OK) on success; a negated errno on failure + * + ****************************************************************************/ + +int kinetis_rtc_cancelalarm(void); + +#undef EXTERN +#if defined(__cplusplus) +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* CONFIG_RTC_ALARM */ +#endif /* __ARCH_ARM_SRC_KINETIS_ALARM_H */ diff --git a/arch/arm/src/kinetis/kinetis_i2c.c b/arch/arm/src/kinetis/kinetis_i2c.c new file mode 100644 index 0000000000000000000000000000000000000000..1713bdbbb1d64d7f326620d83d97c6418867fbbe --- /dev/null +++ b/arch/arm/src/kinetis/kinetis_i2c.c @@ -0,0 +1,1151 @@ +/**************************************************************************** + * arch/arm/src/kinetis/kinetis_i2c.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Matias v01d + * + * 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 "chip.h" +#include "up_arch.h" +#include "up_internal.h" + +#include "kinetis_config.h" +#include "chip.h" +#include "chip/kinetis_i2c.h" +#include "chip/kinetis_sim.h" +#include "chip/kinetis_pinmux.h" +#include "kinetis.h" +#include "kinetis_i2c.h" + +#if defined(CONFIG_KINETIS_I2C0) || defined(CONFIG_KINETIS_I2C1) || \ + defined(CONFIG_KINETIS_I2C2) + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define I2C_TIMEOUT (20*1000/CONFIG_USEC_PER_TICK) /* 20 mS */ + +#define I2C_DEFAULT_FREQUENCY 400000 + +#define STATE_OK 0 +#define STATE_ARBITRATION_ERROR 1 +#define STATE_TIMEOUT 2 +#define STATE_NAK 3 + +/* TODO: + * - revisar tamanio de todos los registros (getreg/putreg) + */ + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* I2C device state structure */ + +struct kinetis_i2cdev_s +{ + struct i2c_master_s dev; /* Generic I2C device */ + uintptr_t base; /* Base address of registers */ + uint32_t basefreq; /* Branch frequency */ + uint32_t frequency; /* Current I2C frequency */ + uint16_t irqid; /* IRQ for this device */ + uint16_t nmsg; /* Number of transfer remaining */ + uint16_t wrcnt; /* number of bytes sent to tx fifo */ + uint16_t rdcnt; /* number of bytes read from rx fifo */ + volatile uint8_t state; /* State of state machine */ + bool restart; /* Should next transfer restart or not */ + sem_t mutex; /* Only one thread can access at a time */ + sem_t wait; /* Place to wait for state machine completion */ + WDOG_ID timeout; /* watchdog to timeout when bus hung */ + struct i2c_msg_s *msgs; /* Remaining transfers - first one is in + * progress */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/* Register access */ + +static uint8_t kinetis_i2c_getreg(struct kinetis_i2cdev_s *priv, + uint8_t offset); +static void kinetis_i2c_putreg(struct kinetis_i2cdev_s *priv, + uint8_t value, uint8_t offset); + +/* I2C helpers */ + +static void kinetis_i2c_setfrequency(struct kinetis_i2cdev_s *priv, + uint32_t frequency); +static int kinetis_i2c_start(struct kinetis_i2cdev_s *priv); +static void kinetis_i2c_stop(struct kinetis_i2cdev_s *priv); +static int kinetis_i2c_interrupt(struct kinetis_i2cdev_s *priv); +#ifdef CONFIG_KINETIS_I2C0 +static int kinetis_i2c0_interrupt(int irq, void *context); +#endif +#ifdef CONFIG_KINETIS_I2C1 +static int kinetis_i2c1_interrupt(int irq, void *context); +#endif +#ifdef CONFIG_KINETIS_I2C2 +static int kinetis_i2c2_interrupt(int irq, void *context); +#endif +static void kinetis_i2c_timeout(int argc, uint32_t arg, ...); +static void kinetis_i2c_setfrequency(struct kinetis_i2cdev_s *priv, + uint32_t frequency); + +/* I2C lower half driver methods */ + +static int kinetis_i2c_transfer(struct i2c_master_s *dev, + struct i2c_msg_s *msgs, int count); +#ifdef CONFIG_I2C_RESET +static int kinetis_i2c_reset(struct i2c_master_s *dev); +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* I2C lower half driver operations */ + +static const struct i2c_ops_s g_i2c_ops = +{ + .transfer = kinetis_i2c_transfer +#ifdef CONFIG_I2C_RESET + ,.reset = kinetis_i2c_reset +#endif +}; + +/* I2C device state instances */ + +#ifdef CONFIG_KINETIS_I2C0 +static struct kinetis_i2cdev_s g_i2c0_dev; +#endif +#ifdef CONFIG_KINETIS_I2C1 +static struct kinetis_i2cdev_s g_i2c1_dev; +#endif +#ifdef CONFIG_KINETIS_I2C2 +static struct kinetis_i2cdev_s g_i2c2_dev; +#endif + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: kinetis_i2c_getreg + * + * Description: + * Get a 16-bit register value by offset + * + ****************************************************************************/ + +static uint8_t kinetis_i2c_getreg(struct kinetis_i2cdev_s *priv, + uint8_t offset) +{ + return getreg8(priv->base + offset); +} + +/**************************************************************************** + * Name: kinetis_i2c_putreg + * + * Description: + * Put a 16-bit register value by offset + * + ****************************************************************************/ + +static void kinetis_i2c_putreg(struct kinetis_i2cdev_s *priv, uint8_t offset, + uint8_t value) +{ + putreg8(value, priv->base + offset); +} + +/**************************************************************************** + * Name: kinetis_i2c_setfrequency + * + * Description: + * Set the frequency for the next transfer + * + ****************************************************************************/ + +static void kinetis_i2c_setfrequency(struct kinetis_i2cdev_s *priv, + uint32_t frequency) +{ + i2cinfo("frequency=%lu\n", (unsigned long)frequency); + + if (frequency == priv->frequency) + { + return; + } + +#if BOARD_BUS_FREQ == 120000000 + if (frequency < 400000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV1152, KINETIS_I2C_F_OFFSET); /* 104 kHz */ + } + else if (frequency < 1000000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV288, KINETIS_I2C_F_OFFSET); /* 416 kHz */ + } + else + { + kinetis_i2c_putreg(priv, I2C_F_DIV128, KINETIS_I2C_F_OFFSET); /* 0.94 MHz */ + } + + kinetis_i2c_putreg(priv, I2C_FLT(4), KINETIS_I2C_FLT_OFFSET); + +#elif BOARD_BUS_FREQ == 108000000 + if (frequency < 400000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV1024, KINETIS_I2C_F_OFFSET); /* 105 kHz */ + } + else if (frequency < 1000000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV256, KINETIS_I2C_F_OFFSET); /* 422 kHz */ + } + else + { + kinetis_i2c_putreg(priv, I2C_F_DIV112, KINETIS_I2C_F_OFFSET); /* 0.96 MHz */ + } + + kinetis_i2c_putreg(priv, I2C_FLT(4), KINETIS_I2C_FLT_OFFSET); + +#elif BOARD_BUS_FREQ == 96000000 + if (frequency < 400000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV960, KINETIS_I2C_F_OFFSET); /* 100 kHz */ + } + else if (frequency < 1000000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV240, KINETIS_I2C_F_OFFSET); /* 400 kHz */ + } + else + { + kinetis_i2c_putreg(priv, I2C_F_DIV96, KINETIS_I2C_F_OFFSET); /* 1.0 MHz */ + } + + kinetis_i2c_putreg(priv, I2C_FLT(4), KINETIS_I2C_FLT_OFFSET); + +#elif BOARD_BUS_FREQ == 90000000 + if (frequency < 400000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV896, KINETIS_I2C_F_OFFSET); /* 100 kHz */ + } + else if (frequency < 1000000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV224, KINETIS_I2C_F_OFFSET); /* 402 kHz */ + } + else + { + kinetis_i2c_putreg(priv, I2C_F_DIV88, KINETIS_I2C_F_OFFSET); /* 1.02 MHz */ + } + + kinetis_i2c_putreg(priv, I2C_FLT(4), KINETIS_I2C_FLT_OFFSET); + +#elif BOARD_BUS_FREQ == 80000000 + if (frequency < 400000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV768, KINETIS_I2C_F_OFFSET); /* 104 kHz */ + } + else if (frequency < 1000000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV192, KINETIS_I2C_F_OFFSET); /* 416 kHz */ + } + else + { + kinetis_i2c_putreg(priv, I2C_F_DIV80, KINETIS_I2C_F_OFFSET); /* 1.0 MHz */ + } + + kinetis_i2c_putreg(priv, I2C_FLT(4), KINETIS_I2C_FLT_OFFSET); + +#elif BOARD_BUS_FREQ == 72000000 + if (frequency < 400000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV640, KINETIS_I2C_F_OFFSET); /* 112 kHz */ + } + else if (frequency < 1000000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV192, KINETIS_I2C_F_OFFSET); /* 375 kHz */ + } + else + { + kinetis_i2c_putreg(priv, I2C_F_DIV72, KINETIS_I2C_F_OFFSET); /* 1.0 MHz */ + } + + kinetis_i2c_putreg(priv, I2C_FLT(4), KINETIS_I2C_FLT_OFFSET); + +#elif BOARD_BUS_FREQ == 64000000 + if (frequency < 400000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV640, KINETIS_I2C_F_OFFSET); /* 100 kHz */ + } + else if (frequency < 1000000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV160, KINETIS_I2C_F_OFFSET); /* 400 kHz */ + } + else + { + kinetis_i2c_putreg(priv, I2C_F_DIV64, KINETIS_I2C_F_OFFSET); /* 1.0 MHz */ + } + + kinetis_i2c_putreg(priv, I2C_FLT(4), KINETIS_I2C_FLT_OFFSET); + +#elif BOARD_BUS_FREQ == 60000000 + if (frequency < 400000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV576, KINETIS_I2C_F_OFFSET); /* 104 kHz */ + } + else if (frequency < 1000000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV144, KINETIS_I2C_F_OFFSET); /* 416 kHz */ + } + else + { + kinetis_i2c_putreg(priv, I2C_F_DIV64, KINETIS_I2C_F_OFFSET); /* 938 kHz */ + } + + kinetis_i2c_putreg(priv, I2C_FLT(4), KINETIS_I2C_FLT_OFFSET); + +#elif BOARD_BUS_FREQ == 56000000 + if (frequency < 400000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV512, KINETIS_I2C_F_OFFSET); /* 109 kHz */ + } + else if (frequency < 1000000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV144, KINETIS_I2C_F_OFFSET); /* 389 kHz */ + } + else + { + kinetis_i2c_putreg(priv, I2C_F_DIV56_1, KINETIS_I2C_F_OFFSET); /* 1 MHz */ + } + + kinetis_i2c_putreg(priv, I2C_FLT(4), KINETIS_I2C_FLT_OFFSET); + +#elif BOARD_BUS_FREQ == 54000000 + if (frequency < 400000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV512, KINETIS_I2C_F_OFFSET); /* 105 kHz */ + } + else if (frequency < 1000000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV128, KINETIS_I2C_F_OFFSET); /* 422 kHz */ + } + else + { + kinetis_i2c_putreg(priv, I2C_F_DIV56, KINETIS_I2C_F_OFFSET); /* 0.96 MHz */ + } + + kinetis_i2c_putreg(priv, I2C_FLT(4), KINETIS_I2C_FLT_OFFSET); + +#elif BOARD_BUS_FREQ == 48000000 + if (frequency < 400000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV480, KINETIS_I2C_F_OFFSET); /* 100 kHz */ + } + else if (frequency < 1000000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV112, KINETIS_I2C_F_OFFSET); /* 400 kHz */ + } + else + { + kinetis_i2c_putreg(priv, I2C_F_DIV48_1, KINETIS_I2C_F_OFFSET); /* 1 MHz */ + } + + kinetis_i2c_putreg(priv, I2C_FLT(4), KINETIS_I2C_FLT_OFFSET); + +#elif BOARD_BUS_FREQ == 40000000 + if (frequency < 400000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV384_2, KINETIS_I2C_F_OFFSET); /* 104 kHz */ + } + else if (frequency < 1000000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV96, KINETIS_I2C_F_OFFSET); /* 416 kHz */ + } + else + { + kinetis_i2c_putreg(priv, I2C_F_DIV40_2, KINETIS_I2C_F_OFFSET); /* 1 MHz */ + } + + kinetis_i2c_putreg(priv, I2C_FLT(3), KINETIS_I2C_FLT_OFFSET); + +#elif BOARD_BUS_FREQ == 36000000 + if (frequency < 400000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV320_2, KINETIS_I2C_F_OFFSET); /* 113 kHz */ + } + else if (frequency < 1000000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV96, KINETIS_I2C_F_OFFSET); /* 375 kHz */ + } + else + { + kinetis_i2c_putreg(priv, I2C_F_DIV36, KINETIS_I2C_F_OFFSET); /* 1 MHz */ + } + + kinetis_i2c_putreg(priv, I2C_FLT(3), KINETIS_I2C_FLT_OFFSET); + +#elif BOARD_BUS_FREQ == 24000000 + if (frequency < 400000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV240, KINETIS_I2C_F_OFFSET); /* 100 kHz */ + } + else if (frequency < 1000000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV64, KINETIS_I2C_F_OFFSET); /* 375 kHz */ + } + else + {161 + kinetis_i2c_putreg(priv, I2C_F_DIV24, KINETIS_I2C_F_OFFSET); /* 1 MHz */ + } + + kinetis_i2c_putreg(priv, I2C_FLT(2), KINETIS_I2C_FLT_OFFSET); + +#elif BOARD_BUS_FREQ == 16000000 + if (frequency < 400000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV160_2, KINETIS_I2C_F_OFFSET); /* 100 kHz */ + } + else if (frequency < 1000000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV40_1, KINETIS_I2C_F_OFFSET); /* 400 kHz */ + } + else + { + kinetis_i2c_putreg(priv, I2C_F_DIV20, KINETIS_I2C_F_OFFSET); /* 800 MHz */ + } + + kinetis_i2c_putreg(priv, I2C_FLT(1), KINETIS_I2C_FLT_OFFSET); + +#elif BOARD_BUS_FREQ == 8000000 + if (frequency < 400000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV80_1, KINETIS_I2C_F_OFFSET); /* 100 kHz */ + } + else + { + kinetis_i2c_putreg(priv, I2C_F_DIV20, KINETIS_I2C_F_OFFSET); /* 400 kHz */ + } + + kinetis_i2c_putreg(priv, I2C_FLT(1), KINETIS_I2C_FLT_OFFSET); + +#elif BOARD_BUS_FREQ == 4000000 + if (frequency < 400000) + { + kinetis_i2c_putreg(priv, I2C_F_DIV40_1, KINETIS_I2C_F_OFFSET); /* 100 kHz */ + } + else + { + kinetis_i2c_putreg(priv, I2C_F_DIV20, KINETIS_I2C_F_OFFSET); /* 200 kHz */ + } + + kinetis_i2c_putreg(priv, I2C_FLT(1), KINETIS_I2C_FLT_OFFSET); + +#elif BOARD_BUS_FREQ == 2000000 + kinetis_i2c_putreg(priv, I2C_F_DIV20, KINETIS_I2C_F_OFFSET); /* 100 kHz */ + kinetis_i2c_putreg(priv, I2C_FLT(1), KINETIS_I2C_FLT_OFFSET); + +#else +# error "F_BUS must be 120, 108, 96, 9, 80, 72, 64, 60, 56, 54, 48, 40, 36, 24, 16, 8, 4 or 2 MHz" +#endif + + priv->frequency = frequency; +} + +/**************************************************************************** + * Name: kinetis_i2c_start + * + * Description: + * Initiate I2C transfer (START/RSTART + address) + * + ****************************************************************************/ + +static int kinetis_i2c_start(struct kinetis_i2cdev_s *priv) +{ + struct i2c_msg_s *msg; + + i2cinfo("START msg=%p\n", priv->msgs); + msg = priv->msgs; + + /* Now take control of the bus */ + + if (kinetis_i2c_getreg(priv, KINETIS_I2C_C1_OFFSET) & I2C_C1_MST) + { + /* We are already the bus master, so send a repeated start */ + + kinetis_i2c_putreg(priv, I2C_C1_IICEN | I2C_C1_IICIE | I2C_C1_MST | + I2C_C1_RSTA | I2C_C1_TX, KINETIS_I2C_C1_OFFSET); + } + else + { + /* We are not currently the bus master, so wait for bus ready */ + + while (kinetis_i2c_getreg(priv, KINETIS_I2C_S_OFFSET) & I2C_S_BUSY); + + /* Become the bus master in transmit mode (send start) */ + + kinetis_i2c_putreg(priv, I2C_C1_IICEN | I2C_C1_IICIE | I2C_C1_MST | + I2C_C1_TX, KINETIS_I2C_C1_OFFSET); + } + + if (I2C_M_READ & msg->flags) /* DEBUG: should happen always */ + { + /* Wait until start condition establishes control of the bus */ + + while (1) + { + if (kinetis_i2c_getreg(priv, KINETIS_I2C_S_OFFSET) & I2C_S_BUSY) + { + break; + } + } + } + + /* Initiate actual transfer (send address) */ + + kinetis_i2c_putreg(priv, (I2C_M_READ & msg->flags) == I2C_M_READ ? + I2C_READADDR8(msg->addr) : I2C_WRITEADDR8(msg->addr), + KINETIS_I2C_D_OFFSET); + + return OK; +} + +/**************************************************************************** + * Name: kinetis_i2c_stop + * + * Description: + * Perform a I2C transfer stop + * + ****************************************************************************/ + +static void kinetis_i2c_stop(struct kinetis_i2cdev_s *priv) +{ + i2cinfo("STOP msg=%p\n", priv->msgs); + + kinetis_i2c_putreg(priv, I2C_C1_IICEN | I2C_C1_IICIE, + KINETIS_I2C_C1_OFFSET); + sem_post(&priv->wait); +} + +/**************************************************************************** + * Name: kinetis_i2c_timeout + * + * Description: + * Watchdog timer for timeout of I2C operation + * + ****************************************************************************/ + +static void kinetis_i2c_timeout(int argc, uint32_t arg, ...) +{ + struct kinetis_i2cdev_s *priv = (struct kinetis_i2cdev_s *)arg; + + DEBUGASSERT(priv != NULL); + i2cinfo("Timeout msg=%p\n", priv->msgs); + + irqstate_t flags = enter_critical_section(); + priv->state = STATE_TIMEOUT; + sem_post(&priv->wait); + leave_critical_section(flags); +} + +/**************************************************************************** + * Name: kinetis_i2c_nextmsg + * + * Description: + * Setup for the next message. + * + ****************************************************************************/ + +void kinetis_i2c_nextmsg(struct kinetis_i2cdev_s *priv) +{ + priv->nmsg--; + i2cinfo("nmsg=%u\n", priv->nmsg); + + if (priv->nmsg > 0) + { + priv->msgs++; + i2cinfo("msg=%p\n", priv->msgs); + + priv->wrcnt = 0; + priv->rdcnt = 0; + + if (priv->restart) + { + sem_post(&priv->wait); + } + } + else + { + kinetis_i2c_stop(priv); + } +} + +/**************************************************************************** + * Name: kinetis_i2c_interrupt + * + * Description: + * The I2C common interrupt handler + * + ****************************************************************************/ + +static int kinetis_i2c_interrupt(struct kinetis_i2cdev_s *priv) +{ + struct i2c_msg_s *msg; + uint32_t state; + int regval; + int dummy; + UNUSED(dummy); + + /* Get current state */ + + state = kinetis_i2c_getreg(priv, KINETIS_I2C_S_OFFSET); + msg = priv->msgs; + + /* Arbitration lost */ + + if (state & I2C_S_ARBL) + { + kinetis_i2c_putreg(priv, I2C_S_IICIF | I2C_S_ARBL, + KINETIS_I2C_S_OFFSET); + priv->state = STATE_ARBITRATION_ERROR; + kinetis_i2c_stop(priv); + } + else + { + /* Clear interrupt */ + + kinetis_i2c_putreg(priv, I2C_S_IICIF, KINETIS_I2C_S_OFFSET); + regval = kinetis_i2c_getreg(priv, KINETIS_I2C_C1_OFFSET); + + /* TX mode */ + + if (regval & I2C_C1_TX) + { + /* Last write was not acknowledged */ + + if (state & I2C_S_RXAK) + { + priv->state = STATE_NAK; /* Set error flag */ + kinetis_i2c_stop(priv); /* Send STOP */ + } + else + { + /* Actually intending to write */ + + if ((I2C_M_READ & msg->flags) == 0) + { + /* Wrote everything */ + + if (priv->wrcnt == msg->length) + { + /* Continue with next message */ + + kinetis_i2c_nextmsg(priv); + + if (!priv->restart) + { + /* Initiate transfer of following message */ + + kinetis_i2c_putreg(priv, + priv->msgs->buffer[priv->wrcnt], + KINETIS_I2C_D_OFFSET); + priv->wrcnt++; + + sem_post(&priv->wait); + } + } + else + { + /* Put next byte */ + + kinetis_i2c_putreg(priv, msg->buffer[priv->wrcnt], + KINETIS_I2C_D_OFFSET); + priv->wrcnt++; + } + } + + /* Actually intending to read (address was just sent) */ + + else + { + if (msg->length == 1 && priv->restart) + { + /* Go to RX mode, do not send ACK */ + + kinetis_i2c_putreg(priv, I2C_C1_IICEN | I2C_C1_IICIE | + I2C_C1_MST | I2C_C1_TXAK, + KINETIS_I2C_C1_OFFSET); + } + else + { + /* Go to RX mode */ + + kinetis_i2c_putreg(priv, I2C_C1_IICEN | I2C_C1_IICIE | + I2C_C1_MST, KINETIS_I2C_C1_OFFSET); + } + + /* TODO: handle zero-length reads */ + /* Dummy read to initiate reception */ + + dummy = kinetis_i2c_getreg(priv, KINETIS_I2C_D_OFFSET); + } + } + } + + /* RX: mode */ + + else + { + /* If last receiving byte */ + + if (priv->rdcnt == (msg->length - 1)) + { + if (priv->restart) + { + /* Go to TX mode before last read, otherwise a new read is + * triggered. + */ + + /* Go to TX mode */ + + kinetis_i2c_putreg(priv, I2C_C1_IICEN | I2C_C1_IICIE | + I2C_C1_MST | I2C_C1_TX, + KINETIS_I2C_C1_OFFSET); + } + else if ((priv->msgs + 1)->length == 1) + { + /* We will continue reception on next message. + * if next message is length == 1, this is actually the + * 2nd to last byte, so do not send ACK. + */ + + /* Do not ACK any more */ + + kinetis_i2c_putreg(priv, I2C_C1_IICEN | I2C_C1_IICIE | + I2C_C1_MST | I2C_C1_TXAK, + KINETIS_I2C_C1_OFFSET); + } + + msg->buffer[priv->rdcnt] = + kinetis_i2c_getreg(priv, KINETIS_I2C_D_OFFSET); + priv->rdcnt++; + + kinetis_i2c_nextmsg(priv); + } + + /* Second to last receiving byte */ + + else if (priv->rdcnt == (msg->length - 2)) + { + if (priv->restart) + { + /* Do not ACK any more */ + + kinetis_i2c_putreg(priv, I2C_C1_IICEN | I2C_C1_IICIE | + I2C_C1_MST | I2C_C1_TXAK, KINETIS_I2C_C1_OFFSET); + } + + msg->buffer[priv->rdcnt] = + kinetis_i2c_getreg(priv, KINETIS_I2C_D_OFFSET); + priv->rdcnt++; + } + else + { + msg->buffer[priv->rdcnt] = + kinetis_i2c_getreg(priv, KINETIS_I2C_D_OFFSET); + priv->rdcnt++; + } + } + } + + return OK; +} + +/**************************************************************************** + * Name: kinetis_i2cN_interrupt + * + * Description: + * The I2CN interrupt handlers + * + ****************************************************************************/ + +#ifdef CONFIG_KINETIS_I2C0 +static int kinetis_i2c0_interrupt(int irq, void *context) +{ + i2cinfo("I2C0 Interrupt...\n"); + return kinetis_i2c_interrupt(&g_i2c0_dev); +} +#endif + +#ifdef CONFIG_KINETIS_I2C1 +static int kinetis_i2c1_interrupt(int irq, void *context) +{ + i2cinfo("I2C1 Interrupt...\n"); + return kinetis_i2c_interrupt(&g_i2c1_dev); +} +#endif + +#ifdef CONFIG_KINETIS_I2C2 +static int kinetis_i2c2_interrupt(int irq, void *context) +{ + i2cinfo("I2C2 Interrupt...\n"); + return kinetis_i2c_interrupt(&g_i2c2_dev); +} +#endif + +/**************************************************************************** + * Name: kinetis_i2c_transfer + * + * Description: + * Perform a sequence of I2C transfers + * + ****************************************************************************/ + +static int kinetis_i2c_transfer(struct i2c_master_s *dev, + struct i2c_msg_s *msgs, int count) +{ + struct kinetis_i2cdev_s *priv = (struct kinetis_i2cdev_s *)dev; + int msg_n; + + i2cinfo("msgs=%p count=%d\n", msgs, count); + DEBUGASSERT(dev != NULL && msgs != NULL && (unsigned)count <= UINT16_MAX); + + /* Get exclusive access to the I2C bus */ + + sem_wait(&priv->mutex); + + /* Set up for the transfer */ + + msg_n = 0; + priv->msgs = msgs; + priv->nmsg = count; + priv->state = STATE_OK; + priv->wrcnt = 0; + priv->rdcnt = 0; + + /* Configure the I2C frequency. REVISIT: Note that the frequency is set + * only on the first message. This could be extended to support + * different transfer frequencies for each message segment. + */ + + kinetis_i2c_setfrequency(priv, msgs->frequency); + + /* Clear the status flags */ + + kinetis_i2c_putreg(priv, I2C_S_IICIF | I2C_S_ARBL, KINETIS_I2C_S_OFFSET); + + /* Process every message */ + + while (priv->nmsg > 0 && priv->state == STATE_OK) + { + priv->restart = true; + + /* Process NORESTART flag */ + + if (priv->nmsg > 1) + { + struct i2c_msg_s* nextmsg = (priv->msgs + 1); + + /* If there is a following message with "norestart" flag of + * the same type as the current one, we can avoid the restart + */ + + if ((nextmsg->flags & I2C_M_NORESTART) && + nextmsg->addr == priv->msgs->addr && + nextmsg->frequency == priv->msgs->frequency && + (nextmsg->flags & I2C_M_READ) == (priv->msgs->flags & I2C_M_READ)) + { + /* "no restart" can be performed */ + + priv->restart = false; + } + } + + /* Only send start when required (we are trusting the flags setting to + * be correctly used here). + */ + + if (!(priv->msgs->flags & I2C_M_NORESTART)) + { + /* Initiate the transfer, in case restart is required */ + + kinetis_i2c_start(priv); + } + + /* Wait for transfer complete */ + + wd_start(priv->timeout, I2C_TIMEOUT, kinetis_i2c_timeout, 1, + (uint32_t) priv); + sem_wait(&priv->wait); + + wd_cancel(priv->timeout); + + msg_n++; + } + + /* Disable interrupts */ + + kinetis_i2c_putreg(priv, I2C_C1_IICEN, KINETIS_I2C_C1_OFFSET); + + /* Release access to I2C bus */ + + sem_post(&priv->mutex); + + if (priv->state != STATE_OK) + { + return -EIO; + } + else + { + return 0; + } +} + +/************************************************************************************ + * Name: kinetis_i2c_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. + * + ************************************************************************************/ + +#ifdef CONFIG_I2C_RESET +static int kinetis_i2c_reset(struct i2c_master_s *dev) +{ + i2cinfo("No reset...\n"); + return OK; +} +#endif /* CONFIG_I2C_RESET */ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: kinetis_i2cbus_initialize + * + * Description: + * Initialise an I2C device + * + ****************************************************************************/ + +struct i2c_master_s *kinetis_i2cbus_initialize(int port) +{ + struct kinetis_i2cdev_s *priv; + xcpt_t handler; + + i2cinfo("port=%d\n", port); + + if (port > 1) + { + i2cerr("ERROR: Kinetis I2C Only suppors ports 0 and 1\n"); + return NULL; + } + + irqstate_t flags; + uint32_t regval; + + flags = enter_critical_section(); + +#ifdef CONFIG_KINETIS_I2C0 + if (port == 0) + { + priv = &g_i2c0_dev; + priv->base = KINETIS_I2C0_BASE; + priv->irqid = KINETIS_IRQ_I2C0; + priv->basefreq = BOARD_BUS_FREQ; + + handler = kinetis_i2c0_interrupt; + + /* Enable clock */ + + regval = getreg32(KINETIS_SIM_SCGC4); + regval |= SIM_SCGC4_I2C0; + putreg32(regval, KINETIS_SIM_SCGC4); + + /* Disable while configuring */ + + kinetis_i2c_putreg(priv, 0, KINETIS_I2C_C1_OFFSET); + + /* Configure pins */ + + kinetis_pinconfig(PIN_I2C0_SCL); + kinetis_pinconfig(PIN_I2C0_SDA); + } + else +#endif +#ifdef CONFIG_KINETIS_I2C1 + if (port == 1) + { + priv = &g_i2c1_dev; + priv->base = KINETIS_I2C1_BASE; + priv->irqid = KINETIS_IRQ_I2C1; + priv->basefreq = BOARD_BUS_FREQ; + + handler = kinetis_i2c1_interrupt; + + /* Enable clock */ + + regval = getreg32(KINETIS_SIM_SCGC4); + regval |= SIM_SCGC4_I2C1; + putreg32(regval, KINETIS_SIM_SCGC4); + + /* Disable while configuring */ + + kinetis_i2c_putreg(priv, 0, KINETIS_I2C_C1_OFFSET); + + /* Configure pins */ + + kinetis_pinconfig(PIN_I2C1_SCL); + kinetis_pinconfig(PIN_I2C1_SDA); + } + else +#endif +#ifdef CONFIG_KINETIS_I2C2 + if (port == 2) + { + priv = &g_i2c2_dev; + priv->base = KINETIS_I2C2_BASE; + priv->irqid = KINETIS_IRQ_I2C2; + priv->basefreq = BOARD_BUS_FREQ; + + handler = kinetis_i2c2_interrupt; + + /* Enable clock */ + + regval = getreg32(KINETIS_SIM_SCGC4); + regval |= SIM_SCGC4_I2C2; + putreg32(regval, KINETIS_SIM_SCGC4); + + /* Disable while configuring */ + + kinetis_i2c_putreg(priv, 0, KINETIS_I2C_C1_OFFSET); + + /* Configure pins */ + + kinetis_pinconfig(PIN_I2C2_SCL); + kinetis_pinconfig(PIN_I2C2_SDA); + } + else +#endif + { + leave_critical_section(flags); + i2cerr("ERROR: Unsupport I2C bus: %d\n", port); + return NULL; + } + + /* Set the default I2C frequency */ + + kinetis_i2c_setfrequency(priv, I2C_DEFAULT_FREQUENCY); + + /* Enable */ + + kinetis_i2c_putreg(priv, I2C_C1_IICEN, KINETIS_I2C_C1_OFFSET); + + /* High-drive select (TODO: why)? */ + + regval = kinetis_i2c_getreg(priv, KINETIS_I2C_C2_OFFSET); + regval |= I2C_C2_HDRS; + kinetis_i2c_putreg(priv, regval, KINETIS_I2C_C2_OFFSET); + + leave_critical_section(flags); + + sem_init(&priv->mutex, 0, 1); + sem_init(&priv->wait, 0, 0); + + /* Allocate a watchdog timer */ + + priv->timeout = wd_create(); + DEBUGASSERT(priv->timeout != 0); + + /* Attach Interrupt Handler */ + + irq_attach(priv->irqid, handler); + + /* Enable Interrupt Handler */ + + up_enable_irq(priv->irqid); + + /* Install our operations */ + + priv->dev.ops = &g_i2c_ops; + return &priv->dev; +} + +/**************************************************************************** + * Name: kinetis_i2cbus_uninitialize + * + * Description: + * Uninitialise an I2C device + * + ****************************************************************************/ + +int kinetis_i2cbus_uninitialize(struct i2c_master_s *dev) +{ + struct kinetis_i2cdev_s *priv = (struct kinetis_i2cdev_s *)dev; + + DEBUGASSERT(priv != NULL); + + kinetis_i2c_putreg(priv, 0, KINETIS_I2C_C1_OFFSET); + + up_disable_irq(priv->irqid); + irq_detach(priv->irqid); + return OK; +} + +#endif /* CONFIG_KINETIS_I2C0 || CONFIG_KINETIS_I2C1 || CONFIG_KINETIS_I2C2 */ diff --git a/arch/arm/src/kinetis/kinetis_i2c.h b/arch/arm/src/kinetis/kinetis_i2c.h new file mode 100644 index 0000000000000000000000000000000000000000..098e4d39add5981788688eff46db049908210a33 --- /dev/null +++ b/arch/arm/src/kinetis/kinetis_i2c.h @@ -0,0 +1,87 @@ +/**************************************************************************** + * arch/arm/src/kinetis/kinetis_i2c.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Matias v01d + * + * 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_I2C_H +#define __ARCH_ARM_SRC_KINETIS_KINETIS_I2C_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include +#include "chip/kinetis_i2c.h" + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Name: kinetis_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 *kinetis_i2cbus_initialize(int port); + +/**************************************************************************** + * Name: kinetis_i2cbus_uninitialize + * + * Description: + * De-initialize the selected I2C port, and power down the device. + * + * Input Parameter: + * Device structure as returned by the lpc43_i2cbus_initialize() + * + * Returned Value: + * OK on success, ERROR when internal reference count mismatch or dev + * points to invalid hardware device. + * + ****************************************************************************/ + +int kinetis_i2cbus_uninitialize(FAR struct i2c_master_s *dev); + +#endif /* __ARCH_ARM_SRC_KINETIS_KINETIS_I2C_H */ diff --git a/arch/arm/src/kinetis/kinetis_pwm.c b/arch/arm/src/kinetis/kinetis_pwm.c index d4ccc74090c5996628f29af1f7deb740bde1f558..4eea85bd42001c9ea03dc971b818d5a56619dbd6 100644 --- a/arch/arm/src/kinetis/kinetis_pwm.c +++ b/arch/arm/src/kinetis/kinetis_pwm.c @@ -58,7 +58,7 @@ #include "chip.h" #include "kinetis.h" -#include "chip/kinetis_pwm.h" +#include "kinetis_pwm.h" #include "chip/kinetis_gpio.h" #include "chip/kinetis_ftm.h" #include "chip/kinetis_sim.h" diff --git a/arch/arm/src/kinetis/kinetis_rtc.c b/arch/arm/src/kinetis/kinetis_rtc.c new file mode 100644 index 0000000000000000000000000000000000000000..ca0f4848d19ff0f48ffe15434596d89ef8ff116e --- /dev/null +++ b/arch/arm/src/kinetis/kinetis_rtc.c @@ -0,0 +1,373 @@ +/**************************************************************************** + * arch/arm/src/kinetis/kinetis_rtc.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Matias v01d + * + * 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_arch.h" + +#include "kinetis_config.h" +#include "chip.h" +#include "chip/kinetis_rtc.h" +#include "chip/kinetis_sim.h" +#include "kinetis.h" +#include "kinetis_alarm.h" + +#if defined(CONFIG_RTC) + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +#ifdef CONFIG_RTC_ALARM +static alarmcb_t g_alarmcb; +#endif + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +volatile bool g_rtc_enabled = false; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: kinetis_rtc_interrupt + * + * Description: + * RTC interrupt service routine + * + * Input Parameters: + * irq - The IRQ number that generated the interrupt + * context - Architecture specific register save information. + * + * Returned Value: + * Zero (OK) on success; A negated errno value on failure. + * + ****************************************************************************/ + +#if defined(CONFIG_RTC_ALARM) +static int kinetis_rtc_interrupt(int irq, void *context) +{ + if (g_alarmcb != NULL) + { + /* Alarm callback */ + + g_alarmcb(); + g_alarmcb = NULL; + } + + /* Clear pending flags, disable alarm */ + + putreg32(0, KINETIS_RTC_TAR); /* unset alarm (resets flags) */ + putreg32(0, KINETIS_RTC_IER); /* disable alarm interrupt */ + + return 0; +} +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_rtc_initialize + * + * Description: + * Initialize the hardware RTC per the selected configuration. This + * function is called once during the OS initialization sequence + * + * Input Parameters: + * None + * + * Returned Value: + * Zero (OK) on success; a negated errno on failure + * + ****************************************************************************/ + +int up_rtc_initialize(void) +{ + int regval; + + /* Enable RTC module */ + + regval = getreg32(KINETIS_SIM_SCGC6); + regval |= SIM_SCGC6_RTC; + putreg32(regval, KINETIS_SIM_SCGC6); + + /* Disable counters (just in case) */ + + putreg32(0, KINETIS_RTC_SR); + + /* Enable oscilator */ + /* capacitance values from teensyduino */ + + putreg32(RTC_CR_SC16P | RTC_CR_SC4P | RTC_CR_OSCE, KINETIS_RTC_CR); + + /* TODO: delay some time (1024 cycles? would be 30ms) */ + + /* Disable interrupts */ + + putreg32(0, KINETIS_RTC_IER); + + /* Reset flags requires writing the seconds register, the following line + * avoids altering any stored time value. + */ + + putreg32(getreg32(KINETIS_RTC_TSR), KINETIS_RTC_TSR); + +#if defined(CONFIG_RTC_ALARM) + /* Enable alarm interrupts. REVISIT: This will not work. up_rtc_initialize() + * is called very early in initialization BEFORE the interrupt system will be + * enabled. All interrupts will disabled later when the interrupt system is + * disabled. This must be done later when the alarm is first set. + */ + + irq_attach(KINETIS_IRQ_RTC, kinetis_rtc_interrupt); + up_enable_irq(KINETIS_IRQ_RTC); +#endif + + /* Enable counters */ + + putreg32(RTC_SR_TCE, KINETIS_RTC_SR); + + /* Mark RTC enabled */ + + g_rtc_enabled = true; + + return OK; +} + +/**************************************************************************** + * Name: up_rtc_time + * + * Description: + * Get the current time in seconds. This is similar to the standard + * time() function. This interface is only required if the low-resolution + * RTC/counter hardware implementation selected. It is only used by the + * RTOS during initialization to set up the system time when CONFIG_RTC is + * set but neither CONFIG_RTC_HIRES nor CONFIG_RTC_DATETIME are set. + * + * Input Parameters: + * None + * + * Returned Value: + * The current time in seconds + * + ****************************************************************************/ + +#ifndef CONFIG_RTC_HIRES +time_t up_rtc_time(void) +{ + return getreg32(KINETIS_RTC_TSR); +} +#endif + +/**************************************************************************** + * Name: up_rtc_gettime + * + * Description: + * Get the current time from the high resolution RTC clock/counter. This + * interface is only supported by the high-resolution RTC/counter hardware + * implementation. It is used to replace the system timer. + * + * Input Parameters: + * tp - The location to return the high resolution time value. + * + * Returned Value: + * Zero (OK) on success; a negated errno on failure + * + ****************************************************************************/ + +#ifdef CONFIG_RTC_HIRES +int up_rtc_gettime(FAR struct timespec *tp) +{ + irqstate_t flags; + uint32_t seconds, prescaler, prescaler2; + + /* Get prescaler and seconds register. this is in a loop which ensures that + * registers will be re-read if during the reads the prescaler has + * wrapped-around. + */ + + flags = enter_critical_section(); + do + { + prescaler = getreg32(KINETIS_RTC_TPR); + seconds = getreg32(KINETIS_RTC_TSR); + prescaler2 = getreg32(KINETIS_RTC_TPR); + } + while (prescaler > prescaler2); + + leave_critical_section(flags); + + /* Build seconds + nanoseconds from seconds and prescaler register */ + + tp->tv_sec = seconds; + tp->tv_nsec = prescaler * (1000000000 / CONFIG_RTC_FREQUENCY); + return OK; +} +#endif + +/**************************************************************************** + * Name: up_rtc_settime + * + * Description: + * Set the RTC to the provided time. All RTC implementations must be able + * to set their time based on a standard timespec. + * + * Input Parameters: + * tp - the time to use + * + * Returned Value: + * Zero (OK) on success; a negated errno on failure + * + ****************************************************************************/ + +int up_rtc_settime(FAR const struct timespec *tp) +{ + irqstate_t flags; + uint32_t seconds, prescaler; + + seconds = tp->tv_sec; + prescaler = tp->tv_nsec * (CONFIG_RTC_FREQUENCY / 1000000000); + + flags = enter_critical_section(); + + putreg32(0, KINETIS_RTC_SR); /* Disable counter */ + + putreg32(prescaler, KINETIS_RTC_TPR); /* Always write prescaler first */ + putreg32(seconds, KINETIS_RTC_TSR); + + putreg32(RTC_SR_TCE, KINETIS_RTC_SR); /* Re-enable counter */ + + leave_critical_section(flags); + + return OK; +} + +/**************************************************************************** + * Name: kinetis_rtc_setalarm + * + * Description: + * Set up an alarm. + * + * Input Parameters: + * tp - the time to set the alarm + * callback - the function to call when the alarm expires. + * + * Returned Value: + * Zero (OK) on success; a negated errno on failure + * + ****************************************************************************/ + +#ifdef CONFIG_RTC_ALARM +int kinetis_rtc_setalarm(FAR const struct timespec *tp, alarmcb_t callback) +{ + /* Is there already something waiting on the ALARM? */ + + if (g_alarmcb == NULL) + { + /* No.. Save the callback function pointer */ + + g_alarmcb = callback; + + /* Enable and set RTC alarm */ + + putreg32(tp->tv_sec, KINETIS_RTC_TAR); /* Set alarm (also resets + * flags) */ + putreg32(RTC_IER_TAIE, KINETIS_RTC_IER); /* Enable alarm interrupt */ + + return OK; + } + else + { + return -EBUSY; + } +} +#endif + +/**************************************************************************** + * Name: kinetis_rtc_cancelalarm + * + * Description: + * Cancel a pending alarm alarm + * + * Input Parameters: + * none + * + * Returned Value: + * Zero (OK) on success; a negated errno on failure + * + ****************************************************************************/ + +#ifdef CONFIG_RTC_ALARM +int kinetis_rtc_cancelalarm(void) +{ + if (g_alarmcb != NULL) + { + /* Cancel the global callback function */ + + g_alarmcb = NULL; + + /* Unset the alarm */ + + putreg32(0, KINETIS_RTC_IER); /* disable alarm interrupt */ + + return OK; + } + else + { + return -ENODATA; + } +} +#endif + +#endif /* KINETIS_RTC */ diff --git a/arch/arm/src/kl/kl_pwm.h b/arch/arm/src/kl/kl_pwm.h index f9afbcd7800e602b7c695fcdb67992d71cff7d5d..5b64e40967be318f3e3e8e639766e9cfac1e1a71 100644 --- a/arch/arm/src/kl/kl_pwm.h +++ b/arch/arm/src/kl/kl_pwm.h @@ -90,13 +90,13 @@ # elif CONFIG_KL_TPM0_CHANNEL == 1 # define PWM_TPM0_PINCFG GPIO_TPM0_CH1OUT # elif CONFIG_KL_TPM0_CHANNEL == 2 -# define PWM_TPM0_PINCFG GPIO_TPM1_CH2OUT +# define PWM_TPM0_PINCFG GPIO_TPM0_CH2OUT # elif CONFIG_KL_TPM0_CHANNEL == 3 -# define PWM_TPM0_PINCFG GPIO_TPM1_CH3OUT +# define PWM_TPM0_PINCFG GPIO_TPM0_CH3OUT # elif CONFIG_KL_TPM0_CHANNEL == 4 -# define PWM_TPM0_PINCFG GPIO_TPM1_CH4OUT +# define PWM_TPM0_PINCFG GPIO_TPM0_CH4OUT # elif CONFIG_KL_TPM0_CHANNEL == 5 -# define PWM_TPM0_PINCFG GPIO_TPM1_CH5OUT +# define PWM_TPM0_PINCFG GPIO_TPM0_CH5OUT # else # error "Unsupported value of CONFIG_KL_TPM1_CHANNEL" # endif diff --git a/arch/arm/src/lpc214x/chip.h b/arch/arm/src/lpc214x/chip.h index c0af01c4475e4fe62e74a518da5bb37f1c0f1031..1e7c8b219bc4890ce1ebb4ff8bb89718c507e57d 100644 --- a/arch/arm/src/lpc214x/chip.h +++ b/arch/arm/src/lpc214x/chip.h @@ -33,8 +33,8 @@ * ****************************************************************************************************/ -#ifndef __LPC214X_CHIP_H -#define __LPC214X_CHIP_H +#ifndef __ARCH_ARM_SRC_LPC214X_CHIP_H +#define __ARCH_ARM_SRC_LPC214X_CHIP_H /**************************************************************************************************** * Included Files @@ -346,4 +346,4 @@ * Public Function Prototypes ****************************************************************************************************/ -#endif /* __LPC214X_CHIP_H */ +#endif /* __ARCH_ARM_SRC_LPC214X_CHIP_H */ diff --git a/arch/arm/src/lpc214x/lpc214x_apb.h b/arch/arm/src/lpc214x/lpc214x_apb.h index e76fa5754a635b8604bafe0fcc1459aa6361ee48..93f9ebdf7aed3e2383e44ecc377e411fbd151f07 100644 --- a/arch/arm/src/lpc214x/lpc214x_apb.h +++ b/arch/arm/src/lpc214x/lpc214x_apb.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef _ARCH_ARM_SRC_LPC214X_APB_H -#define _ARCH_ARM_SRC_LPC214X_APB_H +#ifndef __ARCH_ARM_SRC_LPC214X_LPC214X_APB_H +#define __ARCH_ARM_SRC_LPC214X_LPC214X_APB_H /************************************************************************************ * Included Files @@ -69,4 +69,4 @@ * Public Function Prototypes ************************************************************************************/ -#endif /* _ARCH_ARM_SRC_LPC214X_APB_H */ +#endif /* __ARCH_ARM_SRC_LPC214X_LPC214X_APB_H */ diff --git a/arch/arm/src/lpc214x/lpc214x_i2c.h b/arch/arm/src/lpc214x/lpc214x_i2c.h index 35fcc00f7ea4e900473ee44c5533fb06f7df4b10..d12f1ff4eec5a0505d63c83228fbd941e0591050 100644 --- a/arch/arm/src/lpc214x/lpc214x_i2c.h +++ b/arch/arm/src/lpc214x/lpc214x_i2c.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef _ARCH_ARM_SRC_LPC214X_I2C_H -#define _ARCH_ARM_SRC_LPC214X_I2C_H +#ifndef __ARCH_ARM_SRC_LPC214X_LPC214X_I2C_H +#define __ARCH_ARM_SRC_LPC214X_LPC214X_I2C_H /************************************************************************************ * Included Files @@ -138,4 +138,4 @@ * Public Function Prototypes ************************************************************************************/ -#endif /* _ARCH_ARM_SRC_LPC214X_I2C_H */ +#endif /* __ARCH_ARM_SRC_LPC214X_LPC214X_I2C_H */ diff --git a/arch/arm/src/lpc214x/lpc214x_pinsel.h b/arch/arm/src/lpc214x/lpc214x_pinsel.h index 21c6c2f9db58fed41931f2087fd67d02605853d5..0cb2c58f9bf1ee67fe4c1f6128ee08739008b6aa 100644 --- a/arch/arm/src/lpc214x/lpc214x_pinsel.h +++ b/arch/arm/src/lpc214x/lpc214x_pinsel.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef _ARCH_ARM_SRC_LPC214X_PINSEL_H -#define _ARCH_ARM_SRC_LPC214X_PINSEL_H +#ifndef __ARCH_ARM_SRC_LPC214X_LPC214X_PINSEL_H +#define __ARCH_ARM_SRC_LPC214X_LPC214X_PINSEL_H /************************************************************************************ * Included Files @@ -256,4 +256,4 @@ * Public Function Prototypes ************************************************************************************/ -#endif /* _ARCH_ARM_SRC_LPC214X_PINSEL_H */ +#endif /* __ARCH_ARM_SRC_LPC214X_LPC214X_PINSEL_H */ diff --git a/arch/arm/src/lpc214x/lpc214x_pll.h b/arch/arm/src/lpc214x/lpc214x_pll.h index 4e19bcdc11c05a89df0bbff9bc798181fa48a18d..f8f9a25ad8ee44d797c0b3853a0bc9ce5cbb05f0 100644 --- a/arch/arm/src/lpc214x/lpc214x_pll.h +++ b/arch/arm/src/lpc214x/lpc214x_pll.h @@ -33,8 +33,8 @@ * ****************************************************************************************************/ -#ifndef _ARCH_ARM_SRC_LPC214X_PLL_H -#define _ARCH_ARM_SRC_LPC214X_PLL_H +#ifndef __ARCH_ARM_SRC_LPC214X_LPC214X_PLL_H +#define __ARCH_ARM_SRC_LPC214X_LPC214X_PLL_H /**************************************************************************************************** * Included Files @@ -102,4 +102,4 @@ * Public Function Prototypes ****************************************************************************************************/ -#endif /* _ARCH_ARM_SRC_LPC214X_PLL_H */ +#endif /* __ARCH_ARM_SRC_LPC214X_LPC214X_PLL_H */ diff --git a/arch/arm/src/lpc214x/lpc214x_power.h b/arch/arm/src/lpc214x/lpc214x_power.h index 699af8d59053d3551edfc0467fc732343238f61b..09d89c92ceaa215e2e09b1b6c00aeca15ec39868 100644 --- a/arch/arm/src/lpc214x/lpc214x_power.h +++ b/arch/arm/src/lpc214x/lpc214x_power.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef _ARCH_ARM_SRC_LPC214X_POWER_H -#define _ARCH_ARM_SRC_LPC214X_POWER_H +#ifndef __ARCH_ARM_SRC_LPC214X_LPC214X_POWER_H +#define __ARCH_ARM_SRC_LPC214X_LPC214X_POWER_H /************************************************************************************ * Included Files @@ -87,4 +87,4 @@ * Public Function Prototypes ************************************************************************************/ -#endif /* _ARCH_ARM_SRC_LPC214X_POWER_H */ +#endif /* __ARCH_ARM_SRC_LPC214X_LPC214X_POWER_H */ diff --git a/arch/arm/src/lpc214x/lpc214x_spi.h b/arch/arm/src/lpc214x/lpc214x_spi.h index 97e2fc7a58fce645de655604c7fef40cf0aede53..69c94d89c0fc782290a96290d4c434e7fe0bbbb2 100644 --- a/arch/arm/src/lpc214x/lpc214x_spi.h +++ b/arch/arm/src/lpc214x/lpc214x_spi.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef _ARCH_ARM_SRC_LPC214X_SPI_H -#define _ARCH_ARM_SRC_LPC214X_SPI_H +#ifndef __ARCH_ARM_SRC_LPC214X_LPC214X_SPI_H +#define __ARCH_ARM_SRC_LPC214X_LPC214X_SPI_H /************************************************************************************ * Included Files @@ -181,4 +181,4 @@ struct spi_dev_s; /* Forward reference */ FAR struct spi_dev_s *lpc214x_spibus_initialize(int port); -#endif /* _ARCH_ARM_SRC_LPC214X_SPI_H */ +#endif /* __ARCH_ARM_SRC_LPC214X_LPC214X_SPI_H */ diff --git a/arch/arm/src/lpc214x/lpc214x_timer.h b/arch/arm/src/lpc214x/lpc214x_timer.h index 224e608f3e96948a1e402a03ae03df9691411ceb..df0287d4495362da0b75b8b5fd9388b6a613a670 100644 --- a/arch/arm/src/lpc214x/lpc214x_timer.h +++ b/arch/arm/src/lpc214x/lpc214x_timer.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __LPC214X_TIMER_H -#define __LPC214X_TIMER_H +#ifndef __ARCH_ARM_SRC_LPC214X_LPC214X_TIMER_H +#define __ARCH_ARM_SRC_LPC214X_LPC214X_TIMER_H /************************************************************************************ * Included Files @@ -149,4 +149,4 @@ * Public Function Prototypes ************************************************************************************/ -#endif /* __LPC214X_TIMER_H */ +#endif /* __ARCH_ARM_SRC_LPC214X_LPC214X_TIMER_H */ diff --git a/arch/arm/src/lpc214x/lpc214x_uart.h b/arch/arm/src/lpc214x/lpc214x_uart.h index c4c90c166926ef02998d8128b0d3865ab17d2b6d..3c85c3a065af885bf26e2b7108e56a4825a7fc97 100644 --- a/arch/arm/src/lpc214x/lpc214x_uart.h +++ b/arch/arm/src/lpc214x/lpc214x_uart.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __LPC214X_UART_H -#define __LPC214X_UART_H +#ifndef __ARCH_ARM_SRC_LPC214X_LPC214X_UART_H +#define __ARCH_ARM_SRC_LPC214X_LPC214X_UART_H /************************************************************************************ * Included Files @@ -139,4 +139,4 @@ * Public Function Prototypes ************************************************************************************/ -#endif /* __LPC214X_UART_H */ +#endif /* __ARCH_ARM_SRC_LPC214X_LPC214X_UART_H */ diff --git a/arch/arm/src/lpc214x/lpc214x_vic.h b/arch/arm/src/lpc214x/lpc214x_vic.h index 89a5f7b13f8200175d115bacd5e8fdd71d2528e9..4f3b821a8414c74e9b266e1a77974d74de3f88e5 100644 --- a/arch/arm/src/lpc214x/lpc214x_vic.h +++ b/arch/arm/src/lpc214x/lpc214x_vic.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __LPC214X_VIC_H -#define __LPC214X_VIC_H +#ifndef __ARCH_ARM_SRC_LPC214X_LPC214X_VIC_H +#define __ARCH_ARM_SRC_LPC214X_LPC214X_VIC_H /************************************************************************************ * Included Files @@ -67,4 +67,4 @@ * Public Function Prototypes ************************************************************************************/ -#endif /* __LPC214X_VIC_H */ +#endif /* __ARCH_ARM_SRC_LPC214X_LPC214X_VIC_H */ diff --git a/arch/arm/src/lpc2378/chip.h b/arch/arm/src/lpc2378/chip.h index b8b8b70c85a38bf51a1d98602ca31f0aad4806d7..1f213eaeabd749d4ae6975860f3047738fcb2ac3 100644 --- a/arch/arm/src/lpc2378/chip.h +++ b/arch/arm/src/lpc2378/chip.h @@ -38,8 +38,8 @@ * ****************************************************************************************************/ -#ifndef _ARCH_ARM_SRC_LPC2378_CHIP_H -#define _ARCH_ARM_SRC_LPC2378_CHIP_H +#ifndef __ARCH_ARM_SRC_LPC2378_CHIP_H +#define __ARCH_ARM_SRC_LPC2378_CHIP_H /**************************************************************************************************** * Included Files @@ -1003,4 +1003,4 @@ are for LPC24xx only. */ * Public Function Prototypes ****************************************************************************************************/ -#endif /* _ARCH_ARM_SRC_LPC2378_CHIP_H */ +#endif /* __ARCH_ARM_SRC_LPC2378_CHIP_H */ diff --git a/arch/arm/src/lpc2378/lpc2378.h b/arch/arm/src/lpc2378/lpc2378.h index 0c7fccede9152d9922905f75ec11ac6ddc87c918..1e40b228d0d591d598f2bb6411ad156b5fc8ce47 100644 --- a/arch/arm/src/lpc2378/lpc2378.h +++ b/arch/arm/src/lpc2378/lpc2378.h @@ -38,8 +38,8 @@ * ****************************************************************************************************/ -#ifndef _ARCH_ARM_SRC_LPC2378_INTERNAL_H -#define _ARCH_ARM_SRC_LPC2378_INTERNAL_H +#ifndef __ARCH_ARM_SRC_LPC2378_LPC23XX_H +#define __ARCH_ARM_SRC_LPC2378_LPC23XX_H /**************************************************************************************************** * Included Files @@ -67,4 +67,4 @@ void lpc2378_statledon(void); #endif -#endif /* _ARCH_ARM_SRC_LPC2378_INTERNAL_H */ +#endif /* __ARCH_ARM_SRC_LPC2378_LPC23XX_H */ diff --git a/arch/arm/src/lpc2378/lpc23xx_gpio.h b/arch/arm/src/lpc2378/lpc23xx_gpio.h index fc920be4e96528bb6de16c59f8d0d61f8618b05a..b8be69660954a5844efc4b0ce785878db5b3080b 100644 --- a/arch/arm/src/lpc2378/lpc23xx_gpio.h +++ b/arch/arm/src/lpc2378/lpc23xx_gpio.h @@ -38,8 +38,8 @@ * ************************************************************************************/ -#ifndef _ARCH_ARM_SRC_LPC2378_LPC23XX_GPIO_H -#define _ARCH_ARM_SRC_LPC2378_LPC23XX_GPIO_H +#ifndef __ARCH_ARM_SRC_LPC2378_LPC23XX_GPIO_H +#define __ARCH_ARM_SRC_LPC2378_LPC23XX_GPIO_H /************************************************************************************ * Included Files @@ -68,4 +68,4 @@ * Public Function Prototypes ************************************************************************************/ -#endif /* _ARCH_ARM_SRC_LPC2378_LPC23XX_GPIO_H */ +#endif /* __ARCH_ARM_SRC_LPC2378_LPC23XX_GPIO_H */ diff --git a/arch/arm/src/lpc2378/lpc23xx_pinsel.h b/arch/arm/src/lpc2378/lpc23xx_pinsel.h index 69ad1b749042405b9db94895a2ea233874740ad2..be34810fdc906f6f208a22f93c6365aed16b4138 100644 --- a/arch/arm/src/lpc2378/lpc23xx_pinsel.h +++ b/arch/arm/src/lpc2378/lpc23xx_pinsel.h @@ -38,8 +38,8 @@ * ************************************************************************************/ -#ifndef _ARCH_ARM_SRC_LPC23XX_PINSEL_H -#define _ARCH_ARM_SRC_LPC23XX_PINSEL_H +#ifndef __ARCH_ARM_SRC_LPC2378_LPC23XX_PINSEL_H +#define __ARCH_ARM_SRC_LPC2378_LPC23XX_PINSEL_H /************************************************************************************ * Included Files @@ -789,4 +789,4 @@ * Public Function Prototypes ************************************************************************************/ -#endif /* _ARCH_ARM_SRC_LPC23XX_PINSEL_H */ +#endif /* __ARCH_ARM_SRC_LPC2378_LPC23XX_PINSEL_H */ diff --git a/arch/arm/src/lpc43xx/lpc43_adc.c b/arch/arm/src/lpc43xx/lpc43_adc.c index 4286451f11eec9ad60f6691680509b807adcc8c1..2a9db4297d9c121deb015a6db25b21898d1ee3d7 100644 --- a/arch/arm/src/lpc43xx/lpc43_adc.c +++ b/arch/arm/src/lpc43xx/lpc43_adc.c @@ -59,7 +59,6 @@ #include #include -#include #include #include #include @@ -80,6 +79,12 @@ #include "lpc43_pinconfig.h" +/* board.h should be included last because it depends on the previous + * inclusions and may need to modify other definitions. + */ + +#include + #if defined(CONFIG_LPC43_ADC0) /* TODO ADC1 */ /**************************************************************************** diff --git a/arch/arm/src/lpc43xx/lpc43_serial.c b/arch/arm/src/lpc43xx/lpc43_serial.c index 56e03bbea03cf0a25adac1d62677f2b0fab6c715..82ec6d690efa5b8c34554e4b80b03ce8ced035b3 100644 --- a/arch/arm/src/lpc43xx/lpc43_serial.c +++ b/arch/arm/src/lpc43xx/lpc43_serial.c @@ -170,7 +170,7 @@ static struct up_dev_s g_uart0priv = .bits = CONFIG_USART0_BITS, .stopbits2 = CONFIG_USART0_2STOP, #if defined(CONFIG_USART0_RS485MODE) && defined(CONFIG_USART0_RS485_DTRDIR) - .dtrdir = true; + .dtrdir = true, #endif }; @@ -205,7 +205,7 @@ static struct up_dev_s g_uart1priv = .bits = CONFIG_UART1_BITS, .stopbits2 = CONFIG_UART1_2STOP, #if defined(CONFIG_UART1_RS485MODE) && defined(CONFIG_UART1_RS485_DTRDIR) - .dtrdir = true; + .dtrdir = true, #endif }; @@ -240,7 +240,7 @@ static struct up_dev_s g_uart2priv = .bits = CONFIG_USART2_BITS, .stopbits2 = CONFIG_USART2_2STOP, #if defined(CONFIG_USART2_RS485MODE) && defined(CONFIG_USART2_RS485_DTRDIR) - .dtrdir = true; + .dtrdir = true, #endif }; @@ -275,7 +275,7 @@ static struct up_dev_s g_uart3priv = .bits = CONFIG_USART3_BITS, .stopbits2 = CONFIG_USART3_2STOP, #if defined(CONFIG_USART3_RS485MODE) && defined(CONFIG_USART3_RS485_DTRDIR) - .dtrdir = true; + .dtrdir = true, #endif }; diff --git a/arch/arm/src/sam34/Kconfig b/arch/arm/src/sam34/Kconfig index 8e764dff40ee0fef7a3d407386e21cb0c4f6febd..1f1f423e8578ba3c6bf4cad0093316093f8842fd 100644 --- a/arch/arm/src/sam34/Kconfig +++ b/arch/arm/src/sam34/Kconfig @@ -1060,7 +1060,6 @@ config SAM34_TC5_TIOB config SAM34_ONESHOT bool "TC one-shot wrapper" - depends on SAM34_FREERUN default n if !SCHED_TICKLESS default y if SCHED_TICKLESS ---help--- diff --git a/arch/arm/src/sam34/Make.defs b/arch/arm/src/sam34/Make.defs index 48c751799ceb2df9e75552386a21ff6c05917eb9..dab10fb45e1b45cc1b7f93178819c5b5287f11e8 100644 --- a/arch/arm/src/sam34/Make.defs +++ b/arch/arm/src/sam34/Make.defs @@ -199,7 +199,7 @@ ifeq ($(CONFIG_ARCH_CHIP_SAM4CM),y) ifeq ($(CONFIG_SAM34_TC),y) CHIP_CSRCS += sam4cm_tc.c ifeq ($(CONFIG_SAM34_ONESHOT),y) -CHIP_CSRCS += sam4cm_oneshot.c +CHIP_CSRCS += sam4cm_oneshot.c sam4cm_oneshot_lowerhalf.c endif ifeq ($(CONFIG_SAM34_FREERUN),y) CHIP_CSRCS += sam4cm_freerun.c diff --git a/arch/arm/src/sam34/sam4cm_freerun.c b/arch/arm/src/sam34/sam4cm_freerun.c index a26578e99aca42d11badcada97df4531f05cf244..4b09e1d5e6678cd690abe7fe75aaf3212d782c5d 100644 --- a/arch/arm/src/sam34/sam4cm_freerun.c +++ b/arch/arm/src/sam34/sam4cm_freerun.c @@ -59,7 +59,7 @@ #include "sam4cm_freerun.h" -#ifdef CONFIG_SAM34_ONESHOT +#ifdef CONFIG_SAM34_FREERUN /**************************************************************************** * Private Functions @@ -316,4 +316,4 @@ int sam_freerun_uninitialize(struct sam_freerun_s *freerun) return OK; } -#endif /* CONFIG_SAM34_ONESHOT */ +#endif /* CONFIG_SAM34_FREERUN */ diff --git a/arch/arm/src/sam34/sam4cm_oneshot.c b/arch/arm/src/sam34/sam4cm_oneshot.c index a7505b5a72e2871da1e3b126e52334a361327c9e..0bf92d1fea01d48d008b56978390592b1bb50a19 100644 --- a/arch/arm/src/sam34/sam4cm_oneshot.c +++ b/arch/arm/src/sam34/sam4cm_oneshot.c @@ -111,7 +111,9 @@ static void sam_oneshot_handler(TC_HANDLE tch, void *arg, uint32_t sr) oneshot->handler = NULL; oneshot_arg = (void *)oneshot->arg; oneshot->arg = NULL; +#ifdef CONFIG_SAM34_FREERUN oneshot->start_count = 0; +#endif oneshot_handler(oneshot_arg); } @@ -212,7 +214,10 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, oneshot->running = false; oneshot->handler = NULL; oneshot->arg = NULL; +#ifdef CONFIG_SAM34_FREERUN oneshot->start_count = 0; +#endif + return OK; } @@ -251,8 +256,10 @@ int sam_oneshot_max_delay(struct sam_oneshot_s *oneshot, uint64_t *usec) * ****************************************************************************/ -int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, - oneshot_handler_t handler, void *arg, const struct timespec *ts) +int sam_oneshot_start(struct sam_oneshot_s *oneshot, + struct sam_freerun_s *freerun, + oneshot_handler_t handler, void *arg, + const struct timespec *ts) { uint64_t usec; uint64_t regval; @@ -309,6 +316,7 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer sam_tc_start(oneshot->tch); +#ifdef CONFIG_SAM34_FREERUN /* The function sam_tc_start() starts the timer/counter by setting the * bits TC_CCR_CLKEN and TC_CCR_SWTRG in the channel control register. * The first one enables the timer/counter the latter performs an @@ -327,7 +335,11 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer * vanishes at least if compiled with no optimisation. */ - oneshot->start_count = sam_tc_getcounter(freerun->tch); + if (freerun != NULL) + { + oneshot->start_count = sam_tc_getcounter(freerun->tch); + } +#endif /* Enable interrupts. We should get the callback when the interrupt * occurs. @@ -363,8 +375,8 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer * ****************************************************************************/ -int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, - struct timespec *ts) +int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, + struct sam_freerun_s *freerun, struct timespec *ts) { irqstate_t flags; uint64_t usec; @@ -405,16 +417,19 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *free count = sam_tc_getcounter(oneshot->tch); rc = sam_tc_getregister(oneshot->tch, TC_REGC); +#ifdef CONFIG_SAM34_FREERUN /* In the case the timer/counter was canceled very short after its start, * the counter register can hold the wrong value (the value of the last * run). To prevent this the counter value is set to zero if not at * least on tick passed since the start of the timer/counter. */ - if (count > 0 && sam_tc_getcounter(freerun->tch) == oneshot->start_count) + if (count > 0 && freerun != NULL && + sam_tc_getcounter(freerun->tch) == oneshot->start_count) { count = 0; } +#endif /* Now we can disable the interrupt and stop the timer. */ diff --git a/arch/arm/src/sam34/sam4cm_oneshot.h b/arch/arm/src/sam34/sam4cm_oneshot.h index d7dc7a18ee040968f61a73d09fe908a1859fad8f..d46b67b4211d9de78de1f4411eaf815097d1b174 100644 --- a/arch/arm/src/sam34/sam4cm_oneshot.h +++ b/arch/arm/src/sam34/sam4cm_oneshot.h @@ -46,7 +46,6 @@ #include #include "sam4cm_tc.h" -#include "sam4cm_freerun.h" #ifdef CONFIG_SAM34_ONESHOT @@ -83,11 +82,13 @@ struct sam_oneshot_s volatile oneshot_handler_t handler; /* Oneshot expiration callback */ volatile void *arg; /* The argument that will accompany * the callback */ +#ifdef CONFIG_SAM34_FREERUN volatile uint32_t start_count; /* Stores the value of the freerun counter, * at each start of the onshot timer. Is neccesary * to find out if the onshot counter was updated * correctly at the time of the call to * sam_oneshot_cancel or not. */ +#endif }; /**************************************************************************** @@ -130,6 +131,14 @@ extern "C" int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, uint16_t resolution); +/**************************************************************************** + * Name: sam_oneshot_max_delay + * + * Description: + * Determine the maximum delay of the one-shot timer (in microseconds) + * + ****************************************************************************/ + int sam_oneshot_max_delay(struct sam_oneshot_s *oneshot, uint64_t *usec); /**************************************************************************** @@ -144,7 +153,8 @@ int sam_oneshot_max_delay(struct sam_oneshot_s *oneshot, uint64_t *usec); * sam_oneshot_initialize(); * freerun Caller allocated instance of the freerun state structure. This * structure must have been previously initialized via a call to - * sam_freerun_initialize(); + * sam_freerun_initialize(). May be NULL if there is no matching + * free-running timer. * handler The function to call when when the oneshot timer expires. * arg An opaque argument that will accompany the callback. * ts Provides the duration of the one shot timer. @@ -155,8 +165,11 @@ int sam_oneshot_max_delay(struct sam_oneshot_s *oneshot, uint64_t *usec); * ****************************************************************************/ -int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, - oneshot_handler_t handler, void *arg, const struct timespec *ts); +struct sam_freerun_s; +int sam_oneshot_start(struct sam_oneshot_s *oneshot, + struct sam_freerun_s *freerun, + oneshot_handler_t handler, void *arg, + const struct timespec *ts); /**************************************************************************** * Name: sam_oneshot_cancel @@ -173,7 +186,8 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer * sam_oneshot_initialize(); * freerun Caller allocated instance of the freerun state structure. This * structure must have been previously initialized via a call to - * sam_freerun_initialize(); + * sam_freerun_initialize(). May be NULL if there is no matching + * free-running timer. * ts The location in which to return the time remaining on the * oneshot timer. A time of zero is returned if the timer is * not running. @@ -185,8 +199,9 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer * ****************************************************************************/ -int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, - struct timespec *ts); +struct sam_freerun_s; +int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, + struct sam_freerun_s *freerun, struct timespec *ts); #undef EXTERN #ifdef __cplusplus diff --git a/arch/arm/src/sam34/sam4cm_oneshot_lowerhalf.c b/arch/arm/src/sam34/sam4cm_oneshot_lowerhalf.c new file mode 100644 index 0000000000000000000000000000000000000000..cdab331d93ab2cce41169ca8eabf12076bbfdfe9 --- /dev/null +++ b/arch/arm/src/sam34/sam4cm_oneshot_lowerhalf.c @@ -0,0 +1,345 @@ +/**************************************************************************** + * arch/arm/src/sam/sam_oneshot_lowerhalf.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 + +#include "sam_oneshot.h" + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* This structure describes the state of the oneshot timer lower-half driver */ + +struct sam_oneshot_lowerhalf_s +{ + /* This is the part of the lower half driver that is visible to the upper- + * half client of the driver. This must be the first thing in this + * structure so that pointers to struct oneshot_lowerhalf_s are cast + * compatible to struct sam_oneshot_lowerhalf_s and vice versa. + */ + + struct oneshot_lowerhalf_s lh; /* Common lower-half driver fields */ + + /* Private lower half data follows */ + + struct sam_oneshot_s oneshot; /* SAM-specific oneshot state */ + oneshot_callback_t callback; /* internal handler that receives callback */ + FAR void *arg; /* Argument that is passed to the handler */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static void sam_oneshot_handler(void *arg); + +static int sam_max_delay(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts); +static int sam_start(FAR struct oneshot_lowerhalf_s *lower, + oneshot_callback_t callback, FAR void *arg, + FAR const struct timespec *ts); +static int sam_cancel(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* Lower half operations */ + +static const struct oneshot_operations_s g_oneshot_ops = +{ + .max_delay = sam_max_delay, + .start = sam_start, + .cancel = sam_cancel, +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: sam_oneshot_handler + * + * Description: + * Timer expiration handler + * + * Input Parameters: + * arg - Should be the same argument provided when sam_oneshot_start() + * was called. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void sam_oneshot_handler(void *arg) +{ + FAR struct sam_oneshot_lowerhalf_s *priv = + (FAR struct sam_oneshot_lowerhalf_s *)arg; + oneshot_callback_t callback; + FAR void *cbarg; + + DEBUGASSERT(priv != NULL); + + /* Perhaps the callback was nullified in a race condition with + * sam_cancel? + */ + + if (priv->callback) + { + /* Sample and nullify BEFORE executing callback (in case the callback + * restarts the oneshot). + */ + + callback = priv->callback; + cbarg = priv->arg; + priv->callback = NULL; + priv->arg = NULL; + + /* Then perform the callback */ + + callback(&priv->lh, cbarg); + } +} + +/**************************************************************************** + * Name: sam_max_delay + * + * Description: + * Determine the maximum delay of the one-shot timer (in microseconds) + * + * Input Parameters: + * lower An instance of the lower-half oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * ts The location in which to return the maxumum delay. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +static int sam_max_delay(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts) +{ + FAR struct sam_oneshot_lowerhalf_s *priv = + (FAR struct sam_oneshot_lowerhalf_s *)lower; + uint64_t usecs; + int ret; + + DEBUGASSERT(priv != NULL && ts != NULL); + ret = sam_oneshot_max_delay(&priv->oneshot, &usecs); + if (ret >= 0) + { + uint64_t sec = usecs / 1000000; + usecs -= 1000000 * sec; + + ts->tv_sec = (time_t)sec; + ts->tv_nsec = (long)(usecs * 1000); + } + + return ret; +} + +/**************************************************************************** + * Name: sam_start + * + * Description: + * Start the oneshot timer + * + * Input Parameters: + * lower An instance of the lower-half oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * handler The function to call when when the oneshot timer expires. + * arg An opaque argument that will accompany the callback. + * ts Provides the duration of the one shot timer. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +static int sam_start(FAR struct oneshot_lowerhalf_s *lower, + oneshot_callback_t callback, FAR void *arg, + FAR const struct timespec *ts) +{ + FAR struct sam_oneshot_lowerhalf_s *priv = + (FAR struct sam_oneshot_lowerhalf_s *)lower; + irqstate_t flags; + int ret; + + DEBUGASSERT(priv != NULL && callback != NULL && ts != NULL); + + /* Save the callback information and start the timer */ + + flags = enter_critical_section(); + priv->callback = callback; + priv->arg = arg; + ret = sam_oneshot_start(&priv->oneshot, NULL, + sam_oneshot_handler, priv, ts); + leave_critical_section(flags); + + if (ret < 0) + { + tmrerr("ERROR: sam_oneshot_start failed: %d\n", flags); + } + + return ret; +} + +/**************************************************************************** + * Name: sam_cancel + * + * Description: + * Cancel the oneshot timer and return the time remaining on the timer. + * + * NOTE: This function may execute at a high rate with no timer running (as + * when pre-emption is enabled and disabled). + * + * Input Parameters: + * lower Caller allocated instance of the oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * ts The location in which to return the time remaining on the + * oneshot timer. A time of zero is returned if the timer is + * not running. + * + * Returned Value: + * Zero (OK) is returned on success. A call to up_timer_cancel() when + * the timer is not active should also return success; a negated errno + * value is returned on any failure. + * + ****************************************************************************/ + +static int sam_cancel(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts) +{ + FAR struct sam_oneshot_lowerhalf_s *priv = + (FAR struct sam_oneshot_lowerhalf_s *)lower; + irqstate_t flags; + int ret; + + DEBUGASSERT(priv != NULL); + + /* Cancel the timer */ + + flags = enter_critical_section(); + ret = sam_oneshot_cancel(&priv->oneshot, NULL, ts); + priv->callback = NULL; + priv->arg = NULL; + leave_critical_section(flags); + + if (ret < 0) + { + tmrerr("ERROR: sam_oneshot_cancel failed: %d\n", flags); + } + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: oneshot_initialize + * + * Description: + * Initialize the oneshot timer and return a oneshot lower half driver + * instance. + * + * Input Parameters: + * chan Timer counter channel to be used. + * resolution The required resolution of the timer in units of + * microseconds. NOTE that the range is restricted to the + * range of uint16_t (excluding zero). + * + * Returned Value: + * On success, a non-NULL instance of the oneshot lower-half driver is + * returned. NULL is return on any failure. + * + ****************************************************************************/ + +FAR struct oneshot_lowerhalf_s *oneshot_initialize(int chan, + uint16_t resolution) +{ + FAR struct sam_oneshot_lowerhalf_s *priv; + int ret; + + /* Allocate an instance of the lower half driver */ + + priv = (FAR struct sam_oneshot_lowerhalf_s *) + kmm_zalloc(sizeof(struct sam_oneshot_lowerhalf_s)); + + if (priv == NULL) + { + tmrerr("ERROR: Failed to initialized state structure\n"); + return NULL; + } + + /* Initialize the lower-half driver structure */ + + priv->lh.ops = &g_oneshot_ops; + + /* Initialize the contained SAM oneshot timer */ + + ret = sam_oneshot_initialize(&priv->oneshot, chan, resolution); + if (ret < 0) + { + tmrerr("ERROR: sam_oneshot_initialize failed: %d\n", ret); + kmm_free(priv); + return NULL; + } + + return &priv->lh; +} \ No newline at end of file diff --git a/arch/arm/src/sam34/sam_gpio.c b/arch/arm/src/sam34/sam_gpio.c index 89461c58369c2fc6fe2ef3e8a311a873c99b6c2f..5fda366fe001785f9cc02a66abdbd5ffe10f4148 100644 --- a/arch/arm/src/sam34/sam_gpio.c +++ b/arch/arm/src/sam34/sam_gpio.c @@ -54,6 +54,7 @@ #include "chip.h" #include "sam_gpio.h" +#include "sam_periphclks.h" #if defined(CONFIG_ARCH_CHIP_SAM3U) || defined(CONFIG_ARCH_CHIP_SAM3X) || \ defined(CONFIG_ARCH_CHIP_SAM3A) @@ -96,7 +97,7 @@ static inline uintptr_t sam_gpiobase(gpio_pinset_t cfgset) * Name: sam_gpiopin * * Description: - * Returun the base address of the GPIO register set + * Return the base address of the GPIO register set * ****************************************************************************/ @@ -105,6 +106,67 @@ static inline int sam_gpiopin(gpio_pinset_t cfgset) return 1 << ((cfgset & GPIO_PIN_MASK) >> GPIO_PIN_SHIFT); } +/**************************************************************************** + * Name: sam_gpio_enableclk + * + * Description: + * Enable clocking on the PIO port. Port clocking is required in the + * following cases: + * + * - In order to read values in input pins from the port + * - If the port supports interrupting pins + * - If glitch filtering is enabled + * - If necessary to read the input value on an open drain output (this + * may be done in TWI logic to detect hangs on the I2C bus). + * - If necessary to read the input value on peripheral pins. + * + ****************************************************************************/ + +static inline int sam_gpio_enableclk(gpio_pinset_t cfgset) +{ + /* Enable the peripheral clock for the GPIO's port controller. */ + + switch (cfgset & GPIO_PORT_MASK) + { + case GPIO_PORT_PIOA: + sam_pioa_enableclk(); + break; + + case GPIO_PORT_PIOB: + sam_piob_enableclk(); + break; + +#ifdef GPIO_PORT_PIOC + case GPIO_PORT_PIOC: + sam_pioc_enableclk(); + break; +#endif + +#ifdef GPIO_PORT_PIOD + case GPIO_PORT_PIOD: + sam_piod_enableclk(); + break; +#endif + +#ifdef GPIO_PORT_PIOE + case GPIO_PORT_PIOE: + sam_pioe_enableclk(); + break; +#endif + +#ifdef GPIO_PORT_PIOF + case GPIO_PORT_PIOF: + sam_piof_enableclk(); + break; +#endif + + default: + return -EINVAL; + } + + return OK; +} + /**************************************************************************** * Name: sam_configinput * @@ -171,6 +233,7 @@ static inline int sam_configinput(uintptr_t base, uint32_t pin, { regval &= ~pin; } + putreg32(regval, base + SAM_PIO_SCHMITT_OFFSET); #endif @@ -184,7 +247,12 @@ static inline int sam_configinput(uintptr_t base, uint32_t pin, * another, new API... perhaps sam_configfilter() */ - return OK; + /* Enable the peripheral clock for the GPIO's port controller. + * A GPIO input value is only sampled if the peripheral clock for its + * controller is enabled. + */ + + return sam_gpio_enableclk(cfgset); } /**************************************************************************** diff --git a/arch/arm/src/sam34/sam_wdt.c b/arch/arm/src/sam34/sam_wdt.c index cf3d70b1613e66d04fd435a1fbc20d9f8b157904..62075d9a7657392298f57d721fd5bbf1fef90262 100644 --- a/arch/arm/src/sam34/sam_wdt.c +++ b/arch/arm/src/sam34/sam_wdt.c @@ -554,7 +554,7 @@ static xcpt_t sam34_capture(FAR struct watchdog_lowerhalf_s *lower, regval |= WWDG_CFR_EWI; sam34_putreg(regval, SAM_WDT_CFR); - up_enable_irq(STM32_IRQ_WWDG); + up_enable_irq(SAM_IRQ_WWDG); } else { @@ -563,7 +563,7 @@ static xcpt_t sam34_capture(FAR struct watchdog_lowerhalf_s *lower, regval &= ~WWDG_CFR_EWI; sam34_putreg(regval, SAM_WDT_CFR); - up_disable_irq(STM32_IRQ_WWDG); + up_disable_irq(SAM_IRQ_WWDG); } leave_critical_section(flags); diff --git a/arch/arm/src/sam34/sam_wdt.h b/arch/arm/src/sam34/sam_wdt.h index 234f4e25204273d54d7344673331afe12e1a3634..77a1fbab40e3dd684031c8ab1e7a459c427cf83c 100644 --- a/arch/arm/src/sam34/sam_wdt.h +++ b/arch/arm/src/sam34/sam_wdt.h @@ -95,4 +95,4 @@ void sam_wdtinitialize(FAR const char *devpath); #endif /* __ASSEMBLY__ */ #endif /* CONFIG_WATCHDOG */ -#endif /* __ARCH_ARM_SRC_STM32_STM32_WDG_H */ +#endif /* __ARCH_ARM_SRC_SAM34_WDT_H */ diff --git a/arch/arm/src/sama5/Kconfig b/arch/arm/src/sama5/Kconfig index 11aa7179f1f9aff562b9f5c55ca542f093c31f75..121ee991ecca6cc96f910c6e3aec2afdf1882583 100644 --- a/arch/arm/src/sama5/Kconfig +++ b/arch/arm/src/sama5/Kconfig @@ -3866,7 +3866,6 @@ endif # SAMA5_TC2 config SAMA5_ONESHOT bool "TC one-shot wrapper" - depends on SAMA5_FREERUN default n if !SCHED_TICKLESS default y if SCHED_TICKLESS ---help--- diff --git a/arch/arm/src/sama5/Make.defs b/arch/arm/src/sama5/Make.defs index cfe0d0a3deaf21e098f85003c2fa7aec1d0c25ea..ff8121073052866713bdd54050eaae772b8507aa 100644 --- a/arch/arm/src/sama5/Make.defs +++ b/arch/arm/src/sama5/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/sama5/Make.defs # -# 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 @@ -292,7 +292,7 @@ endif ifeq ($(CONFIG_SAMA5_HAVE_TC),y) CHIP_CSRCS += sam_tc.c ifeq ($(CONFIG_SAMA5_ONESHOT),y) -CHIP_CSRCS += sam_oneshot.c +CHIP_CSRCS += sam_oneshot.c sam_oneshot_lowerhalf.c endif ifeq ($(CONFIG_SAMA5_FREERUN),y) CHIP_CSRCS += sam_freerun.c diff --git a/arch/arm/src/sama5/sam_freerun.c b/arch/arm/src/sama5/sam_freerun.c index 8870988ce608e5d6997378a99ba7e71e06253761..088cb10a6e82a5e9ad02d84edbbf0b2b107f5508 100644 --- a/arch/arm/src/sama5/sam_freerun.c +++ b/arch/arm/src/sama5/sam_freerun.c @@ -60,27 +60,12 @@ #include "sam_freerun.h" -#ifdef CONFIG_SAMA5_ONESHOT - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ +#ifdef CONFIG_SAMA5_FREERUN /**************************************************************************** * Private Functions ****************************************************************************/ + /**************************************************************************** * Name: sam_freerun_handler * @@ -333,4 +318,4 @@ int sam_freerun_uninitialize(struct sam_freerun_s *freerun) return OK; } -#endif /* CONFIG_SAMA5_ONESHOT */ +#endif /* CONFIG_SAMA5_FREERUN */ diff --git a/arch/arm/src/sama5/sam_oneshot.c b/arch/arm/src/sama5/sam_oneshot.c index 5f011ea28745d652f96aa0d458540fd66d9ed722..b883606982378068bcae46c1b6532106d5f88713 100644 --- a/arch/arm/src/sama5/sam_oneshot.c +++ b/arch/arm/src/sama5/sam_oneshot.c @@ -63,22 +63,6 @@ #ifdef CONFIG_SAMA5_ONESHOT -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -128,7 +112,9 @@ static void sam_oneshot_handler(TC_HANDLE tch, void *arg, uint32_t sr) oneshot->handler = NULL; oneshot_arg = (void *)oneshot->arg; oneshot->arg = NULL; +#ifdef CONFIG_SAMA5_FREERUN oneshot->start_count = 0; +#endif oneshot_handler(oneshot_arg); } @@ -229,7 +215,36 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, oneshot->running = false; oneshot->handler = NULL; oneshot->arg = NULL; +#ifdef CONFIG_SAMA5_FREERUN oneshot->start_count = 0; +#endif + + return OK; +} + +/**************************************************************************** + * Name: sam_oneshot_max_delay + * + * Description: + * Return the maximum delay supported by the one shot timer (in + * microseconds). + * + * Input Parameters: + * oneshot Caller allocated instance of the oneshot state structure. This + * structure must have been previously initialized via a call to + * sam_oneshot_initialize(); + * usec The location in which to return the maximum delay. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +int sam_oneshot_max_delay(struct sam_oneshot_s *oneshot, uint64_t *usec) +{ + DEBUGASSERT(oneshot != NULL && usec != NULL); + *usec = (0xffffull * USEC_PER_SEC) / (uint64_t)sam_tc_divfreq(oneshot->tch); return OK; } @@ -253,8 +268,10 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, * ****************************************************************************/ -int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, - oneshot_handler_t handler, void *arg, const struct timespec *ts) +int sam_oneshot_start(struct sam_oneshot_s *oneshot, + struct sam_freerun_s *freerun, + oneshot_handler_t handler, void *arg, + const struct timespec *ts) { uint64_t usec; uint64_t regval; @@ -311,6 +328,7 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer sam_tc_start(oneshot->tch); +#ifdef CONFIG_SAMA5_FREERUN /* The function sam_tc_start() starts the timer/counter by setting the * bits TC_CCR_CLKEN and TC_CCR_SWTRG in the channel control register. * The first one enables the timer/counter the latter performs an @@ -329,7 +347,11 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer * vanishes at least if compiled with no optimisation. */ - oneshot->start_count = sam_tc_getcounter(freerun->tch); + if (freerun != NULL) + { + oneshot->start_count = sam_tc_getcounter(freerun->tch); + } +#endif /* Enable interrupts. We should get the callback when the interrupt * occurs. @@ -365,8 +387,8 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer * ****************************************************************************/ -int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, - struct timespec *ts) +int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, + struct sam_freerun_s *freerun, struct timespec *ts) { irqstate_t flags; uint64_t usec; @@ -407,16 +429,19 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *free count = sam_tc_getcounter(oneshot->tch); rc = sam_tc_getregister(oneshot->tch, TC_REGC); +#ifdef CONFIG_SAMA5_FREERUN /* In the case the timer/counter was canceled very short after its start, * the counter register can hold the wrong value (the value of the last * run). To prevent this the counter value is set to zero if not at * least on tick passed since the start of the timer/counter. */ - if (count > 0 && sam_tc_getcounter(freerun->tch) == oneshot->start_count) + if (count > 0 && freerun != NULL && + sam_tc_getcounter(freerun->tch) == oneshot->start_count) { count = 0; } +#endif /* Now we can disable the interrupt and stop the timer. */ diff --git a/arch/arm/src/sama5/sam_oneshot.h b/arch/arm/src/sama5/sam_oneshot.h index 0443fcd693dbf62592dec20575d66466b814c502..15431882fc048fedb7e228f889d13fb0f5603156 100644 --- a/arch/arm/src/sama5/sam_oneshot.h +++ b/arch/arm/src/sama5/sam_oneshot.h @@ -46,7 +46,6 @@ #include #include "sam_tc.h" -#include "sam_freerun.h" #ifdef CONFIG_SAMA5_ONESHOT @@ -83,11 +82,13 @@ struct sam_oneshot_s volatile oneshot_handler_t handler; /* Oneshot expiration callback */ volatile void *arg; /* The argument that will accompany * the callback */ +#ifdef CONFIG_SAMA5_FREERUN volatile uint32_t start_count; /* Stores the value of the freerun counter, * at each start of the onshot timer. Is neccesary * to find out if the onshot counter was updated * correctly at the time of the call to * sam_oneshot_cancel or not. */ +#endif }; /**************************************************************************** @@ -130,6 +131,27 @@ extern "C" int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, uint16_t resolution); +/**************************************************************************** + * Name: sam_oneshot_max_delay + * + * Description: + * Return the maximum delay supported by the one shot timer (in + * microseconds). + * + * Input Parameters: + * oneshot Caller allocated instance of the oneshot state structure. This + * structure must have been previously initialized via a call to + * sam_oneshot_initialize(); + * usec The location in which to return the maximum delay. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +int sam_oneshot_max_delay(struct sam_oneshot_s *oneshot, uint64_t *usec); + /**************************************************************************** * Name: sam_oneshot_start * @@ -142,7 +164,8 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, * sam_oneshot_initialize(); * freerun Caller allocated instance of the freerun state structure. This * structure must have been previously initialized via a call to - * sam_freerun_initialize(); + * sam_freerun_initialize(). May be NULL if there is no matching + * free-running timer. * handler The function to call when when the oneshot timer expires. * arg An opaque argument that will accompany the callback. * ts Provides the duration of the one shot timer. @@ -153,8 +176,11 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, * ****************************************************************************/ -int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, - oneshot_handler_t handler, void *arg, const struct timespec *ts); +struct sam_freerun_s; +int sam_oneshot_start(struct sam_oneshot_s *oneshot, + struct sam_freerun_s *freerun, + oneshot_handler_t handler, void *arg, + const struct timespec *ts); /**************************************************************************** * Name: sam_oneshot_cancel @@ -171,7 +197,8 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer * sam_oneshot_initialize(); * freerun Caller allocated instance of the freerun state structure. This * structure must have been previously initialized via a call to - * sam_freerun_initialize(); + * sam_freerun_initialize(). May be NULL if there is no matching + * free-running timer. * ts The location in which to return the time remaining on the * oneshot timer. A time of zero is returned if the timer is * not running. @@ -183,8 +210,9 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer * ****************************************************************************/ -int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, - struct timespec *ts); +struct sam_freerun_s; +int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, + struct sam_freerun_s *freerun, struct timespec *ts); #undef EXTERN #ifdef __cplusplus diff --git a/arch/arm/src/sama5/sam_oneshot_lowerhalf.c b/arch/arm/src/sama5/sam_oneshot_lowerhalf.c new file mode 100644 index 0000000000000000000000000000000000000000..e9737ea167d0c5a42c18ef5435fce5a9caaf7a14 --- /dev/null +++ b/arch/arm/src/sama5/sam_oneshot_lowerhalf.c @@ -0,0 +1,347 @@ +/**************************************************************************** + * arch/arm/src/sam/sam_oneshot_lowerhalf.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 +#include +#include + +#include "sam_oneshot.h" + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* This structure describes the state of the oneshot timer lower-half driver */ + +struct sam_oneshot_lowerhalf_s +{ + /* This is the part of the lower half driver that is visible to the upper- + * half client of the driver. This must be the first thing in this + * structure so that pointers to struct oneshot_lowerhalf_s are cast + * compatible to struct sam_oneshot_lowerhalf_s and vice versa. + */ + + struct oneshot_lowerhalf_s lh; /* Common lower-half driver fields */ + + /* Private lower half data follows */ + + struct sam_oneshot_s oneshot; /* SAM-specific oneshot state */ + oneshot_callback_t callback; /* internal handler that receives callback */ + FAR void *arg; /* Argument that is passed to the handler */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static void sam_oneshot_handler(void *arg); + +static int sam_max_delay(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts); +static int sam_start(FAR struct oneshot_lowerhalf_s *lower, + oneshot_callback_t callback, FAR void *arg, + FAR const struct timespec *ts); +static int sam_cancel(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* Lower half operations */ + +static const struct oneshot_operations_s g_oneshot_ops = +{ + .max_delay = sam_max_delay, + .start = sam_start, + .cancel = sam_cancel, +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: sam_oneshot_handler + * + * Description: + * Timer expiration handler + * + * Input Parameters: + * arg - Should be the same argument provided when sam_oneshot_start() + * was called. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void sam_oneshot_handler(void *arg) +{ + FAR struct sam_oneshot_lowerhalf_s *priv = + (FAR struct sam_oneshot_lowerhalf_s *)arg; + oneshot_callback_t callback; + FAR void *cbarg; + + DEBUGASSERT(priv != NULL); + + /* Perhaps the callback was nullified in a race condition with + * sam_cancel? + */ + + if (priv->callback) + { + /* Sample and nullify BEFORE executing callback (in case the callback + * restarts the oneshot). + */ + + callback = priv->callback; + cbarg = priv->arg; + priv->callback = NULL; + priv->arg = NULL; + + /* Then perform the callback */ + + callback(&priv->lh, cbarg); + } +} + +/**************************************************************************** + * Name: sam_max_delay + * + * Description: + * Determine the maximum delay of the one-shot timer (in microseconds) + * + * Input Parameters: + * lower An instance of the lower-half oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * ts The location in which to return the maxumum delay. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +static int sam_max_delay(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts) +{ + FAR struct sam_oneshot_lowerhalf_s *priv = + (FAR struct sam_oneshot_lowerhalf_s *)lower; + uint64_t usecs; + int ret; + + DEBUGASSERT(priv != NULL && ts != NULL); + ret = sam_oneshot_max_delay(&priv->oneshot, &usecs); + if (ret >= 0) + { + uint64_t sec = usecs / 1000000; + usecs -= 1000000 * sec; + + ts->tv_sec = (time_t)sec; + ts->tv_nsec = (long)(usecs * 1000); + } + + return ret; +} + +/**************************************************************************** + * Name: sam_start + * + * Description: + * Start the oneshot timer + * + * Input Parameters: + * lower An instance of the lower-half oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * handler The function to call when when the oneshot timer expires. + * arg An opaque argument that will accompany the callback. + * ts Provides the duration of the one shot timer. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +static int sam_start(FAR struct oneshot_lowerhalf_s *lower, + oneshot_callback_t callback, FAR void *arg, + FAR const struct timespec *ts) +{ + FAR struct sam_oneshot_lowerhalf_s *priv = + (FAR struct sam_oneshot_lowerhalf_s *)lower; + irqstate_t flags; + int ret; + + DEBUGASSERT(priv != NULL && callback != NULL && ts != NULL); + + /* Save the callback information and start the timer */ + + flags = enter_critical_section(); + priv->callback = callback; + priv->arg = arg; + ret = sam_oneshot_start(&priv->oneshot, NULL, + sam_oneshot_handler, priv, ts); + leave_critical_section(flags); + + if (ret < 0) + { + tmrerr("ERROR: sam_oneshot_start failed: %d\n", flags); + } + + return ret; +} + +/**************************************************************************** + * Name: sam_cancel + * + * Description: + * Cancel the oneshot timer and return the time remaining on the timer. + * + * NOTE: This function may execute at a high rate with no timer running (as + * when pre-emption is enabled and disabled). + * + * Input Parameters: + * lower Caller allocated instance of the oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * ts The location in which to return the time remaining on the + * oneshot timer. A time of zero is returned if the timer is + * not running. + * + * Returned Value: + * Zero (OK) is returned on success. A call to up_timer_cancel() when + * the timer is not active should also return success; a negated errno + * value is returned on any failure. + * + ****************************************************************************/ + +static int sam_cancel(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts) +{ + FAR struct sam_oneshot_lowerhalf_s *priv = + (FAR struct sam_oneshot_lowerhalf_s *)lower; + irqstate_t flags; + int ret; + + DEBUGASSERT(priv != NULL); + + /* Cancel the timer */ + + flags = enter_critical_section(); + ret = sam_oneshot_cancel(&priv->oneshot, NULL, ts); + priv->callback = NULL; + priv->arg = NULL; + leave_critical_section(flags); + + if (ret < 0) + { + tmrerr("ERROR: sam_oneshot_cancel failed: %d\n", flags); + } + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: oneshot_initialize + * + * Description: + * Initialize the oneshot timer and return a oneshot lower half driver + * instance. + * + * Input Parameters: + * chan Timer counter channel to be used. + * resolution The required resolution of the timer in units of + * microseconds. NOTE that the range is restricted to the + * range of uint16_t (excluding zero). + * + * Returned Value: + * On success, a non-NULL instance of the oneshot lower-half driver is + * returned. NULL is return on any failure. + * + ****************************************************************************/ + +FAR struct oneshot_lowerhalf_s *oneshot_initialize(int chan, + uint16_t resolution) +{ + FAR struct sam_oneshot_lowerhalf_s *priv; + int ret; + + /* Allocate an instance of the lower half driver */ + + priv = (FAR struct sam_oneshot_lowerhalf_s *) + kmm_zalloc(sizeof(struct sam_oneshot_lowerhalf_s)); + + if (priv == NULL) + { + tmrerr("ERROR: Failed to initialized state structure\n"); + return NULL; + } + + /* Initialize the lower-half driver structure */ + + priv->lh.ops = &g_oneshot_ops; + + /* Initialize the contained SAM oneshot timer */ + + ret = sam_oneshot_initialize(&priv->oneshot, chan, resolution); + if (ret < 0) + { + tmrerr("ERROR: sam_oneshot_initialize failed: %d\n", ret); + kmm_free(priv); + return NULL; + } + + return &priv->lh; +} diff --git a/arch/arm/src/samv7/Kconfig b/arch/arm/src/samv7/Kconfig index 9507e0c59c842e4897254f332795f2124e8edb14..fc4f5135076adda29f6f6566f6e5218a9e575e4c 100644 --- a/arch/arm/src/samv7/Kconfig +++ b/arch/arm/src/samv7/Kconfig @@ -102,7 +102,7 @@ config ARCH_CHIP_SAME70Q default n select ARCH_CHIP_SAME70 select SAMV7_HAVE_MCAN1 - select SAMV7_HAVE_DAC1 + select SAMV7_HAVE_DAC1 if !SAMV7_EMAC0 select SAMV7_HAVE_EBI select SAMV7_HAVE_HSMCI0 select SAMV7_HAVE_SDRAMC @@ -119,7 +119,7 @@ config ARCH_CHIP_SAME70N default n select ARCH_CHIP_SAME70 select SAMV7_HAVE_MCAN1 - select SAMV7_HAVE_DAC1 + select SAMV7_HAVE_DAC1 if !SAMV7_EMAC0 select SAMV7_HAVE_HSMCI0 select SAMV7_HAVE_SPI0 select SAMV7_HAVE_TWIHS2 @@ -152,7 +152,7 @@ config ARCH_CHIP_SAMV71Q default n select ARCH_CHIP_SAMV71 select SAMV7_HAVE_MCAN1 - select SAMV7_HAVE_DAC1 + select SAMV7_HAVE_DAC1 if !SAMV7_EMAC0 select SAMV7_HAVE_EBI select SAMV7_HAVE_HSMCI0 select SAMV7_HAVE_SDRAMC @@ -169,7 +169,7 @@ config ARCH_CHIP_SAMV71N default n select ARCH_CHIP_SAMV71 select SAMV7_HAVE_MCAN1 - select SAMV7_HAVE_DAC1 + select SAMV7_HAVE_DAC1 if !SAMV7_EMAC0 select SAMV7_HAVE_HSMCI0 select SAMV7_HAVE_SPI0 select SAMV7_HAVE_TWIHS2 @@ -196,6 +196,10 @@ config SAMV7_HAVE_MCAN1 bool default n +config SAMV7_DAC + bool + default n + config SAMV7_HAVE_DAC1 bool default n @@ -334,10 +338,12 @@ config SAMV7_MCAN1 config SAMV7_DAC0 bool "Digital To Analog Converter 0 (DAC0)" default n + select SAMV7_DAC config SAMV7_DAC1 bool "Digital To Analog Converter 1 (DAC1)" default n + select SAMV7_DAC depends on SAMV7_HAVE_DAC1 config SAMV7_EBI @@ -1600,7 +1606,6 @@ endif # SAMV7_TC3 config SAMV7_ONESHOT bool "TC one-shot wrapper" - depends on SAMV7_FREERUN default n if !SCHED_TICKLESS default y if SCHED_TICKLESS ---help--- @@ -1658,6 +1663,62 @@ config SAMV7_TC_REGDEBUG endmenu # Timer/counter Configuration endif # SAMV7_HAVE_TC +menu "DAC device driver configuration" + depends on SAMV7_DAC + +config SAMV7_DAC_PRESCAL + int "DAC MCK prescaler" + default 7 + range 0 15 + ---help--- + Define PRESCALER (Peripheral Clock to DAC Clock Ratio) + + 0 -> 2 periods of DAC Clock + 1 -> 3 periods of DAC Clock + 2 -> 4 periods of DAC Clock + 3 -> 5 periods of DAC Clock + 4 -> 6 periods of DAC Clock + 5 -> 7 periods of DAC Clock + 6 -> 8 periods of DAC Clock + 7 -> 9 periods of DAC Clock + 8 -> 10 periods of DAC Clock + 9 -> 11 periods of DAC Clock + 10 -> 12 periods of DAC Clock + 11 -> 13 periods of DAC Clock + 12 -> 14 periods of DAC Clock + 13 -> 15 periods of DAC Clock + 14 -> 16 periods of DAC Clock + 15 -> 17 periods of DAC Clock + +config SAMV7_DAC_TRIGGER + bool "DAC trigger mode" + default n + ---help--- + Enable DAC trigger mode + +if SAMV7_DAC_TRIGGER + +config SAMV7_DAC_TRIGGER_FREQUENCY + int "DAC trigger frequency" + default 1000 + ---help--- + Define DAC trigger frequency + +config SAMV7_DAC_TRIGGER_SELECT + int "DAC trigger source" + default 3 + range 1 3 + ---help--- + Define DAC trigger source. Snly support for TC0, TC1, TC2 output is + currently implemented: + + 1 -> TC0 + 2 -> TC1 + 3 -> TC2 + +endif # SAMV7_DAC_TRIGGER +endmenu # DAC device driver configuration + menu "HSMCI device driver options" depends on SAMV7_HSMCI diff --git a/arch/arm/src/samv7/Make.defs b/arch/arm/src/samv7/Make.defs index fbd88a6e7f459ca44ecdd706a61d93a672c8689d..dfe56491f963a5f5031d741df2c78139eccda9c5 100644 --- a/arch/arm/src/samv7/Make.defs +++ b/arch/arm/src/samv7/Make.defs @@ -181,7 +181,7 @@ endif ifeq ($(CONFIG_SAMV7_HAVE_TC),y) CHIP_CSRCS += sam_tc.c ifeq ($(CONFIG_SAMV7_ONESHOT),y) -CHIP_CSRCS += sam_oneshot.c +CHIP_CSRCS += sam_oneshot.c sam_oneshot_lowerhalf.c endif ifeq ($(CONFIG_SAMV7_FREERUN),y) CHIP_CSRCS += sam_freerun.c @@ -214,3 +214,7 @@ endif ifeq ($(CONFIG_SAMV7_PROGMEM),y) CHIP_CSRCS += sam_progmem.c endif + +ifeq ($(CONFIG_SAMV7_DAC),y) +CHIP_CSRCS += sam_dac.c +endif diff --git a/arch/arm/src/samv7/chip/sam_dacc.h b/arch/arm/src/samv7/chip/sam_dacc.h new file mode 100644 index 0000000000000000000000000000000000000000..a40b0d09e5a608429b3d13499db4e271df9a289e --- /dev/null +++ b/arch/arm/src/samv7/chip/sam_dacc.h @@ -0,0 +1,226 @@ +/**************************************************************************************** + * arch/arm/src/samv7/chip/sam_dacc.h + * Digital-to-Analog Converter Controller (DACC) for the SAMV7 + * + * 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_SAMV7_CHIP_SAM_DACC_H +#define __ARCH_ARM_SRC_SAMV7_CHIP_SAM_DACC_H + +/**************************************************************************************** + * Included Files + ****************************************************************************************/ + +#include + +#include "chip.h" +#include "chip/sam_memorymap.h" + +/**************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************/ + +/* DACC register offsets *****************************************************************/ + +#define SAM_DACC_CR_OFFSET 0x0000 /* Control Register */ +#define SAM_DACC_MR_OFFSET 0x0004 /* Mode Register */ +#define SAM_DACC_TRIGR_OFFSET 0x0008 /* Trigger Register */ +#define SAM_DACC_CHER_OFFSET 0x0010 /* Channel Enable Register */ +#define SAM_DACC_CHDR_OFFSET 0x0014 /* Channel Disable Register */ +#define SAM_DACC_CHSR_OFFSET 0x0018 /* Channel Status Register */ +#define SAM_DACC_CDR0_OFFSET 0x001c /* Conversion Data Register 0 */ +#define SAM_DACC_CDR1_OFFSET 0x0020 /* Conversion Data Register 1 */ +#define SAM_DACC_IER_OFFSET 0x0024 /* Interrupt Enable Register */ +#define SAM_DACC_IDR_OFFSET 0x0028 /* Interrupt Disable Register */ +#define SAM_DACC_IMR_OFFSET 0x002c /* Interrupt Mask Register */ +#define SAM_DACC_ISR_OFFSET 0x0030 /* Interrupt Status Register */ +#define SAM_DACC_ACR_OFFSET 0x0094 /* Analog Current Register */ +#define SAM_DACC_WPMR_OFFSET 0x00e4 /* Write Protect Mode register */ +#define SAM_DACC_WPSR_OFFSET 0x00e8 /* Write Protect Status register */ + +/* DACC register addresses **************************************************************/ + +#define SAM_DACC_CR (SAM_DACC_BASE+SAM_DACC_CR_OFFSET) +#define SAM_DACC_MR (SAM_DACC_BASE+SAM_DACC_MR_OFFSET) +#define SAM_DACC_TRIGR (SAM_DACC_BASE+SAM_DACC_TRIGR_OFFSET) +#define SAM_DACC_CHER (SAM_DACC_BASE+SAM_DACC_CHER_OFFSET) +#define SAM_DACC_CHDR (SAM_DACC_BASE+SAM_DACC_CHDR_OFFSET) +#define SAM_DACC_CHSR (SAM_DACC_BASE+SAM_DACC_CHSR_OFFSET) +#define SAM_DACC_CDR0 (SAM_DACC_BASE+SAM_DACC_CDR0_OFFSET) +#define SAM_DACC_CDR1 (SAM_DACC_BASE+SAM_DACC_CDR1_OFFSET) +#define SAM_DACC_IER (SAM_DACC_BASE+SAM_DACC_IER_OFFSET) +#define SAM_DACC_IDR (SAM_DACC_BASE+SAM_DACC_IDR_OFFSET) +#define SAM_DACC_IMR (SAM_DACC_BASE+SAM_DACC_IMR_OFFSET) +#define SAM_DACC_ISR (SAM_DACC_BASE+SAM_DACC_ISR_OFFSET) +#define SAM_DACC_ACR (SAM_DACC_BASE+SAM_DACC_ACR_OFFSET) +#define SAM_DACC_WPMR (SAM_DACC_BASE+SAM_DACC_WPMR_OFFSET) +#define SAM_DACC_WPSR (SAM_DACC_BASE+SAM_DACC_WPSR_OFFSET) + +/* DACC register bit definitions ********************************************************/ + +/* Control Register */ + +#define DACC_CR_SWRST (1 << 0) /* Bit 0: Software reset */ + +/* Mode Register */ + +#define DACC_MR_MAXS0 (1 << 0) /* Max Speed Mode for Channel 0 */ +# define DACC_MR_MAXS0_TRIG_EVENT (0 << 0) /* External trigger mode or Free-running mode enabled */ +# define DACC_MR_MAXS0_MAXIMUM (1 << 0) /* Max speed mode enabled */ +#define DACC_MR_MAXS1 (1 << 1) /* Max Speed Mode for Channel 1 */ +# define DACC_MR_MAXS1_TRIG_EVENT (0 << 1) /* External trigger mode or Free-running mode enabled */ +# define DACC_MR_MAXS1_MAXIMUM (1 << 1) /* Max speed mode enabled */ +#define DACC_MR_WORD (1 << 4) /* Word Transfer Mode */ +# define DACC_MR_WORD_DISABLED (0 << 4) /* One data to convert is written to the FIFO per access to DACC */ +# define DACC_MR_WORD_ENABLED (1 << 4) /* Two data to convert are written to the FIFO per access to DACC */ +#define DACC_MR_ZERO (1 << 5) /* Must always be written to 0 */ +#define DACC_MR_DIFF (1 << 23) /* Differential Mode */ +# define DACC_MR_DIFF_DISABLED (0 << 23) /* DAC0 and DAC1 are single-ended outputs */ +# define DACC_MR_DIFF_ENABLED (1 << 23) /* DACP and DACN are differential outputs. The differential level is configured by the channel 0 value. */ +#define DACC_MR_PRESCALER_SHIFT (24) +#define DACC_MR_PRESCALER_MASK (0xfu << DACC_MR_PRESCALER_SHIFT) /* Peripheral Clock to DAC Clock Ratio */ +#define DACC_MR_PRESCALER(value) ((DACC_MR_PRESCALER_MASK & ((value) << DACC_MR_PRESCALER_SHIFT))) +# define DACC_MR_PRESCALER_2 (0 << DACC_MR_PRESCALER_SHIFT) /* 2 periods of DAC Clock */ +# define DACC_MR_PRESCALER_3 (1 << DACC_MR_PRESCALER_SHIFT) /* 3 periods of DAC Clock */ +# define DACC_MR_PRESCALER_4 (2 << DACC_MR_PRESCALER_SHIFT) /* 4 periods of DAC Clock */ +# define DACC_MR_PRESCALER_5 (3 << DACC_MR_PRESCALER_SHIFT) /* 5 periods of DAC Clock */ +# define DACC_MR_PRESCALER_6 (4 << DACC_MR_PRESCALER_SHIFT) /* 6 periods of DAC Clock */ +# define DACC_MR_PRESCALER_7 (5 << DACC_MR_PRESCALER_SHIFT) /* 7 periods of DAC Clock */ +# define DACC_MR_PRESCALER_8 (6 << DACC_MR_PRESCALER_SHIFT) /* 8 periods of DAC Clock */ +# define DACC_MR_PRESCALER_9 (7 << DACC_MR_PRESCALER_SHIFT) /* 9 periods of DAC Clock */ +# define DACC_MR_PRESCALER_10 (8 << DACC_MR_PRESCALER_SHIFT) /* 10 periods of DAC Clock */ +# define DACC_MR_PRESCALER_11 (9 << DACC_MR_PRESCALER_SHIFT) /* 11 periods of DAC Clock */ +# define DACC_MR_PRESCALER_12 (10 << DACC_MR_PRESCALER_SHIFT) /* 12 periods of DAC Clock */ +# define DACC_MR_PRESCALER_13 (11 << DACC_MR_PRESCALER_SHIFT) /* 13 periods of DAC Clock */ +# define DACC_MR_PRESCALER_14 (12 << DACC_MR_PRESCALER_SHIFT) /* 14 periods of DAC Clock */ +# define DACC_MR_PRESCALER_15 (13 << DACC_MR_PRESCALER_SHIFT) /* 15 periods of DAC Clock */ +# define DACC_MR_PRESCALER_16 (14 << DACC_MR_PRESCALER_SHIFT) /* 16 periods of DAC Clock */ +# define DACC_MR_PRESCALER_17 (15 << DACC_MR_PRESCALER_SHIFT) /* 17 periods of DAC Clock */ + +/* Trigger Register */ + +#define DACC_TRIGR_TRGEN0 (1 << 0) /* Trigger Enable of Channel 0 */ +# define DACC_TRIGR_TRGEN0_DIS (0 << 0) /* External trigger mode disabled. DACC is in Free-running mode or Max speed mode. */ +# define DACC_TRIGR_TRGEN0_EN (1 << 0) /* External trigger mode enabled. */ +#define DACC_TRIGR_TRGEN1 (1 << 1) /* Trigger Enable of Channel 1 */ +# define DACC_TRIGR_TRGEN1_DIS (0 << 1) /* External trigger mode disabled. DACC is in Free-running mode or Max speed mode. */ +# define DACC_TRIGR_TRGEN1_EN (1 << 1) /* External trigger mode enabled. */ +#define DACC_TRIGR_TRGSEL0_SHIFT (4) +#define DACC_TRIGR_TRGSEL0_MASK (0x7u << DACC_TRIGR_TRGSEL0_SHIFT) /* Trigger Selection of Channel 0 */ +#define DACC_TRIGR_TRGSEL0(value) ((DACC_TRIGR_TRGSEL0_MASK & ((value) << DACC_TRIGR_TRGSEL0_SHIFT))) +# define DACC_TRIGR_TRGSEL0_DATRG (0 << 4) /* DATRG output */ +# define DACC_TRIGR_TRGSEL0_TC0 (1 << 4) /* TC0 output */ +# define DACC_TRIGR_TRGSEL0_TC1 (2 << 4) /* TC1 output */ +# define DACC_TRIGR_TRGSEL0_TC2 (3 << 4) /* TC2 output */ +# define DACC_TRIGR_TRGSEL0_PWM0EV0 (4 << 4) /* PWM0 event 0 */ +# define DACC_TRIGR_TRGSEL0_PWM0EV1 (5 << 4) /* PWM0 event 1 */ +# define DACC_TRIGR_TRGSEL0_PWM1EV0 (6 << 4) /* PWM1 event 0 */ +# define DACC_TRIGR_TRGSEL0_PWM1EV1 (7 << 4) /* PWM1 event 1 */ +#define DACC_TRIGR_TRGSEL1_SHIFT (8) +#define DACC_TRIGR_TRGSEL1_MASK (0x7u << DACC_TRIGR_TRGSEL1_SHIFT) /* Trigger Selection of Channel 1 */ +#define DACC_TRIGR_TRGSEL1(value) ((DACC_TRIGR_TRGSEL1_MASK & ((value) << DACC_TRIGR_TRGSEL1_SHIFT))) +# define DACC_TRIGR_TRGSEL1_DATRG (0 << 8) /* DATRG output */ +# define DACC_TRIGR_TRGSEL1_TC0 (1 << 8) /* TC0 output */ +# define DACC_TRIGR_TRGSEL1_TC1 (2 << 8) /* TC1 output */ +# define DACC_TRIGR_TRGSEL1_TC2 (3 << 8) /* TC2 output */ +# define DACC_TRIGR_TRGSEL1_PWM0EV0 (4 << 8) /* PWM0 event 0 */ +# define DACC_TRIGR_TRGSEL1_PWM0EV1 (5 << 8) /* PWM0 event 1 */ +# define DACC_TRIGR_TRGSEL1_PWM1EV0 (6 << 8) /* PWM1 event 0 */ +# define DACC_TRIGR_TRGSEL1_PWM1EV1 (7 << 8) /* PWM1 event 1 */ +#define DACC_TRIGR_OSR0_SHIFT (16) +#define DACC_TRIGR_OSR0_MASK (0x7u << DACC_TRIGR_OSR0_SHIFT) /* Over Sampling Ratio of Channel 0 */ +#define DACC_TRIGR_OSR0(value) ((DACC_TRIGR_OSR0_MASK & ((value) << DACC_TRIGR_OSR0_SHIFT))) +# define DACC_TRIGR_OSR0_OSR_1 (0 << 16) /* OSR = 1 */ +# define DACC_TRIGR_OSR0_OSR_2 (1 << 16) /* OSR = 2 */ +# define DACC_TRIGR_OSR0_OSR_4 (2 << 16) /* OSR = 4 */ +# define DACC_TRIGR_OSR0_OSR_8 (3 << 16) /* OSR = 8 */ +# define DACC_TRIGR_OSR0_OSR_16 (4 << 16) /* OSR = 16 */ +# define DACC_TRIGR_OSR0_OSR_32 (5 << 16) /* OSR = 32 */ +#define DACC_TRIGR_OSR1_SHIFT (20) +#define DACC_TRIGR_OSR1_MASK (0x7u << DACC_TRIGR_OSR1_SHIFT) /* Over Sampling Ratio of Channel 1 */ +#define DACC_TRIGR_OSR1(value) ((DACC_TRIGR_OSR1_MASK & ((value) << DACC_TRIGR_OSR1_SHIFT))) +# define DACC_TRIGR_OSR1_OSR_1 (0 << 20) /* OSR = 1 */ +# define DACC_TRIGR_OSR1_OSR_2 (1 << 20) /* OSR = 2 */ +# define DACC_TRIGR_OSR1_OSR_4 (2 << 20) /* OSR = 4 */ +# define DACC_TRIGR_OSR1_OSR_8 (3 << 20) /* OSR = 8 */ +# define DACC_TRIGR_OSR1_OSR_16 (4 << 20) /* OSR = 16 */ +# define DACC_TRIGR_OSR1_OSR_32 (5 << 20) /* OSR = 32 */ + +/* Channel Enable, Channel Disable, and Channel Status Registers */ + +#define DACC_CH0 (1 << 0) /* Channel 0 */ +#define DACC_CH1 (1 << 1) /* Channel 1 */ +#define DACC_CHSR_DACRDY0 (1 << 8) /* DAC Ready Flag */ +#define DACC_CHSR_DACRDY1 (1 << 9) /* DAC Ready Flag */ + +/* Conversion Data Register -- 32-bit data */ + +#define DACC_CDR_DATA0_SHIFT (0) +#define DACC_CDR_DATA0_MASK (0xffffu << DACC_CDR_DATA0_SHIFT) /* Data to Convert for channel 0 */ +#define DACC_CDR_DATA0(value) ((DACC_CDR_DATA0_MASK & ((value) << DACC_CDR_DATA0_SHIFT))) +#define DACC_CDR_DATA1_SHIFT (16) +#define DACC_CDR_DATA1_MASK (0xffffu << DACC_CDR_DATA1_SHIFT) /* Data to Convert for channel 1 */ +#define DACC_CDR_DATA1(value) ((DACC_CDR_DATA1_MASK & ((value) << DACC_CDR_DATA1_SHIFT))) + +/* Interrupt Enable, Interrupt Disable, Interrupt Mask, and Interrupt Status Register */ + +#define DACC_INT_TXRDY0 (1 << 0) /* Transmit Ready Interrupt of channel 0 */ +#define DACC_INT_TXRDY1 (1 << 1) /* Transmit Ready Interrupt of channel 1 */ +#define DACC_INT_EOC0 (1 << 4) /* End of Conversion Interrupt of channel 0 */ +#define DACC_INT_EOC1 (1 << 5) /* End of Conversion Interrupt of channel 1 */ +#define DACC_INT_ALL (0xffffffffu) /* All interrupts */ + +/* Analog Current Register */ + +#define DACC_ACR_IBCTLCH0_SHIFT (0) +#define DACC_ACR_IBCTLCH0_MASK (0x3u << DACC_ACR_IBCTLCH0_SHIFT) /* Analog Output Current Control */ +#define DACC_ACR_IBCTLCH0(value) ((DACC_ACR_IBCTLCH0_MASK & ((value) << DACC_ACR_IBCTLCH0_SHIFT))) +#define DACC_ACR_IBCTLCH1_SHIFT (2) +#define DACC_ACR_IBCTLCH1_MASK (0x3u << DACC_ACR_IBCTLCH1_SHIFT) /* Analog Output Current Control */ +#define DACC_ACR_IBCTLCH1(value) ((DACC_ACR_IBCTLCH1_MASK & ((value) << DACC_ACR_IBCTLCH1_SHIFT))) + +/* Write Protect Mode register */ + +#define DACC_WPMR_WPEN (1 << 0) /* Write Protection Enable */ +#define DACC_WPMR_WPKEY_SHIFT (8) +#define DACC_WPMR_WPKEY_MASK (0xffffffu << DACC_WPMR_WPKEY_SHIFT) /* Write Protect Key */ +#define DACC_WPMR_WPKEY(value) ((DACC_WPMR_WPKEY_MASK & ((value) << DACC_WPMR_WPKEY_SHIFT))) +# define DACC_WPMR_WPKEY_PASSWD (0x444143u << 8) /* Writing any other value in this field aborts the write operation of bit WPEN. Always reads as 0. */ + +/* Write Protect Status register */ + +#define DACC_WPSR_WPVS (1 << 0) /* Write Protection Violation Status */ +#define DACC_WPSR_WPVSRC_SHIFT (8) +#define DACC_WPSR_WPVSRC_MASK (0xffu << DACC_WPSR_WPVSRC_SHIFT) /* Write Protection Violation Source */ + +#endif /* __ARCH_ARM_SRC_SAMV7_CHIP_SAM_DACC_H */ diff --git a/arch/arm/src/samv7/sam_dac.c b/arch/arm/src/samv7/sam_dac.c new file mode 100644 index 0000000000000000000000000000000000000000..598201ce3908ac06b5b9c103cc060cd3e7e76905 --- /dev/null +++ b/arch/arm/src/samv7/sam_dac.c @@ -0,0 +1,658 @@ +/************************************************************************************ + * arch/arm/src/samv7/sam_dac.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include "up_internal.h" +#include "up_arch.h" +#include "cache.h" + +#include "chip/sam_dacc.h" +#include "chip/sam_pmc.h" +#include "chip/sam_pinmap.h" + +#include "sam_gpio.h" +#include "sam_xdmac.h" +#include "sam_periphclks.h" +#include "sam_tc.h" +#include "sam_dac.h" + +#if defined(CONFIG_SAMV7_DAC0) || defined(CONFIG_SAMV7_DAC1) + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Get TC channel number from Trigger Selection value */ + +#define SAMV7_DAC_TC_CHANNEL (CONFIG_SAMV7_DAC_TRIGGER_SELECT - 1) + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* This structure represents the internal state of a single SAMV7 DAC module */ + +struct sam_dac_s +{ + uint8_t initialized : 1; /* True, the DAC block has been initialized */ +#ifdef CONFIG_SAMV7_DAC_TRIGGER + TC_HANDLE tc; /* Timer handle */ +#endif +}; + +/* This structure represents the internal state of one SAMV7 DAC channel */ + +struct sam_chan_s +{ + uint8_t inuse : 1; /* True, the driver is in use and not available */ + uint8_t intf; /* DAC zero-based interface number (0 or 1) */ + uint32_t dro; /* Conversion Data Register */ +#ifdef CONFIG_SAMV7_DAC_TRIGGER + uint32_t reg_dacc_trigr_clear; /* channel DACC_TRIGR register clear bits */ + uint32_t reg_dacc_trigr_set; /* channel DACC_TRIGR register set bits */ +#endif +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/* Interrupt handler */ + +static int dac_interrupt(int irq, FAR void *context); + +/* DAC methods */ + +static void dac_reset(FAR struct dac_dev_s *dev); +static int dac_setup(FAR struct dac_dev_s *dev); +static void dac_shutdown(FAR struct dac_dev_s *dev); +static void dac_txint(FAR struct dac_dev_s *dev, bool enable); +static int dac_send(FAR struct dac_dev_s *dev, FAR struct dac_msg_s *msg); +static int dac_ioctl(FAR struct dac_dev_s *dev, int cmd, unsigned long arg); + +/* Initialization */ + +#ifdef CONFIG_SAMV7_DAC_TRIGGER +static int dac_timer_init(struct sam_dac_s *priv, uint32_t freq_required, + int channel); +static void dac_timer_free(struct sam_dac_s *priv); +#endif +static int dac_channel_init(FAR struct sam_chan_s *chan); +static int dac_module_init(void); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const struct dac_ops_s g_dacops = +{ + .ao_reset = dac_reset, + .ao_setup = dac_setup, + .ao_shutdown = dac_shutdown, + .ao_txint = dac_txint, + .ao_send = dac_send, + .ao_ioctl = dac_ioctl, +}; + +#ifdef CONFIG_SAMV7_DAC0 +static struct sam_chan_s g_dac1priv = +{ + .intf = 0, + .dro = SAM_DACC_CDR0, +#ifdef CONFIG_SAMV7_DAC_TRIGGER + .reg_dacc_trigr_clear = DACC_TRIGR_TRGSEL0_MASK, + .reg_dacc_trigr_set = DACC_TRIGR_TRGSEL0(CONFIG_SAMV7_DAC_TRIGGER_SELECT) | DACC_TRIGR_TRGEN0, +#endif +}; + +static struct dac_dev_s g_dac1dev = +{ + .ad_ops = &g_dacops, + .ad_priv = &g_dac1priv, +}; +#endif + +#ifdef CONFIG_SAMV7_DAC1 +static struct sam_chan_s g_dac2priv = +{ + .intf = 1, + .dro = SAM_DACC_CDR1, +#ifdef CONFIG_SAMV7_DAC_TRIGGER + .reg_dacc_trigr_clear = DACC_TRIGR_TRGSEL1_MASK, + .reg_dacc_trigr_set = DACC_TRIGR_TRGSEL1(CONFIG_SAMV7_DAC_TRIGGER_SELECT) | DACC_TRIGR_TRGEN1, +#endif +}; + +static struct dac_dev_s g_dac2dev = +{ + .ad_ops = &g_dacops, + .ad_priv = &g_dac2priv, +}; +#endif + +static struct sam_dac_s g_dacmodule; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: dac_interrupt + * + * Description: + * DAC interrupt handler. + * + * Input Parameters: + * + * Returned Value: + * OK + * + ****************************************************************************/ + +static int dac_interrupt(int irq, FAR void *context) +{ +#ifdef CONFIG_SAMV7_DAC1 + uint32_t status; + + status = getreg32(SAM_DACC_ISR) & getreg32(SAM_DACC_IMR); + if (status & DACC_INT_TXRDY1) + { + dac_txdone(&g_dac2dev); + } + + if (status & DACC_INT_TXRDY0) +#endif + { + dac_txdone(&g_dac1dev); + } + + return OK; +} + +/**************************************************************************** + * Name: dac_reset + * + * Description: + * Reset the DAC channel. Called early to initialize the hardware. This + * is called, before dac_setup() and on error conditions. + * + * Input Parameters: + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void dac_reset(FAR struct dac_dev_s *dev) +{ + irqstate_t flags; + + /* Reset only the selected DAC channel; the other DAC channel must remain + * functional. + */ + + flags = enter_critical_section(); + +#warning "Missing logic" + + leave_critical_section(flags); +} + +/**************************************************************************** + * Name: dac_setup + * + * Description: + * Configure the DAC. This method is called the first time that the DAC + * device is opened. This will occur when the port is first opened. + * This setup includes configuring and attaching DAC interrupts. Interrupts + * are all disabled upon return. + * + * Input Parameters: + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +static int dac_setup(FAR struct dac_dev_s *dev) +{ +#warning "Missing logic" + return OK; +} + +/**************************************************************************** + * Name: dac_shutdown + * + * Description: + * Disable the DAC. This method is called when the DAC device is closed. + * This method reverses the operation the setup method. + * + * Input Parameters: + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void dac_shutdown(FAR struct dac_dev_s *dev) +{ +#warning "Missing logic" +} + +/**************************************************************************** + * Name: dac_txint + * + * Description: + * Call to enable or disable TX interrupts. + * + * Input Parameters: + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void dac_txint(FAR struct dac_dev_s *dev, bool enable) +{ + FAR struct sam_chan_s *chan; + + chan = dev->ad_priv; + if (enable) + { + putreg32(DACC_INT_TXRDY0 << chan->intf, SAM_DACC_IER); + } + else + { + putreg32(DACC_INT_TXRDY0 << chan->intf, SAM_DACC_IDR); + } +} + +/**************************************************************************** + * Name: dac_send + * + * Description: + * Set the DAC output. + * + * Input Parameters: + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +static int dac_send(FAR struct dac_dev_s *dev, FAR struct dac_msg_s *msg) +{ + FAR struct sam_chan_s *chan = dev->ad_priv; + + /* Interrupt based transfer */ + + putreg16(msg->am_data >> 16, chan->dro); + + return OK; +} + +/**************************************************************************** + * Name: dac_ioctl + * + * Description: + * All ioctl calls will be routed through this method. + * + * Input Parameters: + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +static int dac_ioctl(FAR struct dac_dev_s *dev, int cmd, unsigned long arg) +{ + return -ENOTTY; +} + +/**************************************************************************** + * Name: dac_timer_init + * + * Description: + * Configure a timer to periodically trigger conversion. Only channels TC0, + * TC1, TC2 can be used with DAC. + * + ****************************************************************************/ + +#ifdef CONFIG_SAMV7_DAC_TRIGGER +static int dac_timer_init(struct sam_dac_s *priv, uint32_t freq_required, + int channel) +{ + uint32_t mode; + uint32_t regval; + uint32_t freq_actual; + + ainfo("required frequency=%ld [Hz], channel=%d\n", + (long)freq_required, channel); + + DEBUGASSERT(priv && (freq_required > 0) && (channel >= 0 && channel <= 2)); + + /* Set the timer/counter waveform mode the the clock input. Use smallest + * MCK divisor of 8 to have highest clock resolution thus smallest frequency + * error. With 32 bit counter the lowest possible frequency of 1 Hz is easily + * supported. + */ + + /* TODO Add support for TC_CMR_TCCLKS_PCK6 to reduce frequency error */ + + mode = (TC_CMR_TCCLKS_MCK8 | /* Use MCK/8 clock signal */ + TC_CMR_WAVSEL_UPRC | /* UP mode w/ trigger on RC Compare */ + TC_CMR_WAVE | /* Wave mode */ + TC_CMR_ACPA_CLEAR | /* RA Compare Effect on TIOA: Clear */ + TC_CMR_ACPC_SET); /* RC Compare Effect on TIOA: Set */ + + /* Now allocate and configure the channel */ + + priv->tc = sam_tc_allocate(channel, mode); + if (!priv->tc) + { + aerr("ERROR: Failed to allocate channel %d mode %08x\n", channel, mode); + return -EINVAL; + } + + /* Calculate the actual counter value from this divider and the tc input + * frequency. + */ + + regval = BOARD_MCK_FREQUENCY / 8 / freq_required; + DEBUGASSERT(regval > 0); /* Will check for integer underflow */ + + /* Set up TC_RA and TC_RC. The frequency is determined by RA and RC: + * TIOA is cleared on RA match; TIOA is set on RC match. + */ + + sam_tc_setregister(priv->tc, TC_REGA, regval >> 1); + sam_tc_setregister(priv->tc, TC_REGC, regval); + + freq_actual = BOARD_MCK_FREQUENCY / 8 / regval; + ainfo("configured frequency=%ld [Hz]\n", (long)freq_actual); + + /* And start the timer */ + + sam_tc_start(priv->tc); + return OK; +} +#endif + +/**************************************************************************** + * Name: dac_timer_free + * + * Description: + * Free the timer resource + * + ****************************************************************************/ + +#ifdef CONFIG_SAMV7_DAC_TRIGGER +static void dac_timer_free(struct sam_dac_s *priv) +{ + /* Is a timer allocated? */ + + ainfo("tc=%p\n", priv->tc); + + if (priv->tc) + { + /* Yes.. stop it and free it */ + + sam_tc_stop(priv->tc); + sam_tc_free(priv->tc); + priv->tc = NULL; + } +} +#endif + +/**************************************************************************** + * Name: dac_channel_init + * + * Description: + * Initialize the DAC channel. + * + * Input Parameters: + * chan - A reference to the DAC channel state data + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +static int dac_channel_init(FAR struct sam_chan_s *chan) +{ + /* Is the selected channel already in-use? */ + + if (chan->inuse) + { + /* Yes.. then return EBUSY */ + + return -EBUSY; + } + +#ifdef CONFIG_SAMV7_DAC_TRIGGER + /* Configure trigger mode operation */ + + ainfo("Enabled trigger mode for DAC%d\n", chan->intf); + + modifyreg32(SAM_DACC_TRIGR, + chan->reg_dacc_trigr_clear, + chan->reg_dacc_trigr_set); +#endif + + /* Enable DAC Channel */ + + putreg32(1 << chan->intf, SAM_DACC_CHER); + + /* Mark the DAC channel "in-use" */ + + chan->inuse = 1; + return OK; +} + +/**************************************************************************** + * Name: dac_module_init + * + * Description: + * Initialize the DAC. All ioctl calls will be routed through this method. + * + * Input Parameters: + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +static int dac_module_init(void) +{ + uint32_t regval; + int ret; + + /* Has the DAC block already been initialized? */ + + if (g_dacmodule.initialized) + { + /* Yes.. then return success We only have to do this once */ + + return OK; + } + + ainfo("Initializing...\n"); + + /* Disable DAC peripheral clock */ + + sam_dacc_disableclk(); + + /* Configure DAC pins */ + +#ifdef CONFIG_SAMV7_DAC0 + sam_configgpio(GPIO_DAC0); +#endif +#ifdef CONFIG_SAMV7_DAC1 + sam_configgpio(GPIO_DAC1); +#endif + + /* Enable the DAC peripheral clock */ + + sam_dacc_enableclk(); + + /* Reset the DAC controller */ + + putreg32(DACC_CR_SWRST, SAM_DACC_CR); + + /* Set the MCK clock prescaler: PRESCAL = (MCK / DACClock) - 2 */ + + regval = DACC_MR_PRESCALER(CONFIG_SAMV7_DAC_PRESCAL); + putreg32(regval, SAM_DACC_MR); + + /* Configure trigger mode operation */ + +#ifdef CONFIG_SAMV7_DAC_TRIGGER + ret = dac_timer_init(&g_dacmodule, + CONFIG_SAMV7_DAC_TRIGGER_FREQUENCY, + SAMV7_DAC_TC_CHANNEL); + if (ret < 0) + { + aerr("ERROR: Failed to initialize the timer: %d\n", ret); + return ret; + } +#endif + + /* Configure interrupts */ + + ret = irq_attach(SAM_IRQ_DACC, dac_interrupt); + if (ret < 0) + { + aerr("irq_attach failed: %d\n", ret); + return ret; + } + + ainfo("Enable the DAC interrupt: irq=%d\n", SAM_IRQ_DACC); + up_enable_irq(SAM_IRQ_DACC); + + /* Mark the DAC module as initialized */ + + g_dacmodule.initialized = 1; + return OK; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: sam_dac_initialize + * + * Description: + * Initialize the DAC. + * + * Input Parameters: + * intf - The DAC interface number. + * + * Returned Value: + * Valid DAC device structure reference on success, NULL on failure. + * + ****************************************************************************/ + +FAR struct dac_dev_s *sam_dac_initialize(int intf) +{ + FAR struct dac_dev_s *dev; + FAR struct sam_chan_s *chan; + int ret; + +#ifdef CONFIG_SAMV7_DAC0 + if (intf == 0) + { + ainfo("DAC1 Selected\n"); + dev = &g_dac1dev; + } + else +#endif +#ifdef CONFIG_SAMV7_DAC1 + if (intf == 1) + { + ainfo("DAC2 Selected\n"); + dev = &g_dac2dev; + } + else +#endif + { + aerr("ERROR: No such DAC interface: %d\n", intf); + errno = ENODEV; + return NULL; + } + + /* Initialize the DAC peripheral module */ + + ret = dac_module_init(); + if (ret < 0) + { + aerr("ERROR: Failed to initialize the DAC peripheral module: %d\n", ret); + errno = -ret; + return NULL; + } + + /* Configure the selected DAC channel */ + + chan = dev->ad_priv; + ret = dac_channel_init(chan); + if (ret < 0) + { + aerr("ERROR: Failed to initialize DAC channel %d: %d\n", intf, ret); + errno = -ret; + return NULL; + } + + return dev; +} + +#endif /* CONFIG_SAMV7_DAC0 || CONFIG_SAMV7_DAC1 */ diff --git a/arch/arm/src/samv7/sam_dac.h b/arch/arm/src/samv7/sam_dac.h new file mode 100644 index 0000000000000000000000000000000000000000..616d25b486c64298bfa8ba83a6d5f4d8df7bd0ff --- /dev/null +++ b/arch/arm/src/samv7/sam_dac.h @@ -0,0 +1,129 @@ +/**************************************************************************** + * arch/arm/src/samv7/sam_dac.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_SAMV7_SAM_DAC_H +#define __ARCH_ARM_SRC_SAMV7_SAM_DAC_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include +#include "chip/sam_dacc.h" + +#if defined(CONFIG_SAMV7_DAC0) || defined(CONFIG_SAMV7_DAC1) + +/**************************************************************************** + * Pre-processor definitions + ****************************************************************************/ +/* Default configuration settings may be overridden in the board configuration + * file. + */ + +#if !defined(CONFIG_SAMV7_DAC_DMA_BUFFER_SIZE) +# define CONFIG_SAMV7_DAC_DMA_BUFFER_SIZE 8 +#elif CONFIG_SAMV7_DAC_DMA_BUFFER_SIZE > 65535 +# warning "CONFIG_SAMV7_DAC_DMA_BUFFER_SIZE value does not fit into uint16_t, limiting it to 65535" +# undef CONFIG_SAMV7_DAC_DMA_BUFFER_SIZE +# define CONFIG_SAMV7_DAC_DMA_BUFFER_SIZE (65535) +#endif + +#if !defined(CONFIG_SAMV7_DAC_TRIGGER_FREQUENCY) +# define CONFIG_SAMV7_DAC_TRIGGER_FREQUENCY 8000 +#endif + +/* PRESCAL = (MCK / DACClock) - 2 + * + * Given: + * MCK = 150MHz + * DACClock = 16MHz + * Then: + * PRESCAL = 7 + */ + +#if !defined(CONFIG_SAMV7_DAC_PRESCAL) +#define CONFIG_SAMV7_DAC_PRESCAL (7) +#elif CONFIG_SAMV7_DAC_PRESCAL > 15 +# warning "Maximum valid CONFIG_SAMV7_DAC_PRESCAL value is 15" +#endif + +#if !defined(CONFIG_SAMV7_DAC_TRIGGER_SELECT) +#define CONFIG_SAMV7_DAC_TRIGGER_SELECT (3) +#elif CONFIG_SAMV7_DAC_TRIGGER_SELECT < 1 || CONFIG_SAMV7_DAC_TRIGGER_SELECT > 3 +# warning "Only CONFIG_SAMV7_DAC_TRIGGER_SELECT == [1-3] is supported" +#endif + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Name: sam_dac_initialize + * + * Description: + * Initialize the DAC + * + * Input Parameters: + * intf - The DAC interface number. + * + * Returned Value: + * Valid DAC device structure reference on success; a NULL on failure + * + ****************************************************************************/ + +struct dac_dev_s; +FAR struct dac_dev_s *sam_dac_initialize(int intf); + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* CONFIG_SAMV7_DAC0 || CONFIG_SAMV7_DAC1 */ +#endif /* __ARCH_ARM_SRC_SAMV7_SAM_DAC_H */ diff --git a/arch/arm/src/samv7/sam_freerun.c b/arch/arm/src/samv7/sam_freerun.c index b3fbfbf6dfc6eb114edfab61a9baed79986d6426..4db95112182ecf4414f06ae7e88c3b5e61605ae9 100644 --- a/arch/arm/src/samv7/sam_freerun.c +++ b/arch/arm/src/samv7/sam_freerun.c @@ -61,7 +61,7 @@ #include "sam_freerun.h" -#ifdef CONFIG_SAMV7_ONESHOT +#ifdef CONFIG_SAMV7_FREERUN /**************************************************************************** * Private Functions @@ -319,4 +319,4 @@ int sam_freerun_uninitialize(struct sam_freerun_s *freerun) return OK; } -#endif /* CONFIG_SAMV7_ONESHOT */ +#endif /* CONFIG_SAMV7_FREERUN */ diff --git a/arch/arm/src/samv7/sam_oneshot.c b/arch/arm/src/samv7/sam_oneshot.c index 4ee2467a61ed967fa3abe15f5720792392c1f458..9a20ec17a76a4594a84b312d1bcf8f79b4d577fc 100644 --- a/arch/arm/src/samv7/sam_oneshot.c +++ b/arch/arm/src/samv7/sam_oneshot.c @@ -64,22 +64,6 @@ #ifdef CONFIG_SAMV7_ONESHOT -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -129,7 +113,9 @@ static void sam_oneshot_handler(TC_HANDLE tch, void *arg, uint32_t sr) oneshot->handler = NULL; oneshot_arg = (void *)oneshot->arg; oneshot->arg = NULL; +#ifdef CONFIG_SAMV7_FREERUN oneshot->start_count = 0; +#endif oneshot_handler(oneshot_arg); } @@ -230,7 +216,36 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, oneshot->running = false; oneshot->handler = NULL; oneshot->arg = NULL; +#ifdef CONFIG_SAMV7_FREERUN oneshot->start_count = 0; +#endif + + return OK; +} + +/**************************************************************************** + * Name: sam_oneshot_max_delay + * + * Description: + * Return the maximum delay supported by the one shot timer (in + * microseconds). + * + * Input Parameters: + * oneshot Caller allocated instance of the oneshot state structure. This + * structure must have been previously initialized via a call to + * sam_oneshot_initialize(); + * usec The location in which to return the maximum delay. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +int sam_oneshot_max_delay(struct sam_oneshot_s *oneshot, uint64_t *usec) +{ + DEBUGASSERT(oneshot != NULL && usec != NULL); + *usec = (0xffffull * USEC_PER_SEC) / (uint64_t)sam_tc_divfreq(oneshot->tch); return OK; } @@ -254,8 +269,10 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, * ****************************************************************************/ -int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, - oneshot_handler_t handler, void *arg, const struct timespec *ts) +int sam_oneshot_start(struct sam_oneshot_s *oneshot, + struct sam_freerun_s *freerun, + oneshot_handler_t handler, void *arg, + const struct timespec *ts) { uint64_t usec; uint64_t regval; @@ -285,7 +302,8 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer usec = (uint64_t)ts->tv_sec * USEC_PER_SEC + (uint64_t)(ts->tv_nsec / NSEC_PER_USEC); - /* Get the timer counter frequency and determine the number of counts need to achieve the requested delay. + /* Get the timer counter frequency and determine the number of counts + * needed to achieve the requested delay. * * frequency = ticks / second * ticks = seconds * frequency @@ -312,6 +330,7 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer sam_tc_start(oneshot->tch); +#ifdef CONFIG_SAMV7_FREERUN /* The function sam_tc_start() starts the timer/counter by setting the * bits TC_CCR_CLKEN and TC_CCR_SWTRG in the channel control register. * The first one enables the timer/counter the latter performs an @@ -325,12 +344,16 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer * the counter value of the freerun timer/counter is stored at each start * of the oneshot timer/counter. * - * The function up_timer_gettime() could also be used for this but it takes - * too long. If up_timer_gettime() is called within this function the problem - * vanishes at least if compiled with no optimisation. + * The function up_timer_gettime() could also be used for this but it + * takes too long. If up_timer_gettime() is called within this function + * the problem vanishes at least if compiled with no optimisation. */ - oneshot->start_count = sam_tc_getcounter(freerun->tch); + if (freerun != NULL) + { + oneshot->start_count = sam_tc_getcounter(freerun->tch); + } +#endif /* Enable interrupts. We should get the callback when the interrupt * occurs. @@ -347,8 +370,8 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer * Description: * Cancel the oneshot timer and return the time remaining on the timer. * - * NOTE: This function may execute at a high rate with no timer running (as - * when pre-emption is enabled and disabled). + * NOTE: This function may execute at a high rate with no timer running + * (as when pre-emption is enabled and disabled). * * Input Parameters: * oneshot Caller allocated instance of the oneshot state structure. This @@ -366,8 +389,8 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer * ****************************************************************************/ -int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, - struct timespec *ts) +int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, + struct sam_freerun_s *freerun, struct timespec *ts) { irqstate_t flags; uint64_t usec; @@ -408,16 +431,19 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *free count = sam_tc_getcounter(oneshot->tch); rc = sam_tc_getregister(oneshot->tch, TC_REGC); +#ifdef CONFIG_SAMV7_FREERUN /* In the case the timer/counter was canceled very short after its start, * the counter register can hold the wrong value (the value of the last * run). To prevent this the counter value is set to zero if not at * least on tick passed since the start of the timer/counter. */ - if (count > 0 && sam_tc_getcounter(freerun->tch) == oneshot->start_count) + if (count > 0 && freerun != NULL && + sam_tc_getcounter(freerun->tch) == oneshot->start_count) { count = 0; } +#endif /* Now we can disable the interrupt and stop the timer. */ @@ -491,32 +517,4 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *free return OK; } -/**************************************************************************** - * Name: sam_oneshot_max_delay - * - * Description: - * Return the maximum delay supported by the one shot timer (in - * microseconds). - * - * Input Parameters: - * oneshot Caller allocated instance of the oneshot state structure. This - * structure must have been previously initialized via a call to - * sam_oneshot_initialize(); - * usec The location in which to return the maximum delay. - * - * Returned Value: - * Zero (OK) is returned on success; a negated errno value is returned - * on failure. - * - ****************************************************************************/ - -#ifdef CONFIG_SCHED_TICKLESS_LIMIT_MAX_SLEEP -int sam_oneshot_max_delay(struct sam_oneshot_s *oneshot, uint64_t *usec) -{ - DEBUGASSERT(oneshot && usec); - *usec = (0xffffull * USEC_PER_SEC) / (uint64_t)sam_tc_divfreq(oneshot->tch); - return OK; -} -#endif - #endif /* CONFIG_SAMV7_ONESHOT */ diff --git a/arch/arm/src/samv7/sam_oneshot.h b/arch/arm/src/samv7/sam_oneshot.h index 6c4e42337f156b730750ffb0f83a90bbf3717abe..276698c7dda9dea0d4dc02d6058b91adc35fbef6 100644 --- a/arch/arm/src/samv7/sam_oneshot.h +++ b/arch/arm/src/samv7/sam_oneshot.h @@ -46,7 +46,6 @@ #include #include "sam_tc.h" -#include "sam_freerun.h" #ifdef CONFIG_SAMV7_ONESHOT @@ -83,11 +82,13 @@ struct sam_oneshot_s volatile oneshot_handler_t handler; /* Oneshot expiration callback */ volatile void *arg; /* The argument that will accompany * the callback */ +#ifdef CONFIG_SAMV7_FREERUN volatile uint32_t start_count; /* Stores the value of the freerun counter, * at each start of the onshot timer. Is neccesary * to find out if the onshot counter was updated * correctly at the time of the call to * sam_oneshot_cancel or not. */ +#endif }; /**************************************************************************** @@ -149,9 +150,7 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, * ****************************************************************************/ -#ifdef CONFIG_SCHED_TICKLESS_LIMIT_MAX_SLEEP int sam_oneshot_max_delay(struct sam_oneshot_s *oneshot, uint64_t *usec); -#endif /**************************************************************************** * Name: sam_oneshot_start @@ -165,7 +164,8 @@ int sam_oneshot_max_delay(struct sam_oneshot_s *oneshot, uint64_t *usec); * sam_oneshot_initialize(); * freerun Caller allocated instance of the freerun state structure. This * structure must have been previously initialized via a call to - * sam_freerun_initialize(); + * sam_freerun_initialize(). May be NULL if there is no matching + * free-running timer. * handler The function to call when when the oneshot timer expires. * arg An opaque argument that will accompany the callback. * ts Provides the duration of the one shot timer. @@ -176,8 +176,11 @@ int sam_oneshot_max_delay(struct sam_oneshot_s *oneshot, uint64_t *usec); * ****************************************************************************/ -int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, - oneshot_handler_t handler, void *arg, const struct timespec *ts); +struct sam_freerun_s; +int sam_oneshot_start(struct sam_oneshot_s *oneshot, + struct sam_freerun_s *freerun, + oneshot_handler_t handler, void *arg, + const struct timespec *ts); /**************************************************************************** * Name: sam_oneshot_cancel @@ -194,7 +197,8 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer * sam_oneshot_initialize(); * freerun Caller allocated instance of the freerun state structure. This * structure must have been previously initialized via a call to - * sam_freerun_initialize(); + * sam_freerun_initialize(). May be NULL if there is no matching + * free-running timer. * ts The location in which to return the time remaining on the * oneshot timer. A time of zero is returned if the timer is * not running. @@ -206,8 +210,9 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freer * ****************************************************************************/ -int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, - struct timespec *ts); +struct sam_freerun_s; +int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, + struct sam_freerun_s *freerun, struct timespec *ts); #undef EXTERN #ifdef __cplusplus diff --git a/arch/arm/src/samv7/sam_oneshot_lowerhalf.c b/arch/arm/src/samv7/sam_oneshot_lowerhalf.c new file mode 100644 index 0000000000000000000000000000000000000000..e6154850eb3ff0ff514881b956fee21ebbdefb8c --- /dev/null +++ b/arch/arm/src/samv7/sam_oneshot_lowerhalf.c @@ -0,0 +1,345 @@ +/**************************************************************************** + * arch/arm/src/sam/sam_oneshot_lowerhalf.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 + +#include "sam_oneshot.h" + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* This structure describes the state of the oneshot timer lower-half driver */ + +struct sam_oneshot_lowerhalf_s +{ + /* This is the part of the lower half driver that is visible to the upper- + * half client of the driver. This must be the first thing in this + * structure so that pointers to struct oneshot_lowerhalf_s are cast + * compatible to struct sam_oneshot_lowerhalf_s and vice versa. + */ + + struct oneshot_lowerhalf_s lh; /* Common lower-half driver fields */ + + /* Private lower half data follows */ + + struct sam_oneshot_s oneshot; /* SAMV7-specific oneshot state */ + oneshot_callback_t callback; /* internal handler that receives callback */ + FAR void *arg; /* Argument that is passed to the handler */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static void sam_oneshot_handler(void *arg); + +static int sam_max_delay(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts); +static int sam_start(FAR struct oneshot_lowerhalf_s *lower, + oneshot_callback_t callback, FAR void *arg, + FAR const struct timespec *ts); +static int sam_cancel(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* Lower half operations */ + +static const struct oneshot_operations_s g_oneshot_ops = +{ + .max_delay = sam_max_delay, + .start = sam_start, + .cancel = sam_cancel, +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: sam_oneshot_handler + * + * Description: + * Timer expiration handler + * + * Input Parameters: + * arg - Should be the same argument provided when sam_oneshot_start() + * was called. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void sam_oneshot_handler(void *arg) +{ + FAR struct sam_oneshot_lowerhalf_s *priv = + (FAR struct sam_oneshot_lowerhalf_s *)arg; + oneshot_callback_t callback; + FAR void *cbarg; + + DEBUGASSERT(priv != NULL); + + /* Perhaps the callback was nullified in a race condition with + * sam_cancel? + */ + + if (priv->callback) + { + /* Sample and nullify BEFORE executing callback (in case the callback + * restarts the oneshot). + */ + + callback = priv->callback; + cbarg = priv->arg; + priv->callback = NULL; + priv->arg = NULL; + + /* Then perform the callback */ + + callback(&priv->lh, cbarg); + } +} + +/**************************************************************************** + * Name: sam_max_delay + * + * Description: + * Determine the maximum delay of the one-shot timer (in microseconds) + * + * Input Parameters: + * lower An instance of the lower-half oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * ts The location in which to return the maxumum delay. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +static int sam_max_delay(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts) +{ + FAR struct sam_oneshot_lowerhalf_s *priv = + (FAR struct sam_oneshot_lowerhalf_s *)lower; + uint64_t usecs; + int ret; + + DEBUGASSERT(priv != NULL && ts != NULL); + ret = sam_oneshot_max_delay(&priv->oneshot, &usecs); + if (ret >= 0) + { + uint64_t sec = usecs / 1000000; + usecs -= 1000000 * sec; + + ts->tv_sec = (time_t)sec; + ts->tv_nsec = (long)(usecs * 1000); + } + + return ret; +} + +/**************************************************************************** + * Name: sam_start + * + * Description: + * Start the oneshot timer + * + * Input Parameters: + * lower An instance of the lower-half oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * handler The function to call when when the oneshot timer expires. + * arg An opaque argument that will accompany the callback. + * ts Provides the duration of the one shot timer. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +static int sam_start(FAR struct oneshot_lowerhalf_s *lower, + oneshot_callback_t callback, FAR void *arg, + FAR const struct timespec *ts) +{ + FAR struct sam_oneshot_lowerhalf_s *priv = + (FAR struct sam_oneshot_lowerhalf_s *)lower; + irqstate_t flags; + int ret; + + DEBUGASSERT(priv != NULL && callback != NULL && ts != NULL); + + /* Save the callback information and start the timer */ + + flags = enter_critical_section(); + priv->callback = callback; + priv->arg = arg; + ret = sam_oneshot_start(&priv->oneshot, NULL, + sam_oneshot_handler, priv, ts); + leave_critical_section(flags); + + if (ret < 0) + { + tmrerr("ERROR: sam_oneshot_start failed: %d\n", flags); + } + + return ret; +} + +/**************************************************************************** + * Name: sam_cancel + * + * Description: + * Cancel the oneshot timer and return the time remaining on the timer. + * + * NOTE: This function may execute at a high rate with no timer running (as + * when pre-emption is enabled and disabled). + * + * Input Parameters: + * lower Caller allocated instance of the oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * ts The location in which to return the time remaining on the + * oneshot timer. A time of zero is returned if the timer is + * not running. + * + * Returned Value: + * Zero (OK) is returned on success. A call to up_timer_cancel() when + * the timer is not active should also return success; a negated errno + * value is returned on any failure. + * + ****************************************************************************/ + +static int sam_cancel(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts) +{ + FAR struct sam_oneshot_lowerhalf_s *priv = + (FAR struct sam_oneshot_lowerhalf_s *)lower; + irqstate_t flags; + int ret; + + DEBUGASSERT(priv != NULL); + + /* Cancel the timer */ + + flags = enter_critical_section(); + ret = sam_oneshot_cancel(&priv->oneshot, NULL, ts); + priv->callback = NULL; + priv->arg = NULL; + leave_critical_section(flags); + + if (ret < 0) + { + tmrerr("ERROR: sam_oneshot_cancel failed: %d\n", flags); + } + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: oneshot_initialize + * + * Description: + * Initialize the oneshot timer and return a oneshot lower half driver + * instance. + * + * Input Parameters: + * chan Timer counter channel to be used. + * resolution The required resolution of the timer in units of + * microseconds. NOTE that the range is restricted to the + * range of uint16_t (excluding zero). + * + * Returned Value: + * On success, a non-NULL instance of the oneshot lower-half driver is + * returned. NULL is return on any failure. + * + ****************************************************************************/ + +FAR struct oneshot_lowerhalf_s *oneshot_initialize(int chan, + uint16_t resolution) +{ + FAR struct sam_oneshot_lowerhalf_s *priv; + int ret; + + /* Allocate an instance of the lower half driver */ + + priv = (FAR struct sam_oneshot_lowerhalf_s *) + kmm_zalloc(sizeof(struct sam_oneshot_lowerhalf_s)); + + if (priv == NULL) + { + tmrerr("ERROR: Failed to initialized state structure\n"); + return NULL; + } + + /* Initialize the lower-half driver structure */ + + priv->lh.ops = &g_oneshot_ops; + + /* Initialize the contained SAM oneshot timer */ + + ret = sam_oneshot_initialize(&priv->oneshot, chan, resolution); + if (ret < 0) + { + tmrerr("ERROR: sam_oneshot_initialize failed: %d\n", ret); + kmm_free(priv); + return NULL; + } + + return &priv->lh; +} \ No newline at end of file diff --git a/arch/arm/src/samv7/sam_spi.c b/arch/arm/src/samv7/sam_spi.c index df176330991389ad75ddc58dd80f418e2ce05d71..06c18b70f131b28a929ef54c54b4f0fba43b233f 100644 --- a/arch/arm/src/samv7/sam_spi.c +++ b/arch/arm/src/samv7/sam_spi.c @@ -1221,6 +1221,7 @@ static int spi_setdelay(struct spi_dev_s *dev, uint32_t startdelay, #ifdef CONFIG_SPI_HWFEATURES static int spi_hwfeatures(struct spi_dev_s *dev, uint8_t features) { +#ifdef CONFIG_SPI_CS_CONTROL struct sam_spics_s *spics = (struct sam_spics_s *)dev; struct sam_spidev_s *spi = spi_device(spics); uint32_t regval; @@ -1280,7 +1281,10 @@ static int spi_hwfeatures(struct spi_dev_s *dev, uint8_t features) spi->escape_lastxfer = false; } - return 0; + return ((features & ~HWFEAT_FORCE_CS_CONTROL_MASK) == 0) ? OK : -ENOSYS; +#else + return -ENOSYS; +#endif } #endif diff --git a/arch/arm/src/stm32/Kconfig b/arch/arm/src/stm32/Kconfig index 3b7a1cf8cc892f6eb08874a2ceacc5ec475876f8..f914f760e195baa36d60cf77ceea8ed20b5e6ab7 100644 --- a/arch/arm/src/stm32/Kconfig +++ b/arch/arm/src/stm32/Kconfig @@ -1398,6 +1398,8 @@ config STM32_STM32F37XX select STM32_HAVE_DAC1 select STM32_HAVE_DAC2 select STM32_HAVE_I2C2 + select STM32_HAVE_SPI2 + select STM32_HAVE_SPI3 select STM32_HAVE_USART3 config STM32_STM32F40XX @@ -2074,7 +2076,7 @@ config STM32_SPI6 config STM32_SYSCFG bool "SYSCFG" default y - depends on STM32_STM32L15XX || STM32_STM32F30XX || STM32_STM32F37XX || STM32_STM32F207 || STM32_STM32F40XX + depends on STM32_STM32L15XX || STM32_STM32F30XX || STM32_STM32F37XX || STM32_STM32F207 || STM32_STM32F40XX || STM32_CONNECTIVITYLINE config STM32_TIM1 bool "TIM1" diff --git a/arch/arm/src/stm32/Make.defs b/arch/arm/src/stm32/Make.defs index aef4ef081552e0ca842838d713704463cea0dd8b..f08a904d67e1e42e1153b3e2f32d82b38e7999b1 100644 --- a/arch/arm/src/stm32/Make.defs +++ b/arch/arm/src/stm32/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/stm32/Make.defs # -# Copyright (C) 2009, 2011-2015 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 @@ -125,7 +125,7 @@ CHIP_CSRCS += stm32_tickless.c endif ifeq ($(CONFIG_STM32_ONESHOT),y) -CHIP_CSRCS += stm32_oneshot.c +CHIP_CSRCS += stm32_oneshot.c stm32_oneshot_lowerhalf.c endif ifeq ($(CONFIG_STM32_FREERUN),y) diff --git a/arch/arm/src/stm32/chip/stm32_otghs.h b/arch/arm/src/stm32/chip/stm32_otghs.h index 42b442226216a7877bb9c1b59f87104538c9033e..95b4772a37aa0c345ec4528c4eb184e127c740b9 100644 --- a/arch/arm/src/stm32/chip/stm32_otghs.h +++ b/arch/arm/src/stm32/chip/stm32_otghs.h @@ -59,8 +59,6 @@ #define OTGHS_PID_MDATA (3) /* Non-control */ #define OTGHS_PID_SETUP (3) /* Control */ -/* If OTGHS2 is defined (FS mode of the HS module), then remap the OTGHS base address */ - /* Register Offsets *********************************************************************************/ /* Core global control and status registers */ diff --git a/arch/arm/src/stm32/chip/stm32_spi.h b/arch/arm/src/stm32/chip/stm32_spi.h index bdbabab33461794d0f645bbbd2c496f85e188e8b..3e0a086b63cba3bd537c19f66fe91b8d553c37bc 100644 --- a/arch/arm/src/stm32/chip/stm32_spi.h +++ b/arch/arm/src/stm32/chip/stm32_spi.h @@ -66,7 +66,7 @@ #define STM32_SPI_TXCRCR_OFFSET 0x0018 /* SPI Tx CRC register (16-bit) */ #if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F30XX) || \ - defined(CONFIG_STM32_STM32F40XX) + defined(CONFIG_STM32_STM32F37XX) || defined(CONFIG_STM32_STM32F40XX) # define STM32_SPI_I2SCFGR_OFFSET 0x001c /* I2S configuration register */ # define STM32_SPI_I2SPR_OFFSET 0x0020 /* I2S prescaler register */ #endif @@ -92,7 +92,7 @@ # define STM32_SPI2_RXCRCR (STM32_SPI2_BASE+STM32_SPI_RXCRCR_OFFSET) # define STM32_SPI2_TXCRCR (STM32_SPI2_BASE+STM32_SPI_TXCRCR_OFFSET) #if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F30XX) || \ - defined(CONFIG_STM32_STM32F40XX) + defined(CONFIG_STM32_STM32F37XX) || defined(CONFIG_STM32_STM32F40XX) # define STM32_SPI2_I2SCFGR (STM32_SPI2_BASE+STM32_SPI_I2SCFGR_OFFSET) # define STM32_SPI2_I2SPR (STM32_SPI2_BASE+STM32_SPI_I2SPR_OFFSET) # endif @@ -107,7 +107,7 @@ # define STM32_SPI3_RXCRCR (STM32_SPI3_BASE+STM32_SPI_RXCRCR_OFFSET) # define STM32_SPI3_TXCRCR (STM32_SPI3_BASE+STM32_SPI_TXCRCR_OFFSET) #if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F30XX) || \ - defined(CONFIG_STM32_STM32F40XX) + defined(CONFIG_STM32_STM32F37XX) || defined(CONFIG_STM32_STM32F40XX) # define STM32_SPI3_I2SCFGR (STM32_SPI3_BASE+STM32_SPI_I2SCFGR_OFFSET) # define STM32_SPI3_I2SPR (STM32_SPI3_BASE+STM32_SPI_I2SPR_OFFSET) # endif @@ -135,7 +135,11 @@ #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_DFF (1 << 11) /* Bit 11: Data Frame Format */ +#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) +# define SPI_CR1_CRCL (1 << 11) /* Bit 11: CRC length */ +#else +# define SPI_CR1_DFF (1 << 11) /* Bit 11: Data Frame Format */ +#endif #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 */ @@ -148,7 +152,7 @@ #define SPI_CR2_SSOE (1 << 2) /* Bit 2: SS Output Enable */ #if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F30XX) || \ - defined(CONFIG_STM32_STM32F40XX) + defined(CONFIG_STM32_STM32F37XX) || defined(CONFIG_STM32_STM32F40XX) # define SPI_CR2_FRF (1 << 4) /* Bit 4: Frame format */ #endif @@ -156,22 +160,23 @@ #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 */ -#ifdef CONFIG_STM32_STM32F30XX -#define SPI_CR1_DS_SHIFT (8) /* Bits 8-11: Data size */ -#define SPI_CR1_DS_MASK (15 << SPI_CR1_DS_SHIFT) -# define SPI_CR1_DS_4BIT (3 << SPI_CR1_DS_SHIFT) -# define SPI_CR1_DS_5BIT (4 << SPI_CR1_DS_SHIFT) -# define SPI_CR1_DS_6BIT (5 << SPI_CR1_DS_SHIFT) -# define SPI_CR1_DS_7BIT (6 << SPI_CR1_DS_SHIFT) -# define SPI_CR1_DS_8BIT (7 << SPI_CR1_DS_SHIFT) -# define SPI_CR1_DS_9BIT (8 << SPI_CR1_DS_SHIFT) -# define SPI_CR1_DS_10BIT (9 << SPI_CR1_DS_SHIFT) -# define SPI_CR1_DS_11BIT (10 << SPI_CR1_DS_SHIFT) -# define SPI_CR1_DS_12BIT (11 << SPI_CR1_DS_SHIFT) -# define SPI_CR1_DS_13BIT (12 << SPI_CR1_DS_SHIFT) -# define SPI_CR1_DS_14BIT (13 << SPI_CR1_DS_SHIFT) -# define SPI_CR1_DS_15BIT (14 << SPI_CR1_DS_SHIFT) -# define SPI_CR1_DS_16BIT (15 << SPI_CR1_DS_SHIFT) +#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) +#define SPI_CR2_DS_SHIFT (8) /* Bits 8-11: Data size */ +#define SPI_CR2_DS_MASK (15 << SPI_CR2_DS_SHIFT) +# define SPI_CR2_DS(n) ((uint32_t)((n) - 1) << SPI_CR2_DS_SHIFT) +# define SPI_CR2_DS_4BIT (3 << SPI_CR2_DS_SHIFT) +# define SPI_CR2_DS_5BIT (4 << SPI_CR2_DS_SHIFT) +# define SPI_CR2_DS_6BIT (5 << SPI_CR2_DS_SHIFT) +# define SPI_CR2_DS_7BIT (6 << SPI_CR2_DS_SHIFT) +# define SPI_CR2_DS_8BIT (7 << SPI_CR2_DS_SHIFT) +# define SPI_CR2_DS_9BIT (8 << SPI_CR2_DS_SHIFT) +# define SPI_CR2_DS_10BIT (9 << SPI_CR2_DS_SHIFT) +# define SPI_CR2_DS_11BIT (10 << SPI_CR2_DS_SHIFT) +# define SPI_CR2_DS_12BIT (11 << SPI_CR2_DS_SHIFT) +# define SPI_CR2_DS_13BIT (12 << SPI_CR2_DS_SHIFT) +# define SPI_CR2_DS_14BIT (13 << SPI_CR2_DS_SHIFT) +# define SPI_CR2_DS_15BIT (14 << SPI_CR2_DS_SHIFT) +# define SPI_CR2_DS_16BIT (15 << SPI_CR2_DS_SHIFT) #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 */ @@ -183,7 +188,7 @@ #define SPI_SR_TXE (1 << 1) /* Bit 1: Transmit buffer empty */ #if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F30XX) || \ - defined(CONFIG_STM32_STM32F40XX) + defined(CONFIG_STM32_STM32F37XX) || defined(CONFIG_STM32_STM32F40XX) # define SPI_SR_CHSIDE (1 << 2) /* Bit 2: Channel side */ # define SPI_SR_UDR (1 << 3) /* Bit 3: Underrun flag */ #endif @@ -194,29 +199,29 @@ #define SPI_SR_BSY (1 << 7) /* Bit 7: Busy flag */ #if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F30XX) || \ - defined(CONFIG_STM32_STM32F40XX) -# define SPI_SR_TIFRFE (1 << 8) /* Bit 8: TI frame format error */ + defined(CONFIG_STM32_STM32F37XX) || defined(CONFIG_STM32_STM32F40XX) +# define SPI_SR_FRE (1 << 8) /* Bit 8: TI frame format error */ #endif -#ifdef CONFIG_STM32_STM32F30XX -#define SPI_CR1_FRLVL_SHIFT (9) /* Bits 9-10: FIFO reception level */ -#define SPI_CR1_FRLVL_MASK (3 << SPI_CR1_FRLVL_SHIFT) -# define SPI_CR1_FRLVL_EMPTY (0 << SPI_CR1_FRLVL_SHIFT) /* FIFO empty */ -# define SPI_CR1_FRLVL_QUARTER (1 << SPI_CR1_FRLVL_SHIFT) /* 1/4 FIFO */ -# define SPI_CR1_FRLVL_HALF (2 << SPI_CR1_FRLVL_SHIFT) /* 1/2 FIFO */ -# define SPI_CR1_FRLVL_FULL (3 << SPI_CR1_FRLVL_SHIFT) /* FIFO full */ -#define SPI_CR1_FTLVL_SHIFT (11) /* Bits 11-12: FIFO transmission level */ -#define SPI_CR1_FTLVL_MASK (3 << SPI_CR1_FTLVL_SHIFT) -# define SPI_CR1_FTLVL_EMPTY (0 << SPI_CR1_FTLVL_SHIFT) /* FIFO empty */ -# define SPI_CR1_FTLVL_QUARTER (1 << SPI_CR1_FTLVL_SHIFT) /* 1/4 FIFO */ -# define SPI_CR1_FTLVL_HALF (2 << SPI_CR1_FTLVL_SHIFT) /* 1/2 FIFO */ -# define SPI_CR1_FTLVL_FULL (3 << SPI_CR1_FTLVL_SHIFT) /* FIFO full */ +#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) +#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 */ #endif /* I2S configuration register */ #if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F30XX) || \ - defined(CONFIG_STM32_STM32F40XX) + defined(CONFIG_STM32_STM32F37XX) || defined(CONFIG_STM32_STM32F40XX) # 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) @@ -244,7 +249,7 @@ /* I2S prescaler register */ #if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F30XX) || \ - defined(CONFIG_STM32_STM32F40XX) + defined(CONFIG_STM32_STM32F37XX) || defined(CONFIG_STM32_STM32F40XX) # 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 */ @@ -252,4 +257,3 @@ #endif #endif /* __ARCH_ARM_STC_STM32_CHIP_STM32_SPI_H */ - diff --git a/arch/arm/src/stm32/chip/stm32f10xxx_rcc.h b/arch/arm/src/stm32/chip/stm32f10xxx_rcc.h index 35b2ad8156c2547103e02290501bcf97c4c7b96c..4318b9d9cf7a99e0ea77e595a17bc011261e4fce 100644 --- a/arch/arm/src/stm32/chip/stm32f10xxx_rcc.h +++ b/arch/arm/src/stm32/chip/stm32f10xxx_rcc.h @@ -148,26 +148,37 @@ #define RCC_CFGR_PLLXTPRE (1 << 17) /* Bit 17: HSE divider for PLL entry */ #define RCC_CFGR_PLLMUL_SHIFT (18) /* Bits 21-18: PLL Multiplication Factor */ #define RCC_CFGR_PLLMUL_MASK (0x0f << RCC_CFGR_PLLMUL_SHIFT) -# define RCC_CFGR_PLLMUL_CLKx2 (0 << RCC_CFGR_PLLMUL_SHIFT) /* 0000: PLL input clock x 2 */ -# define RCC_CFGR_PLLMUL_CLKx3 (1 << RCC_CFGR_PLLMUL_SHIFT) /* 0001: PLL input clock x 3 */ +#ifndef CONFIG_STM32_CONNECTIVITYLINE +# define RCC_CFGR_PLLMUL_CLKx2 (0 << RCC_CFGR_PLLMUL_SHIFT) /* 0000: PLL input clock x 2 */ +# define RCC_CFGR_PLLMUL_CLKx3 (1 << RCC_CFGR_PLLMUL_SHIFT) /* 0001: PLL input clock x 3 */ +#endif # define RCC_CFGR_PLLMUL_CLKx4 (2 << RCC_CFGR_PLLMUL_SHIFT) /* 0010: PLL input clock x 4 */ # define RCC_CFGR_PLLMUL_CLKx5 (3 << RCC_CFGR_PLLMUL_SHIFT) /* 0011: PLL input clock x 5 */ # define RCC_CFGR_PLLMUL_CLKx6 (4 << RCC_CFGR_PLLMUL_SHIFT) /* 0100: PLL input clock x 6 */ # define RCC_CFGR_PLLMUL_CLKx7 (5 << RCC_CFGR_PLLMUL_SHIFT) /* 0101: PLL input clock x 7 */ # define RCC_CFGR_PLLMUL_CLKx8 (6 << RCC_CFGR_PLLMUL_SHIFT) /* 0110: PLL input clock x 8 */ # define RCC_CFGR_PLLMUL_CLKx9 (7 << RCC_CFGR_PLLMUL_SHIFT) /* 0111: PLL input clock x 9 */ -# define RCC_CFGR_PLLMUL_CLKx10 (8 << RCC_CFGR_PLLMUL_SHIFT) /* 1000: PLL input clock x 10 */ -# define RCC_CFGR_PLLMUL_CLKx11 (9 << RCC_CFGR_PLLMUL_SHIFT) /* 1001: PLL input clock x 11 */ -# define RCC_CFGR_PLLMUL_CLKx12 (10 << RCC_CFGR_PLLMUL_SHIFT) /* 1010: PLL input clock x 12 */ -# define RCC_CFGR_PLLMUL_CLKx13 (11 << RCC_CFGR_PLLMUL_SHIFT) /* 1011: PLL input clock x 13 */ -# define RCC_CFGR_PLLMUL_CLKx14 (12 << RCC_CFGR_PLLMUL_SHIFT) /* 1100: PLL input clock x 14 */ -# define RCC_CFGR_PLLMUL_CLKx15 (13 << RCC_CFGR_PLLMUL_SHIFT) /* 1101: PLL input clock x 15 */ -# define RCC_CFGR_PLLMUL_CLKx16 (14 << RCC_CFGR_PLLMUL_SHIFT) /* 111x: PLL input clock x 16 */ +#ifndef CONFIG_STM32_CONNECTIVITYLINE +# define RCC_CFGR_PLLMUL_CLKx10 (8 << RCC_CFGR_PLLMUL_SHIFT) /* 1000: PLL input clock x 10 */ +# define RCC_CFGR_PLLMUL_CLKx11 (9 << RCC_CFGR_PLLMUL_SHIFT) /* 1001: PLL input clock x 11 */ +# define RCC_CFGR_PLLMUL_CLKx12 (10 << RCC_CFGR_PLLMUL_SHIFT) /* 1010: PLL input clock x 12 */ +# define RCC_CFGR_PLLMUL_CLKx13 (11 << RCC_CFGR_PLLMUL_SHIFT) /* 1011: PLL input clock x 13 */ +# define RCC_CFGR_PLLMUL_CLKx14 (12 << RCC_CFGR_PLLMUL_SHIFT) /* 1100: PLL input clock x 14 */ +# define RCC_CFGR_PLLMUL_CLKx15 (13 << RCC_CFGR_PLLMUL_SHIFT) /* 1101: PLL input clock x 15 */ +# define RCC_CFGR_PLLMUL_CLKx16 (14 << RCC_CFGR_PLLMUL_SHIFT) /* 111x: PLL input clock x 16 */ +#else +# define RCC_CFGR_PLLMUL_CLKx65 (13 << RCC_CFGR_PLLMUL_SHIFT) /* 1011: PLL input clock x 6.5 */ +#endif + #ifndef CONFIG_STM32_VALUELINE # define RCC_CFGR_USBPRE (1 << 22) /* Bit 22: USB FS prescaler */ +# define RCC_CFGR_USBPREd0 (0) /* PLLCLK / 1 */ +# define RCC_CFGR_USBPREd15 (1) /* PLLCLK / 1.5 */ #endif #ifdef CONFIG_STM32_CONNECTIVITYLINE # define RCC_CFGR_OTGFSPRE (1 << 22) /* Bit 22: OTG FS prescaler */ +# define RCC_CFGR_OTGFSPREd2 (1) /* PLL_VCO (2x PLLCLK) / 2 */ +# define RCC_CFGR_OTGFSPREd3 (0) /* PLL_VCO (3x PLLCLK) / 3 */ #endif #define RCC_CFGR_MCO_SHIFT (24) /* Bits 27-24: Microcontroller Clock Output */ #define RCC_CFGR_MCO_MASK (15 << RCC_CFGR_MCO_SHIFT) diff --git a/arch/arm/src/stm32/chip/stm32f37xxx_syscfg.h b/arch/arm/src/stm32/chip/stm32f37xxx_syscfg.h index 2219009ef7da2fedd208c27d7d7bfe87ab3efafa..6b4ccd227dd39c66c1a212dc894b06f480258e63 100644 --- a/arch/arm/src/stm32/chip/stm32f37xxx_syscfg.h +++ b/arch/arm/src/stm32/chip/stm32f37xxx_syscfg.h @@ -113,7 +113,7 @@ #define SYSCFG_EXTICR_PORTC (2) /* 0010: PC[x] pin */ #define SYSCFG_EXTICR_PORTD (3) /* 0011: PD[x] pin */ #define SYSCFG_EXTICR_PORTE (4) /* 0100: Reserved */ -#define SYSCFG_EXTICR_PORTE (5) /* 0101: PF[x] pin */ +#define SYSCFG_EXTICR_PORTF (5) /* 0101: PF[x] pin */ #define SYSCFG_EXTICR_PORT_MASK (15) #define SYSCFG_EXTICR_EXTI_SHIFT(g) (((g) & 3) << 2) diff --git a/arch/arm/src/stm32/chip/stm32f40xxx_pinmap.h b/arch/arm/src/stm32/chip/stm32f40xxx_pinmap.h index ff75a5d0ad9edc07851b66e97516d33462a74197..0fdaef01398024c81cefdd4e18c698bc444ace3b 100644 --- a/arch/arm/src/stm32/chip/stm32f40xxx_pinmap.h +++ b/arch/arm/src/stm32/chip/stm32f40xxx_pinmap.h @@ -413,10 +413,11 @@ #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) || defined(CONFIG_STM32_STM32F411) -# define GPIO_I2C2_SDA_4 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN3) +#if defined(CONFIG_STM32_STM32F411) +# define GPIO_I2C2_SDA_4 (GPIO_ALT|GPIO_AF9|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN3) #endif #if defined(CONFIG_STM32_STM32F446) +# define GPIO_I2C2_SDA_4 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN3) # 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/chip/stm32fxxxxx_otgfs.h b/arch/arm/src/stm32/chip/stm32fxxxxx_otgfs.h index b0f431ab06f808bdc4a24948eeecdff090fb151a..8658aec0a89224069a7993d8f434891907f8a1b8 100644 --- a/arch/arm/src/stm32/chip/stm32fxxxxx_otgfs.h +++ b/arch/arm/src/stm32/chip/stm32fxxxxx_otgfs.h @@ -1,10 +1,11 @@ /**************************************************************************************************** * arch/arm/src/stm32/chip/stm32fxxxxx_otgfs.h * - * Copyright (C) 2012, 2014-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2014-2016 Gregory Nutt. All rights reserved. * Copyright (C) 2016 Omni Hoverboards Inc. All rights reserved. - * Author: Gregory Nutt - * Paul Alexander Patience + * 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 @@ -470,44 +471,38 @@ /* Core interrupt and Interrupt mask registers */ -#define OTGFS_GINTSTS_CMOD (1 << 0) /* Bit 0: Current mode of operation */ +#define OTGFS_GINTSTS_CMOD (1 << 0) /* Bit 0: ro Current mode of operation */ # define OTGFS_GINTSTS_DEVMODE (0) # define OTGFS_GINTSTS_HOSTMODE (OTGFS_GINTSTS_CMOD) -#define OTGFS_GINT_MMIS (1 << 1) /* Bit 1: Mode mismatch interrupt */ -#define OTGFS_GINT_OTG (1 << 2) /* Bit 2: OTG interrupt */ -#define OTGFS_GINT_SOF (1 << 3) /* Bit 3: Start of frame */ -#define OTGFS_GINT_RXFLVL (1 << 4) /* Bit 4: RxFIFO non-empty */ -#define OTGFS_GINT_NPTXFE (1 << 5) /* Bit 5: Non-periodic TxFIFO empty */ -#define OTGFS_GINT_GINAKEFF (1 << 6) /* Bit 6: Global IN non-periodic NAK effective */ +#define OTGFS_GINT_MMIS (1 << 1) /* Bit 1: rc_w1 Mode mismatch interrupt */ +#define OTGFS_GINT_OTG (1 << 2) /* Bit 2: ro OTG interrupt */ +#define OTGFS_GINT_SOF (1 << 3) /* Bit 3: rc_w1 Start of frame */ +#define OTGFS_GINT_RXFLVL (1 << 4) /* Bit 4: ro RxFIFO non-empty */ +#define OTGFS_GINT_NPTXFE (1 << 5) /* Bit 5: ro Non-periodic TxFIFO empty */ +#define OTGFS_GINT_GINAKEFF (1 << 6) /* Bit 6: ro Global IN non-periodic NAK effective */ #define OTGFS_GINT_GONAKEFF (1 << 7) /* Bit 7: Global OUT NAK effective */ - /* Bits 8-9: Reserved, must be kept at reset value */ -#define OTGFS_GINT_ESUSP (1 << 10) /* Bit 10: Early suspend */ -#define OTGFS_GINT_USBSUSP (1 << 11) /* Bit 11: USB suspend */ -#define OTGFS_GINT_USBRST (1 << 12) /* Bit 12: USB reset */ -#define OTGFS_GINT_ENUMDNE (1 << 13) /* Bit 13: Enumeration done */ -#define OTGFS_GINT_ISOODRP (1 << 14) /* Bit 14: Isochronous OUT packet dropped interrupt */ -#define OTGFS_GINT_EOPF (1 << 15) /* Bit 15: End of periodic frame interrupt */ - /* Bits 16 Reserved, must be kept at reset value */ -#define OTGFS_GINTMSK_EPMISM (1 << 17) /* Bit 17: Endpoint mismatch interrupt mask */ -#define OTGFS_GINT_IEP (1 << 18) /* Bit 18: IN endpoint interrupt */ -#define OTGFS_GINT_OEP (1 << 19) /* Bit 19: OUT endpoint interrupt */ -#define OTGFS_GINT_IISOIXFR (1 << 20) /* Bit 20: Incomplete isochronous IN transfer */ -#define OTGFS_GINT_IISOOXFR (1 << 21) /* Bit 21: Incomplete isochronous OUT transfer (device) */ -#define OTGFS_GINT_IPXFR (1 << 21) /* Bit 21: Incomplete periodic transfer (host) */ - /* Bit 22: Reserved, must be kept at reset value */ -#if defined(CONFIG_STM32_STM32F446) || defined(CONFIG_STM32_STM32F469) -# define OTGFS_GINT_RSTDET (1 << 23) /* Bit 23: Reset detected interrupt */ -#endif -#define OTGFS_GINT_HPRT (1 << 24) /* Bit 24: Host port interrupt */ -#define OTGFS_GINT_HC (1 << 25) /* Bit 25: Host channels interrupt */ -#define OTGFS_GINT_PTXFE (1 << 26) /* Bit 26: Periodic TxFIFO empty */ -#if defined(CONFIG_STM32_STM32F446) || defined(CONFIG_STM32_STM32F469) -# define OTGFS_GINT_LPMINT (1 << 27) /* Bit 27: LPM interrupt */ -#endif -#define OTGFS_GINT_CIDSCHG (1 << 28) /* Bit 28: Connector ID status change */ -#define OTGFS_GINT_DISC (1 << 29) /* Bit 29: Disconnect detected interrupt */ -#define OTGFS_GINT_SRQ (1 << 30) /* Bit 30: Session request/new session detected interrupt */ -#define OTGFS_GINT_WKUP (1 << 31) /* Bit 31: Resume/remote wakeup detected interrupt */ +#define OTGFS_GINT_RES89 (3 << 8) /* Bits 8-9: Reserved, must be kept at reset value */ +#define OTGFS_GINT_ESUSP (1 << 10) /* Bit 10: rc_w1 Early suspend */ +#define OTGFS_GINT_USBSUSP (1 << 11) /* Bit 11: rc_w1 USB suspend */ +#define OTGFS_GINT_USBRST (1 << 12) /* Bit 12: rc_w1 USB reset */ +#define OTGFS_GINT_ENUMDNE (1 << 13) /* Bit 13: rc_w1 Enumeration done */ +#define OTGFS_GINT_ISOODRP (1 << 14) /* Bit 14: rc_w1 Isochronous OUT packet dropped interrupt */ +#define OTGFS_GINT_EOPF (1 << 15) /* Bit 15: rc_w1 End of periodic frame interrupt */ +#define OTGFS_GINT_RES16 (1 << 16) /* Bits 16 Reserved, must be kept at reset value */ +#define OTGFS_GINTMSK_EPMISM (1 << 17) /* Bit 17: Reserved in GINT rw Endpoint mismatch interrupt mask */ +#define OTGFS_GINT_IEP (1 << 18) /* Bit 18: ro IN endpoint interrupt */ +#define OTGFS_GINT_OEP (1 << 19) /* Bit 19: ro OUT endpoint interrupt */ +#define OTGFS_GINT_IISOIXFR (1 << 20) /* Bit 20: rc_w1Incomplete isochronous IN transfer */ +#define OTGFS_GINT_IISOOXFR (1 << 21) /* Bit 21: rc_w1 Incomplete isochronous OUT transfer */ +#define OTGFS_GINT_RES2223 (3 << 22) /* Bits 22-23: Reserved, must be kept at reset value */ +#define OTGFS_GINT_HPRT (1 << 24) /* Bit 24: ro Host port interrupt */ +#define OTGFS_GINT_HC (1 << 25) /* Bit 25: ro Host channels interrupt */ +#define OTGFS_GINT_PTXFE (1 << 26) /* Bit 26: ro Periodic TxFIFO empty */ +#define OTGFS_GINT_RES27 (1 << 27) /* Bit 27 Reserved, must be kept at reset value */ +#define OTGFS_GINT_CIDSCHG (1 << 28) /* Bit 28: rc_w1 Connector ID status change */ +#define OTGFS_GINT_DISC (1 << 29) /* Bit 29: rc_w1 Disconnect detected interrupt */ +#define OTGFS_GINT_SRQ (1 << 30) /* Bit 30: rc_w1 Session request/new session detected interrupt */ +#define OTGFS_GINT_WKUP (1 << 31) /* Bit 31: rc_w1 Resume/remote wakeup detected interrupt */ /* Receive status debug read/OTG status read and pop registers (host mode) */ diff --git a/arch/arm/src/stm32/iar/stm32_vectors.S b/arch/arm/src/stm32/iar/stm32_vectors.S index 9b2c0432ba6058885a696fc9822ac2ae04becea9..cb9069dbc194998d908f6341f0cf10ef047cd562 100644 --- a/arch/arm/src/stm32/iar/stm32_vectors.S +++ b/arch/arm/src/stm32/iar/stm32_vectors.S @@ -176,7 +176,207 @@ __vector_table: #if defined(CONFIG_STM32_STM32L15XX) # include "chip/stm32l15xxx_vectors.h" #elif defined(CONFIG_STM32_STM32F10XX) -# include "chip/stm32f10xxx_vectors.h" + +# if defined(CONFIG_STM32_VALUELINE) + + DCD stm32_wwdg /* Vector 16+0: Window Watchdog interrupt */ + DCD stm32_pvd /* Vector 16+1: PVD through EXTI Line detection interrupt */ + DCD stm32_tamper /* Vector 16+2: Tamper interrupt */ + DCD stm32_rtc /* Vector 16+3: RTC Wakeup through EXTI line interrupt */ + DCD stm32_flash /* Vector 16+4: Flash global interrupt */ + DCD stm32_rcc /* Vector 16+5: RCC global interrupt */ + DCD stm32_exti0 /* Vector 16+6: EXTI Line 0 interrupt */ + DCD stm32_exti1 /* Vector 16+7: EXTI Line 1 interrupt */ + DCD stm32_exti2 /* Vector 16+8: EXTI Line 2 interrupt */ + DCD stm32_exti3 /* Vector 16+9: EXTI Line 3 interrupt */ + DCD stm32_exti4 /* Vector 16+10: EXTI Line 4 interrupt */ + DCD stm32_dma1ch1 /* Vector 16+11: DMA1 Channel 1 global interrupt */ + DCD stm32_dma1ch2 /* Vector 16+12: DMA1 Channel 2 global interrupt */ + DCD stm32_dma1ch3 /* Vector 16+13: DMA1 Channel 3 global interrupt */ + DCD stm32_dma1ch4 /* Vector 16+14: DMA1 Channel 4 global interrupt */ + DCD stm32_dma1ch5 /* Vector 16+15: DMA1 Channel 5 global interrupt */ + DCD stm32_dma1ch6 /* Vector 16+16: DMA1 Channel 6 global interrupt */ + DCD stm32_dma1ch7 /* Vector 16+17: DMA1 Channel 7 global interrupt */ + DCD stm32_adc1 /* Vector 16+18: ADC1 global interrupt */ + DCD stm32_reserved /* Vector 16+19: Reserved 0 */ + DCD stm32_reserved /* Vector 16+20: Reserved 1 */ + DCD stm32_reserved /* Vector 16+21: Reserved 2 */ + DCD stm32_reserved /* Vector 16+22: Reserved 3 */ + DCD stm32_exti95 /* Vector 16+23: EXTI Line[9:5] interrupts */ + DCD stm32_tim1brk /* Vector 16+24: TIM1 Break interrupt; TIM15 global interrupt */ + DCD stm32_tim1up /* Vector 16+25: TIM1 Update interrupt; TIM16 global interrupt */ + DCD stm32_tim1trgcom /* Vector 16+26: TIM1 Trigger and Commutation interrupts; TIM17 global interrupt */ + DCD stm32_tim1cc /* Vector 16+27: TIM1 Capture Compare interrupt */ + DCD stm32_tim2 /* Vector 16+28: TIM2 global interrupt */ + DCD stm32_tim3 /* Vector 16+29: TIM3 global interrupt */ + DCD stm32_tim4 /* Vector 16+30: TIM4 global interrupt */ + DCD stm32_i2c1ev /* Vector 16+31: I2C1 event interrupt */ + DCD stm32_i2c1er /* Vector 16+32: I2C1 error interrupt */ + DCD stm32_i2c2ev /* Vector 16+33: I2C2 event interrupt */ + DCD stm32_i2c2er /* Vector 16+34: I2C2 error interrupt */ + DCD stm32_spi1 /* Vector 16+35: SPI1 global interrupt */ + DCD stm32_spi2 /* Vector 16+36: SPI2 global interrupt */ + DCD stm32_usart1 /* Vector 16+37: USART1 global interrupt */ + DCD stm32_usart2 /* Vector 16+38: USART2 global interrupt */ + DCD stm32_usart3 /* Vector 16+39: USART3 global interrupt */ + DCD stm32_exti1510 /* Vector 16+40: EXTI Line[15:10] interrupts */ + DCD stm32_rtcalr /* Vector 16+41: RTC alarms (A and B) through EXTI line interrupt */ + DCD stm32_cec /* Vector 16+42: CEC global interrupt */ + DCD stm32_tim12 /* Vector 16+43: TIM12 global interrupt */ + DCD stm32_tim13 /* Vector 16+44: TIM13 global interrupt */ + DCD stm32_tim14 /* Vector 16+45: TIM14 global interrupt */ + DCD stm32_reserved /* Vector 16+46: Reserved 4 */ + DCD stm32_reserved /* Vector 16+47: Reserved 5 */ + DCD stm32_fsmc /* Vector 16+48: FSMC global interrupt */ + DCD stm32_reserved /* Vector 16+49: Reserved 6 */ + DCD stm32_tim5 /* Vector 16+50: TIM5 global interrupt */ + DCD stm32_spi3 /* Vector 16+51: SPI3 global interrupt */ + DCD stm32_uart4 /* Vector 16+52: USART2 global interrupt */ + DCD stm32_uart5 /* Vector 16+53: UART5 global interrupt */ + DCD stm32_tim6 /* Vector 16+54: TIM6 global interrupt */ + DCD stm32_tim7 /* Vector 16+55: TIM7 global interrupt */ + DCD stm32_dma2ch1 /* Vector 16+56: DMA2 Channel 1 global interrupt */ + DCD stm32_dma2ch2 /* Vector 16+57: DMA2 Channel 2 global interrupt */ + DCD stm32_dma2ch3 /* Vector 16+58: DMA2 Channel 3 global interrupt */ + DCD stm32_dma2ch45 /* Vector 16+59: DMA2 Channel 4 and 5 global interrupt */ + DCD stm32_dma2ch5 /* Vector 16+60: DMA2 Channel 5 global interrupt */ + +# elif defined(CONFIG_STM32_CONNECTIVITYLINE) + + DCD stm32_wwdg /* Vector 16+0: Window Watchdog interrupt */ + DCD stm32_pvd /* Vector 16+1: PVD through EXTI Line detection interrupt */ + DCD stm32_tamper /* Vector 16+2: Tamper interrupt */ + DCD stm32_rtc /* Vector 16+3: RTC global interrupt */ + DCD stm32_flash /* Vector 16+4: Flash global interrupt */ + DCD stm32_rcc /* Vector 16+5: RCC global interrupt */ + DCD stm32_exti0 /* Vector 16+6: EXTI Line 0 interrupt */ + DCD stm32_exti1 /* Vector 16+7: EXTI Line 1 interrupt */ + DCD stm32_exti2 /* Vector 16+8: EXTI Line 2 interrupt */ + DCD stm32_exti3 /* Vector 16+9: EXTI Line 3 interrupt */ + DCD stm32_exti4 /* Vector 16+10: EXTI Line 4 interrupt */ + DCD stm32_dma1ch1 /* Vector 16+11: DMA1 Channel 1 global interrupt */ + DCD stm32_dma1ch2 /* Vector 16+12: DMA1 Channel 2 global interrupt */ + DCD stm32_dma1ch3 /* Vector 16+13: DMA1 Channel 3 global interrupt */ + DCD stm32_dma1ch4 /* Vector 16+14: DMA1 Channel 4 global interrupt */ + DCD stm32_dma1ch5 /* Vector 16+15: DMA1 Channel 5 global interrupt */ + DCD stm32_dma1ch6 /* Vector 16+16: DMA1 Channel 6 global interrupt */ + DCD stm32_dma1ch7 /* Vector 16+17: DMA1 Channel 7 global interrupt */ + DCD stm32_adc12 /* Vector 16+18: ADC1 and ADC2 global interrupt */ + DCD stm32_can1tx /* Vector 16+19: CAN1 TX interrupts */ + DCD stm32_can1rx0 /* Vector 16+20: CAN1 RX0 interrupts */ + DCD stm32_can1rx /* Vector 16+21: CAN1 RX1 interrupt */ + DCD stm32_can1sce /* Vector 16+22: CAN1 SCE interrupt */ + DCD stm32_exti95 /* Vector 16+23: EXTI Line[9:5] interrupts */ + DCD stm32_tim1brk /* Vector 16+24: TIM1 Break interrupt */ + DCD stm32_tim1up /* Vector 16+25: TIM1 Update interrupt */ + DCD stm32_tim1trgcom /* Vector 16+26: TIM1 Trigger and Commutation interrupts */ + DCD stm32_tim1cc /* Vector 16+27: TIM1 Capture Compare interrupt */ + DCD stm32_tim2 /* Vector 16+28: TIM2 global interrupt */ + DCD stm32_tim3 /* Vector 16+29: TIM3 global interrupt */ + DCD stm32_tim4 /* Vector 16+30: TIM4 global interrupt */ + DCD stm32_i2c1ev /* Vector 16+31: I2C1 event interrupt */ + DCD stm32_i2c1er /* Vector 16+32: I2C1 error interrupt */ + DCD stm32_i2c2ev /* Vector 16+33: I2C2 event interrupt */ + DCD stm32_i2c2er /* Vector 16+34: I2C2 error interrupt */ + DCD stm32_spi1 /* Vector 16+35: SPI1 global interrupt */ + DCD stm32_spi2 /* Vector 16+36: SPI2 global interrupt */ + DCD stm32_usart1 /* Vector 16+37: USART1 global interrupt */ + DCD stm32_usart2 /* Vector 16+38: USART2 global interrupt */ + DCD stm32_usart3 /* Vector 16+39: USART3 global interrupt */ + DCD stm32_exti1510 /* Vector 16+40: EXTI Line[15:10] interrupts */ + DCD stm32_rtcalr /* Vector 16+41: RTC alarm through EXTI line interrupt */ + DCD stm32_otgfswkup /* Vector 16+42: USB On-The-Go FS Wakeup through EXTI line interrupt */ + DCD stm32_reserved /* Vector 16+43: Reserved 0 */ + DCD stm32_reserved /* Vector 16+44: Reserved 1 */ + DCD stm32_reserved /* Vector 16+45: Reserved 2 */ + DCD stm32_reserved /* Vector 16+46: Reserved 3 */ + DCD stm32_reserved /* Vector 16+47: Reserved 4 */ + DCD stm32_reserved /* Vector 16+48: Reserved 5 */ + DCD stm32_reserved /* Vector 16+49: Reserved 6 */ + DCD stm32_tim5 /* Vector 16+50: TIM5 global interrupt */ + DCD stm32_spi3 /* Vector 16+51: SPI3 global interrupt */ + DCD stm32_uart4 /* Vector 16+52: UART4 global interrupt */ + DCD stm32_uart5 /* Vector 16+53: UART5 global interrupt */ + DCD stm32_tim6 /* Vector 16+54: TIM6 global interrupt */ + DCD stm32_tim7 /* Vector 16+55: TIM7 global interrupt */ + DCD stm32_dma2ch1 /* Vector 16+56: DMA2 Channel 1 global interrupt */ + DCD stm32_dma2ch2 /* Vector 16+57: DMA2 Channel 2 global interrupt */ + DCD stm32_dma2ch3 /* Vector 16+58: DMA2 Channel 3 global interrupt */ + DCD stm32_dma2ch4 /* Vector 16+59: DMA2 Channel 4 global interrupt */ + DCD stm32_dma2ch5 /* Vector 16+60: DMA2 Channel 5 global interrupt */ + DCD stm32_eth /* Vector 16+61: Ethernet global interrupt */ + DCD stm32_ethwkup /* Vector 16+62: Ethernet Wakeup through EXTI line interrupt */ + DCD stm32_can2tx /* Vector 16+63: CAN2 TX interrupts */ + DCD stm32_can2rx0 /* Vector 16+64: CAN2 RX0 interrupts */ + DCD stm32_can2rx1 /* Vector 16+65: CAN2 RX1 interrupt */ + DCD stm32_can2sce /* Vector 16+66: CAN2 SCE interrupt */ + DCD stm32_otgfs /* Vector 16+67: USB On The Go FS global interrupt */ + +# else /* CONFIG_STM32_CONNECTIVITYLINE */ + + DCD stm32_wwdg /* Vector 16+0: Window Watchdog interrupt */ + DCD stm32_pvd /* Vector 16+1: PVD through EXTI Line detection interrupt */ + DCD stm32_tamper /* Vector 16+2: Tamper interrupt */ + DCD stm32_rtc /* Vector 16+3: RTC global interrupt */ + DCD stm32_flash /* Vector 16+4: Flash global interrupt */ + DCD stm32_rcc /* Vector 16+5: RCC global interrupt */ + DCD stm32_exti0 /* Vector 16+6: EXTI Line 0 interrupt */ + DCD stm32_exti1 /* Vector 16+7: EXTI Line 1 interrupt */ + DCD stm32_exti2 /* Vector 16+8: EXTI Line 2 interrupt */ + DCD stm32_exti3 /* Vector 16+9: EXTI Line 3 interrupt */ + DCD stm32_exti4 /* Vector 16+10: EXTI Line 4 interrupt */ + DCD stm32_dma1ch1 /* Vector 16+11: DMA1 Channel 1 global interrupt */ + DCD stm32_dma1ch2 /* Vector 16+12: DMA1 Channel 2 global interrupt */ + DCD stm32_dma1ch3 /* Vector 16+13: DMA1 Channel 3 global interrupt */ + DCD stm32_dma1ch4 /* Vector 16+14: DMA1 Channel 4 global interrupt */ + DCD stm32_dma1ch5 /* Vector 16+15: DMA1 Channel 5 global interrupt */ + DCD stm32_dma1ch6 /* Vector 16+16: DMA1 Channel 6 global interrupt */ + DCD stm32_dma1ch7 /* Vector 16+17: DMA1 Channel 7 global interrupt */ + DCD stm32_adc12 /* Vector 16+18: ADC1 and ADC2 global interrupt */ + DCD stm32_usbhpcantx /* Vector 16+19: USB High Priority or CAN TX interrupts*/ + DCD stm32_usblpcanrx0 /* Vector 16+20: USB Low Priority or CAN RX0 interrupts*/ + DCD stm32_can1rx1 /* Vector 16+21: CAN1 RX1 interrupt */ + DCD stm32_can1sce /* Vector 16+22: CAN1 SCE interrupt */ + DCD stm32_exti95 /* Vector 16+23: EXTI Line[9:5] interrupts */ + DCD stm32_tim1brk /* Vector 16+24: TIM1 Break interrupt */ + DCD stm32_tim1up /* Vector 16+25: TIM1 Update interrupt */ + DCD stm32_tim1rtgcom /* Vector 16+26: TIM1 Trigger and Commutation interrupts */ + DCD stm32_tim1cc /* Vector 16+27: TIM1 Capture Compare interrupt */ + DCD stm32_tim2 /* Vector 16+28: TIM2 global interrupt */ + DCD stm32_tim3 /* Vector 16+29: TIM3 global interrupt */ + DCD stm32_tim4 /* Vector 16+30: TIM4 global interrupt */ + DCD stm32_i2c1ev /* Vector 16+31: I2C1 event interrupt */ + DCD stm32_i2c1er /* Vector 16+32: I2C1 error interrupt */ + DCD stm32_i2c2ev /* Vector 16+33: I2C2 event interrupt */ + DCD stm32_i2c2er /* Vector 16+34: I2C2 error interrupt */ + DCD stm32_spi1 /* Vector 16+35: SPI1 global interrupt */ + DCD stm32_spi2 /* Vector 16+36: SPI2 global interrupt */ + DCD stm32_usart1 /* Vector 16+37: USART1 global interrupt */ + DCD stm32_usart2 /* Vector 16+38: USART2 global interrupt */ + DCD stm32_usart3 /* Vector 16+39: USART3 global interrupt */ + DCD stm32_exti1510 /* Vector 16+40: EXTI Line[15:10] interrupts */ + DCD stm32_rtcalr /* Vector 16+41: RTC alarm through EXTI line interrupt */ + DCD stm32_usbwkup /* Vector 16+42: USB wakeup from suspend through EXTI line interrupt*/ + DCD stm32_tim8brk /* Vector 16+43: TIM8 Break interrupt */ + DCD stm32_tim8up /* Vector 16+44: TIM8 Update interrupt */ + DCD stm32_tim8trgcom /* Vector 16+45: TIM8 Trigger and Commutation interrupts */ + DCD stm32_tim8cc /* Vector 16+46: TIM8 Capture Compare interrupt */ + DCD stm32_adc3 /* Vector 16+47: ADC3 global interrupt */ + DCD stm32_fsmc /* Vector 16+48: FSMC global interrupt */ + DCD stm32_sdio /* Vector 16+49: SDIO global interrupt */ + DCD stm32_tim5 /* Vector 16+50: TIM5 global interrupt */ + DCD stm32_spi3 /* Vector 16+51: SPI3 global interrupt */ + DCD stm32_uart4 /* Vector 16+52: UART4 global interrupt */ + DCD stm32_uart5 /* Vector 16+53: UART5 global interrupt */ + DCD stm32_tim6 /* Vector 16+54: TIM6 global interrupt */ + DCD stm32_tim7 /* Vector 16+55: TIM7 global interrupt */ + DCD stm32_dma2ch1 /* Vector 16+56: DMA2 Channel 1 global interrupt */ + DCD stm32_dma2ch2 /* Vector 16+57: DMA2 Channel 2 global interrupt */ + DCD stm32_dma2ch3 /* Vector 16+58: DMA2 Channel 3 global interrupt */ + DCD stm32_dma2ch45 /* Vector 16+59: DMA2 Channel 4&5 global interrupt */ + +# endif /* CONFIG_STM32_CONNECTIVITYLINE */ + #elif defined(CONFIG_STM32_STM32F20XX) DCD stm32_wwdg /* Vector 16+0: Window Watchdog interrupt */ DCD stm32_pvd /* Vector 16+1: PVD through EXTI Line detection interrupt */ @@ -278,7 +478,7 @@ __vector_table: * .text ************************************************************************************/ - SECTION .text:CODE:NOROOT(2) + SECTION .text:CODE:NOROOT(8) handlers: HANDLER stm32_reserved, STM32_IRQ_RESERVED /* Unexpected/reserved vector */ @@ -304,8 +504,196 @@ handlers: #if defined(CONFIG_STM32_STM32L15XX) # include "chip/stm32l15xxx_vectors.h" #elif defined(CONFIG_STM32_STM32F10XX) -# include "chip/stm32f10xxx_vectors.h" + + +# if defined(CONFIG_STM32_VALUELINE) + + HANDLER stm32_wwdg, STM32_IRQ_WWDG /* Vector 16+0: Window Watchdog interrupt */ + HANDLER stm32_pvd, STM32_IRQ_PVD /* Vector 16+1: PVD through EXTI Line detection interrupt */ + HANDLER stm32_tamper, STM32_IRQ_TAMPER /* Vector 16+2: Tamper interrupt */ + HANDLER stm32_rtc, STM32_IRQ_RTC /* Vector 16+3: RTC Wakeup through EXTI line interrupt */ + HANDLER stm32_flash, STM32_IRQ_FLASH /* Vector 16+4: Flash global interrupt */ + HANDLER stm32_rcc, STM32_IRQ_RCC /* Vector 16+5: RCC global interrupt */ + HANDLER stm32_exti0, STM32_IRQ_EXTI0 /* Vector 16+6: EXTI Line 0 interrupt */ + HANDLER stm32_exti1, STM32_IRQ_EXTI1 /* Vector 16+7: EXTI Line 1 interrupt */ + HANDLER stm32_exti2, STM32_IRQ_EXTI2 /* Vector 16+8: EXTI Line 2 interrupt */ + HANDLER stm32_exti3, STM32_IRQ_EXTI3 /* Vector 16+9: EXTI Line 3 interrupt */ + HANDLER stm32_exti4, STM32_IRQ_EXTI4 /* Vector 16+10: EXTI Line 4 interrupt */ + HANDLER stm32_dma1ch1, STM32_IRQ_DMA1CH1 /* Vector 16+11: DMA1 Channel 1 global interrupt */ + HANDLER stm32_dma1ch2, STM32_IRQ_DMA1CH2 /* Vector 16+12: DMA1 Channel 2 global interrupt */ + HANDLER stm32_dma1ch3, STM32_IRQ_DMA1CH3 /* Vector 16+13: DMA1 Channel 3 global interrupt */ + HANDLER stm32_dma1ch4, STM32_IRQ_DMA1CH4 /* Vector 16+14: DMA1 Channel 4 global interrupt */ + HANDLER stm32_dma1ch5, STM32_IRQ_DMA1CH5 /* Vector 16+15: DMA1 Channel 5 global interrupt */ + HANDLER stm32_dma1ch6, STM32_IRQ_DMA1CH6 /* Vector 16+16: DMA1 Channel 6 global interrupt */ + HANDLER stm32_dma1ch7, STM32_IRQ_DMA1CH7 /* Vector 16+17: DMA1 Channel 7 global interrupt */ + HANDLER stm32_adc1, STM32_IRQ_ADC1 /* Vector 16+18: ADC1 global interrupt */ + HANDLER stm32_exti95, STM32_IRQ_EXTI95 /* Vector 16+23: EXTI Line[9:5] interrupts */ + HANDLER stm32_tim1brk, STM32_IRQ_TIM1BRK /* Vector 16+24: TIM1 Break interrupt; TIM15 global interrupt */ + HANDLER stm32_tim1up, STM32_IRQ_TIM1UP /* Vector 16+25: TIM1 Update interrupt; TIM16 global interrupt */ + HANDLER stm32_tim1trgcom, STM32_IRQ_TIM1TRGCOM /* Vector 16+26: TIM1 Trigger and Commutation interrupts; TIM17 global interrupt */ + HANDLER stm32_tim1cc, STM32_IRQ_TIM1CC /* Vector 16+27: TIM1 Capture Compare interrupt */ + HANDLER stm32_tim2, STM32_IRQ_TIM2 /* Vector 16+28: TIM2 global interrupt */ + HANDLER stm32_tim3, STM32_IRQ_TIM3 /* Vector 16+29: TIM3 global interrupt */ + HANDLER stm32_tim4, STM32_IRQ_TIM4 /* Vector 16+30: TIM4 global interrupt */ + HANDLER stm32_i2c1ev, STM32_IRQ_I2C1EV /* Vector 16+31: I2C1 event interrupt */ + HANDLER stm32_i2c1er, STM32_IRQ_I2C1ER /* Vector 16+32: I2C1 error interrupt */ + HANDLER stm32_i2c2ev, STM32_IRQ_I2C2EV /* Vector 16+33: I2C2 event interrupt */ + HANDLER stm32_i2c2er, STM32_IRQ_I2C2ER /* Vector 16+34: I2C2 error interrupt */ + HANDLER stm32_spi1, STM32_IRQ_SPI1 /* Vector 16+35: SPI1 global interrupt */ + HANDLER stm32_spi2, STM32_IRQ_SPI2 /* Vector 16+36: SPI2 global interrupt */ + HANDLER stm32_usart1, STM32_IRQ_USART1 /* Vector 16+37: USART1 global interrupt */ + HANDLER stm32_usart2, STM32_IRQ_USART2 /* Vector 16+38: USART2 global interrupt */ + HANDLER stm32_usart3, STM32_IRQ_USART3 /* Vector 16+39: USART3 global interrupt */ + HANDLER stm32_exti1510, STM32_IRQ_EXTI1510 /* Vector 16+40: EXTI Line[15:10] interrupts */ + HANDLER stm32_rtcalr, STM32_IRQ_RTCALR /* Vector 16+41: RTC alarms (A and B) through EXTI line interrupt */ + HANDLER stm32_cec, STM32_IRQ_CEC /* Vector 16+42: CEC global interrupt */ + HANDLER stm32_tim12, STM32_IRQ_TIM12 /* Vector 16+43: TIM12 global interrupt */ + HANDLER stm32_tim13, STM32_IRQ_TIM13 /* Vector 16+44: TIM13 global interrupt */ + HANDLER stm32_tim14, STM32_IRQ_TIM14 /* Vector 16+45: TIM14 global interrupt */ + HANDLER stm32_fsmc, STM32_IRQ_FSMC /* Vector 16+48: FSMC global interrupt */ + HANDLER stm32_tim5, STM32_IRQ_TIM5 /* Vector 16+50: TIM5 global interrupt */ + HANDLER stm32_spi3, STM32_IRQ_SPI3 /* Vector 16+51: SPI3 global interrupt */ + HANDLER stm32_uart4, STM32_IRQ_UART4 /* Vector 16+52: USART2 global interrupt */ + HANDLER stm32_uart5, STM32_IRQ_UART5 /* Vector 16+53: UART5 global interrupt */ + HANDLER stm32_tim6, STM32_IRQ_TIM6 /* Vector 16+54: TIM6 global interrupt */ + HANDLER stm32_tim7, STM32_IRQ_TIM7 /* Vector 16+55: TIM7 global interrupt */ + HANDLER stm32_dma2ch1, STM32_IRQ_DMA2CH1 /* Vector 16+56: DMA2 Channel 1 global interrupt */ + HANDLER stm32_dma2ch2, STM32_IRQ_DMA2CH2 /* Vector 16+57: DMA2 Channel 2 global interrupt */ + HANDLER stm32_dma2ch3, STM32_IRQ_DMA2CH3 /* Vector 16+58: DMA2 Channel 3 global interrupt */ + HANDLER stm32_dma2ch45, STM32_IRQ_DMA2CH45 /* Vector 16+59: DMA2 Channel 4 and 5 global interrupt */ + HANDLER stm32_dma2ch5, STM32_IRQ_DMA2CH5 /* Vector 16+60: DMA2 Channel 5 global interrupt */ + +# elif defined(CONFIG_STM32_CONNECTIVITYLINE) + + HANDLER stm32_wwdg, STM32_IRQ_WWDG /* Vector 16+0: Window Watchdog interrupt */ + HANDLER stm32_pvd, STM32_IRQ_PVD /* Vector 16+1: PVD through EXTI Line detection interrupt */ + HANDLER stm32_tamper, STM32_IRQ_TAMPER /* Vector 16+2: Tamper interrupt */ + HANDLER stm32_rtc, STM32_IRQ_RTC /* Vector 16+3: RTC global interrupt */ + HANDLER stm32_flash, STM32_IRQ_FLASH /* Vector 16+4: Flash global interrupt */ + HANDLER stm32_rcc, STM32_IRQ_RCC /* Vector 16+5: RCC global interrupt */ + HANDLER stm32_exti0, STM32_IRQ_EXTI0 /* Vector 16+6: EXTI Line 0 interrupt */ + HANDLER stm32_exti1, STM32_IRQ_EXTI1 /* Vector 16+7: EXTI Line 1 interrupt */ + HANDLER stm32_exti2, STM32_IRQ_EXTI2 /* Vector 16+8: EXTI Line 2 interrupt */ + HANDLER stm32_exti3, STM32_IRQ_EXTI3 /* Vector 16+9: EXTI Line 3 interrupt */ + HANDLER stm32_exti4, STM32_IRQ_EXTI4 /* Vector 16+10: EXTI Line 4 interrupt */ + HANDLER stm32_dma1ch1, STM32_IRQ_DMA1CH1 /* Vector 16+11: DMA1 Channel 1 global interrupt */ + HANDLER stm32_dma1ch2, STM32_IRQ_DMA1CH2 /* Vector 16+12: DMA1 Channel 2 global interrupt */ + HANDLER stm32_dma1ch3, STM32_IRQ_DMA1CH3 /* Vector 16+13: DMA1 Channel 3 global interrupt */ + HANDLER stm32_dma1ch4, STM32_IRQ_DMA1CH4 /* Vector 16+14: DMA1 Channel 4 global interrupt */ + HANDLER stm32_dma1ch5, STM32_IRQ_DMA1CH5 /* Vector 16+15: DMA1 Channel 5 global interrupt */ + HANDLER stm32_dma1ch6, STM32_IRQ_DMA1CH6 /* Vector 16+16: DMA1 Channel 6 global interrupt */ + HANDLER stm32_dma1ch7, STM32_IRQ_DMA1CH7 /* Vector 16+17: DMA1 Channel 7 global interrupt */ + HANDLER stm32_adc12, STM32_IRQ_ADC12 /* Vector 16+18: ADC1 and ADC2 global interrupt */ + HANDLER stm32_can1tx, STM32_IRQ_CAN1TX /* Vector 16+19: CAN1 TX interrupts */ + HANDLER stm32_can1rx0, STM32_IRQ_CAN1RX0 /* Vector 16+20: CAN1 RX0 interrupts */ + HANDLER stm32_can1rx, STM32_IRQ_CAN1RX1 /* Vector 16+21: CAN1 RX1 interrupt */ + HANDLER stm32_can1sce, STM32_IRQ_CAN1SCE /* Vector 16+22: CAN1 SCE interrupt */ + HANDLER stm32_exti95, STM32_IRQ_EXTI95 /* Vector 16+23: EXTI Line[9:5] interrupts */ + HANDLER stm32_tim1brk, STM32_IRQ_TIM1BRK /* Vector 16+24: TIM1 Break interrupt */ + HANDLER stm32_tim1up, STM32_IRQ_TIM1UP /* Vector 16+25: TIM1 Update interrupt */ + HANDLER stm32_tim1trgcom, STM32_IRQ_TIM1TRGCOM /* Vector 16+26: TIM1 Trigger and Commutation interrupts */ + HANDLER stm32_tim1cc, STM32_IRQ_TIM1CC /* Vector 16+27: TIM1 Capture Compare interrupt */ + HANDLER stm32_tim2, STM32_IRQ_TIM2 /* Vector 16+28: TIM2 global interrupt */ + HANDLER stm32_tim3, STM32_IRQ_TIM3 /* Vector 16+29: TIM3 global interrupt */ + HANDLER stm32_tim4, STM32_IRQ_TIM4 /* Vector 16+30: TIM4 global interrupt */ + HANDLER stm32_i2c1ev, STM32_IRQ_I2C1EV /* Vector 16+31: I2C1 event interrupt */ + HANDLER stm32_i2c1er, STM32_IRQ_I2C1ER /* Vector 16+32: I2C1 error interrupt */ + HANDLER stm32_i2c2ev, STM32_IRQ_I2C2EV /* Vector 16+33: I2C2 event interrupt */ + HANDLER stm32_i2c2er, STM32_IRQ_I2C2ER /* Vector 16+34: I2C2 error interrupt */ + HANDLER stm32_spi1, STM32_IRQ_SPI1 /* Vector 16+35: SPI1 global interrupt */ + HANDLER stm32_spi2, STM32_IRQ_SPI2 /* Vector 16+36: SPI2 global interrupt */ + HANDLER stm32_usart1, STM32_IRQ_USART1 /* Vector 16+37: USART1 global interrupt */ + HANDLER stm32_usart2, STM32_IRQ_USART2 /* Vector 16+38: USART2 global interrupt */ + HANDLER stm32_usart3, STM32_IRQ_USART3 /* Vector 16+39: USART3 global interrupt */ + HANDLER stm32_exti1510, STM32_IRQ_EXTI1510 /* Vector 16+40: EXTI Line[15:10] interrupts */ + HANDLER stm32_rtcalr, STM32_IRQ_RTCALRM /* Vector 16+41: RTC alarm through EXTI line interrupt */ + HANDLER stm32_otgfswkup, STM32_IRQ_OTGFSWKUP /* Vector 16+42: USB On-The-Go FS Wakeup through EXTI line interrupt */ + HANDLER stm32_tim5, STM32_IRQ_TIM5 /* Vector 16+50: TIM5 global interrupt */ + HANDLER stm32_spi3, STM32_IRQ_SPI3 /* Vector 16+51: SPI3 global interrupt */ + HANDLER stm32_uart4 , STM32_IRQ_UART4 /* Vector 16+52: UART4 global interrupt */ + HANDLER stm32_uart5, STM32_IRQ_UART5 /* Vector 16+53: UART5 global interrupt */ + HANDLER stm32_tim6, STM32_IRQ_TIM6 /* Vector 16+54: TIM6 global interrupt */ + HANDLER stm32_tim7, STM32_IRQ_TIM7 /* Vector 16+55: TIM7 global interrupt */ + HANDLER stm32_dma2ch1, STM32_IRQ_DMA2CH1 /* Vector 16+56: DMA2 Channel 1 global interrupt */ + HANDLER stm32_dma2ch2, STM32_IRQ_DMA2CH2 /* Vector 16+57: DMA2 Channel 2 global interrupt */ + HANDLER stm32_dma2ch3, STM32_IRQ_DMA2CH3 /* Vector 16+58: DMA2 Channel 3 global interrupt */ + HANDLER stm32_dma2ch4, STM32_IRQ_DMA2CH4 /* Vector 16+59: DMA2 Channel 4 global interrupt */ + HANDLER stm32_dma2ch5, STM32_IRQ_DMA2CH5 /* Vector 16+60: DMA2 Channel 5 global interrupt */ + HANDLER stm32_eth, STM32_IRQ_ETH /* Vector 16+61: Ethernet global interrupt */ + HANDLER stm32_ethwkup, STM32_IRQ_ETHWKUP /* Vector 16+62: Ethernet Wakeup through EXTI line interrupt */ + HANDLER stm32_can2tx, STM32_IRQ_CAN2TX /* Vector 16+63: CAN2 TX interrupts */ + HANDLER stm32_can2rx0, STM32_IRQ_CAN2RX0 /* Vector 16+64: CAN2 RX0 interrupts */ + HANDLER stm32_can2rx1, STM32_IRQ_CAN2RX1 /* Vector 16+65: CAN2 RX1 interrupt */ + HANDLER stm32_can2sce, STM32_IRQ_CAN2SCE /* Vector 16+66: CAN2 SCE interrupt */ + HANDLER stm32_otgfs, STM32_IRQ_OTGFS /* Vector 16+67: USB On The Go FS global interrupt */ + +# else /* CONFIG_STM32_CONNECTIVITYLINE */ + + HANDLER stm32_wwdg, STM32_IRQ_WWDG /* Vector 16+0: Window Watchdog interrupt */ + HANDLER stm32_pvd, STM32_IRQ_PVD /* Vector 16+1: PVD through EXTI Line detection interrupt */ + HANDLER stm32_tamper, STM32_IRQ_TAMPER /* Vector 16+2: Tamper interrupt */ + HANDLER stm32_rtc, STM32_IRQ_RTC /* Vector 16+3: RTC global interrupt */ + HANDLER stm32_flash, STM32_IRQ_FLASH /* Vector 16+4: Flash global interrupt */ + HANDLER stm32_rcc, STM32_IRQ_RCC /* Vector 16+5: RCC global interrupt */ + HANDLER stm32_exti0, STM32_IRQ_EXTI0 /* Vector 16+6: EXTI Line 0 interrupt */ + HANDLER stm32_exti1, STM32_IRQ_EXTI1 /* Vector 16+7: EXTI Line 1 interrupt */ + HANDLER stm32_exti2, STM32_IRQ_EXTI2 /* Vector 16+8: EXTI Line 2 interrupt */ + HANDLER stm32_exti3, STM32_IRQ_EXTI3 /* Vector 16+9: EXTI Line 3 interrupt */ + HANDLER stm32_exti4, STM32_IRQ_EXTI4 /* Vector 16+10: EXTI Line 4 interrupt */ + HANDLER stm32_dma1ch1, STM32_IRQ_DMA1CH1 /* Vector 16+11: DMA1 Channel 1 global interrupt */ + HANDLER stm32_dma1ch2, STM32_IRQ_DMA1CH2 /* Vector 16+12: DMA1 Channel 2 global interrupt */ + HANDLER stm32_dma1ch3, STM32_IRQ_DMA1CH3 /* Vector 16+13: DMA1 Channel 3 global interrupt */ + HANDLER stm32_dma1ch4, STM32_IRQ_DMA1CH4 /* Vector 16+14: DMA1 Channel 4 global interrupt */ + HANDLER stm32_dma1ch5, STM32_IRQ_DMA1CH5 /* Vector 16+15: DMA1 Channel 5 global interrupt */ + HANDLER stm32_dma1ch6, STM32_IRQ_DMA1CH6 /* Vector 16+16: DMA1 Channel 6 global interrupt */ + HANDLER stm32_dma1ch7, STM32_IRQ_DMA1CH7 /* Vector 16+17: DMA1 Channel 7 global interrupt */ + HANDLER stm32_adc12, STM32_IRQ_ADC12 /* Vector 16+18: ADC1 and ADC2 global interrupt */ + HANDLER stm32_usbhpcantx, STM32_IRQ_USBHPCANTX /* Vector 16+19: USB High Priority or CAN TX interrupts*/ + HANDLER stm32_usblpcanrx0, STM32_IRQ_USBLPCANRX0 /* Vector 16+20: USB Low Priority or CAN RX0 interrupts*/ + HANDLER stm32_can1rx1, STM32_IRQ_CAN1RX1 /* Vector 16+21: CAN1 RX1 interrupt */ + HANDLER stm32_can1sce, STM32_IRQ_CAN1SCE /* Vector 16+22: CAN1 SCE interrupt */ + HANDLER stm32_exti95, STM32_IRQ_EXTI95 /* Vector 16+23: EXTI Line[9:5] interrupts */ + HANDLER stm32_tim1brk, STM32_IRQ_TIM1BRK /* Vector 16+24: TIM1 Break interrupt */ + HANDLER stm32_tim1up, STM32_IRQ_TIM1UP /* Vector 16+25: TIM1 Update interrupt */ + HANDLER stm32_tim1rtgcom, STM32_IRQ_TIM1TRGCOM /* Vector 16+26: TIM1 Trigger and Commutation interrupts */ + HANDLER stm32_tim1cc, STM32_IRQ_TIM1CC /* Vector 16+27: TIM1 Capture Compare interrupt */ + HANDLER stm32_tim2, STM32_IRQ_TIM2 /* Vector 16+28: TIM2 global interrupt */ + HANDLER stm32_tim3, STM32_IRQ_TIM3 /* Vector 16+29: TIM3 global interrupt */ + HANDLER stm32_tim4, STM32_IRQ_TIM4 /* Vector 16+30: TIM4 global interrupt */ + HANDLER stm32_i2c1ev, STM32_IRQ_I2C1EV /* Vector 16+31: I2C1 event interrupt */ + HANDLER stm32_i2c1er, STM32_IRQ_I2C1ER /* Vector 16+32: I2C1 error interrupt */ + HANDLER stm32_i2c2ev, STM32_IRQ_I2C2EV /* Vector 16+33: I2C2 event interrupt */ + HANDLER stm32_i2c2er, STM32_IRQ_I2C2ER /* Vector 16+34: I2C2 error interrupt */ + HANDLER stm32_spi1, STM32_IRQ_SPI1 /* Vector 16+35: SPI1 global interrupt */ + HANDLER stm32_spi2, STM32_IRQ_SPI2 /* Vector 16+36: SPI2 global interrupt */ + HANDLER stm32_usart1, STM32_IRQ_USART1 /* Vector 16+37: USART1 global interrupt */ + HANDLER stm32_usart2, STM32_IRQ_USART2 /* Vector 16+38: USART2 global interrupt */ + HANDLER stm32_usart3, STM32_IRQ_USART3 /* Vector 16+39: USART3 global interrupt */ + HANDLER stm32_exti1510, STM32_IRQ_EXTI1510 /* Vector 16+40: EXTI Line[15:10] interrupts */ + HANDLER stm32_rtcalr, STM32_IRQ_RTCALRM /* Vector 16+41: RTC alarm through EXTI line interrupt */ + HANDLER stm32_usbwkup, STM32_IRQ_USBWKUP /* Vector 16+42: USB wakeup from suspend through EXTI line interrupt*/ + HANDLER stm32_tim8brk, STM32_IRQ_TIM8BRK /* Vector 16+43: TIM8 Break interrupt */ + HANDLER stm32_tim8up, STM32_IRQ_TIM8UP /* Vector 16+44: TIM8 Update interrupt */ + HANDLER stm32_tim8trgcom, STM32_IRQ_TIM8TRGCOM /* Vector 16+45: TIM8 Trigger and Commutation interrupts */ + HANDLER stm32_tim8cc, STM32_IRQ_TIM8CC /* Vector 16+46: TIM8 Capture Compare interrupt */ + HANDLER stm32_adc3, STM32_IRQ_ADC3 /* Vector 16+47: ADC3 global interrupt */ + HANDLER stm32_fsmc, STM32_IRQ_FSMC /* Vector 16+48: FSMC global interrupt */ + HANDLER stm32_sdio, STM32_IRQ_SDIO /* Vector 16+49: SDIO global interrupt */ + HANDLER stm32_tim5, STM32_IRQ_TIM5 /* Vector 16+50: TIM5 global interrupt */ + HANDLER stm32_spi3, STM32_IRQ_SPI3 /* Vector 16+51: SPI3 global interrupt */ + HANDLER stm32_uart4, STM32_IRQ_UART4 /* Vector 16+52: UART4 global interrupt */ + HANDLER stm32_uart5, STM32_IRQ_UART5 /* Vector 16+53: UART5 global interrupt */ + HANDLER stm32_tim6, STM32_IRQ_TIM6 /* Vector 16+54: TIM6 global interrupt */ + HANDLER stm32_tim7, STM32_IRQ_TIM7 /* Vector 16+55: TIM7 global interrupt */ + HANDLER stm32_dma2ch1, STM32_IRQ_DMA2CH1 /* Vector 16+56: DMA2 Channel 1 global interrupt */ + HANDLER stm32_dma2ch2, STM32_IRQ_DMA2CH2 /* Vector 16+57: DMA2 Channel 2 global interrupt */ + HANDLER stm32_dma2ch3, STM32_IRQ_DMA2CH3 /* Vector 16+58: DMA2 Channel 3 global interrupt */ + HANDLER stm32_dma2ch45, STM32_IRQ_DMA2CH45 /* Vector 16+59: DMA2 Channel 4&5 global interrupt */ + +# endif /* CONFIG_STM32_CONNECTIVITYLINE */ + #elif defined(CONFIG_STM32_STM32F20XX) + HANDLER stm32_wwdg, STM32_IRQ_WWDG /* Vector 16+0: Window Watchdog interrupt */ HANDLER stm32_pvd, STM32_IRQ_PVD /* Vector 16+1: PVD through EXTI Line detection interrupt */ HANDLER stm32_tamper, STM32_IRQ_TAMPER /* Vector 16+2: Tamper and time stamp interrupts */ @@ -387,6 +775,7 @@ handlers: HANDLER stm32_dcmi, STM32_IRQ_DCMI /* Vector 16+78: DCMI global interrupt */ HANDLER stm32_cryp, STM32_IRQ_CRYP /* Vector 16+79: CRYP crypto global interrupt */ HANDLER stm32_hash, STM32_IRQ_HASH /* Vector 16+80: Hash and Rng global interrupt */ + #elif defined(CONFIG_STM32_STM32F30XX) # include "chip/stm32f30xxx_vectors.h" #elif defined(CONFIG_STM32_STM32F37XX) diff --git a/arch/arm/src/stm32/stm32_adc.c b/arch/arm/src/stm32/stm32_adc.c index 31109fd8f50aa28d706cbc8f7770894b9b38e052..2972ebaf9a6a7024a0111adc05902edad6c773f1 100644 --- a/arch/arm/src/stm32/stm32_adc.c +++ b/arch/arm/src/stm32/stm32_adc.c @@ -1657,7 +1657,7 @@ static void adc_dmaconvcallback(DMA_HANDLE handle, uint8_t isr, FAR void *arg) for (i = 0; i < priv->nchannels; i++) { - priv->cb->au_receive(dev, priv->current, priv->dmabuffer[priv->current]); + priv->cb->au_receive(dev, priv->chanlist[priv->current], priv->dmabuffer[priv->current]); priv->current++; if (priv->current >= priv->nchannels) { diff --git a/arch/arm/src/stm32/stm32_bbsram.c b/arch/arm/src/stm32/stm32_bbsram.c index 81c49340ae9e6b20dd76babd5fca731867763bbc..a401feca56284f3ead3738b774fe59a67f8f376d 100644 --- a/arch/arm/src/stm32/stm32_bbsram.c +++ b/arch/arm/src/stm32/stm32_bbsram.c @@ -256,7 +256,7 @@ static void stm32_bbsram_semtake(FAR struct stm32_bbsram_s *priv) static inline void stm32_bbsram_unlock(void) { - (void)stm32_pwr_enablebkp(true); + stm32_pwr_enablebkp(true); } /**************************************************************************** @@ -276,7 +276,7 @@ static inline void stm32_bbsram_unlock(void) static inline void stm32_bbsram_lock(void) { - (void)stm32_pwr_enablebkp(false); + stm32_pwr_enablebkp(false); } /**************************************************************************** diff --git a/arch/arm/src/stm32/stm32_eth.c b/arch/arm/src/stm32/stm32_eth.c index bced5def66102aadb0b09c1545e518e2fd27681c..8103477f5a94c16ace5f0356372e4a6dcda047ee 100644 --- a/arch/arm/src/stm32/stm32_eth.c +++ b/arch/arm/src/stm32/stm32_eth.c @@ -704,7 +704,10 @@ static void stm32_rxdescinit(FAR struct stm32_ethmac_s *priv); #if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT) static int stm32_phyintenable(FAR struct stm32_ethmac_s *priv); #endif +#if defined(CONFIG_STM32_AUTONEG) || defined(CONFIG_NETDEV_PHY_IOCTL) || \ + defined(CONFIG_ETH0_PHY_DM9161) static int stm32_phyread(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t *value); +#endif static int stm32_phywrite(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t value); #ifdef CONFIG_ETH0_PHY_DM9161 static inline int stm32_dm9161(FAR struct stm32_ethmac_s *priv); @@ -1687,12 +1690,6 @@ static void stm32_receive(FAR struct stm32_ethmac_s *priv) continue; } -#ifdef CONFIG_NET_PKT - /* When packet sockets are enabled, feed the frame into the packet tap */ - - pkt_input(&priv->dev); -#endif - /* We only accept IP packets of the configured type and ARP packets */ #ifdef CONFIG_NET_IPv4 @@ -3098,6 +3095,8 @@ static int stm32_phyintenable(struct stm32_ethmac_s *priv) * ****************************************************************************/ +#if defined(CONFIG_STM32_AUTONEG) || defined(CONFIG_NETDEV_PHY_IOCTL) || \ + defined(CONFIG_ETH0_PHY_DM9161) static int stm32_phyread(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t *value) { volatile uint32_t timeout; @@ -3134,6 +3133,7 @@ static int stm32_phyread(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t *val return -ETIMEDOUT; } +#endif /**************************************************************************** * Function: stm32_phywrite @@ -3278,7 +3278,10 @@ static inline int stm32_dm9161(FAR struct stm32_ethmac_s *priv) static int stm32_phyinit(FAR struct stm32_ethmac_s *priv) { +#ifdef CONFIG_STM32_AUTOGEN volatile uint32_t timeout; +#endif + uint32_t regval; uint16_t phyval; int ret; diff --git a/arch/arm/src/stm32/stm32_freerun.c b/arch/arm/src/stm32/stm32_freerun.c index 836df043ad79478b17307d8fb7808b81717bfb71..38133c7c36540a79284d029ee569e138ca335ad1 100644 --- a/arch/arm/src/stm32/stm32_freerun.c +++ b/arch/arm/src/stm32/stm32_freerun.c @@ -53,7 +53,7 @@ #ifdef CONFIG_STM32_FREERUN /**************************************************************************** - * Private Functions + * Private Data ****************************************************************************/ static struct stm32_freerun_s *g_freerun; @@ -80,6 +80,7 @@ static struct stm32_freerun_s *g_freerun; * ****************************************************************************/ +#ifndef CONFIG_CLOCK_TIMEKEEPING static int stm32_freerun_handler(int irq, void *context) { struct stm32_freerun_s *freerun = g_freerun; @@ -90,6 +91,7 @@ static int stm32_freerun_handler(int irq, void *context) STM32_TIM_ACKINT(freerun->tch, 0); return OK; } +#endif /* CONFIG_CLOCK_TIMEKEEPING */ /**************************************************************************** * Public Functions @@ -140,15 +142,21 @@ int stm32_freerun_initialize(struct stm32_freerun_s *freerun, int chan, * success. */ - freerun->chan = chan; - freerun->running = false; - freerun->overflow = 0; + freerun->chan = chan; + freerun->running = false; + +#ifdef CONFIG_CLOCK_TIMEKEEPING + freerun->counter_mask = 0xffffffffull; +#endif - g_freerun = freerun; +#ifndef CONFIG_CLOCK_TIMEKEEPING + freerun->overflow = 0; + g_freerun = freerun; /* Set up to receive the callback when the counter overflow occurs */ STM32_TIM_SETISR(freerun->tch, stm32_freerun_handler, 0); +#endif /* Set timer period */ @@ -157,8 +165,11 @@ int stm32_freerun_initialize(struct stm32_freerun_s *freerun, int chan, /* Start the counter */ STM32_TIM_SETMODE(freerun->tch, STM32_TIM_MODE_UP); + +#ifndef CONFIG_CLOCK_TIMEKEEPING STM32_TIM_ACKINT(freerun->tch, 0); STM32_TIM_ENABLEINT(freerun->tch, 0); +#endif return OK; } @@ -182,6 +193,8 @@ int stm32_freerun_initialize(struct stm32_freerun_s *freerun, int chan, * ****************************************************************************/ +#ifndef CONFIG_CLOCK_TIMEKEEPING + int stm32_freerun_counter(struct stm32_freerun_s *freerun, struct timespec *ts) { @@ -257,6 +270,16 @@ int stm32_freerun_counter(struct stm32_freerun_s *freerun, return OK; } +#else /* CONFIG_CLOCK_TIMEKEEPING */ + +int stm32_freerun_counter(struct stm32_freerun_s *freerun, uint64_t *counter) +{ + *counter = (uint64_t)STM32_TIM_GETCOUNTER(freerun->tch); + return OK; +} + +#endif /* CONFIG_CLOCK_TIMEKEEPING */ + /**************************************************************************** * Name: stm32_freerun_uninitialize * diff --git a/arch/arm/src/stm32/stm32_freerun.h b/arch/arm/src/stm32/stm32_freerun.h index 08dd1786da7cb3d73e95913e7c5a6abf9e44b757..bc7609666cfe40a91b2b6ad22c7f17f314b80292 100644 --- a/arch/arm/src/stm32/stm32_freerun.h +++ b/arch/arm/src/stm32/stm32_freerun.h @@ -64,9 +64,16 @@ struct stm32_freerun_s { uint8_t chan; /* The timer/counter in use */ bool running; /* True: the timer is running */ - uint32_t overflow; /* Timer counter overflow */ FAR struct stm32_tim_dev_s *tch; /* Handle returned by stm32_tim_init() */ uint32_t frequency; + +#ifndef CONFIG_CLOCK_TIMEKEEPING + uint32_t overflow; /* Timer counter overflow */ +#endif + +#ifdef CONFIG_CLOCK_TIMEKEEPING + uint64_t counter_mask; +#endif }; /**************************************************************************** @@ -127,9 +134,18 @@ int stm32_freerun_initialize(struct stm32_freerun_s *freerun, int chan, * ****************************************************************************/ +#ifndef CONFIG_CLOCK_TIMEKEEPING + int stm32_freerun_counter(struct stm32_freerun_s *freerun, struct timespec *ts); +#else /* CONFIG_CLOCK_TIMEKEEPING */ + +int stm32_freerun_counter(struct stm32_freerun_s *freerun, + uint64_t *counter); + +#endif /* CONFIG_CLOCK_TIMEKEEPING */ + /**************************************************************************** * Name: stm32_freerun_uninitialize * diff --git a/arch/arm/src/stm32/stm32_lse.c b/arch/arm/src/stm32/stm32_lse.c index 18334852ba21190aa56705866d4714cf7c8beb71..64e697976eade7b9521c591938caa18bbce5479b 100644 --- a/arch/arm/src/stm32/stm32_lse.c +++ b/arch/arm/src/stm32/stm32_lse.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/stm32/stm32_lse.c * - * Copyright (C) 2009, 2011, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -45,18 +45,6 @@ #include "stm32_rcc.h" #include "stm32_waste.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -74,14 +62,12 @@ void stm32_rcc_enablelse(void) { - bool bkpenabled; - /* The LSE is in the RTC domain and write access is denied to this domain * after reset, you have to enable write access using DBP bit in the PWR CR * register before to configuring the LSE. */ - bkpenabled = stm32_pwr_enablebkp(true); + stm32_pwr_enablebkp(true); #if defined(CONFIG_STM32_STM32L15XX) /* Enable the External Low-Speed (LSE) oscillator by setting the LSEON bit @@ -115,8 +101,5 @@ void stm32_rcc_enablelse(void) /* Disable backup domain access if it was disabled on entry */ - if (!bkpenabled) - { - (void)stm32_pwr_enablebkp(false); - } + stm32_pwr_enablebkp(false); } diff --git a/arch/arm/src/stm32/stm32_oneshot_lowerhalf.c b/arch/arm/src/stm32/stm32_oneshot_lowerhalf.c new file mode 100644 index 0000000000000000000000000000000000000000..41426958bcf20e030b7a6ffce08009031670b685 --- /dev/null +++ b/arch/arm/src/stm32/stm32_oneshot_lowerhalf.c @@ -0,0 +1,345 @@ +/**************************************************************************** + * arch/arm/src/stm32/stm32_oneshot_lowerhalf.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 + +#include "stm32_oneshot.h" + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* This structure describes the state of the oneshot timer lower-half driver */ + +struct stm32_oneshot_lowerhalf_s +{ + /* This is the part of the lower half driver that is visible to the upper- + * half client of the driver. This must be the first thing in this + * structure so that pointers to struct oneshot_lowerhalf_s are cast + * compatible to struct stm32_oneshot_lowerhalf_s and vice versa. + */ + + struct oneshot_lowerhalf_s lh; /* Common lower-half driver fields */ + + /* Private lower half data follows */ + + struct stm32_oneshot_s oneshot; /* STM32-specific oneshot state */ + oneshot_callback_t callback; /* Internal handler that receives callback */ + FAR void *arg; /* Argument that is passed to the handler */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static void stm32_oneshot_handler(void *arg); + +static int stm32_max_delay(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts); +static int stm32_start(FAR struct oneshot_lowerhalf_s *lower, + oneshot_callback_t callback, FAR void *arg, + FAR const struct timespec *ts); +static int stm32_cancel(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* Lower half operations */ + +static const struct oneshot_operations_s g_oneshot_ops = +{ + .max_delay = stm32_max_delay, + .start = stm32_start, + .cancel = stm32_cancel, +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_oneshot_handler + * + * Description: + * Timer expiration handler + * + * Input Parameters: + * arg - Should be the same argument provided when stm32_oneshot_start() + * was called. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void stm32_oneshot_handler(void *arg) +{ + FAR struct stm32_oneshot_lowerhalf_s *priv = + (FAR struct stm32_oneshot_lowerhalf_s *)arg; + oneshot_callback_t callback; + FAR void *cbarg; + + DEBUGASSERT(priv != NULL); + + /* Perhaps the callback was nullified in a race condition with + * stm32_cancel? + */ + + if (priv->callback) + { + /* Sample and nullify BEFORE executing callback (in case the callback + * restarts the oneshot). + */ + + callback = priv->callback; + cbarg = priv->arg; + priv->callback = NULL; + priv->arg = NULL; + + /* Then perform the callback */ + + callback(&priv->lh, cbarg); + } +} + +/**************************************************************************** + * Name: stm32_max_delay + * + * Description: + * Determine the maximum delay of the one-shot timer (in microseconds) + * + * Input Parameters: + * lower An instance of the lower-half oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * ts The location in which to return the maxumum delay. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +static int stm32_max_delay(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts) +{ + FAR struct stm32_oneshot_lowerhalf_s *priv = + (FAR struct stm32_oneshot_lowerhalf_s *)lower; + uint64_t usecs; + int ret; + + DEBUGASSERT(priv != NULL && ts != NULL); + ret = stm32_oneshot_max_delay(&priv->oneshot, &usecs); + if (ret >= 0) + { + uint64_t sec = usecs / 1000000; + usecs -= 1000000 * sec; + + ts->tv_sec = (time_t)sec; + ts->tv_nsec = (long)(usecs * 1000); + } + + return ret; +} + +/**************************************************************************** + * Name: stm32_start + * + * Description: + * Start the oneshot timer + * + * Input Parameters: + * lower An instance of the lower-half oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * handler The function to call when when the oneshot timer expires. + * arg An opaque argument that will accompany the callback. + * ts Provides the duration of the one shot timer. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +static int stm32_start(FAR struct oneshot_lowerhalf_s *lower, + oneshot_callback_t callback, FAR void *arg, + FAR const struct timespec *ts) +{ + FAR struct stm32_oneshot_lowerhalf_s *priv = + (FAR struct stm32_oneshot_lowerhalf_s *)lower; + irqstate_t flags; + int ret; + + DEBUGASSERT(priv != NULL && callback != NULL && ts != NULL); + + /* Save the callback information and start the timer */ + + flags = enter_critical_section(); + priv->callback = callback; + priv->arg = arg; + ret = stm32_oneshot_start(&priv->oneshot, + stm32_oneshot_handler, priv, ts); + leave_critical_section(flags); + + if (ret < 0) + { + tmrerr("ERROR: stm32_oneshot_start failed: %d\n", flags); + } + + return ret; +} + +/**************************************************************************** + * Name: stm32_cancel + * + * Description: + * Cancel the oneshot timer and return the time remaining on the timer. + * + * NOTE: This function may execute at a high rate with no timer running (as + * when pre-emption is enabled and disabled). + * + * Input Parameters: + * lower Caller allocated instance of the oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * ts The location in which to return the time remaining on the + * oneshot timer. A time of zero is returned if the timer is + * not running. + * + * Returned Value: + * Zero (OK) is returned on success. A call to up_timer_cancel() when + * the timer is not active should also return success; a negated errno + * value is returned on any failure. + * + ****************************************************************************/ + +static int stm32_cancel(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts) +{ + FAR struct stm32_oneshot_lowerhalf_s *priv = + (FAR struct stm32_oneshot_lowerhalf_s *)lower; + irqstate_t flags; + int ret; + + DEBUGASSERT(priv != NULL); + + /* Cancel the timer */ + + flags = enter_critical_section(); + ret = stm32_oneshot_cancel(&priv->oneshot, ts); + priv->callback = NULL; + priv->arg = NULL; + leave_critical_section(flags); + + if (ret < 0) + { + tmrerr("ERROR: stm32_oneshot_cancel failed: %d\n", flags); + } + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: oneshot_initialize + * + * Description: + * Initialize the oneshot timer and return a oneshot lower half driver + * instance. + * + * Input Parameters: + * chan Timer counter channel to be used. + * resolution The required resolution of the timer in units of + * microseconds. NOTE that the range is restricted to the + * range of uint16_t (excluding zero). + * + * Returned Value: + * On success, a non-NULL instance of the oneshot lower-half driver is + * returned. NULL is return on any failure. + * + ****************************************************************************/ + +FAR struct oneshot_lowerhalf_s *oneshot_initialize(int chan, + uint16_t resolution) +{ + FAR struct stm32_oneshot_lowerhalf_s *priv; + int ret; + + /* Allocate an instance of the lower half driver */ + + priv = (FAR struct stm32_oneshot_lowerhalf_s *) + kmm_zalloc(sizeof(struct stm32_oneshot_lowerhalf_s)); + + if (priv == NULL) + { + tmrerr("ERROR: Failed to initialized state structure\n"); + return NULL; + } + + /* Initialize the lower-half driver structure */ + + priv->lh.ops = &g_oneshot_ops; + + /* Initialize the contained STM32 oneshot timer */ + + ret = stm32_oneshot_initialize(&priv->oneshot, chan, resolution); + if (ret < 0) + { + tmrerr("ERROR: stm32_oneshot_initialize failed: %d\n", ret); + kmm_free(priv); + return NULL; + } + + return &priv->lh; +} diff --git a/arch/arm/src/stm32/stm32_otgfsdev.c b/arch/arm/src/stm32/stm32_otgfsdev.c index 231d091a0cc8bbaedb1ce40af8638d31e9de05b7..c570e6d084fceaca4c7095898b1431d5c68cc73f 100644 --- a/arch/arm/src/stm32/stm32_otgfsdev.c +++ b/arch/arm/src/stm32/stm32_otgfsdev.c @@ -1,8 +1,9 @@ /**************************************************************************** * arch/arm/src/stm32/stm32_otgfsdev.c * - * Copyright (C) 2012-2014 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2012-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 @@ -111,7 +112,8 @@ # define CONFIG_USBDEV_EP3_TXFIFO_SIZE 192 #endif -#if (CONFIG_USBDEV_RXFIFO_SIZE + CONFIG_USBDEV_EP0_TXFIFO_SIZE + \ +#if (CONFIG_USBDEV_RXFIFO_SIZE + \ + CONFIG_USBDEV_EP0_TXFIFO_SIZE + CONFIG_USBDEV_EP1_TXFIFO_SIZE + \ CONFIG_USBDEV_EP2_TXFIFO_SIZE + CONFIG_USBDEV_EP3_TXFIFO_SIZE) > 1280 # error "FIFO allocations exceed FIFO memory size" #endif @@ -151,6 +153,26 @@ # error "CONFIG_USBDEV_EP3_TXFIFO_SIZE is out of range" #endif +#define OTGFS_GINT_RESERVED (OTGFS_GINT_RES89 | \ + (OTGFS_GINT_RES16 | OTGFS_GINTMSK_EPMISM) \ + |OTGFS_GINT_RES2223 | \ + OTGFS_GINT_RES27) + +#define OTGFS_GINT_RC_W1 (OTGFS_GINT_MMIS | \ + OTGFS_GINT_SOF | \ + OTGFS_GINT_ESUSP | \ + OTGFS_GINT_USBSUSP | \ + OTGFS_GINT_USBRST | \ + OTGFS_GINT_ENUMDNE | \ + OTGFS_GINT_ISOODRP | \ + OTGFS_GINT_EOPF | \ + OTGFS_GINT_IISOIXFR | \ + OTGFS_GINT_IISOOXFR | \ + OTGFS_GINT_CIDSCHG | \ + OTGFS_GINT_DISC | \ + OTGFS_GINT_SRQ | \ + OTGFS_GINT_WKUP) + /* Debug ***********************************************************************/ /* Trace error codes */ @@ -3119,154 +3141,163 @@ static inline void stm32_rxinterrupt(FAR struct stm32_usbdev_s *priv) /* Disable the Rx status queue level interrupt */ - regval = stm32_getreg(STM32_OTGFS_GINTMSK); - regval &= ~OTGFS_GINT_RXFLVL; - stm32_putreg(regval, STM32_OTGFS_GINTMSK); + while(0 != (stm32_getreg(STM32_OTGFS_GINTSTS) & OTGFS_GINT_RXFLVL)) + { - /* Get the status from the top of the FIFO */ + /* Get the status from the top of the FIFO */ - regval = stm32_getreg(STM32_OTGFS_GRXSTSP); + regval = stm32_getreg(STM32_OTGFS_GRXSTSP); - /* Decode status fields */ + /* Decode status fields */ - epphy = (regval & OTGFS_GRXSTSD_EPNUM_MASK) >> OTGFS_GRXSTSD_EPNUM_SHIFT; + epphy = (regval & OTGFS_GRXSTSD_EPNUM_MASK) >> OTGFS_GRXSTSD_EPNUM_SHIFT; - if (epphy < STM32_NENDPOINTS) - { - privep = &priv->epout[epphy]; + /* Workaround for bad values read from the STM32_OTGFS_GRXSTSP register + * happens regval is 0xb4e48168 or 0xa80c9367 or 267E781c + * All of which provide out of range indexes for epout[epphy] + */ - /* Handle the RX event according to the packet status field */ + if (epphy < STM32_NENDPOINTS) + { + privep = &priv->epout[epphy]; - switch (regval & OTGFS_GRXSTSD_PKTSTS_MASK) - { - /* Global OUT NAK. This indicate that the global OUT NAK bit has taken - * effect. - * - * PKTSTS = Global OUT NAK, BCNT = 0, EPNUM = Don't Care, DPID = Don't - * Care. - */ + /* Handle the RX event according to the packet status field */ - case OTGFS_GRXSTSD_PKTSTS_OUTNAK: + switch (regval & OTGFS_GRXSTSD_PKTSTS_MASK) { - usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_OUTNAK), 0); - } - break; + /* Global OUT NAK. This indicate that the global OUT NAK bit has taken + * effect. + * + * PKTSTS = Global OUT NAK, BCNT = 0, EPNUM = Don't Care, DPID = Don't + * Care. + */ - /* OUT data packet received. - * - * PKTSTS = DataOUT, BCNT = size of the received data OUT packet, - * EPNUM = EPNUM on which the packet was received, DPID = Actual Data PID. - */ + case OTGFS_GRXSTSD_PKTSTS_OUTNAK: + { + usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_OUTNAK), 0); + } + break; - case OTGFS_GRXSTSD_PKTSTS_OUTRECVD: - { - usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_OUTRECVD), epphy); - bcnt = (regval & OTGFS_GRXSTSD_BCNT_MASK) >> OTGFS_GRXSTSD_BCNT_SHIFT; - if (bcnt > 0) - { - stm32_epout_receive(privep, bcnt); - } - } - break; + /* OUT data packet received. + * + * PKTSTS = DataOUT, BCNT = size of the received data OUT packet, + * EPNUM = EPNUM on which the packet was received, DPID = Actual Data PID. + */ - /* OUT transfer completed. This indicates that an OUT data transfer for - * the specified OUT endpoint has completed. After this entry is popped - * from the receive FIFO, the core asserts a Transfer Completed interrupt - * on the specified OUT endpoint. - * - * PKTSTS = Data OUT Transfer Done, BCNT = 0, EPNUM = OUT EP Num on - * which the data transfer is complete, DPID = Don't Care. - */ + case OTGFS_GRXSTSD_PKTSTS_OUTRECVD: + { + usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_OUTRECVD), epphy); + bcnt = (regval & OTGFS_GRXSTSD_BCNT_MASK) >> OTGFS_GRXSTSD_BCNT_SHIFT; + if (bcnt > 0) + { + stm32_epout_receive(privep, bcnt); + } + } + break; - case OTGFS_GRXSTSD_PKTSTS_OUTDONE: - { - usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_OUTDONE), epphy); - } - break; + /* OUT transfer completed. This indicates that an OUT data transfer for + * the specified OUT endpoint has completed. After this entry is popped + * from the receive FIFO, the core asserts a Transfer Completed interrupt + * on the specified OUT endpoint. + * + * PKTSTS = Data OUT Transfer Done, BCNT = 0, EPNUM = OUT EP Num on + * which the data transfer is complete, DPID = Don't Care. + */ - /* SETUP transaction completed. This indicates that the Setup stage for - * the specified endpoint has completed and the Data stage has started. - * After this entry is popped from the receive FIFO, the core asserts a - * Setup interrupt on the specified control OUT endpoint (triggers an - * interrupt). - * - * PKTSTS = Setup Stage Done, BCNT = 0, EPNUM = Control EP Num, - * DPID = Don't Care. - */ + case OTGFS_GRXSTSD_PKTSTS_OUTDONE: + { + usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_OUTDONE), epphy); + } + break; - case OTGFS_GRXSTSD_PKTSTS_SETUPDONE: - { - usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_SETUPDONE), epphy); - } - break; + /* SETUP transaction completed. This indicates that the Setup stage for + * the specified endpoint has completed and the Data stage has started. + * After this entry is popped from the receive FIFO, the core asserts a + * Setup interrupt on the specified control OUT endpoint (triggers an + * interrupt). + * + * PKTSTS = Setup Stage Done, BCNT = 0, EPNUM = Control EP Num, + * DPID = Don't Care. + */ - /* SETUP data packet received. This indicates that a SETUP packet for the - * specified endpoint is now available for reading from the receive FIFO. - * - * PKTSTS = SETUP, BCNT = 8, EPNUM = Control EP Num, DPID = D0. - */ + case OTGFS_GRXSTSD_PKTSTS_SETUPDONE: + { + usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_SETUPDONE), epphy); - case OTGFS_GRXSTSD_PKTSTS_SETUPRECVD: - { - uint16_t datlen; + /* Now that the Setup Phase is complete if it was an OUT enable + * the endpoint + * (Doing this here prevents the loss of the first FIFO word) + */ - usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_SETUPRECVD), epphy); + if (priv->ep0state == EP0STATE_SETUP_OUT) + { - /* Read EP0 setup data. NOTE: If multiple SETUP packets are received, - * the last one overwrites the previous setup packets and only that - * last SETUP packet will be processed. - */ + /* Clear NAKSTS so that we can receive the data */ - stm32_rxfifo_read(&priv->epout[EP0], (FAR uint8_t *)&priv->ctrlreq, - USB_SIZEOF_CTRLREQ); + regval = stm32_getreg(STM32_OTGFS_DOEPCTL0); + regval |= OTGFS_DOEPCTL0_CNAK; + stm32_putreg(regval, STM32_OTGFS_DOEPCTL0); - /* Was this an IN or an OUT SETUP packet. If it is an OUT SETUP, - * then we need to wait for the completion of the data phase to - * process the setup command. If it is an IN SETUP packet, then - * we must processing the command BEFORE we enter the DATA phase. - * - * If the data associated with the OUT SETUP packet is zero length, - * then, of course, we don't need to wait. - */ + } + } + break; - datlen = GETUINT16(priv->ctrlreq.len); - if (USB_REQ_ISOUT(priv->ctrlreq.type) && datlen > 0) - { - /* Clear NAKSTS so that we can receive the data */ + /* SETUP data packet received. This indicates that a SETUP packet for the + * specified endpoint is now available for reading from the receive FIFO. + * + * PKTSTS = SETUP, BCNT = 8, EPNUM = Control EP Num, DPID = D0. + */ - regval = stm32_getreg(STM32_OTGFS_DOEPCTL0); - regval |= OTGFS_DOEPCTL0_CNAK; - stm32_putreg(regval, STM32_OTGFS_DOEPCTL0); + case OTGFS_GRXSTSD_PKTSTS_SETUPRECVD: + { + uint16_t datlen; - /* Wait for the data phase. */ + usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_SETUPRECVD), epphy); - priv->ep0state = EP0STATE_SETUP_OUT; - } - else - { - /* We can process the setup data as soon as SETUP done word is - * popped of the RxFIFO. - */ + /* Read EP0 setup data. NOTE: If multiple SETUP packets are received, + * the last one overwrites the previous setup packets and only that + * last SETUP packet will be processed. + */ - priv->ep0state = EP0STATE_SETUP_READY; - } - } - break; + stm32_rxfifo_read(&priv->epout[EP0], (FAR uint8_t *)&priv->ctrlreq, + USB_SIZEOF_CTRLREQ); - default: - { - usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), - (regval & OTGFS_GRXSTSD_PKTSTS_MASK) >> OTGFS_GRXSTSD_PKTSTS_SHIFT); - } - break; - } - } + /* Was this an IN or an OUT SETUP packet. If it is an OUT SETUP, + * then we need to wait for the completion of the data phase to + * process the setup command. If it is an IN SETUP packet, then + * we must processing the command BEFORE we enter the DATA phase. + * + * If the data associated with the OUT SETUP packet is zero length, + * then, of course, we don't need to wait. + */ - /* Enable the Rx Status Queue Level interrupt */ + datlen = GETUINT16(priv->ctrlreq.len); + if (USB_REQ_ISOUT(priv->ctrlreq.type) && datlen > 0) + { + /* Wait for the data phase. */ - regval = stm32_getreg(STM32_OTGFS_GINTMSK); - regval |= OTGFS_GINT_RXFLVL; - stm32_putreg(regval, STM32_OTGFS_GINTMSK); + priv->ep0state = EP0STATE_SETUP_OUT; + } + else + { + /* We can process the setup data as soon as SETUP done word is + * popped of the RxFIFO. + */ + + priv->ep0state = EP0STATE_SETUP_READY; + } + } + break; + + default: + { + usbtrace(TRACE_DEVERROR(STM32_TRACEERR_INVALIDPARMS), + (regval & OTGFS_GRXSTSD_PKTSTS_MASK) >> OTGFS_GRXSTSD_PKTSTS_SHIFT); + } + break; + } + } + } } /**************************************************************************** @@ -3289,7 +3320,7 @@ static inline void stm32_enuminterrupt(FAR struct stm32_usbdev_s *priv) regval = stm32_getreg(STM32_OTGFS_GUSBCFG); regval &= ~OTGFS_GUSBCFG_TRDT_MASK; - regval |= OTGFS_GUSBCFG_TRDT(5); + regval |= OTGFS_GUSBCFG_TRDT(6); stm32_putreg(regval, STM32_OTGFS_GUSBCFG); } @@ -3508,6 +3539,7 @@ static int stm32_usbinterrupt(int irq, FAR void *context) FAR struct stm32_usbdev_s *priv = &g_otgfsdev; uint32_t regval; + uint32_t reserved; usbtrace(TRACE_INTENTRY(STM32_TRACEINTID_USB), 0); @@ -3519,14 +3551,21 @@ static int stm32_usbinterrupt(int irq, FAR void *context) * some interrupts (like RXFLVL) will generate additional interrupting * events. */ - for (; ; ) { /* Get the set of pending, un-masked interrupts */ regval = stm32_getreg(STM32_OTGFS_GINTSTS); + reserved = (regval & OTGFS_GINT_RESERVED); regval &= stm32_getreg(STM32_OTGFS_GINTMSK); + /* With out modifying the reserved bits, acknowledge all + * **Writable** pending irqs we will service below + */ + + stm32_putreg(((regval | reserved) & OTGFS_GINT_RC_W1), STM32_OTGFS_GINTSTS); + + /* Break out of the loop when there are no further pending (and * unmasked) interrupts to be processes. */ @@ -3545,7 +3584,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_EPOUT), (uint16_t)regval); stm32_epout_interrupt(priv); - stm32_putreg(OTGFS_GINT_OEP, STM32_OTGFS_GINTSTS); } /* IN endpoint interrupt. The core sets this bit to indicate that @@ -3556,7 +3594,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_EPIN), (uint16_t)regval); stm32_epin_interrupt(priv); - stm32_putreg(OTGFS_GINT_IEP, STM32_OTGFS_GINTSTS); } /* Host/device mode mismatch error interrupt */ @@ -3565,7 +3602,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) if ((regval & OTGFS_GINT_MMIS) != 0) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_MISMATCH), (uint16_t)regval); - stm32_putreg(OTGFS_GINT_MMIS, STM32_OTGFS_GINTSTS); } #endif @@ -3575,7 +3611,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_WAKEUP), (uint16_t)regval); stm32_resumeinterrupt(priv); - stm32_putreg(OTGFS_GINT_WKUP, STM32_OTGFS_GINTSTS); } /* USB suspend interrupt */ @@ -3584,7 +3619,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_SUSPEND), (uint16_t)regval); stm32_suspendinterrupt(priv); - stm32_putreg(OTGFS_GINT_USBSUSP, STM32_OTGFS_GINTSTS); } /* Start of frame interrupt */ @@ -3593,7 +3627,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) if ((regval & OTGFS_GINT_SOF) != 0) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_SOF), (uint16_t)regval); - stm32_putreg(OTGFS_GINT_SOF, STM32_OTGFS_GINTSTS); } #endif @@ -3605,7 +3638,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_RXFIFO), (uint16_t)regval); stm32_rxinterrupt(priv); - stm32_putreg(OTGFS_GINT_RXFLVL, STM32_OTGFS_GINTSTS); } /* USB reset interrupt */ @@ -3618,7 +3650,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) stm32_usbreset(priv); usbtrace(TRACE_INTEXIT(STM32_TRACEINTID_USB), 0); - stm32_putreg(OTGFS_GINT_USBRST, STM32_OTGFS_GINTSTS); return OK; } @@ -3628,7 +3659,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_ENUMDNE), (uint16_t)regval); stm32_enuminterrupt(priv); - stm32_putreg(OTGFS_GINT_ENUMDNE, STM32_OTGFS_GINTSTS); } /* Incomplete isochronous IN transfer interrupt. When the core finds @@ -3642,7 +3672,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_IISOIXFR), (uint16_t)regval); stm32_isocininterrupt(priv); - stm32_putreg(OTGFS_GINT_IISOIXFR, STM32_OTGFS_GINTSTS); } /* Incomplete isochronous OUT transfer. For isochronous OUT @@ -3659,7 +3688,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_IISOOXFR), (uint16_t)regval); stm32_isocoutinterrupt(priv); - stm32_putreg(OTGFS_GINT_IISOOXFR, STM32_OTGFS_GINTSTS); } #endif @@ -3670,7 +3698,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_SRQ), (uint16_t)regval); stm32_sessioninterrupt(priv); - stm32_putreg(OTGFS_GINT_SRQ, STM32_OTGFS_GINTSTS); } /* OTG interrupt */ @@ -3679,7 +3706,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_OTG), (uint16_t)regval); stm32_otginterrupt(priv); - stm32_putreg(OTGFS_GINT_OTG, STM32_OTGFS_GINTSTS); } #endif } @@ -5338,7 +5364,9 @@ static void stm32_hwinitialize(FAR struct stm32_usbdev_s *priv) /* Clear any pending interrupts */ - stm32_putreg(0xbfffffff, STM32_OTGFS_GINTSTS); + regval = stm32_getreg(STM32_OTGFS_GINTSTS); + regval &= OTGFS_GINT_RESERVED; + stm32_putreg(regval | OTGFS_GINT_RC_W1, STM32_OTGFS_GINTSTS); /* Enable the interrupts in the INTMSK */ diff --git a/arch/arm/src/stm32/stm32_pwr.c b/arch/arm/src/stm32/stm32_pwr.c index a32caaea517529f63c486b208e37ac3ffa638186..5eda6c08ccc1b1c97148e284e43da9796f456073 100644 --- a/arch/arm/src/stm32/stm32_pwr.c +++ b/arch/arm/src/stm32/stm32_pwr.c @@ -2,7 +2,7 @@ * arch/arm/src/stm32/stm32_pwr.c * * Copyright (C) 2011 Uros Platise. All rights reserved. - * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2015-2016 Gregory Nutt. All rights reserved. * Authors: Uros Platise * Gregory Nutt * @@ -40,21 +40,19 @@ ************************************************************************************/ #include -#include #include #include #include +#include +#include + #include "up_arch.h" #include "stm32_pwr.h" #if defined(CONFIG_STM32_PWR) -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - /************************************************************************************ * Private Functions ************************************************************************************/ @@ -85,46 +83,70 @@ static inline void stm32_pwr_modifyreg(uint8_t offset, uint16_t clearbits, uint1 * Enables access to the backup domain (RTC registers, RTC backup data registers * and backup SRAM). * + * NOTE: Reference counting is used in order to supported nested calls to this + * function. As a consequence, every call to stm32_pwr_enablebkp(true) must + * be followed by a matching call to stm32_pwr_enablebkp(false). + * * Input Parameters: * writable - True: enable ability to write to backup domain registers * * Returned Value: - * True: The backup domain was previously writable. + * None * ************************************************************************************/ -bool stm32_pwr_enablebkp(bool writable) +void stm32_pwr_enablebkp(bool writable) { + static uint16_t writable_counter = 0; + irqstate_t flags; uint16_t regval; bool waswritable; + bool wait = false; + + flags = enter_critical_section(); /* Get the current state of the STM32 PWR control register */ regval = stm32_pwr_getreg(STM32_PWR_CR_OFFSET); waswritable = ((regval & PWR_CR_DBP) != 0); + if (writable) + { + DEBUGASSERT(writable_counter < UINT16_MAX); + writable_counter++; + } + else if (writable_counter > 0) + { + writable_counter--; + } + /* Enable or disable the ability to write */ - if (waswritable && !writable) + if (waswritable && writable_counter == 0) { /* Disable backup domain access */ regval &= ~PWR_CR_DBP; stm32_pwr_putreg(STM32_PWR_CR_OFFSET, regval); } - else if (!waswritable && writable) + else if (!waswritable && writable_counter > 0) { /* Enable backup domain access */ regval |= PWR_CR_DBP; stm32_pwr_putreg(STM32_PWR_CR_OFFSET, regval); + wait = true; + } + + leave_critical_section(flags); + + if (wait) + { /* Enable does not happen right away */ up_udelay(4); } - - return waswritable; } /************************************************************************************ diff --git a/arch/arm/src/stm32/stm32_pwr.h b/arch/arm/src/stm32/stm32_pwr.h index 49e0657f552b68a1085d1576fb714b592d491592..344834c0678ff806fc51583e1888c34585b8be47 100644 --- a/arch/arm/src/stm32/stm32_pwr.h +++ b/arch/arm/src/stm32/stm32_pwr.h @@ -73,15 +73,19 @@ extern "C" * Enables access to the backup domain (RTC registers, RTC backup data registers * and backup SRAM). * + * NOTE: Reference counting is used in order to supported nested calls to this + * function. As a consequence, every call to stm32_pwr_enablebkp(true) must + * be followed by a matching call to stm32_pwr_enablebkp(false). + * * Input Parameters: * writable - True: enable ability to write to backup domain registers * * Returned Value: - * True: The backup domain was previously writable. + * None * ************************************************************************************/ -bool stm32_pwr_enablebkp(bool writable); +void stm32_pwr_enablebkp(bool writable); /************************************************************************************ * Name: stm32_pwr_enablebreg diff --git a/arch/arm/src/stm32/stm32_rcc.c b/arch/arm/src/stm32/stm32_rcc.c index 553f76e73df675c7615f740abc47ff39d57813f5..cf3c115d639cd3eb82b676f9e46b5a9ed05cfa0f 100644 --- a/arch/arm/src/stm32/stm32_rcc.c +++ b/arch/arm/src/stm32/stm32_rcc.c @@ -128,7 +128,7 @@ static inline void rcc_resetbkp(void) regval = getreg32(RTC_MAGIC_REG); if (regval != RTC_MAGIC) { - (void)stm32_pwr_enablebkp(true); + 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) @@ -137,7 +137,7 @@ static inline void rcc_resetbkp(void) modifyreg32(STM32_RCC_XXX, 0, RCC_XXX_YYYRST); modifyreg32(STM32_RCC_XXX, RCC_XXX_YYYRST, 0); - (void)stm32_pwr_enablebkp(false); + stm32_pwr_enablebkp(false); } } #else diff --git a/arch/arm/src/stm32/stm32_rtcc.c b/arch/arm/src/stm32/stm32_rtcc.c index da8f57db592cb12dfef09d4bafef0f512bd9cb41..d27a8ddd387270e3bdf85b23ac3f3c921948dce0 100644 --- a/arch/arm/src/stm32/stm32_rtcc.c +++ b/arch/arm/src/stm32/stm32_rtcc.c @@ -222,7 +222,7 @@ static void rtc_wprunlock(void) * registers and backup SRAM). */ - (void)stm32_pwr_enablebkp(true); + stm32_pwr_enablebkp(true); /* The following steps are required to unlock the write protection on all the * RTC registers (except for RTC_ISR[13:8], RTC_TAFCR, and RTC_BKPxR). @@ -261,7 +261,7 @@ static inline void rtc_wprlock(void) * registers and backup SRAM). */ - (void)stm32_pwr_enablebkp(false); + stm32_pwr_enablebkp(false); } /************************************************************************************ @@ -598,7 +598,7 @@ int up_rtc_initialize(void) regval = getreg32(RTC_MAGIC_REG); - (void)stm32_pwr_enablebkp(true); + stm32_pwr_enablebkp(true); if (regval != RTC_MAGIC) { @@ -673,7 +673,7 @@ int up_rtc_initialize(void) } } - (void)stm32_pwr_enablebkp(false); + stm32_pwr_enablebkp(false); /* Loop, attempting to initialize/resume the RTC. This loop is necessary * because it seems that occasionally it takes longer to initialize the RTC @@ -724,11 +724,17 @@ int up_rtc_initialize(void) * backup data registers and backup SRAM). */ - (void)stm32_pwr_enablebkp(true); + stm32_pwr_enablebkp(true); /* Remember that the RTC is initialized */ putreg32(RTC_MAGIC, RTC_MAGIC_REG); + + /* Disable write access to the backup domain (RTC registers, RTC + * backup data registers and backup SRAM). + */ + + stm32_pwr_enablebkp(false); } else { @@ -740,12 +746,6 @@ int up_rtc_initialize(void) rtc_dumpregs("Did resume"); } - /* Disable write access to the backup domain (RTC registers, RTC backup - * data registers and backup SRAM). - */ - - (void)stm32_pwr_enablebkp(false); - if (ret != OK && nretry > 0) { rtcinfo("setup/resume ran %d times and failed with %d\n", diff --git a/arch/arm/src/stm32/stm32_rtcounter.c b/arch/arm/src/stm32/stm32_rtcounter.c index 8156de0a6041fdc32623c7d0347a584a8dc3acd7..137e7344a03443876e479be86ea9aed68a09c4d6 100644 --- a/arch/arm/src/stm32/stm32_rtcounter.c +++ b/arch/arm/src/stm32/stm32_rtcounter.c @@ -377,7 +377,7 @@ int up_rtc_initialize(void) * registers and backup SRAM). */ - (void)stm32_pwr_enablebkp(true); + stm32_pwr_enablebkp(true); /* Set access to the peripheral, enable the backup domain (BKP) and the lower * power external 32,768Hz (Low-Speed External, LSE) oscillator. Configure the @@ -428,7 +428,7 @@ int up_rtc_initialize(void) * registers and backup SRAM). */ - (void)stm32_pwr_enablebkp(false); + stm32_pwr_enablebkp(false); return OK; } @@ -605,7 +605,7 @@ int up_rtc_settime(FAR const struct timespec *tp) /* Enable write access to the backup domain */ flags = enter_critical_section(); - (void)stm32_pwr_enablebkp(true); + stm32_pwr_enablebkp(true); /* Then write the broken out values to the RTC counter and BKP overflow register * (hi-res mode only) @@ -625,7 +625,7 @@ int up_rtc_settime(FAR const struct timespec *tp) putreg16(regvals.ovf, RTC_TIMEMSB_REG); #endif - (void)stm32_pwr_enablebkp(false); + stm32_pwr_enablebkp(false); leave_critical_section(flags); return OK; } diff --git a/arch/arm/src/stm32/stm32_spi.c b/arch/arm/src/stm32/stm32_spi.c index 807a13127f2243fe10cab221831db3c11bda55a5..d82b6eb3cb12ba07aaaa7aa996c69b6313c949bf 100644 --- a/arch/arm/src/stm32/stm32_spi.c +++ b/arch/arm/src/stm32/stm32_spi.c @@ -132,8 +132,8 @@ /* DMA channel configuration */ -#if defined(CONFIG_STM32_STM32F10XX) || defined(CONFIG_STM32_STM32F30XX) || \ - defined(CONFIG_STM32_STM32L15XX) +#if defined(CONFIG_STM32_STM32F10XX) || defined(CONFIG_STM32_STM32L15XX) || \ + defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) # define SPI_RXDMA16_CONFIG (SPI_DMA_PRIO|DMA_CCR_MSIZE_16BITS|DMA_CCR_PSIZE_16BITS|DMA_CCR_MINC ) # define SPI_RXDMA8_CONFIG (SPI_DMA_PRIO|DMA_CCR_MSIZE_8BITS |DMA_CCR_PSIZE_8BITS |DMA_CCR_MINC ) # define SPI_RXDMA16NULL_CONFIG (SPI_DMA_PRIO|DMA_CCR_MSIZE_8BITS |DMA_CCR_PSIZE_16BITS ) @@ -182,7 +182,7 @@ struct stm32_spidev_s 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 (8 or 16) */ + uint8_t nbits; /* Width of word in bits (4 through 16) */ uint8_t mode; /* Mode 0,1,2,3 */ }; @@ -193,8 +193,15 @@ struct stm32_spidev_s /* Helpers */ static inline uint16_t spi_getreg(FAR struct stm32_spidev_s *priv, uint8_t offset); +#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) +static inline uint8_t spi_getreg8(FAR struct stm32_spidev_s *priv, uint8_t offset); +#endif static inline void spi_putreg(FAR struct stm32_spidev_s *priv, uint8_t offset, uint16_t value); +#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) +static inline void spi_putreg8(FAR struct stm32_spidev_s *priv, uint8_t offset, + uint8_t value); +#endif 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_16bitmode(FAR struct stm32_spidev_s *priv); @@ -222,6 +229,10 @@ 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); +#ifdef CONFIG_SPI_HWFEATURES +static int spi_hwfeatures(FAR struct spi_dev_s *dev, + spi_hwfeatures_t features); +#endif 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); @@ -249,7 +260,7 @@ static const struct spi_ops_s g_sp1iops = .setmode = spi_setmode, .setbits = spi_setbits, #ifdef CONFIG_SPI_HWFEATURES - .hwfeatures = 0, /* Not supported */ + .hwfeatures = spi_hwfeatures, #endif .status = stm32_spi1status, #ifdef CONFIG_SPI_CMDDATA @@ -292,6 +303,9 @@ static const struct spi_ops_s g_sp2iops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = spi_hwfeatures, +#endif .status = stm32_spi2status, #ifdef CONFIG_SPI_CMDDATA .cmddata = stm32_spi2cmddata, @@ -333,6 +347,9 @@ static const struct spi_ops_s g_sp3iops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = spi_hwfeatures, +#endif .status = stm32_spi3status, #ifdef CONFIG_SPI_CMDDATA .cmddata = stm32_spi3cmddata, @@ -374,6 +391,9 @@ static const struct spi_ops_s g_sp4iops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = spi_hwfeatures, +#endif .status = stm32_spi4status, #ifdef CONFIG_SPI_CMDDATA .cmddata = stm32_spi4cmddata, @@ -415,6 +435,9 @@ static const struct spi_ops_s g_sp5iops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = spi_hwfeatures, +#endif .status = stm32_spi5status, #ifdef CONFIG_SPI_CMDDATA .cmddata = stm32_spi5cmddata, @@ -456,6 +479,9 @@ static const struct spi_ops_s g_sp6iops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = spi_hwfeatures, +#endif .status = stm32_spi6status, #ifdef CONFIG_SPI_CMDDATA .cmddata = stm32_spi3cmddata, @@ -489,10 +515,6 @@ static struct stm32_spidev_s g_spi6dev = }; #endif -/************************************************************************************ - * Public Data - ************************************************************************************/ - /************************************************************************************ * Private Functions ************************************************************************************/ @@ -517,6 +539,28 @@ static inline uint16_t spi_getreg(FAR struct stm32_spidev_s *priv, uint8_t offse return getreg16(priv->spibase + offset); } +/************************************************************************************ + * 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 16-bit register + * + ************************************************************************************/ + +#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) +static inline uint8_t spi_getreg8(FAR struct stm32_spidev_s *priv, uint8_t offset) +{ + return getreg8(priv->spibase + offset); +} +#endif + /************************************************************************************ * Name: spi_putreg * @@ -538,6 +582,30 @@ static inline void spi_putreg(FAR struct stm32_spidev_s *priv, uint8_t offset, u putreg16(value, priv->spibase + offset); } +/************************************************************************************ + * Name: spi_putreg8 + * + * Description: + * Write an 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 16-bit value to be written + * + * Returned Value: + * The contents of the 16-bit register + * + ************************************************************************************/ + +#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) +static inline void spi_putreg8(FAR struct stm32_spidev_s *priv, uint8_t offset, + uint8_t value) +{ + putreg8(value, priv->spibase + offset); +} +#endif + /************************************************************************************ * Name: spi_readword * @@ -560,7 +628,27 @@ static inline uint16_t spi_readword(FAR struct stm32_spidev_s *priv) /* Then return the received byte */ - return spi_getreg(priv, STM32_SPI_DR_OFFSET); +#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) + /* "When the data frame size fits into one byte (less than or equal to 8 bits), + * data packing is used automatically when any read or write 16-bit access is + * performed on the SPIx_DR register. The double data frame pattern is handled + * in parallel in this case. At first, the SPI operates using the pattern + * stored in the LSB of the accessed word, then with the other half stored in + * the MSB.... The receiver then has to access both data frames by a single + * 16-bit read of SPIx_DR as a response to this single RXNE event. The RxFIFO + * threshold setting and the following read access must be always kept aligned + * at the receiver side, as data can be lost if it is not in line." + */ + + if (priv->nbits < 9) + { + return (uint16_t)spi_getreg8(priv, STM32_SPI_DR_OFFSET); + } + else +#endif + { + return spi_getreg(priv, STM32_SPI_DR_OFFSET); + } } /************************************************************************************ @@ -584,9 +672,35 @@ static inline void spi_writeword(FAR struct stm32_spidev_s *priv, uint16_t word) while ((spi_getreg(priv, STM32_SPI_SR_OFFSET) & SPI_SR_TXE) == 0); - /* Then send the byte */ + /* Then send the word */ + +#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) + /* "When the data frame size fits into one byte (less than or equal to 8 bits), + * data packing is used automatically when any read or write 16-bit access is + * performed on the SPIx_DR register. The double data frame pattern is handled + * in parallel in this case. At first, the SPI operates using the pattern + * stored in the LSB of the accessed word, then with the other half stored in + * the MSB... + * + * "A specific problem appears if an odd number of such "fit into one byte" + * data frames must be handled. On the transmitter side, writing the last + * data frame of any odd sequence with an 8-bit access to SPIx_DR is enough. + * ..." + * + * REVISIT: "...The receiver has to change the Rx_FIFO threshold level for the + * last data frame received in the odd sequence of frames in order to generate + * the RXNE event." + */ - spi_putreg(priv, STM32_SPI_DR_OFFSET, word); + if (priv->nbits < 9) + { + spi_putreg8(priv, STM32_SPI_DR_OFFSET, (uint8_t)word); + } + else +#endif + { + spi_putreg(priv, STM32_SPI_DR_OFFSET, word); + } } /************************************************************************************ @@ -605,7 +719,11 @@ static inline void spi_writeword(FAR struct stm32_spidev_s *priv, uint16_t word) static inline bool spi_16bitmode(FAR struct stm32_spidev_s *priv) { +#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) + return (priv->nbits > 8); +#else return ((spi_getreg(priv, STM32_SPI_CR1_OFFSET) & SPI_CR1_DFF) != 0); +#endif } /************************************************************************************ @@ -878,7 +996,8 @@ static inline void spi_dmatxstart(FAR struct stm32_spidev_s *priv) * ************************************************************************************/ -static void spi_modifycr1(FAR struct stm32_spidev_s *priv, uint16_t setbits, uint16_t clrbits) +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); @@ -887,6 +1006,34 @@ static void spi_modifycr1(FAR struct stm32_spidev_s *priv, uint16_t setbits, uin 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 + * + ************************************************************************************/ + +#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) +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); +} +#endif + /************************************************************************************ * Name: spi_lock * @@ -1132,28 +1279,48 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) if (nbits != priv->nbits) { +#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) + /* Yes... Set CR2 appropriately */ + /* Set the number of bits (valid range 4-16) */ + + if (nbits < 4 || nbits > 16) + { + spierr("ERROR: nbits out of range: %d\n", nbits); + return; + } + + clrbits = SPI_CR2_DS_MASK; + setbits = SPI_CR2_DS(nbits); + + /* If nbits is <=8, then we are in byte mode and FRXTH must be set + * (else, transaction will not complete). + */ + + if (nbits < 9) + { + setbits |= SPI_CR2_FRXTH; /* RX FIFO Threshold = 1 byte */ + } + else + { + clrbits |= SPI_CR2_FRXTH; /* RX FIFO Threshold = 2 bytes */ + } + + spi_modifycr1(priv, 0, SPI_CR1_SPE); + spi_modifycr2(priv, setbits, clrbits); + spi_modifycr1(priv, SPI_CR1_SPE, 0); +#else /* Yes... Set CR1 appropriately */ switch (nbits) { - case -8: - setbits = SPI_CR1_LSBFIRST; - clrbits = SPI_CR1_DFF; - break; - case 8: setbits = 0; - clrbits = SPI_CR1_DFF | SPI_CR1_LSBFIRST; - break; - - case -16: - setbits = SPI_CR1_DFF | SPI_CR1_LSBFIRST; - clrbits = 0; + clrbits = SPI_CR1_DFF; break; case 16: setbits = SPI_CR1_DFF; - clrbits = SPI_CR1_LSBFIRST; + clrbits = 0; break; default: @@ -1163,13 +1330,65 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) spi_modifycr1(priv, 0, SPI_CR1_SPE); spi_modifycr1(priv, setbits, clrbits); spi_modifycr1(priv, SPI_CR1_SPE, 0); - +#endif /* Save the selection so the subsequence re-configurations will be faster */ priv->nbits = nbits; } } +/**************************************************************************** + * Name: spi_hwfeatures + * + * Description: + * Set hardware-specific feature flags. + * + * Input Parameters: + * dev - Device-specific state data + * features - H/W feature flags + * + * Returned Value: + * Zero (OK) if the selected H/W features are enabled; A negated errno + * value if any H/W feature is not supportable. + * + ****************************************************************************/ + +#ifdef CONFIG_SPI_HWFEATURES +static int spi_hwfeatures(FAR struct spi_dev_s *dev, spi_hwfeatures_t features) +{ +#ifdef CONFIG_SPI_BITORDER + FAR struct stm32_spidev_s *priv = (FAR struct stm32_spidev_s *)dev; + uint16_t setbits; + uint16_t clrbits; + + spiinfo("features=%08x\n", features); + + /* Transfer data LSB first? */ + + if ((features & HWFEAT_LSBFIRST) != 0) + { + setbits = SPI_CR1_LSBFIRST; + clrbits = 0; + } + else + { + setbits = 0; + clrbits = SPI_CR1_LSBFIRST; + } + + spi_modifycr1(priv, 0, SPI_CR1_SPE); + spi_modifycr1(priv, setbits, clrbits); + spi_modifycr1(priv, SPI_CR1_SPE, 0); + + /* Other H/W features are not supported */ + + return ((features & ~HWFEAT_LSBFIRST) == 0) ? OK : -ENOSYS; +#else + return -ENOSYS; +#endif +} +#endif + /************************************************************************************ * Name: spi_send * @@ -1213,6 +1432,9 @@ static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd) * Description: * Exchange a block of data on SPI without using DMA * + * REVISIT: This function could be much more efficient by exploiting (1) RX and TX + * FIFOs and (2) the STM32 F3 data packing. + * * Input Parameters: * dev - Device-specific state data * txbuffer - A pointer to the buffer of data to be sent @@ -1446,6 +1668,25 @@ static void spi_bus_initialize(FAR struct stm32_spidev_s *priv) uint16_t setbits; uint16_t clrbits; +#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) + /* 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_CRCL | 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); +#else /* Configure CR1. Default configuration: * Mode 0: CPHA=0 and CPOL=0 * Master: MSTR=1 @@ -1459,6 +1700,7 @@ static void spi_bus_initialize(FAR struct stm32_spidev_s *priv) SPI_CR1_RXONLY | SPI_CR1_DFF | SPI_CR1_BIDIOE | SPI_CR1_BIDIMODE; setbits = SPI_CR1_MSTR | SPI_CR1_SSI | SPI_CR1_SSM; spi_modifycr1(priv, setbits, clrbits); +#endif priv->frequency = 0; priv->nbits = 8; @@ -1494,7 +1736,7 @@ static void spi_bus_initialize(FAR struct stm32_spidev_s *priv) priv->txdma = stm32_dmachannel(priv->txch); DEBUGASSERT(priv->rxdma && priv->txdma); - spi_putreg(priv, STM32_SPI_CR2_OFFSET, SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN); + spi_modifycr2(priv, SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN, 0); #endif /* Enable spi */ @@ -1671,7 +1913,7 @@ FAR struct spi_dev_s *stm32_spibus_initialize(int bus) else #endif { - spierr("ERROR: Unsupbused SPI bus: %d\n", bus); + spierr("ERROR: Unsupported SPI bus: %d\n", bus); return NULL; } diff --git a/arch/arm/src/stm32/stm32_tickless.c b/arch/arm/src/stm32/stm32_tickless.c index eadef5ce90db97c91eb797d5e03648a495ce44ed..82d7a593d25d3767284bd91010bad08da1a0bd67 100644 --- a/arch/arm/src/stm32/stm32_tickless.c +++ b/arch/arm/src/stm32/stm32_tickless.c @@ -272,11 +272,44 @@ void up_timer_initialize(void) * ****************************************************************************/ +#ifndef CONFIG_CLOCK_TIMEKEEPING + int up_timer_gettime(FAR struct timespec *ts) { return stm32_freerun_counter(&g_tickless.freerun, ts); } +#else + +int up_timer_getcounter(FAR uint64_t *cycles) +{ + return stm32_freerun_counter(&g_tickless.freerun, cycles); +} + +#endif /* CONFIG_CLOCK_TIMEKEEPING */ + +/**************************************************************************** + * Name: up_timer_getmask + * + * Description: + * To be provided + * + * Input Parameters: + * mask - Location to return the 64-bit mask + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef CONFIG_CLOCK_TIMEKEEPING +void up_timer_getmask(FAR uint64_t *mask) +{ + DEBUGASSERT(mask != NULL); + *mask = g_tickless.freerun.counter_mask; +} +#endif /* CONFIG_CLOCK_TIMEKEEPING */ + /**************************************************************************** * Name: up_timer_cancel * diff --git a/arch/arm/src/stm32/stm32f40xxx_rtcc.c b/arch/arm/src/stm32/stm32f40xxx_rtcc.c index 7145243b8945011900ac3d0176d7f3b0e68df14b..cbd136d6d5343ce2730f8cb57c4107c40ccb74e2 100644 --- a/arch/arm/src/stm32/stm32f40xxx_rtcc.c +++ b/arch/arm/src/stm32/stm32f40xxx_rtcc.c @@ -263,7 +263,7 @@ static void rtc_wprunlock(void) * registers and backup SRAM). */ - (void)stm32_pwr_enablebkp(true); + stm32_pwr_enablebkp(true); /* The following steps are required to unlock the write protection on all the * RTC registers (except for RTC_ISR[13:8], RTC_TAFCR, and RTC_BKPxR). @@ -302,7 +302,7 @@ static inline void rtc_wprlock(void) * data registers and backup SRAM). */ - (void)stm32_pwr_enablebkp(false); + stm32_pwr_enablebkp(false); } /**************************************************************************** @@ -892,7 +892,7 @@ int up_rtc_initialize(void) regval = getreg32(RTC_MAGIC_REG); - (void)stm32_pwr_enablebkp(true); + stm32_pwr_enablebkp(true); if (regval != RTC_MAGIC) { @@ -972,7 +972,7 @@ int up_rtc_initialize(void) } } - (void)stm32_pwr_enablebkp(false); + stm32_pwr_enablebkp(false); /* Loop, attempting to initialize/resume the RTC. This loop is necessary * because it seems that occasionally it takes longer to initialize the RTC @@ -1023,11 +1023,17 @@ int up_rtc_initialize(void) * backup data registers and backup SRAM). */ - (void)stm32_pwr_enablebkp(true); + stm32_pwr_enablebkp(true); /* Remember that the RTC is initialized */ putreg32(RTC_MAGIC, RTC_MAGIC_REG); + + /* Disable write access to the backup domain (RTC registers, RTC + * backup data registers and backup SRAM). + */ + + stm32_pwr_enablebkp(false); } else { @@ -1039,12 +1045,6 @@ int up_rtc_initialize(void) rtc_dumpregs("Did resume"); } - /* Disable write access to the backup domain (RTC registers, RTC backup - * data registers and backup SRAM). - */ - - (void)stm32_pwr_enablebkp(false); - if (ret != OK && nretry > 0) { rtcinfo("setup/resume ran %d times and failed with %d\n", diff --git a/arch/arm/src/stm32f7/chip/stm32_otg.h b/arch/arm/src/stm32f7/chip/stm32_otg.h index 874dd2656397497af2fb810dc06795ab42e48dde..aca73655523c92360b498a9837a8f07ee3bf0795 100644 --- a/arch/arm/src/stm32f7/chip/stm32_otg.h +++ b/arch/arm/src/stm32f7/chip/stm32_otg.h @@ -324,21 +324,20 @@ #define OTG_GINT_NPTXFE (1 << 5) /* Bit 5: Non-periodic TxFIFO empty */ #define OTG_GINT_GINAKEFF (1 << 6) /* Bit 6: Global IN non-periodic NAK effective */ #define OTG_GINT_GONAKEFF (1 << 7) /* Bit 7: Global OUT NAK effective */ - /* Bits 8-9: Reserved, must be kept at reset value */ +#define OTG_GINT_RES89 (3 << 8) /* Bits 8-9: Reserved, must be kept at reset value */ #define OTG_GINT_ESUSP (1 << 10) /* Bit 10: Early suspend */ #define OTG_GINT_USBSUSP (1 << 11) /* Bit 11: USB suspend */ #define OTG_GINT_USBRST (1 << 12) /* Bit 12: USB reset */ #define OTG_GINT_ENUMDNE (1 << 13) /* Bit 13: Enumeration done */ #define OTG_GINT_ISOODRP (1 << 14) /* Bit 14: Isochronous OUT packet dropped interrupt */ #define OTG_GINT_EOPF (1 << 15) /* Bit 15: End of periodic frame interrupt */ - /* Bits 16 Reserved, must be kept at reset value */ -#define OTG_GINTMSK_EPMISM (1 << 17) /* Bit 17: Endpoint mismatch interrupt mask */ +#define OTG_GINT_RES1617 (3 << 16) /* Bits 16-17 Reserved, must be kept at reset value */ #define OTG_GINT_IEP (1 << 18) /* Bit 18: IN endpoint interrupt */ #define OTG_GINT_OEP (1 << 19) /* Bit 19: OUT endpoint interrupt */ #define OTG_GINT_IISOIXFR (1 << 20) /* Bit 20: Incomplete isochronous IN transfer */ #define OTG_GINT_IISOOXFR (1 << 21) /* Bit 21: Incomplete isochronous OUT transfer (device) */ #define OTG_GINT_IPXFR (1 << 21) /* Bit 21: Incomplete periodic transfer (host) */ - /* Bit 22: Reserved, must be kept at reset value */ +#define OTG_GINT_RES22 (1 << 22) /* Bits 22: Reserved, must be kept at reset value */ #define OTG_GINT_RSTDET (1 << 23) /* Bit 23: Reset detected interrupt */ #define OTG_GINT_HPRT (1 << 24) /* Bit 24: Host port interrupt */ #define OTG_GINT_HC (1 << 25) /* Bit 25: Host channels interrupt */ diff --git a/arch/arm/src/stm32f7/stm32_ethernet.c b/arch/arm/src/stm32f7/stm32_ethernet.c index 74d7721ed6059b45387fc88c2c65a874258fb18e..9caceb48427a769072cf156e7f1a8fcb69bb7246 100644 --- a/arch/arm/src/stm32f7/stm32_ethernet.c +++ b/arch/arm/src/stm32f7/stm32_ethernet.c @@ -1788,12 +1788,6 @@ static void stm32_receive(struct stm32_ethmac_s *priv) continue; } -#ifdef CONFIG_NET_PKT - /* When packet sockets are enabled, feed the frame into the packet tap */ - - pkt_input(&priv->dev); -#endif - /* We only accept IP packets of the configured type and ARP packets */ #ifdef CONFIG_NET_IPv4 diff --git a/arch/arm/src/stm32f7/stm32_otgdev.c b/arch/arm/src/stm32f7/stm32_otgdev.c index 6a776976e2d4b489654ef58215d5e1aacec8deec..f06175cb5bf0cd2820cb302e8d02812e0c6d7fde 100644 --- a/arch/arm/src/stm32f7/stm32_otgdev.c +++ b/arch/arm/src/stm32f7/stm32_otgdev.c @@ -209,6 +209,29 @@ # error "FIFO allocations exceed FIFO memory size" #endif +#define OTG_GINT_RESERVED (OTG_GINT_RES89 | \ + OTG_GINT_RES1617 | \ + OTG_GINT_RES22) + + +#define OTG_GINT_RC_W1 (OTG_GINT_MMIS | \ + OTG_GINT_SOF | \ + OTG_GINT_ESUSP | \ + OTG_GINT_USBSUSP | \ + OTG_GINT_USBRST | \ + OTG_GINT_ENUMDNE | \ + OTG_GINT_ISOODRP | \ + OTG_GINT_EOPF | \ + OTG_GINT_IISOIXFR | \ + OTG_GINT_IISOOXFR | \ + OTG_GINT_RSTDET | \ + OTG_GINT_LPMINT | \ + OTG_GINT_CIDSCHG | \ + OTG_GINT_DISC | \ + OTG_GINT_SRQ | \ + OTG_GINT_WKUP) + + /* Debug ***********************************************************************/ /* Trace error codes */ @@ -871,7 +894,7 @@ static uint32_t stm32_getreg(uint32_t addr) { if (count == 4) { - llerr("...\n"); + uinfo("...\n"); } return val; @@ -888,7 +911,7 @@ static uint32_t stm32_getreg(uint32_t addr) { /* Yes.. then show how many times the value repeated */ - llerr("[repeats %d more times]\n", count-3); + uinfo("[repeats %d more times]\n", count-3); } /* Save the new address, value, and count */ @@ -900,7 +923,7 @@ static uint32_t stm32_getreg(uint32_t addr) /* Show the register value read */ - llerr("%08x->%08x\n", addr, val); + uinfo("%08x->%08x\n", addr, val); return val; } #endif @@ -918,7 +941,7 @@ static void stm32_putreg(uint32_t val, uint32_t addr) { /* Show the register value being written */ - llerr("%08x<-%08x\n", addr, val); + uinfo("%08x<-%08x\n", addr, val); /* Write the value */ @@ -3171,12 +3194,6 @@ static inline void stm32_rxinterrupt(FAR struct stm32_usbdev_s *priv) int bcnt; int epphy; - /* Disable the Rx status queue level interrupt */ - - regval = stm32_getreg(STM32_OTG_GINTMSK); - regval &= ~OTG_GINT_RXFLVL; - stm32_putreg(regval, STM32_OTG_GINTMSK); - /* Get the status from the top of the FIFO */ regval = stm32_getreg(STM32_OTG_GRXSTSP); @@ -3251,6 +3268,22 @@ static inline void stm32_rxinterrupt(FAR struct stm32_usbdev_s *priv) case OTG_GRXSTSD_PKTSTS_SETUPDONE: { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_SETUPDONE), epphy); + + /* Now that the Setup Phase is complete if it was an OUT enable + * the endpoint + * (Doing this here prevents the loss of the first FIFO word) + */ + + if (priv->ep0state == EP0STATE_SETUP_OUT) + { + + /* Clear NAKSTS so that we can receive the data */ + + regval = stm32_getreg(STM32_OTG_DOEPCTL(0)); + regval |= OTG_DOEPCTL0_CNAK; + stm32_putreg(regval, STM32_OTG_DOEPCTL(0)); + + } } break; @@ -3286,14 +3319,6 @@ static inline void stm32_rxinterrupt(FAR struct stm32_usbdev_s *priv) datlen = GETUINT16(priv->ctrlreq.len); if (USB_REQ_ISOUT(priv->ctrlreq.type) && datlen > 0) { - /* Clear NAKSTS so that we can receive the data */ - - regval = stm32_getreg(STM32_OTG_DOEPCTL(0)); - regval |= OTG_DOEPCTL0_CNAK; - stm32_putreg(regval, STM32_OTG_DOEPCTL(0)); - - /* Wait for the data phase. */ - priv->ep0state = EP0STATE_SETUP_OUT; } else @@ -3316,11 +3341,6 @@ static inline void stm32_rxinterrupt(FAR struct stm32_usbdev_s *priv) } } - /* Enable the Rx Status Queue Level interrupt */ - - regval = stm32_getreg(STM32_OTG_GINTMSK); - regval |= OTG_GINT_RXFLVL; - stm32_putreg(regval, STM32_OTG_GINTMSK); } /**************************************************************************** @@ -3343,7 +3363,7 @@ static inline void stm32_enuminterrupt(FAR struct stm32_usbdev_s *priv) regval = stm32_getreg(STM32_OTG_GUSBCFG); regval &= ~OTG_GUSBCFG_TRDT_MASK; - regval |= OTG_GUSBCFG_TRDT(5); + regval |= OTG_GUSBCFG_TRDT(6); stm32_putreg(regval, STM32_OTG_GUSBCFG); } @@ -3562,6 +3582,7 @@ static int stm32_usbinterrupt(int irq, FAR void *context) FAR struct stm32_usbdev_s *priv = &g_otghsdev; uint32_t regval; + uint32_t reserved; usbtrace(TRACE_INTENTRY(STM32_TRACEINTID_USB), 0); @@ -3579,8 +3600,15 @@ static int stm32_usbinterrupt(int irq, FAR void *context) /* Get the set of pending, un-masked interrupts */ regval = stm32_getreg(STM32_OTG_GINTSTS); + reserved = (regval & OTG_GINT_RESERVED); regval &= stm32_getreg(STM32_OTG_GINTMSK); + /* With out modifying the reserved bits, acknowledge all + * **Writable** pending irqs we will service below + */ + + stm32_putreg(((regval | reserved) & OTG_GINT_RC_W1), STM32_OTG_GINTSTS); + /* Break out of the loop when there are no further pending (and * unmasked) interrupts to be processes. */ @@ -3599,7 +3627,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_EPOUT), (uint16_t)regval); stm32_epout_interrupt(priv); - stm32_putreg(OTG_GINT_OEP, STM32_OTG_GINTSTS); } /* IN endpoint interrupt. The core sets this bit to indicate that @@ -3610,7 +3637,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_EPIN), (uint16_t)regval); stm32_epin_interrupt(priv); - stm32_putreg(OTG_GINT_IEP, STM32_OTG_GINTSTS); } /* Host/device mode mismatch error interrupt */ @@ -3619,7 +3645,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) if ((regval & OTG_GINT_MMIS) != 0) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_MISMATCH), (uint16_t)regval); - stm32_putreg(OTG_GINT_MMIS, STM32_OTG_GINTSTS); } #endif @@ -3629,7 +3654,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_WAKEUP), (uint16_t)regval); stm32_resumeinterrupt(priv); - stm32_putreg(OTG_GINT_WKUP, STM32_OTG_GINTSTS); } /* USB suspend interrupt */ @@ -3638,7 +3662,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_SUSPEND), (uint16_t)regval); stm32_suspendinterrupt(priv); - stm32_putreg(OTG_GINT_USBSUSP, STM32_OTG_GINTSTS); } /* Start of frame interrupt */ @@ -3647,7 +3670,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) if ((regval & OTG_GINT_SOF) != 0) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_SOF), (uint16_t)regval); - stm32_putreg(OTG_GINT_SOF, STM32_OTG_GINTSTS); } #endif @@ -3659,12 +3681,11 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_RXFIFO), (uint16_t)regval); stm32_rxinterrupt(priv); - stm32_putreg(OTG_GINT_RXFLVL, STM32_OTG_GINTSTS); } /* USB reset interrupt */ - if ((regval & OTG_GINT_USBRST) != 0) + if ((regval & (OTG_GINT_USBRST | OTG_GINT_RSTDET)) != 0) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_DEVRESET), (uint16_t)regval); @@ -3672,7 +3693,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) stm32_usbreset(priv); usbtrace(TRACE_INTEXIT(STM32_TRACEINTID_USB), 0); - stm32_putreg(OTG_GINT_USBRST, STM32_OTG_GINTSTS); return OK; } @@ -3682,7 +3702,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_ENUMDNE), (uint16_t)regval); stm32_enuminterrupt(priv); - stm32_putreg(OTG_GINT_ENUMDNE, STM32_OTG_GINTSTS); } /* Incomplete isochronous IN transfer interrupt. When the core finds @@ -3696,7 +3715,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_IISOIXFR), (uint16_t)regval); stm32_isocininterrupt(priv); - stm32_putreg(OTG_GINT_IISOIXFR, STM32_OTG_GINTSTS); } /* Incomplete isochronous OUT transfer. For isochronous OUT @@ -3713,7 +3731,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_IISOOXFR), (uint16_t)regval); stm32_isocoutinterrupt(priv); - stm32_putreg(OTG_GINT_IISOOXFR, STM32_OTG_GINTSTS); } #endif @@ -3724,7 +3741,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_SRQ), (uint16_t)regval); stm32_sessioninterrupt(priv); - stm32_putreg(OTG_GINT_SRQ, STM32_OTG_GINTSTS); } /* OTG interrupt */ @@ -3733,7 +3749,6 @@ static int stm32_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_OTG), (uint16_t)regval); stm32_otginterrupt(priv); - stm32_putreg(OTG_GINT_OTG, STM32_OTG_GINTSTS); } #endif } @@ -5425,7 +5440,9 @@ static void stm32_hwinitialize(FAR struct stm32_usbdev_s *priv) /* Clear any pending interrupts */ - stm32_putreg(0xbfffffff, STM32_OTG_GINTSTS); + regval = stm32_getreg(STM32_OTG_GINTSTS); + regval &= OTG_GINT_RESERVED; + stm32_putreg(regval | OTG_GINT_RC_W1, STM32_OTG_GINTSTS); #if defined(CONFIG_STM32F7_OTGHS) /* Disable the ULPI Clock enable in RCC AHB1 Register. This must diff --git a/arch/arm/src/stm32f7/stm32_spi.c b/arch/arm/src/stm32f7/stm32_spi.c index 78b5eeaf06b9f2126d86e5a57b5a9e9e3f22de9e..4b0fceba541c3133608d20467211f5fdf05cdda7 100644 --- a/arch/arm/src/stm32f7/stm32_spi.c +++ b/arch/arm/src/stm32f7/stm32_spi.c @@ -203,6 +203,10 @@ 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); +#ifdef CONFIG_SPI_HWFEATURES +static int spi_hwfeatures(FAR struct spi_dev_s *dev, + spi_hwfeatures_t features); +#endif 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); @@ -230,7 +234,7 @@ static const struct spi_ops_s g_sp1iops = .setmode = spi_setmode, .setbits = spi_setbits, #ifdef CONFIG_SPI_HWFEATURES - .hwfeatures = 0, /* Not supported */ + .hwfeatures = spi_hwfeatures, #endif .status = stm32_spi1status, #ifdef CONFIG_SPI_CMDDATA @@ -273,6 +277,9 @@ static const struct spi_ops_s g_sp2iops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = spi_hwfeatures, +#endif .status = stm32_spi2status, #ifdef CONFIG_SPI_CMDDATA .cmddata = stm32_spi2cmddata, @@ -314,6 +321,9 @@ static const struct spi_ops_s g_sp3iops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = spi_hwfeatures, +#endif .status = stm32_spi3status, #ifdef CONFIG_SPI_CMDDATA .cmddata = stm32_spi3cmddata, @@ -355,6 +365,9 @@ static const struct spi_ops_s g_sp4iops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = spi_hwfeatures, +#endif .status = stm32_spi4status, #ifdef CONFIG_SPI_CMDDATA .cmddata = stm32_spi4cmddata, @@ -396,6 +409,9 @@ static const struct spi_ops_s g_sp5iops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = spi_hwfeatures, +#endif .status = stm32_spi5status, #ifdef CONFIG_SPI_CMDDATA .cmddata = stm32_spi5cmddata, @@ -437,6 +453,9 @@ static const struct spi_ops_s g_sp6iops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = spi_hwfeatures, +#endif .status = stm32_spi6status, #ifdef CONFIG_SPI_CMDDATA .cmddata = stm32_spi3cmddata, @@ -1219,10 +1238,8 @@ 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) { FAR struct stm32_spidev_s *priv = (FAR struct stm32_spidev_s *)dev; - uint16_t setbitscr1; - uint16_t clrbitscr1; - uint16_t setbitscr2; - uint16_t clrbitscr2; + uint16_t setbits; + uint16_t clrbits; int savbits = nbits; spiinfo("nbits=%d\n", nbits); @@ -1231,21 +1248,7 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) 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; - } - + /* Yes... Set CR2 appropriately */ /* Set the number of bits (valid range 4-16) */ if (nbits < 4 || nbits > 16) @@ -1253,8 +1256,8 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) return; } - clrbitscr2 = SPI_CR2_DS_MASK; - setbitscr2 = SPI_CR2_DS_VAL(nbits); + clrbits = SPI_CR2_DS_MASK; + setbits = 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). @@ -1262,16 +1265,15 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) if (nbits < 9) { - setbitscr2 |= SPI_CR2_FRXTH; /* RX FIFO Threshold = 1 byte */ + setbits |= SPI_CR2_FRXTH; /* RX FIFO Threshold = 1 byte */ } else { - clrbitscr2 |= SPI_CR2_FRXTH; /* RX FIFO Threshold = 2 bytes */ + clrbits |= 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_modifycr2(priv, setbits, clrbits); spi_modifycr1(priv, SPI_CR1_SPE, 0); /* Save the selection so the subsequence re-configurations will be faster */ @@ -1280,6 +1282,61 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) } } +/**************************************************************************** + * Name: spi_hwfeatures + * + * Description: + * Set hardware-specific feature flags. + * + * Input Parameters: + * dev - Device-specific state data + * features - H/W feature flags + * + * Returned Value: + * Zero (OK) if the selected H/W features are enabled; A negated errno + * value if any H/W feature is not supportable. + * + ****************************************************************************/ + +#ifdef CONFIG_SPI_HWFEATURES +static int spi_hwfeatures(FAR struct spi_dev_s *dev, spi_hwfeatures_t features) +{ +#ifdef CONFIG_SPI_BITORDER + 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("features=%08x\n", features); + + /* Transfer data LSB first? */ + + if ((features & HWFEAT_LSBFIRST) != 0) + { + setbits = SPI_CR1_LSBFIRST; + clrbits = 0; + } + else + { + setbits = 0; + clrbits = SPI_CR1_LSBFIRST; + } + + spi_modifycr1(priv, 0, SPI_CR1_SPE); + spi_modifycr1(priv, setbits, clrbits); + spi_modifycr1(priv, SPI_CR1_SPE, 0); + + /* Other H/W features are not supported */ + + return ((features & ~HWFEAT_LSBFIRST) == 0) ? OK : -ENOSYS; +#else + return -ENOSYS; +#endif +} +#endif + /************************************************************************************ * Name: spi_send * diff --git a/arch/arm/src/stm32l4/Make.defs b/arch/arm/src/stm32l4/Make.defs index 33a5e0a5ba863ff3f1ead921f41fce14ae34f836..d265c2a4f51e7669cf57d9bbcc789f4be8c62599 100644 --- a/arch/arm/src/stm32l4/Make.defs +++ b/arch/arm/src/stm32l4/Make.defs @@ -125,7 +125,7 @@ CHIP_CSRCS += stm32l4_tickless.c endif ifeq ($(CONFIG_STM32L4_ONESHOT),y) -CHIP_CSRCS += stm32l4_oneshot.c +CHIP_CSRCS += stm32l4_oneshot.c stm32l4_oneshot_lowerhalf.c endif ifeq ($(CONFIG_STM32L4_FREERUN),y) diff --git a/arch/arm/src/stm32l4/chip/stm32l4x6xx_otgfs.h b/arch/arm/src/stm32l4/chip/stm32l4x6xx_otgfs.h index 2d8d431285f5e02c04dc062a7000c8ba0cb965d5..39065c057068518670716ab849d8a7751ca8ed36 100644 --- a/arch/arm/src/stm32l4/chip/stm32l4x6xx_otgfs.h +++ b/arch/arm/src/stm32l4/chip/stm32l4x6xx_otgfs.h @@ -61,408 +61,408 @@ /* Register Offsets *********************************************************************************/ /* Core global control and status registers */ -#define STM32_OTGFS_GOTGCTL_OFFSET 0x0000 /* Control and status register */ -#define STM32_OTGFS_GOTGINT_OFFSET 0x0004 /* Interrupt register */ -#define STM32_OTGFS_GAHBCFG_OFFSET 0x0008 /* AHB configuration register */ -#define STM32_OTGFS_GUSBCFG_OFFSET 0x000c /* USB configuration register */ -#define STM32_OTGFS_GRSTCTL_OFFSET 0x0010 /* Reset register */ -#define STM32_OTGFS_GINTSTS_OFFSET 0x0014 /* Core interrupt register */ -#define STM32_OTGFS_GINTMSK_OFFSET 0x0018 /* Interrupt mask register */ -#define STM32_OTGFS_GRXSTSR_OFFSET 0x001c /* Receive status debug read/OTG status read register */ -#define STM32_OTGFS_GRXSTSP_OFFSET 0x0020 /* Receive status debug read/OTG status pop register */ -#define STM32_OTGFS_GRXFSIZ_OFFSET 0x0024 /* Receive FIFO size register */ -#define STM32_OTGFS_HNPTXFSIZ_OFFSET 0x0028 /* Host non-periodic transmit FIFO size register */ -#define STM32_OTGFS_DIEPTXF0_OFFSET 0x0028 /* Endpoint 0 Transmit FIFO size */ -#define STM32_OTGFS_HNPTXSTS_OFFSET 0x002c /* Non-periodic transmit FIFO/queue status register */ -#define STM32_OTGFS_GCCFG_OFFSET 0x0038 /* General core configuration register */ -#define STM32_OTGFS_CID_OFFSET 0x003c /* Core ID register */ -#define STM32_OTGFS_GLPMCFG_OFFSET 0x0054 /* LPM configuration register */ -#define STM32_OTGFS_GPWRDN_OFFSET 0x0058 /* Power down register */ -#define STM32_OTGFS_GADPCTL_OFSSET 0x005c /* ADP timer, control and status register */ -#define STM32_OTGFS_HPTXFSIZ_OFFSET 0x0100 /* Host periodic transmit FIFO size register */ - -#define STM32_OTGFS_DIEPTXF_OFFSET(n) (104+(((n)-1) << 2)) -#define STM32_OTGFS_DIEPTXF1_OFFSET 0x0104 /* Device IN endpoint transmit FIFO1 size register */ -#define STM32_OTGFS_DIEPTXF2_OFFSET 0x0108 /* Device IN endpoint transmit FIFO2 size register */ -#define STM32_OTGFS_DIEPTXF3_OFFSET 0x010c /* Device IN endpoint transmit FIFO3 size register */ -#define STM32_OTGFS_DIEPTXF4_OFFSET 0x0110 /* Device IN endpoint transmit FIFO4 size register */ -#define STM32_OTGFS_DIEPTXF5_OFFSET 0x0114 /* Device IN endpoint transmit FIFO5 size register */ +#define STM32L4_OTGFS_GOTGCTL_OFFSET 0x0000 /* Control and status register */ +#define STM32L4_OTGFS_GOTGINT_OFFSET 0x0004 /* Interrupt register */ +#define STM32L4_OTGFS_GAHBCFG_OFFSET 0x0008 /* AHB configuration register */ +#define STM32L4_OTGFS_GUSBCFG_OFFSET 0x000c /* USB configuration register */ +#define STM32L4_OTGFS_GRSTCTL_OFFSET 0x0010 /* Reset register */ +#define STM32L4_OTGFS_GINTSTS_OFFSET 0x0014 /* Core interrupt register */ +#define STM32L4_OTGFS_GINTMSK_OFFSET 0x0018 /* Interrupt mask register */ +#define STM32L4_OTGFS_GRXSTSR_OFFSET 0x001c /* Receive status debug read/OTG status read register */ +#define STM32L4_OTGFS_GRXSTSP_OFFSET 0x0020 /* Receive status debug read/OTG status pop register */ +#define STM32L4_OTGFS_GRXFSIZ_OFFSET 0x0024 /* Receive FIFO size register */ +#define STM32L4_OTGFS_HNPTXFSIZ_OFFSET 0x0028 /* Host non-periodic transmit FIFO size register */ +#define STM32L4_OTGFS_DIEPTXF0_OFFSET 0x0028 /* Endpoint 0 Transmit FIFO size */ +#define STM32L4_OTGFS_HNPTXSTS_OFFSET 0x002c /* Non-periodic transmit FIFO/queue status register */ +#define STM32L4_OTGFS_GCCFG_OFFSET 0x0038 /* General core configuration register */ +#define STM32L4_OTGFS_CID_OFFSET 0x003c /* Core ID register */ +#define STM32L4_OTGFS_GLPMCFG_OFFSET 0x0054 /* LPM configuration register */ +#define STM32L4_OTGFS_GPWRDN_OFFSET 0x0058 /* Power down register */ +#define STM32L4_OTGFS_GADPCTL_OFSSET 0x005c /* ADP timer, control and status register */ +#define STM32L4_OTGFS_HPTXFSIZ_OFFSET 0x0100 /* Host periodic transmit FIFO size register */ + +#define STM32L4_OTGFS_DIEPTXF_OFFSET(n) (104+(((n)-1) << 2)) +#define STM32L4_OTGFS_DIEPTXF1_OFFSET 0x0104 /* Device IN endpoint transmit FIFO1 size register */ +#define STM32L4_OTGFS_DIEPTXF2_OFFSET 0x0108 /* Device IN endpoint transmit FIFO2 size register */ +#define STM32L4_OTGFS_DIEPTXF3_OFFSET 0x010c /* Device IN endpoint transmit FIFO3 size register */ +#define STM32L4_OTGFS_DIEPTXF4_OFFSET 0x0110 /* Device IN endpoint transmit FIFO4 size register */ +#define STM32L4_OTGFS_DIEPTXF5_OFFSET 0x0114 /* Device IN endpoint transmit FIFO5 size register */ /* Host-mode control and status registers */ -#define STM32_OTGFS_HCFG_OFFSET 0x0400 /* Host configuration register */ -#define STM32_OTGFS_HFIR_OFFSET 0x0404 /* Host frame interval register */ -#define STM32_OTGFS_HFNUM_OFFSET 0x0408 /* Host frame number/frame time remaining register */ -#define STM32_OTGFS_HPTXSTS_OFFSET 0x0410 /* Host periodic transmit FIFO/queue status register */ -#define STM32_OTGFS_HAINT_OFFSET 0x0414 /* Host all channels interrupt register */ -#define STM32_OTGFS_HAINTMSK_OFFSET 0x0418 /* Host all channels interrupt mask register */ -#define STM32_OTGFS_HPRT_OFFSET 0x0440 /* Host port control and status register */ - -#define STM32_OTGFS_CHAN_OFFSET(n) (0x500 + ((n) << 5) -#define STM32_OTGFS_HCCHAR_CHOFFSET 0x0000 /* Host channel characteristics register */ -#define STM32_OTGFS_HCINT_CHOFFSET 0x0008 /* Host channel interrupt register */ -#define STM32_OTGFS_HCINTMSK_CHOFFSET 0x000c /* Host channel interrupt mask register */ -#define STM32_OTGFS_HCTSIZ_CHOFFSET 0x0010 /* Host channel interrupt register */ - -#define STM32_OTGFS_HCCHAR_OFFSET(n) (0x500 + ((n) << 5)) -#define STM32_OTGFS_HCCHAR0_OFFSET 0x0500 /* Host channel-0 characteristics register */ -#define STM32_OTGFS_HCCHAR1_OFFSET 0x0520 /* Host channel-1 characteristics register */ -#define STM32_OTGFS_HCCHAR2_OFFSET 0x0540 /* Host channel-2 characteristics register */ -#define STM32_OTGFS_HCCHAR3_OFFSET 0x0560 /* Host channel-3 characteristics register */ -#define STM32_OTGFS_HCCHAR4_OFFSET 0x0580 /* Host channel-4 characteristics register */ -#define STM32_OTGFS_HCCHAR5_OFFSET 0x05a0 /* Host channel-5 characteristics register */ -#define STM32_OTGFS_HCCHAR6_OFFSET 0x05c0 /* Host channel-6 characteristics register */ -#define STM32_OTGFS_HCCHAR7_OFFSET 0x05e0 /* Host channel-7 characteristics register */ -#define STM32_OTGFS_HCCHAR8_OFFSET 0x0600 /* Host channel-8 characteristics register */ -#define STM32_OTGFS_HCCHAR9_OFFSET 0x0620 /* Host channel-9 characteristics register */ -#define STM32_OTGFS_HCCHAR10_OFFSET 0x0640 /* Host channel-10 characteristics register */ -#define STM32_OTGFS_HCCHAR11_OFFSET 0x0660 /* Host channel-11 characteristics register */ - -#define STM32_OTGFS_HCINT_OFFSET(n) (0x508 + ((n) << 5)) -#define STM32_OTGFS_HCINT0_OFFSET 0x0508 /* Host channel-0 interrupt register */ -#define STM32_OTGFS_HCINT1_OFFSET 0x0528 /* Host channel-1 interrupt register */ -#define STM32_OTGFS_HCINT2_OFFSET 0x0548 /* Host channel-2 interrupt register */ -#define STM32_OTGFS_HCINT3_OFFSET 0x0568 /* Host channel-3 interrupt register */ -#define STM32_OTGFS_HCINT4_OFFSET 0x0588 /* Host channel-4 interrupt register */ -#define STM32_OTGFS_HCINT5_OFFSET 0x05a8 /* Host channel-5 interrupt register */ -#define STM32_OTGFS_HCINT6_OFFSET 0x05c8 /* Host channel-6 interrupt register */ -#define STM32_OTGFS_HCINT7_OFFSET 0x05e8 /* Host channel-7 interrupt register */ -#define STM32_OTGFS_HCINT8_OFFSET 0x0608 /* Host channel-8 interrupt register */ -#define STM32_OTGFS_HCINT9_OFFSET 0x0628 /* Host channel-9 interrupt register */ -#define STM32_OTGFS_HCINT10_OFFSET 0x0648 /* Host channel-10 interrupt register */ -#define STM32_OTGFS_HCINT11_OFFSET 0x0668 /* Host channel-11 interrupt register */ - -#define STM32_OTGFS_HCINTMSK_OFFSET(n) (0x50c + ((n) << 5)) -#define STM32_OTGFS_HCINTMSK0_OFFSET 0x050c /* Host channel-0 interrupt mask register */ -#define STM32_OTGFS_HCINTMSK1_OFFSET 0x052c /* Host channel-1 interrupt mask register */ -#define STM32_OTGFS_HCINTMSK2_OFFSET 0x054c /* Host channel-2 interrupt mask register */ -#define STM32_OTGFS_HCINTMSK3_OFFSET 0x056c /* Host channel-3 interrupt mask register */ -#define STM32_OTGFS_HCINTMSK4_OFFSET 0x058c /* Host channel-4 interrupt mask register */ -#define STM32_OTGFS_HCINTMSK5_OFFSET 0x05ac /* Host channel-5 interrupt mask register */ -#define STM32_OTGFS_HCINTMSK6_OFFSET 0x05cc /* Host channel-6 interrupt mask register */ -#define STM32_OTGFS_HCINTMSK7_OFFSET 0x05ec /* Host channel-7 interrupt mask register */ -#define STM32_OTGFS_HCINTMSK8_OFFSET 0x060c /* Host channel-8 interrupt mask register */ -#define STM32_OTGFS_HCINTMSK9_OFFSET 0x062c /* Host channel-9 interrupt mask register */ -#define STM32_OTGFS_HCINTMSK10_OFFSET 0x064c /* Host channel-10 interrupt mask register */ -#define STM32_OTGFS_HCINTMSK11_OFFSET 0x066c /* Host channel-11 interrupt mask register */ - -#define STM32_OTGFS_HCTSIZ_OFFSET(n) (0x510 + ((n) << 5)) -#define STM32_OTGFS_HCTSIZ0_OFFSET 0x0510 /* Host channel-0 interrupt register */ -#define STM32_OTGFS_HCTSIZ1_OFFSET 0x0530 /* Host channel-1 interrupt register */ -#define STM32_OTGFS_HCTSIZ2_OFFSET 0x0550 /* Host channel-2 interrupt register */ -#define STM32_OTGFS_HCTSIZ3_OFFSET 0x0570 /* Host channel-3 interrupt register */ -#define STM32_OTGFS_HCTSIZ4_OFFSET 0x0590 /* Host channel-4 interrupt register */ -#define STM32_OTGFS_HCTSIZ5_OFFSET 0x05b0 /* Host channel-5 interrupt register */ -#define STM32_OTGFS_HCTSIZ6_OFFSET 0x05d0 /* Host channel-6 interrupt register */ -#define STM32_OTGFS_HCTSIZ7_OFFSET 0x05f0 /* Host channel-7 interrupt register */ -#define STM32_OTGFS_HCTSIZ8_OFFSET 0x0610 /* Host channel-8 interrupt register */ -#define STM32_OTGFS_HCTSIZ9_OFFSET 0x0630 /* Host channel-9 interrupt register */ -#define STM32_OTGFS_HCTSIZ10_OFFSET 0x0650 /* Host channel-10 interrupt register */ -#define STM32_OTGFS_HCTSIZ11_OFFSET 0x0670 /* Host channel-11 interrupt register */ +#define STM32L4_OTGFS_HCFG_OFFSET 0x0400 /* Host configuration register */ +#define STM32L4_OTGFS_HFIR_OFFSET 0x0404 /* Host frame interval register */ +#define STM32L4_OTGFS_HFNUM_OFFSET 0x0408 /* Host frame number/frame time remaining register */ +#define STM32L4_OTGFS_HPTXSTS_OFFSET 0x0410 /* Host periodic transmit FIFO/queue status register */ +#define STM32L4_OTGFS_HAINT_OFFSET 0x0414 /* Host all channels interrupt register */ +#define STM32L4_OTGFS_HAINTMSK_OFFSET 0x0418 /* Host all channels interrupt mask register */ +#define STM32L4_OTGFS_HPRT_OFFSET 0x0440 /* Host port control and status register */ + +#define STM32L4_OTGFS_CHAN_OFFSET(n) (0x500 + ((n) << 5) +#define STM32L4_OTGFS_HCCHAR_CHOFFSET 0x0000 /* Host channel characteristics register */ +#define STM32L4_OTGFS_HCINT_CHOFFSET 0x0008 /* Host channel interrupt register */ +#define STM32L4_OTGFS_HCINTMSK_CHOFFSET 0x000c /* Host channel interrupt mask register */ +#define STM32L4_OTGFS_HCTSIZ_CHOFFSET 0x0010 /* Host channel interrupt register */ + +#define STM32L4_OTGFS_HCCHAR_OFFSET(n) (0x500 + ((n) << 5)) +#define STM32L4_OTGFS_HCCHAR0_OFFSET 0x0500 /* Host channel-0 characteristics register */ +#define STM32L4_OTGFS_HCCHAR1_OFFSET 0x0520 /* Host channel-1 characteristics register */ +#define STM32L4_OTGFS_HCCHAR2_OFFSET 0x0540 /* Host channel-2 characteristics register */ +#define STM32L4_OTGFS_HCCHAR3_OFFSET 0x0560 /* Host channel-3 characteristics register */ +#define STM32L4_OTGFS_HCCHAR4_OFFSET 0x0580 /* Host channel-4 characteristics register */ +#define STM32L4_OTGFS_HCCHAR5_OFFSET 0x05a0 /* Host channel-5 characteristics register */ +#define STM32L4_OTGFS_HCCHAR6_OFFSET 0x05c0 /* Host channel-6 characteristics register */ +#define STM32L4_OTGFS_HCCHAR7_OFFSET 0x05e0 /* Host channel-7 characteristics register */ +#define STM32L4_OTGFS_HCCHAR8_OFFSET 0x0600 /* Host channel-8 characteristics register */ +#define STM32L4_OTGFS_HCCHAR9_OFFSET 0x0620 /* Host channel-9 characteristics register */ +#define STM32L4_OTGFS_HCCHAR10_OFFSET 0x0640 /* Host channel-10 characteristics register */ +#define STM32L4_OTGFS_HCCHAR11_OFFSET 0x0660 /* Host channel-11 characteristics register */ + +#define STM32L4_OTGFS_HCINT_OFFSET(n) (0x508 + ((n) << 5)) +#define STM32L4_OTGFS_HCINT0_OFFSET 0x0508 /* Host channel-0 interrupt register */ +#define STM32L4_OTGFS_HCINT1_OFFSET 0x0528 /* Host channel-1 interrupt register */ +#define STM32L4_OTGFS_HCINT2_OFFSET 0x0548 /* Host channel-2 interrupt register */ +#define STM32L4_OTGFS_HCINT3_OFFSET 0x0568 /* Host channel-3 interrupt register */ +#define STM32L4_OTGFS_HCINT4_OFFSET 0x0588 /* Host channel-4 interrupt register */ +#define STM32L4_OTGFS_HCINT5_OFFSET 0x05a8 /* Host channel-5 interrupt register */ +#define STM32L4_OTGFS_HCINT6_OFFSET 0x05c8 /* Host channel-6 interrupt register */ +#define STM32L4_OTGFS_HCINT7_OFFSET 0x05e8 /* Host channel-7 interrupt register */ +#define STM32L4_OTGFS_HCINT8_OFFSET 0x0608 /* Host channel-8 interrupt register */ +#define STM32L4_OTGFS_HCINT9_OFFSET 0x0628 /* Host channel-9 interrupt register */ +#define STM32L4_OTGFS_HCINT10_OFFSET 0x0648 /* Host channel-10 interrupt register */ +#define STM32L4_OTGFS_HCINT11_OFFSET 0x0668 /* Host channel-11 interrupt register */ + +#define STM32L4_OTGFS_HCINTMSK_OFFSET(n) (0x50c + ((n) << 5)) +#define STM32L4_OTGFS_HCINTMSK0_OFFSET 0x050c /* Host channel-0 interrupt mask register */ +#define STM32L4_OTGFS_HCINTMSK1_OFFSET 0x052c /* Host channel-1 interrupt mask register */ +#define STM32L4_OTGFS_HCINTMSK2_OFFSET 0x054c /* Host channel-2 interrupt mask register */ +#define STM32L4_OTGFS_HCINTMSK3_OFFSET 0x056c /* Host channel-3 interrupt mask register */ +#define STM32L4_OTGFS_HCINTMSK4_OFFSET 0x058c /* Host channel-4 interrupt mask register */ +#define STM32L4_OTGFS_HCINTMSK5_OFFSET 0x05ac /* Host channel-5 interrupt mask register */ +#define STM32L4_OTGFS_HCINTMSK6_OFFSET 0x05cc /* Host channel-6 interrupt mask register */ +#define STM32L4_OTGFS_HCINTMSK7_OFFSET 0x05ec /* Host channel-7 interrupt mask register */ +#define STM32L4_OTGFS_HCINTMSK8_OFFSET 0x060c /* Host channel-8 interrupt mask register */ +#define STM32L4_OTGFS_HCINTMSK9_OFFSET 0x062c /* Host channel-9 interrupt mask register */ +#define STM32L4_OTGFS_HCINTMSK10_OFFSET 0x064c /* Host channel-10 interrupt mask register */ +#define STM32L4_OTGFS_HCINTMSK11_OFFSET 0x066c /* Host channel-11 interrupt mask register */ + +#define STM32L4_OTGFS_HCTSIZ_OFFSET(n) (0x510 + ((n) << 5)) +#define STM32L4_OTGFS_HCTSIZ0_OFFSET 0x0510 /* Host channel-0 interrupt register */ +#define STM32L4_OTGFS_HCTSIZ1_OFFSET 0x0530 /* Host channel-1 interrupt register */ +#define STM32L4_OTGFS_HCTSIZ2_OFFSET 0x0550 /* Host channel-2 interrupt register */ +#define STM32L4_OTGFS_HCTSIZ3_OFFSET 0x0570 /* Host channel-3 interrupt register */ +#define STM32L4_OTGFS_HCTSIZ4_OFFSET 0x0590 /* Host channel-4 interrupt register */ +#define STM32L4_OTGFS_HCTSIZ5_OFFSET 0x05b0 /* Host channel-5 interrupt register */ +#define STM32L4_OTGFS_HCTSIZ6_OFFSET 0x05d0 /* Host channel-6 interrupt register */ +#define STM32L4_OTGFS_HCTSIZ7_OFFSET 0x05f0 /* Host channel-7 interrupt register */ +#define STM32L4_OTGFS_HCTSIZ8_OFFSET 0x0610 /* Host channel-8 interrupt register */ +#define STM32L4_OTGFS_HCTSIZ9_OFFSET 0x0630 /* Host channel-9 interrupt register */ +#define STM32L4_OTGFS_HCTSIZ10_OFFSET 0x0650 /* Host channel-10 interrupt register */ +#define STM32L4_OTGFS_HCTSIZ11_OFFSET 0x0670 /* Host channel-11 interrupt register */ /* Device-mode control and status registers */ -#define STM32_OTGFS_DCFG_OFFSET 0x0800 /* Device configuration register */ -#define STM32_OTGFS_DCTL_OFFSET 0x0804 /* Device control register */ -#define STM32_OTGFS_DSTS_OFFSET 0x0808 /* Device status register */ -#define STM32_OTGFS_DIEPMSK_OFFSET 0x0810 /* Device IN endpoint common interrupt mask register */ -#define STM32_OTGFS_DOEPMSK_OFFSET 0x0814 /* Device OUT endpoint common interrupt mask register */ -#define STM32_OTGFS_DAINT_OFFSET 0x0818 /* Device all endpoints interrupt register */ -#define STM32_OTGFS_DAINTMSK_OFFSET 0x081c /* All endpoints interrupt mask register */ -#define STM32_OTGFS_DVBUSDIS_OFFSET 0x0828 /* Device VBUS discharge time register */ -#define STM32_OTGFS_DVBUSPULSE_OFFSET 0x082c /* Device VBUS pulsing time register */ -#define STM32_OTGFS_DIEPEMPMSK_OFFSET 0x0834 /* Device IN endpoint FIFO empty interrupt mask register */ - -#define STM32_OTGFS_DIEP_OFFSET(n) (0x0900 + ((n) << 5)) -#define STM32_OTGFS_DIEPCTL_EPOFFSET 0x0000 /* Device endpoint control register */ -#define STM32_OTGFS_DIEPINT_EPOFFSET 0x0008 /* Device endpoint interrupt register */ -#define STM32_OTGFS_DIEPTSIZ_EPOFFSET 0x0010 /* Device IN endpoint transfer size register */ -#define STM32_OTGFS_DTXFSTS_EPOFFSET 0x0018 /* Device IN endpoint transmit FIFO status register */ - -#define STM32_OTGFS_DIEPCTL_OFFSET(n) (0x0900 + ((n) << 5)) -#define STM32_OTGFS_DIEPCTL0_OFFSET 0x0900 /* Device control IN endpoint 0 control register */ -#define STM32_OTGFS_DIEPCTL1_OFFSET 0x0920 /* Device control IN endpoint 2 control register */ -#define STM32_OTGFS_DIEPCTL2_OFFSET 0x0940 /* Device control IN endpoint 3 control register */ -#define STM32_OTGFS_DIEPCTL3_OFFSET 0x0960 /* Device control IN endpoint 4 control register */ -#define STM32_OTGFS_DIEPCTL4_OFFSET 0x0980 /* Device control IN endpoint 4 control register */ -#define STM32_OTGFS_DIEPCTL5_OFFSET 0x09a0 /* Device control IN endpoint 4 control register */ - -#define STM32_OTGFS_DIEPINT_OFFSET(n) (0x0908 + ((n) << 5)) -#define STM32_OTGFS_DIEPINT0_OFFSET 0x0908 /* Device endpoint-0 interrupt register */ -#define STM32_OTGFS_DIEPINT1_OFFSET 0x0928 /* Device endpoint-1 interrupt register */ -#define STM32_OTGFS_DIEPINT2_OFFSET 0x0948 /* Device endpoint-2 interrupt register */ -#define STM32_OTGFS_DIEPINT3_OFFSET 0x0968 /* Device endpoint-3 interrupt register */ -#define STM32_OTGFS_DIEPINT4_OFFSET 0x0988 /* Device endpoint-3 interrupt register */ -#define STM32_OTGFS_DIEPINT5_OFFSET 0x09a8 /* Device endpoint-3 interrupt register */ - -#define STM32_OTGFS_DIEPTSIZ_OFFSET(n) (0x910 + ((n) << 5)) -#define STM32_OTGFS_DIEPTSIZ0_OFFSET 0x0910 /* Device IN endpoint 0 transfer size register */ -#define STM32_OTGFS_DIEPTSIZ1_OFFSET 0x0930 /* Device IN endpoint 1 transfer size register */ -#define STM32_OTGFS_DIEPTSIZ2_OFFSET 0x0950 /* Device IN endpoint 2 transfer size register */ -#define STM32_OTGFS_DIEPTSIZ3_OFFSET 0x0970 /* Device IN endpoint 3 transfer size register */ -#define STM32_OTGFS_DIEPTSIZ4_OFFSET 0x0990 /* Device IN endpoint 3 transfer size register */ -#define STM32_OTGFS_DIEPTSIZ5_OFFSET 0x09b0 /* Device IN endpoint 3 transfer size register */ - -#define STM32_OTGFS_DTXFSTS_OFFSET(n) (0x0918 + ((n) << 5)) -#define STM32_OTGFS_DTXFSTS0_OFFSET 0x0918 /* Device OUT endpoint-0 TxFIFO status register */ -#define STM32_OTGFS_DTXFSTS1_OFFSET 0x0938 /* Device OUT endpoint-1 TxFIFO status register */ -#define STM32_OTGFS_DTXFSTS2_OFFSET 0x0958 /* Device OUT endpoint-2 TxFIFO status register */ -#define STM32_OTGFS_DTXFSTS3_OFFSET 0x0978 /* Device OUT endpoint-3 TxFIFO status register */ -#define STM32_OTGFS_DTXFSTS4_OFFSET 0x0998 /* Device OUT endpoint-3 TxFIFO status register */ -#define STM32_OTGFS_DTXFSTS5_OFFSET 0x09b8 /* Device OUT endpoint-3 TxFIFO status register */ - -#define STM32_OTGFS_DOEP_OFFSET(n) (0x0b00 + ((n) << 5)) -#define STM32_OTGFS_DOEPCTL_EPOFFSET 0x0000 /* Device control OUT endpoint 0 control register */ -#define STM32_OTGFS_DOEPINT_EPOFFSET 0x0008 /* Device endpoint-x interrupt register */ -#define STM32_OTGFS_DOEPTSIZ_EPOFFSET 0x0010 /* Device endpoint OUT transfer size register */ - -#define STM32_OTGFS_DOEPCTL_OFFSET(n) (0x0b00 + ((n) << 5)) -#define STM32_OTGFS_DOEPCTL0_OFFSET 0x00b00 /* Device OUT endpoint 0 control register */ -#define STM32_OTGFS_DOEPCTL1_OFFSET 0x00b20 /* Device OUT endpoint 1 control register */ -#define STM32_OTGFS_DOEPCTL2_OFFSET 0x00b40 /* Device OUT endpoint 2 control register */ -#define STM32_OTGFS_DOEPCTL3_OFFSET 0x00b60 /* Device OUT endpoint 3 control register */ -#define STM32_OTGFS_DOEPCTL4_OFFSET 0x00b80 /* Device OUT endpoint 4 control register */ -#define STM32_OTGFS_DOEPCTL5_OFFSET 0x00ba0 /* Device OUT endpoint 5 control register */ - -#define STM32_OTGFS_DOEPINT_OFFSET(n) (0x0b08 + ((n) << 5)) -#define STM32_OTGFS_DOEPINT0_OFFSET 0x00b08 /* Device endpoint-0 interrupt register */ -#define STM32_OTGFS_DOEPINT1_OFFSET 0x00b28 /* Device endpoint-1 interrupt register */ -#define STM32_OTGFS_DOEPINT2_OFFSET 0x00b48 /* Device endpoint-2 interrupt register */ -#define STM32_OTGFS_DOEPINT3_OFFSET 0x00b68 /* Device endpoint-3 interrupt register */ -#define STM32_OTGFS_DOEPINT4_OFFSET 0x00b88 /* Device endpoint-4 interrupt register */ -#define STM32_OTGFS_DOEPINT5_OFFSET 0x00ba8 /* Device endpoint-5 interrupt register */ - -#define STM32_OTGFS_DOEPTSIZ_OFFSET(n) (0x0b10 + ((n) << 5)) -#define STM32_OTGFS_DOEPTSIZ0_OFFSET 0x00b10 /* Device OUT endpoint-0 transfer size register */ -#define STM32_OTGFS_DOEPTSIZ1_OFFSET 0x00b30 /* Device OUT endpoint-1 transfer size register */ -#define STM32_OTGFS_DOEPTSIZ2_OFFSET 0x00b50 /* Device OUT endpoint-2 transfer size register */ -#define STM32_OTGFS_DOEPTSIZ3_OFFSET 0x00b70 /* Device OUT endpoint-3 transfer size register */ -#define STM32_OTGFS_DOEPTSIZ4_OFFSET 0x00b90 /* Device OUT endpoint-4 transfer size register */ -#define STM32_OTGFS_DOEPTSIZ5_OFFSET 0x00bb0 /* Device OUT endpoint-5 transfer size register */ +#define STM32L4_OTGFS_DCFG_OFFSET 0x0800 /* Device configuration register */ +#define STM32L4_OTGFS_DCTL_OFFSET 0x0804 /* Device control register */ +#define STM32L4_OTGFS_DSTS_OFFSET 0x0808 /* Device status register */ +#define STM32L4_OTGFS_DIEPMSK_OFFSET 0x0810 /* Device IN endpoint common interrupt mask register */ +#define STM32L4_OTGFS_DOEPMSK_OFFSET 0x0814 /* Device OUT endpoint common interrupt mask register */ +#define STM32L4_OTGFS_DAINT_OFFSET 0x0818 /* Device all endpoints interrupt register */ +#define STM32L4_OTGFS_DAINTMSK_OFFSET 0x081c /* All endpoints interrupt mask register */ +#define STM32L4_OTGFS_DVBUSDIS_OFFSET 0x0828 /* Device VBUS discharge time register */ +#define STM32L4_OTGFS_DVBUSPULSE_OFFSET 0x082c /* Device VBUS pulsing time register */ +#define STM32L4_OTGFS_DIEPEMPMSK_OFFSET 0x0834 /* Device IN endpoint FIFO empty interrupt mask register */ + +#define STM32L4_OTGFS_DIEP_OFFSET(n) (0x0900 + ((n) << 5)) +#define STM32L4_OTGFS_DIEPCTL_EPOFFSET 0x0000 /* Device endpoint control register */ +#define STM32L4_OTGFS_DIEPINT_EPOFFSET 0x0008 /* Device endpoint interrupt register */ +#define STM32L4_OTGFS_DIEPTSIZ_EPOFFSET 0x0010 /* Device IN endpoint transfer size register */ +#define STM32L4_OTGFS_DTXFSTS_EPOFFSET 0x0018 /* Device IN endpoint transmit FIFO status register */ + +#define STM32L4_OTGFS_DIEPCTL_OFFSET(n) (0x0900 + ((n) << 5)) +#define STM32L4_OTGFS_DIEPCTL0_OFFSET 0x0900 /* Device control IN endpoint 0 control register */ +#define STM32L4_OTGFS_DIEPCTL1_OFFSET 0x0920 /* Device control IN endpoint 2 control register */ +#define STM32L4_OTGFS_DIEPCTL2_OFFSET 0x0940 /* Device control IN endpoint 3 control register */ +#define STM32L4_OTGFS_DIEPCTL3_OFFSET 0x0960 /* Device control IN endpoint 4 control register */ +#define STM32L4_OTGFS_DIEPCTL4_OFFSET 0x0980 /* Device control IN endpoint 4 control register */ +#define STM32L4_OTGFS_DIEPCTL5_OFFSET 0x09a0 /* Device control IN endpoint 4 control register */ + +#define STM32L4_OTGFS_DIEPINT_OFFSET(n) (0x0908 + ((n) << 5)) +#define STM32L4_OTGFS_DIEPINT0_OFFSET 0x0908 /* Device endpoint-0 interrupt register */ +#define STM32L4_OTGFS_DIEPINT1_OFFSET 0x0928 /* Device endpoint-1 interrupt register */ +#define STM32L4_OTGFS_DIEPINT2_OFFSET 0x0948 /* Device endpoint-2 interrupt register */ +#define STM32L4_OTGFS_DIEPINT3_OFFSET 0x0968 /* Device endpoint-3 interrupt register */ +#define STM32L4_OTGFS_DIEPINT4_OFFSET 0x0988 /* Device endpoint-3 interrupt register */ +#define STM32L4_OTGFS_DIEPINT5_OFFSET 0x09a8 /* Device endpoint-3 interrupt register */ + +#define STM32L4_OTGFS_DIEPTSIZ_OFFSET(n) (0x910 + ((n) << 5)) +#define STM32L4_OTGFS_DIEPTSIZ0_OFFSET 0x0910 /* Device IN endpoint 0 transfer size register */ +#define STM32L4_OTGFS_DIEPTSIZ1_OFFSET 0x0930 /* Device IN endpoint 1 transfer size register */ +#define STM32L4_OTGFS_DIEPTSIZ2_OFFSET 0x0950 /* Device IN endpoint 2 transfer size register */ +#define STM32L4_OTGFS_DIEPTSIZ3_OFFSET 0x0970 /* Device IN endpoint 3 transfer size register */ +#define STM32L4_OTGFS_DIEPTSIZ4_OFFSET 0x0990 /* Device IN endpoint 3 transfer size register */ +#define STM32L4_OTGFS_DIEPTSIZ5_OFFSET 0x09b0 /* Device IN endpoint 3 transfer size register */ + +#define STM32L4_OTGFS_DTXFSTS_OFFSET(n) (0x0918 + ((n) << 5)) +#define STM32L4_OTGFS_DTXFSTS0_OFFSET 0x0918 /* Device OUT endpoint-0 TxFIFO status register */ +#define STM32L4_OTGFS_DTXFSTS1_OFFSET 0x0938 /* Device OUT endpoint-1 TxFIFO status register */ +#define STM32L4_OTGFS_DTXFSTS2_OFFSET 0x0958 /* Device OUT endpoint-2 TxFIFO status register */ +#define STM32L4_OTGFS_DTXFSTS3_OFFSET 0x0978 /* Device OUT endpoint-3 TxFIFO status register */ +#define STM32L4_OTGFS_DTXFSTS4_OFFSET 0x0998 /* Device OUT endpoint-3 TxFIFO status register */ +#define STM32L4_OTGFS_DTXFSTS5_OFFSET 0x09b8 /* Device OUT endpoint-3 TxFIFO status register */ + +#define STM32L4_OTGFS_DOEP_OFFSET(n) (0x0b00 + ((n) << 5)) +#define STM32L4_OTGFS_DOEPCTL_EPOFFSET 0x0000 /* Device control OUT endpoint 0 control register */ +#define STM32L4_OTGFS_DOEPINT_EPOFFSET 0x0008 /* Device endpoint-x interrupt register */ +#define STM32L4_OTGFS_DOEPTSIZ_EPOFFSET 0x0010 /* Device endpoint OUT transfer size register */ + +#define STM32L4_OTGFS_DOEPCTL_OFFSET(n) (0x0b00 + ((n) << 5)) +#define STM32L4_OTGFS_DOEPCTL0_OFFSET 0x00b00 /* Device OUT endpoint 0 control register */ +#define STM32L4_OTGFS_DOEPCTL1_OFFSET 0x00b20 /* Device OUT endpoint 1 control register */ +#define STM32L4_OTGFS_DOEPCTL2_OFFSET 0x00b40 /* Device OUT endpoint 2 control register */ +#define STM32L4_OTGFS_DOEPCTL3_OFFSET 0x00b60 /* Device OUT endpoint 3 control register */ +#define STM32L4_OTGFS_DOEPCTL4_OFFSET 0x00b80 /* Device OUT endpoint 4 control register */ +#define STM32L4_OTGFS_DOEPCTL5_OFFSET 0x00ba0 /* Device OUT endpoint 5 control register */ + +#define STM32L4_OTGFS_DOEPINT_OFFSET(n) (0x0b08 + ((n) << 5)) +#define STM32L4_OTGFS_DOEPINT0_OFFSET 0x00b08 /* Device endpoint-0 interrupt register */ +#define STM32L4_OTGFS_DOEPINT1_OFFSET 0x00b28 /* Device endpoint-1 interrupt register */ +#define STM32L4_OTGFS_DOEPINT2_OFFSET 0x00b48 /* Device endpoint-2 interrupt register */ +#define STM32L4_OTGFS_DOEPINT3_OFFSET 0x00b68 /* Device endpoint-3 interrupt register */ +#define STM32L4_OTGFS_DOEPINT4_OFFSET 0x00b88 /* Device endpoint-4 interrupt register */ +#define STM32L4_OTGFS_DOEPINT5_OFFSET 0x00ba8 /* Device endpoint-5 interrupt register */ + +#define STM32L4_OTGFS_DOEPTSIZ_OFFSET(n) (0x0b10 + ((n) << 5)) +#define STM32L4_OTGFS_DOEPTSIZ0_OFFSET 0x00b10 /* Device OUT endpoint-0 transfer size register */ +#define STM32L4_OTGFS_DOEPTSIZ1_OFFSET 0x00b30 /* Device OUT endpoint-1 transfer size register */ +#define STM32L4_OTGFS_DOEPTSIZ2_OFFSET 0x00b50 /* Device OUT endpoint-2 transfer size register */ +#define STM32L4_OTGFS_DOEPTSIZ3_OFFSET 0x00b70 /* Device OUT endpoint-3 transfer size register */ +#define STM32L4_OTGFS_DOEPTSIZ4_OFFSET 0x00b90 /* Device OUT endpoint-4 transfer size register */ +#define STM32L4_OTGFS_DOEPTSIZ5_OFFSET 0x00bb0 /* Device OUT endpoint-5 transfer size register */ /* Power and clock gating registers */ -#define STM32_OTGFS_PCGCCTL_OFFSET 0x0e00 /* Power and clock gating control register */ +#define STM32L4_OTGFS_PCGCCTL_OFFSET 0x0e00 /* Power and clock gating control register */ /* Data FIFO (DFIFO) access registers */ -#define STM32_OTGFS_DFIFO_DEP_OFFSET(n) (0x1000 + ((n) << 12)) -#define STM32_OTGFS_DFIFO_HCH_OFFSET(n) (0x1000 + ((n) << 12)) +#define STM32L4_OTGFS_DFIFO_DEP_OFFSET(n) (0x1000 + ((n) << 12)) +#define STM32L4_OTGFS_DFIFO_HCH_OFFSET(n) (0x1000 + ((n) << 12)) -#define STM32_OTGFS_DFIFO_DEP0_OFFSET 0x1000 /* 0x1000-0x1ffc Device IN/OUT Endpoint 0 DFIFO Write/Read Access */ -#define STM32_OTGFS_DFIFO_HCH0_OFFSET 0x1000 /* 0x1000-0x1ffc Host OUT/IN Channel 0 DFIFO Read/Write Access */ +#define STM32L4_OTGFS_DFIFO_DEP0_OFFSET 0x1000 /* 0x1000-0x1ffc Device IN/OUT Endpoint 0 DFIFO Write/Read Access */ +#define STM32L4_OTGFS_DFIFO_HCH0_OFFSET 0x1000 /* 0x1000-0x1ffc Host OUT/IN Channel 0 DFIFO Read/Write Access */ -#define STM32_OTGFS_DFIFO_DEP1_OFFSET 0x2000 /* 0x2000-0x2ffc Device IN/OUT Endpoint 1 DFIFO Write/Read Access */ -#define STM32_OTGFS_DFIFO_HCH1_OFFSET 0x2000 /* 0x2000-0x2ffc Host OUT/IN Channel 1 DFIFO Read/Write Access */ +#define STM32L4_OTGFS_DFIFO_DEP1_OFFSET 0x2000 /* 0x2000-0x2ffc Device IN/OUT Endpoint 1 DFIFO Write/Read Access */ +#define STM32L4_OTGFS_DFIFO_HCH1_OFFSET 0x2000 /* 0x2000-0x2ffc Host OUT/IN Channel 1 DFIFO Read/Write Access */ -#define STM32_OTGFS_DFIFO_DEP2_OFFSET 0x3000 /* 0x3000-0x3ffc Device IN/OUT Endpoint 2 DFIFO Write/Read Access */ -#define STM32_OTGFS_DFIFO_HCH2_OFFSET 0x3000 /* 0x3000-0x3ffc Host OUT/IN Channel 2 DFIFO Read/Write Access */ +#define STM32L4_OTGFS_DFIFO_DEP2_OFFSET 0x3000 /* 0x3000-0x3ffc Device IN/OUT Endpoint 2 DFIFO Write/Read Access */ +#define STM32L4_OTGFS_DFIFO_HCH2_OFFSET 0x3000 /* 0x3000-0x3ffc Host OUT/IN Channel 2 DFIFO Read/Write Access */ -#define STM32_OTGFS_DFIFO_DEP3_OFFSET 0x4000 /* 0x4000-0x4ffc Device IN/OUT Endpoint 3 DFIFO Write/Read Access */ -#define STM32_OTGFS_DFIFO_HCH3_OFFSET 0x4000 /* 0x4000-0x4ffc Host OUT/IN Channel 3 DFIFO Read/Write Access */ +#define STM32L4_OTGFS_DFIFO_DEP3_OFFSET 0x4000 /* 0x4000-0x4ffc Device IN/OUT Endpoint 3 DFIFO Write/Read Access */ +#define STM32L4_OTGFS_DFIFO_HCH3_OFFSET 0x4000 /* 0x4000-0x4ffc Host OUT/IN Channel 3 DFIFO Read/Write Access */ -#define STM32_OTGFS_DFIFO_DEP4_OFFSET 0x5000 /* 0x5000-0x5ffc Device IN/OUT Endpoint 4 DFIFO Write/Read Access */ -#define STM32_OTGFS_DFIFO_HCH4_OFFSET 0x5000 /* 0x5000-0x5ffc Host OUT/IN Channel 4 DFIFO Read/Write Access */ +#define STM32L4_OTGFS_DFIFO_DEP4_OFFSET 0x5000 /* 0x5000-0x5ffc Device IN/OUT Endpoint 4 DFIFO Write/Read Access */ +#define STM32L4_OTGFS_DFIFO_HCH4_OFFSET 0x5000 /* 0x5000-0x5ffc Host OUT/IN Channel 4 DFIFO Read/Write Access */ -#define STM32_OTGFS_DFIFO_DEP5_OFFSET 0x6000 /* 0x6000-0x6ffc Device IN/OUT Endpoint 5 DFIFO Write/Read Access */ -#define STM32_OTGFS_DFIFO_HCH5_OFFSET 0x6000 /* 0x6000-0x6ffc Host OUT/IN Channel 5 DFIFO Read/Write Access */ +#define STM32L4_OTGFS_DFIFO_DEP5_OFFSET 0x6000 /* 0x6000-0x6ffc Device IN/OUT Endpoint 5 DFIFO Write/Read Access */ +#define STM32L4_OTGFS_DFIFO_HCH5_OFFSET 0x6000 /* 0x6000-0x6ffc Host OUT/IN Channel 5 DFIFO Read/Write Access */ /* Register Addresses *******************************************************************************/ -#define STM32_OTGFS_GOTGCTL (STM32L4_OTGFS_BASE+STM32_OTGFS_GOTGCTL_OFFSET) -#define STM32_OTGFS_GOTGINT (STM32L4_OTGFS_BASE+STM32_OTGFS_GOTGINT_OFFSET) -#define STM32_OTGFS_GAHBCFG (STM32L4_OTGFS_BASE+STM32_OTGFS_GAHBCFG_OFFSET) -#define STM32_OTGFS_GUSBCFG (STM32L4_OTGFS_BASE+STM32_OTGFS_GUSBCFG_OFFSET) -#define STM32_OTGFS_GRSTCTL (STM32L4_OTGFS_BASE+STM32_OTGFS_GRSTCTL_OFFSET) -#define STM32_OTGFS_GINTSTS (STM32L4_OTGFS_BASE+STM32_OTGFS_GINTSTS_OFFSET) -#define STM32_OTGFS_GINTMSK (STM32L4_OTGFS_BASE+STM32_OTGFS_GINTMSK_OFFSET) -#define STM32_OTGFS_GRXSTSR (STM32L4_OTGFS_BASE+STM32_OTGFS_GRXSTSR_OFFSET) -#define STM32_OTGFS_GRXSTSP (STM32L4_OTGFS_BASE+STM32_OTGFS_GRXSTSP_OFFSET) -#define STM32_OTGFS_GRXFSIZ (STM32L4_OTGFS_BASE+STM32_OTGFS_GRXFSIZ_OFFSET) -#define STM32_OTGFS_HNPTXFSIZ (STM32L4_OTGFS_BASE+STM32_OTGFS_HNPTXFSIZ_OFFSET) -#define STM32_OTGFS_DIEPTXF0 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPTXF0_OFFSET) -#define STM32_OTGFS_HNPTXSTS (STM32L4_OTGFS_BASE+STM32_OTGFS_HNPTXSTS_OFFSET) -#define STM32_OTGFS_GCCFG (STM32L4_OTGFS_BASE+STM32_OTGFS_GCCFG_OFFSET) -#define STM32_OTGFS_CID (STM32L4_OTGFS_BASE+STM32_OTGFS_CID_OFFSET) -#define STM32_OTGFS_GLPMCFG (STM32L4_OTGFS_BASE+STM32_OTGFS_GLPMCFG_OFFSET) -#define STM32_OTGFS_GPWRDN (STM32L4_OTGFS_BASE+STM32_OTGFS_GPWRDN_OFFSET) -#define STM32_OTGFS_GADPCTL (STM32L4_OTGFS_BASE+STM32_OTGFS_GADPCTL_OFSSET) -#define STM32_OTGFS_HPTXFSIZ (STM32L4_OTGFS_BASE+STM32_OTGFS_HPTXFSIZ_OFFSET) - -#define STM32_OTGFS_DIEPTXF(n) (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPTXF_OFFSET(n)) -#define STM32_OTGFS_DIEPTXF1 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPTXF1_OFFSET) -#define STM32_OTGFS_DIEPTXF2 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPTXF2_OFFSET) -#define STM32_OTGFS_DIEPTXF3 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPTXF3_OFFSET) -#define STM32_OTGFS_DIEPTXF4 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPTXF4_OFFSET) -#define STM32_OTGFS_DIEPTXF5 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPTXF5_OFFSET) +#define STM32L4_OTGFS_GOTGCTL (STM32L4_OTGFS_BASE+STM32L4_OTGFS_GOTGCTL_OFFSET) +#define STM32L4_OTGFS_GOTGINT (STM32L4_OTGFS_BASE+STM32L4_OTGFS_GOTGINT_OFFSET) +#define STM32L4_OTGFS_GAHBCFG (STM32L4_OTGFS_BASE+STM32L4_OTGFS_GAHBCFG_OFFSET) +#define STM32L4_OTGFS_GUSBCFG (STM32L4_OTGFS_BASE+STM32L4_OTGFS_GUSBCFG_OFFSET) +#define STM32L4_OTGFS_GRSTCTL (STM32L4_OTGFS_BASE+STM32L4_OTGFS_GRSTCTL_OFFSET) +#define STM32L4_OTGFS_GINTSTS (STM32L4_OTGFS_BASE+STM32L4_OTGFS_GINTSTS_OFFSET) +#define STM32L4_OTGFS_GINTMSK (STM32L4_OTGFS_BASE+STM32L4_OTGFS_GINTMSK_OFFSET) +#define STM32L4_OTGFS_GRXSTSR (STM32L4_OTGFS_BASE+STM32L4_OTGFS_GRXSTSR_OFFSET) +#define STM32L4_OTGFS_GRXSTSP (STM32L4_OTGFS_BASE+STM32L4_OTGFS_GRXSTSP_OFFSET) +#define STM32L4_OTGFS_GRXFSIZ (STM32L4_OTGFS_BASE+STM32L4_OTGFS_GRXFSIZ_OFFSET) +#define STM32L4_OTGFS_HNPTXFSIZ (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HNPTXFSIZ_OFFSET) +#define STM32L4_OTGFS_DIEPTXF0 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPTXF0_OFFSET) +#define STM32L4_OTGFS_HNPTXSTS (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HNPTXSTS_OFFSET) +#define STM32L4_OTGFS_GCCFG (STM32L4_OTGFS_BASE+STM32L4_OTGFS_GCCFG_OFFSET) +#define STM32L4_OTGFS_CID (STM32L4_OTGFS_BASE+STM32L4_OTGFS_CID_OFFSET) +#define STM32L4_OTGFS_GLPMCFG (STM32L4_OTGFS_BASE+STM32L4_OTGFS_GLPMCFG_OFFSET) +#define STM32L4_OTGFS_GPWRDN (STM32L4_OTGFS_BASE+STM32L4_OTGFS_GPWRDN_OFFSET) +#define STM32L4_OTGFS_GADPCTL (STM32L4_OTGFS_BASE+STM32L4_OTGFS_GADPCTL_OFSSET) +#define STM32L4_OTGFS_HPTXFSIZ (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HPTXFSIZ_OFFSET) + +#define STM32L4_OTGFS_DIEPTXF(n) (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPTXF_OFFSET(n)) +#define STM32L4_OTGFS_DIEPTXF1 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPTXF1_OFFSET) +#define STM32L4_OTGFS_DIEPTXF2 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPTXF2_OFFSET) +#define STM32L4_OTGFS_DIEPTXF3 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPTXF3_OFFSET) +#define STM32L4_OTGFS_DIEPTXF4 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPTXF4_OFFSET) +#define STM32L4_OTGFS_DIEPTXF5 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPTXF5_OFFSET) /* Host-mode control and status registers */ -#define STM32_OTGFS_HCFG (STM32L4_OTGFS_BASE+STM32_OTGFS_HCFG_OFFSET) -#define STM32_OTGFS_HFIR (STM32L4_OTGFS_BASE+STM32_OTGFS_HFIR_OFFSET) -#define STM32_OTGFS_HFNUM (STM32L4_OTGFS_BASE+STM32_OTGFS_HFNUM_OFFSET) -#define STM32_OTGFS_HPTXSTS (STM32L4_OTGFS_BASE+STM32_OTGFS_HPTXSTS_OFFSET) -#define STM32_OTGFS_HAINT (STM32L4_OTGFS_BASE+STM32_OTGFS_HAINT_OFFSET) -#define STM32_OTGFS_HAINTMSK (STM32L4_OTGFS_BASE+STM32_OTGFS_HAINTMSK_OFFSET) -#define STM32_OTGFS_HPRT (STM32L4_OTGFS_BASE+STM32_OTGFS_HPRT_OFFSET) - -#define STM32_OTGFS_CHAN(n) (STM32L4_OTGFS_BASE+STM32_OTGFS_CHAN_OFFSET(n)) - -#define STM32_OTGFS_HCCHAR(n) (STM32L4_OTGFS_BASE+STM32_OTGFS_HCCHAR_OFFSET(n)) -#define STM32_OTGFS_HCCHAR0 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCCHAR0_OFFSET) -#define STM32_OTGFS_HCCHAR1 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCCHAR1_OFFSET) -#define STM32_OTGFS_HCCHAR2 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCCHAR2_OFFSET) -#define STM32_OTGFS_HCCHAR3 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCCHAR3_OFFSET) -#define STM32_OTGFS_HCCHAR4 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCCHAR4_OFFSET) -#define STM32_OTGFS_HCCHAR5 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCCHAR5_OFFSET) -#define STM32_OTGFS_HCCHAR6 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCCHAR6_OFFSET) -#define STM32_OTGFS_HCCHAR7 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCCHAR7_OFFSET) -#define STM32_OTGFS_HCCHAR8 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCCHAR8_OFFSET) -#define STM32_OTGFS_HCCHAR9 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCCHAR9_OFFSET) -#define STM32_OTGFS_HCCHAR10 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCCHAR10_OFFSET) -#define STM32_OTGFS_HCCHAR11 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCCHAR11_OFFSET) - -#define STM32_OTGFS_HCINT(n) (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINT_OFFSET(n)) -#define STM32_OTGFS_HCINT0 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINT0_OFFSET) -#define STM32_OTGFS_HCINT1 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINT1_OFFSET) -#define STM32_OTGFS_HCINT2 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINT2_OFFSET) -#define STM32_OTGFS_HCINT3 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINT3_OFFSET) -#define STM32_OTGFS_HCINT4 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINT4_OFFSET) -#define STM32_OTGFS_HCINT5 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINT5_OFFSET) -#define STM32_OTGFS_HCINT6 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINT6_OFFSET) -#define STM32_OTGFS_HCINT7 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINT7_OFFSET) -#define STM32_OTGFS_HCINT8 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINT8_OFFSET) -#define STM32_OTGFS_HCINT9 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINT9_OFFSET) -#define STM32_OTGFS_HCINT10 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINT10_OFFSET) -#define STM32_OTGFS_HCINT11 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINT11_OFFSET) - -#define STM32_OTGFS_HCINTMSK(n) (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINTMSK_OFFSET(n)) -#define STM32_OTGFS_HCINTMSK0 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINTMSK0_OFFSET) -#define STM32_OTGFS_HCINTMSK1 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINTMSK1_OFFSET) -#define STM32_OTGFS_HCINTMSK2 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINTMSK2_OFFSET) -#define STM32_OTGFS_HCINTMSK3 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINTMSK3_OFFSET) -#define STM32_OTGFS_HCINTMSK4 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINTMSK4_OFFSET) -#define STM32_OTGFS_HCINTMSK5 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINTMSK5_OFFSET) -#define STM32_OTGFS_HCINTMSK6 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINTMSK6_OFFSET) -#define STM32_OTGFS_HCINTMSK7 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINTMSK7_OFFSET) -#define STM32_OTGFS_HCINTMSK8 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINTMSK8_OFFSET) -#define STM32_OTGFS_HCINTMSK9 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINTMSK9_OFFSET) -#define STM32_OTGFS_HCINTMSK10 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINTMSK10_OFFSET) -#define STM32_OTGFS_HCINTMSK11 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCINTMSK11_OFFSET) - -#define STM32_OTGFS_HCTSIZ(n) (STM32L4_OTGFS_BASE+STM32_OTGFS_HCTSIZ_OFFSET(n)) -#define STM32_OTGFS_HCTSIZ0 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCTSIZ0_OFFSET) -#define STM32_OTGFS_HCTSIZ1 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCTSIZ1_OFFSET) -#define STM32_OTGFS_HCTSIZ2 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCTSIZ2_OFFSET) -#define STM32_OTGFS_HCTSIZ3 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCTSIZ3_OFFSET) -#define STM32_OTGFS_HCTSIZ4 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCTSIZ4_OFFSET) -#define STM32_OTGFS_HCTSIZ5 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCTSIZ5_OFFSET) -#define STM32_OTGFS_HCTSIZ6 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCTSIZ6_OFFSET) -#define STM32_OTGFS_HCTSIZ7 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCTSIZ7_OFFSET) -#define STM32_OTGFS_HCTSIZ8 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCTSIZ8_OFFSET) -#define STM32_OTGFS_HCTSIZ9 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCTSIZ9_OFFSET) -#define STM32_OTGFS_HCTSIZ10 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCTSIZ10_OFFSET) -#define STM32_OTGFS_HCTSIZ11 (STM32L4_OTGFS_BASE+STM32_OTGFS_HCTSIZ11_OFFSET) +#define STM32L4_OTGFS_HCFG (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCFG_OFFSET) +#define STM32L4_OTGFS_HFIR (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HFIR_OFFSET) +#define STM32L4_OTGFS_HFNUM (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HFNUM_OFFSET) +#define STM32L4_OTGFS_HPTXSTS (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HPTXSTS_OFFSET) +#define STM32L4_OTGFS_HAINT (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HAINT_OFFSET) +#define STM32L4_OTGFS_HAINTMSK (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HAINTMSK_OFFSET) +#define STM32L4_OTGFS_HPRT (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HPRT_OFFSET) + +#define STM32L4_OTGFS_CHAN(n) (STM32L4_OTGFS_BASE+STM32L4_OTGFS_CHAN_OFFSET(n)) + +#define STM32L4_OTGFS_HCCHAR(n) (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCCHAR_OFFSET(n)) +#define STM32L4_OTGFS_HCCHAR0 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCCHAR0_OFFSET) +#define STM32L4_OTGFS_HCCHAR1 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCCHAR1_OFFSET) +#define STM32L4_OTGFS_HCCHAR2 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCCHAR2_OFFSET) +#define STM32L4_OTGFS_HCCHAR3 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCCHAR3_OFFSET) +#define STM32L4_OTGFS_HCCHAR4 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCCHAR4_OFFSET) +#define STM32L4_OTGFS_HCCHAR5 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCCHAR5_OFFSET) +#define STM32L4_OTGFS_HCCHAR6 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCCHAR6_OFFSET) +#define STM32L4_OTGFS_HCCHAR7 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCCHAR7_OFFSET) +#define STM32L4_OTGFS_HCCHAR8 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCCHAR8_OFFSET) +#define STM32L4_OTGFS_HCCHAR9 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCCHAR9_OFFSET) +#define STM32L4_OTGFS_HCCHAR10 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCCHAR10_OFFSET) +#define STM32L4_OTGFS_HCCHAR11 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCCHAR11_OFFSET) + +#define STM32L4_OTGFS_HCINT(n) (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINT_OFFSET(n)) +#define STM32L4_OTGFS_HCINT0 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINT0_OFFSET) +#define STM32L4_OTGFS_HCINT1 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINT1_OFFSET) +#define STM32L4_OTGFS_HCINT2 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINT2_OFFSET) +#define STM32L4_OTGFS_HCINT3 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINT3_OFFSET) +#define STM32L4_OTGFS_HCINT4 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINT4_OFFSET) +#define STM32L4_OTGFS_HCINT5 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINT5_OFFSET) +#define STM32L4_OTGFS_HCINT6 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINT6_OFFSET) +#define STM32L4_OTGFS_HCINT7 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINT7_OFFSET) +#define STM32L4_OTGFS_HCINT8 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINT8_OFFSET) +#define STM32L4_OTGFS_HCINT9 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINT9_OFFSET) +#define STM32L4_OTGFS_HCINT10 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINT10_OFFSET) +#define STM32L4_OTGFS_HCINT11 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINT11_OFFSET) + +#define STM32L4_OTGFS_HCINTMSK(n) (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINTMSK_OFFSET(n)) +#define STM32L4_OTGFS_HCINTMSK0 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINTMSK0_OFFSET) +#define STM32L4_OTGFS_HCINTMSK1 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINTMSK1_OFFSET) +#define STM32L4_OTGFS_HCINTMSK2 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINTMSK2_OFFSET) +#define STM32L4_OTGFS_HCINTMSK3 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINTMSK3_OFFSET) +#define STM32L4_OTGFS_HCINTMSK4 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINTMSK4_OFFSET) +#define STM32L4_OTGFS_HCINTMSK5 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINTMSK5_OFFSET) +#define STM32L4_OTGFS_HCINTMSK6 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINTMSK6_OFFSET) +#define STM32L4_OTGFS_HCINTMSK7 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINTMSK7_OFFSET) +#define STM32L4_OTGFS_HCINTMSK8 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINTMSK8_OFFSET) +#define STM32L4_OTGFS_HCINTMSK9 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINTMSK9_OFFSET) +#define STM32L4_OTGFS_HCINTMSK10 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINTMSK10_OFFSET) +#define STM32L4_OTGFS_HCINTMSK11 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCINTMSK11_OFFSET) + +#define STM32L4_OTGFS_HCTSIZ(n) (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCTSIZ_OFFSET(n)) +#define STM32L4_OTGFS_HCTSIZ0 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCTSIZ0_OFFSET) +#define STM32L4_OTGFS_HCTSIZ1 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCTSIZ1_OFFSET) +#define STM32L4_OTGFS_HCTSIZ2 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCTSIZ2_OFFSET) +#define STM32L4_OTGFS_HCTSIZ3 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCTSIZ3_OFFSET) +#define STM32L4_OTGFS_HCTSIZ4 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCTSIZ4_OFFSET) +#define STM32L4_OTGFS_HCTSIZ5 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCTSIZ5_OFFSET) +#define STM32L4_OTGFS_HCTSIZ6 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCTSIZ6_OFFSET) +#define STM32L4_OTGFS_HCTSIZ7 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCTSIZ7_OFFSET) +#define STM32L4_OTGFS_HCTSIZ8 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCTSIZ8_OFFSET) +#define STM32L4_OTGFS_HCTSIZ9 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCTSIZ9_OFFSET) +#define STM32L4_OTGFS_HCTSIZ10 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCTSIZ10_OFFSET) +#define STM32L4_OTGFS_HCTSIZ11 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_HCTSIZ11_OFFSET) /* Device-mode control and status registers */ -#define STM32_OTGFS_DCFG (STM32L4_OTGFS_BASE+STM32_OTGFS_DCFG_OFFSET) -#define STM32_OTGFS_DCTL (STM32L4_OTGFS_BASE+STM32_OTGFS_DCTL_OFFSET) -#define STM32_OTGFS_DSTS (STM32L4_OTGFS_BASE+STM32_OTGFS_DSTS_OFFSET) -#define STM32_OTGFS_DIEPMSK (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPMSK_OFFSET) -#define STM32_OTGFS_DOEPMSK (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPMSK_OFFSET) -#define STM32_OTGFS_DAINT (STM32L4_OTGFS_BASE+STM32_OTGFS_DAINT_OFFSET) -#define STM32_OTGFS_DAINTMSK (STM32L4_OTGFS_BASE+STM32_OTGFS_DAINTMSK_OFFSET) -#define STM32_OTGFS_DVBUSDIS (STM32L4_OTGFS_BASE+STM32_OTGFS_DVBUSDIS_OFFSET) -#define STM32_OTGFS_DVBUSPULSE (STM32L4_OTGFS_BASE+STM32_OTGFS_DVBUSPULSE_OFFSET) -#define STM32_OTGFS_DIEPEMPMSK (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPEMPMSK_OFFSET) - -#define STM32_OTGFS_DIEP(n) (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEP_OFFSET(n)) - -#define STM32_OTGFS_DIEPCTL(n) (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPCTL_OFFSET(n)) -#define STM32_OTGFS_DIEPCTL0 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPCTL0_OFFSET) -#define STM32_OTGFS_DIEPCTL1 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPCTL1_OFFSET) -#define STM32_OTGFS_DIEPCTL2 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPCTL2_OFFSET) -#define STM32_OTGFS_DIEPCTL3 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPCTL3_OFFSET) -#define STM32_OTGFS_DIEPCTL4 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPCTL4_OFFSET) -#define STM32_OTGFS_DIEPCTL5 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPCTL5_OFFSET) - -#define STM32_OTGFS_DIEPINT(n) (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPINT_OFFSET(n)) -#define STM32_OTGFS_DIEPINT0 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPINT0_OFFSET) -#define STM32_OTGFS_DIEPINT1 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPINT1_OFFSET) -#define STM32_OTGFS_DIEPINT2 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPINT2_OFFSET) -#define STM32_OTGFS_DIEPINT3 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPINT3_OFFSET) -#define STM32_OTGFS_DIEPINT4 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPINT4_OFFSET) -#define STM32_OTGFS_DIEPINT5 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPINT5_OFFSET) - -#define STM32_OTGFS_DIEPTSIZ(n) (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPTSIZ_OFFSET(n)) -#define STM32_OTGFS_DIEPTSIZ0 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPTSIZ0_OFFSET) -#define STM32_OTGFS_DIEPTSIZ1 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPTSIZ1_OFFSET) -#define STM32_OTGFS_DIEPTSIZ2 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPTSIZ2_OFFSET) -#define STM32_OTGFS_DIEPTSIZ3 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPTSIZ3_OFFSET) -#define STM32_OTGFS_DIEPTSIZ4 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPTSIZ4_OFFSET) -#define STM32_OTGFS_DIEPTSIZ5 (STM32L4_OTGFS_BASE+STM32_OTGFS_DIEPTSIZ5_OFFSET) - -#define STM32_OTGFS_DTXFSTS(n) (STM32L4_OTGFS_BASE+STM32_OTGFS_DTXFSTS_OFFSET(n)) -#define STM32_OTGFS_DTXFSTS0 (STM32L4_OTGFS_BASE+STM32_OTGFS_DTXFSTS0_OFFSET) -#define STM32_OTGFS_DTXFSTS1 (STM32L4_OTGFS_BASE+STM32_OTGFS_DTXFSTS1_OFFSET) -#define STM32_OTGFS_DTXFSTS2 (STM32L4_OTGFS_BASE+STM32_OTGFS_DTXFSTS2_OFFSET) -#define STM32_OTGFS_DTXFSTS3 (STM32L4_OTGFS_BASE+STM32_OTGFS_DTXFSTS3_OFFSET) -#define STM32_OTGFS_DTXFSTS4 (STM32L4_OTGFS_BASE+STM32_OTGFS_DTXFSTS4_OFFSET) -#define STM32_OTGFS_DTXFSTS5 (STM32L4_OTGFS_BASE+STM32_OTGFS_DTXFSTS5_OFFSET) - -#define STM32_OTGFS_DOEP(n) (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEP_OFFSET(n)) - -#define STM32_OTGFS_DOEPCTL(n) (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPCTL_OFFSET(n)) -#define STM32_OTGFS_DOEPCTL0 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPCTL0_OFFSET) -#define STM32_OTGFS_DOEPCTL1 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPCTL1_OFFSET) -#define STM32_OTGFS_DOEPCTL2 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPCTL2_OFFSET) -#define STM32_OTGFS_DOEPCTL3 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPCTL3_OFFSET) -#define STM32_OTGFS_DOEPCTL4 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPCTL4_OFFSET) -#define STM32_OTGFS_DOEPCTL5 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPCTL5_OFFSET) - -#define STM32_OTGFS_DOEPINT(n) (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPINT_OFFSET(n)) -#define STM32_OTGFS_DOEPINT0 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPINT0_OFFSET) -#define STM32_OTGFS_DOEPINT1 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPINT1_OFFSET) -#define STM32_OTGFS_DOEPINT2 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPINT2_OFFSET) -#define STM32_OTGFS_DOEPINT3 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPINT3_OFFSET) -#define STM32_OTGFS_DOEPINT4 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPINT4_OFFSET) -#define STM32_OTGFS_DOEPINT5 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPINT5_OFFSET) - -#define STM32_OTGFS_DOEPTSIZ(n) (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPTSIZ_OFFSET(n)) -#define STM32_OTGFS_DOEPTSIZ0 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPTSIZ0_OFFSET) -#define STM32_OTGFS_DOEPTSIZ1 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPTSIZ1_OFFSET) -#define STM32_OTGFS_DOEPTSIZ2 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPTSIZ2_OFFSET) -#define STM32_OTGFS_DOEPTSIZ3 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPTSIZ3_OFFSET) -#define STM32_OTGFS_DOEPTSIZ4 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPTSIZ4_OFFSET) -#define STM32_OTGFS_DOEPTSIZ5 (STM32L4_OTGFS_BASE+STM32_OTGFS_DOEPTSIZ5_OFFSET) +#define STM32L4_OTGFS_DCFG (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DCFG_OFFSET) +#define STM32L4_OTGFS_DCTL (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DCTL_OFFSET) +#define STM32L4_OTGFS_DSTS (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DSTS_OFFSET) +#define STM32L4_OTGFS_DIEPMSK (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPMSK_OFFSET) +#define STM32L4_OTGFS_DOEPMSK (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPMSK_OFFSET) +#define STM32L4_OTGFS_DAINT (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DAINT_OFFSET) +#define STM32L4_OTGFS_DAINTMSK (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DAINTMSK_OFFSET) +#define STM32L4_OTGFS_DVBUSDIS (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DVBUSDIS_OFFSET) +#define STM32L4_OTGFS_DVBUSPULSE (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DVBUSPULSE_OFFSET) +#define STM32L4_OTGFS_DIEPEMPMSK (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPEMPMSK_OFFSET) + +#define STM32L4_OTGFS_DIEP(n) (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEP_OFFSET(n)) + +#define STM32L4_OTGFS_DIEPCTL(n) (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPCTL_OFFSET(n)) +#define STM32L4_OTGFS_DIEPCTL0 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPCTL0_OFFSET) +#define STM32L4_OTGFS_DIEPCTL1 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPCTL1_OFFSET) +#define STM32L4_OTGFS_DIEPCTL2 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPCTL2_OFFSET) +#define STM32L4_OTGFS_DIEPCTL3 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPCTL3_OFFSET) +#define STM32L4_OTGFS_DIEPCTL4 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPCTL4_OFFSET) +#define STM32L4_OTGFS_DIEPCTL5 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPCTL5_OFFSET) + +#define STM32L4_OTGFS_DIEPINT(n) (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPINT_OFFSET(n)) +#define STM32L4_OTGFS_DIEPINT0 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPINT0_OFFSET) +#define STM32L4_OTGFS_DIEPINT1 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPINT1_OFFSET) +#define STM32L4_OTGFS_DIEPINT2 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPINT2_OFFSET) +#define STM32L4_OTGFS_DIEPINT3 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPINT3_OFFSET) +#define STM32L4_OTGFS_DIEPINT4 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPINT4_OFFSET) +#define STM32L4_OTGFS_DIEPINT5 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPINT5_OFFSET) + +#define STM32L4_OTGFS_DIEPTSIZ(n) (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPTSIZ_OFFSET(n)) +#define STM32L4_OTGFS_DIEPTSIZ0 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPTSIZ0_OFFSET) +#define STM32L4_OTGFS_DIEPTSIZ1 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPTSIZ1_OFFSET) +#define STM32L4_OTGFS_DIEPTSIZ2 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPTSIZ2_OFFSET) +#define STM32L4_OTGFS_DIEPTSIZ3 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPTSIZ3_OFFSET) +#define STM32L4_OTGFS_DIEPTSIZ4 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPTSIZ4_OFFSET) +#define STM32L4_OTGFS_DIEPTSIZ5 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DIEPTSIZ5_OFFSET) + +#define STM32L4_OTGFS_DTXFSTS(n) (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DTXFSTS_OFFSET(n)) +#define STM32L4_OTGFS_DTXFSTS0 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DTXFSTS0_OFFSET) +#define STM32L4_OTGFS_DTXFSTS1 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DTXFSTS1_OFFSET) +#define STM32L4_OTGFS_DTXFSTS2 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DTXFSTS2_OFFSET) +#define STM32L4_OTGFS_DTXFSTS3 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DTXFSTS3_OFFSET) +#define STM32L4_OTGFS_DTXFSTS4 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DTXFSTS4_OFFSET) +#define STM32L4_OTGFS_DTXFSTS5 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DTXFSTS5_OFFSET) + +#define STM32L4_OTGFS_DOEP(n) (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEP_OFFSET(n)) + +#define STM32L4_OTGFS_DOEPCTL(n) (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPCTL_OFFSET(n)) +#define STM32L4_OTGFS_DOEPCTL0 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPCTL0_OFFSET) +#define STM32L4_OTGFS_DOEPCTL1 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPCTL1_OFFSET) +#define STM32L4_OTGFS_DOEPCTL2 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPCTL2_OFFSET) +#define STM32L4_OTGFS_DOEPCTL3 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPCTL3_OFFSET) +#define STM32L4_OTGFS_DOEPCTL4 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPCTL4_OFFSET) +#define STM32L4_OTGFS_DOEPCTL5 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPCTL5_OFFSET) + +#define STM32L4_OTGFS_DOEPINT(n) (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPINT_OFFSET(n)) +#define STM32L4_OTGFS_DOEPINT0 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPINT0_OFFSET) +#define STM32L4_OTGFS_DOEPINT1 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPINT1_OFFSET) +#define STM32L4_OTGFS_DOEPINT2 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPINT2_OFFSET) +#define STM32L4_OTGFS_DOEPINT3 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPINT3_OFFSET) +#define STM32L4_OTGFS_DOEPINT4 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPINT4_OFFSET) +#define STM32L4_OTGFS_DOEPINT5 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPINT5_OFFSET) + +#define STM32L4_OTGFS_DOEPTSIZ(n) (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPTSIZ_OFFSET(n)) +#define STM32L4_OTGFS_DOEPTSIZ0 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPTSIZ0_OFFSET) +#define STM32L4_OTGFS_DOEPTSIZ1 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPTSIZ1_OFFSET) +#define STM32L4_OTGFS_DOEPTSIZ2 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPTSIZ2_OFFSET) +#define STM32L4_OTGFS_DOEPTSIZ3 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPTSIZ3_OFFSET) +#define STM32L4_OTGFS_DOEPTSIZ4 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPTSIZ4_OFFSET) +#define STM32L4_OTGFS_DOEPTSIZ5 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DOEPTSIZ5_OFFSET) /* Power and clock gating registers */ -#define STM32_OTGFS_PCGCCTL (STM32L4_OTGFS_BASE+STM32_OTGFS_PCGCCTL_OFFSET) +#define STM32L4_OTGFS_PCGCCTL (STM32L4_OTGFS_BASE+STM32L4_OTGFS_PCGCCTL_OFFSET) /* Data FIFO (DFIFO) access registers */ -#define STM32_OTGFS_DFIFO_DEP(n) (STM32L4_OTGFS_BASE+STM32_OTGFS_DFIFO_DEP_OFFSET(n)) -#define STM32_OTGFS_DFIFO_HCH(n) (STM32L4_OTGFS_BASE+STM32_OTGFS_DFIFO_HCH_OFFSET(n)) +#define STM32L4_OTGFS_DFIFO_DEP(n) (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DFIFO_DEP_OFFSET(n)) +#define STM32L4_OTGFS_DFIFO_HCH(n) (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DFIFO_HCH_OFFSET(n)) -#define STM32_OTGFS_DFIFO_DEP0 (STM32L4_OTGFS_BASE+STM32_OTGFS_DFIFO_DEP0_OFFSET) -#define STM32_OTGFS_DFIFO_HCH0 (STM32L4_OTGFS_BASE+STM32_OTGFS_DFIFO_HCH0_OFFSET) +#define STM32L4_OTGFS_DFIFO_DEP0 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DFIFO_DEP0_OFFSET) +#define STM32L4_OTGFS_DFIFO_HCH0 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DFIFO_HCH0_OFFSET) -#define STM32_OTGFS_DFIFO_DEP1 (STM32L4_OTGFS_BASE+STM32_OTGFS_DFIFO_DEP1_OFFSET) -#define STM32_OTGFS_DFIFO_HCH1 (STM32L4_OTGFS_BASE+STM32_OTGFS_DFIFO_HCH1_OFFSET) +#define STM32L4_OTGFS_DFIFO_DEP1 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DFIFO_DEP1_OFFSET) +#define STM32L4_OTGFS_DFIFO_HCH1 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DFIFO_HCH1_OFFSET) -#define STM32_OTGFS_DFIFO_DEP2 (STM32L4_OTGFS_BASE+STM32_OTGFS_DFIFO_DEP2_OFFSET) -#define STM32_OTGFS_DFIFO_HCH2 (STM32L4_OTGFS_BASE+STM32_OTGFS_DFIFO_HCH2_OFFSET) +#define STM32L4_OTGFS_DFIFO_DEP2 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DFIFO_DEP2_OFFSET) +#define STM32L4_OTGFS_DFIFO_HCH2 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DFIFO_HCH2_OFFSET) -#define STM32_OTGFS_DFIFO_DEP3 (STM32L4_OTGFS_BASE+STM32_OTGFS_DFIFO_DEP3_OFFSET) -#define STM32_OTGFS_DFIFO_HCH3 (STM32L4_OTGFS_BASE+STM32_OTGFS_DFIFO_HCH3_OFFSET) +#define STM32L4_OTGFS_DFIFO_DEP3 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DFIFO_DEP3_OFFSET) +#define STM32L4_OTGFS_DFIFO_HCH3 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DFIFO_HCH3_OFFSET) -#define STM32_OTGFS_DFIFO_DEP4 (STM32L4_OTGFS_BASE+STM32_OTGFS_DFIFO_DEP4_OFFSET) -#define STM32_OTGFS_DFIFO_HCH4 (STM32L4_OTGFS_BASE+STM32_OTGFS_DFIFO_HCH4_OFFSET) +#define STM32L4_OTGFS_DFIFO_DEP4 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DFIFO_DEP4_OFFSET) +#define STM32L4_OTGFS_DFIFO_HCH4 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DFIFO_HCH4_OFFSET) -#define STM32_OTGFS_DFIFO_DEP5 (STM32L4_OTGFS_BASE+STM32_OTGFS_DFIFO_DEP5_OFFSET) -#define STM32_OTGFS_DFIFO_HCH5 (STM32L4_OTGFS_BASE+STM32_OTGFS_DFIFO_HCH5_OFFSET) +#define STM32L4_OTGFS_DFIFO_DEP5 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DFIFO_DEP5_OFFSET) +#define STM32L4_OTGFS_DFIFO_HCH5 (STM32L4_OTGFS_BASE+STM32L4_OTGFS_DFIFO_HCH5_OFFSET) /* Register Bitfield Definitions ********************************************************************/ /* Core global control and status registers */ @@ -555,20 +555,20 @@ #define OTGFS_GINT_NPTXFE (1 << 5) /* Bit 5: Non-periodic TxFIFO empty */ #define OTGFS_GINT_GINAKEFF (1 << 6) /* Bit 6: Global IN non-periodic NAK effective */ #define OTGFS_GINT_GONAKEFF (1 << 7) /* Bit 7: Global OUT NAK effective */ - /* Bits 8-9: Reserved, must be kept at reset value */ +#define OTGFS_GINT_RES89 (3 << 8) /* Bits 8-9: Reserved, must be kept at reset value */ #define OTGFS_GINT_ESUSP (1 << 10) /* Bit 10: Early suspend */ #define OTGFS_GINT_USBSUSP (1 << 11) /* Bit 11: USB suspend */ #define OTGFS_GINT_USBRST (1 << 12) /* Bit 12: USB reset */ #define OTGFS_GINT_ENUMDNE (1 << 13) /* Bit 13: Enumeration done */ #define OTGFS_GINT_ISOODRP (1 << 14) /* Bit 14: Isochronous OUT packet dropped interrupt */ #define OTGFS_GINT_EOPF (1 << 15) /* Bit 15: End of periodic frame interrupt */ - /* Bits 16-17: Reserved, must be kept at reset value */ +#define OTGFS_GINT_RES1617 (3 << 16) /* Bits 16-17: Reserved, must be kept at reset value */ #define OTGFS_GINT_IEP (1 << 18) /* Bit 18: IN endpoint interrupt */ #define OTGFS_GINT_OEP (1 << 19) /* Bit 19: OUT endpoint interrupt */ #define OTGFS_GINT_IISOIXFR (1 << 20) /* Bit 20: Incomplete isochronous IN transfer */ #define OTGFS_GINT_IISOOXFR (1 << 21) /* Bit 21: Incomplete isochronous OUT transfer (device) */ #define OTGFS_GINT_IPXFR (1 << 21) /* Bit 21: Incomplete periodic transfer (host) */ - /* Bit 22: Reserved, must be kept at reset value */ +#define OTGFS_GINT_RES22 (1 << 22) /* Bit 22: Reserved, must be kept at reset value */ #define OTGFS_GINT_RSTDET (1 << 23) /* Bit 23: Reset detected interrupt */ #define OTGFS_GINT_HPRT (1 << 24) /* Bit 24: Host port interrupt */ #define OTGFS_GINT_HC (1 << 25) /* Bit 25: Host channels interrupt */ diff --git a/arch/arm/src/stm32l4/stm32l4_oneshot.h b/arch/arm/src/stm32l4/stm32l4_oneshot.h index 743652bf49ba31470992ad8e8a070e0070037f16..86800f6b352fb2f895c5f3e980e392c523e4b643 100644 --- a/arch/arm/src/stm32l4/stm32l4_oneshot.h +++ b/arch/arm/src/stm32l4/stm32l4_oneshot.h @@ -118,7 +118,7 @@ extern "C" ****************************************************************************/ int stm32l4_oneshot_initialize(struct stm32l4_oneshot_s *oneshot, int chan, - uint16_t resolution); + uint16_t resolution); /**************************************************************************** * Name: stm32l4_oneshot_max_delay @@ -128,7 +128,8 @@ int stm32l4_oneshot_initialize(struct stm32l4_oneshot_s *oneshot, int chan, * ****************************************************************************/ -int stm32l4_oneshot_max_delay(struct stm32l4_oneshot_s *oneshot, uint64_t *usec); +int stm32l4_oneshot_max_delay(struct stm32l4_oneshot_s *oneshot, + uint64_t *usec); /**************************************************************************** * Name: stm32l4_oneshot_start @@ -151,8 +152,8 @@ int stm32l4_oneshot_max_delay(struct stm32l4_oneshot_s *oneshot, uint64_t *usec) ****************************************************************************/ int stm32l4_oneshot_start(struct stm32l4_oneshot_s *oneshot, - oneshot_handler_t handler, void *arg, - const struct timespec *ts); + oneshot_handler_t handler, void *arg, + const struct timespec *ts); /**************************************************************************** * Name: stm32l4_oneshot_cancel @@ -179,7 +180,7 @@ int stm32l4_oneshot_start(struct stm32l4_oneshot_s *oneshot, ****************************************************************************/ int stm32l4_oneshot_cancel(struct stm32l4_oneshot_s *oneshot, - struct timespec *ts); + struct timespec *ts); #undef EXTERN #ifdef __cplusplus diff --git a/arch/arm/src/stm32l4/stm32l4_oneshot_lowerhalf.c b/arch/arm/src/stm32l4/stm32l4_oneshot_lowerhalf.c new file mode 100644 index 0000000000000000000000000000000000000000..8a73130dc7dea4accf475ebee82d4ec5fcd712a4 --- /dev/null +++ b/arch/arm/src/stm32l4/stm32l4_oneshot_lowerhalf.c @@ -0,0 +1,345 @@ +/**************************************************************************** + * arch/arm/src/stm32l4/stm32l4_oneshot_lowerhalf.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 + +#include "stm32l4_oneshot.h" + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* This structure describes the state of the oneshot timer lower-half driver */ + +struct stm32l4_oneshot_lowerhalf_s +{ + /* This is the part of the lower half driver that is visible to the upper- + * half client of the driver. This must be the first thing in this + * structure so that pointers to struct oneshot_lowerhalf_s are cast + * compatible to struct stm32l4_oneshot_lowerhalf_s and vice versa. + */ + + struct oneshot_lowerhalf_s lh; /* Common lower-half driver fields */ + + /* Private lower half data follows */ + + struct stm32l4_oneshot_s oneshot; /* STM32-specific oneshot state */ + oneshot_callback_t callback; /* internal handler that receives callback */ + FAR void *arg; /* Argument that is passed to the handler */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static void stm32l4_oneshot_handler(void *arg); + +static int stm32l4_max_delay(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts); +static int stm32l4_start(FAR struct oneshot_lowerhalf_s *lower, + oneshot_callback_t callback, FAR void *arg, + FAR const struct timespec *ts); +static int stm32l4_cancel(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* Lower half operations */ + +static const struct oneshot_operations_s g_oneshot_ops = +{ + .max_delay = stm32l4_max_delay, + .start = stm32l4_start, + .cancel = stm32l4_cancel, +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32l4_oneshot_handler + * + * Description: + * Timer expiration handler + * + * Input Parameters: + * arg - Should be the same argument provided when stm32l4_oneshot_start() + * was called. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void stm32l4_oneshot_handler(void *arg) +{ + FAR struct stm32l4_oneshot_lowerhalf_s *priv = + (FAR struct stm32l4_oneshot_lowerhalf_s *)arg; + oneshot_callback_t callback; + FAR void *cbarg; + + DEBUGASSERT(priv != NULL); + + /* Perhaps the callback was nullified in a race condition with + * stm32l4_cancel? + */ + + if (priv->callback) + { + /* Sample and nullify BEFORE executing callback (in case the callback + * restarts the oneshot). + */ + + callback = priv->callback; + cbarg = priv->arg; + priv->callback = NULL; + priv->arg = NULL; + + /* Then perform the callback */ + + callback(&priv->lh, cbarg); + } +} + +/**************************************************************************** + * Name: stm32l4_max_delay + * + * Description: + * Determine the maximum delay of the one-shot timer (in microseconds) + * + * Input Parameters: + * lower An instance of the lower-half oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * ts The location in which to return the maxumum delay. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +static int stm32l4_max_delay(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts) +{ + FAR struct stm32l4_oneshot_lowerhalf_s *priv = + (FAR struct stm32l4_oneshot_lowerhalf_s *)lower; + uint64_t usecs; + int ret; + + DEBUGASSERT(priv != NULL && ts != NULL); + ret = stm32l4_oneshot_max_delay(&priv->oneshot, &usecs); + if (ret >= 0) + { + uint64_t sec = usecs / 1000000; + usecs -= 1000000 * sec; + + ts->tv_sec = (time_t)sec; + ts->tv_nsec = (long)(usecs * 1000); + } + + return ret; +} + +/**************************************************************************** + * Name: stm32l4_start + * + * Description: + * Start the oneshot timer + * + * Input Parameters: + * lower An instance of the lower-half oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * handler The function to call when when the oneshot timer expires. + * arg An opaque argument that will accompany the callback. + * ts Provides the duration of the one shot timer. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +static int stm32l4_start(FAR struct oneshot_lowerhalf_s *lower, + oneshot_callback_t callback, FAR void *arg, + FAR const struct timespec *ts) +{ + FAR struct stm32l4_oneshot_lowerhalf_s *priv = + (FAR struct stm32l4_oneshot_lowerhalf_s *)lower; + irqstate_t flags; + int ret; + + DEBUGASSERT(priv != NULL && callback != NULL && ts != NULL); + + /* Save the callback information and start the timer */ + + flags = enter_critical_section(); + priv->callback = callback; + priv->arg = arg; + ret = stm32l4_oneshot_start(&priv->oneshot, + stm32l4_oneshot_handler, priv, ts); + leave_critical_section(flags); + + if (ret < 0) + { + tmrerr("ERROR: stm32l4_oneshot_start failed: %d\n", flags); + } + + return ret; +} + +/**************************************************************************** + * Name: stm32l4_cancel + * + * Description: + * Cancel the oneshot timer and return the time remaining on the timer. + * + * NOTE: This function may execute at a high rate with no timer running (as + * when pre-emption is enabled and disabled). + * + * Input Parameters: + * lower Caller allocated instance of the oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * ts The location in which to return the time remaining on the + * oneshot timer. A time of zero is returned if the timer is + * not running. + * + * Returned Value: + * Zero (OK) is returned on success. A call to up_timer_cancel() when + * the timer is not active should also return success; a negated errno + * value is returned on any failure. + * + ****************************************************************************/ + +static int stm32l4_cancel(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts) +{ + FAR struct stm32l4_oneshot_lowerhalf_s *priv = + (FAR struct stm32l4_oneshot_lowerhalf_s *)lower; + irqstate_t flags; + int ret; + + DEBUGASSERT(priv != NULL); + + /* Cancel the timer */ + + flags = enter_critical_section(); + ret = stm32l4_oneshot_cancel(&priv->oneshot, ts); + priv->callback = NULL; + priv->arg = NULL; + leave_critical_section(flags); + + if (ret < 0) + { + tmrerr("ERROR: stm32l4_oneshot_cancel failed: %d\n", flags); + } + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: oneshot_initialize + * + * Description: + * Initialize the oneshot timer and return a oneshot lower half driver + * instance. + * + * Input Parameters: + * chan Timer counter channel to be used. + * resolution The required resolution of the timer in units of + * microseconds. NOTE that the range is restricted to the + * range of uint16_t (excluding zero). + * + * Returned Value: + * On success, a non-NULL instance of the oneshot lower-half driver is + * returned. NULL is return on any failure. + * + ****************************************************************************/ + +FAR struct oneshot_lowerhalf_s *oneshot_initialize(int chan, + uint16_t resolution) +{ + FAR struct stm32l4_oneshot_lowerhalf_s *priv; + int ret; + + /* Allocate an instance of the lower half driver */ + + priv = (FAR struct stm32l4_oneshot_lowerhalf_s *) + kmm_zalloc(sizeof(struct stm32l4_oneshot_lowerhalf_s)); + + if (priv == NULL) + { + tmrerr("ERROR: Failed to initialized state structure\n"); + return NULL; + } + + /* Initialize the lower-half driver structure */ + + priv->lh.ops = &g_oneshot_ops; + + /* Initialize the contained STM32 oneshot timer */ + + ret = stm32l4_oneshot_initialize(&priv->oneshot, chan, resolution); + if (ret < 0) + { + tmrerr("ERROR: stm32l4_oneshot_initialize failed: %d\n", ret); + kmm_free(priv); + return NULL; + } + + return &priv->lh; +} diff --git a/arch/arm/src/stm32l4/stm32l4_otgfsdev.c b/arch/arm/src/stm32l4/stm32l4_otgfsdev.c index 2ade38444f64f4865831e8bf940f09695289bfc0..06bab127d359a98776a4c517d680498e7340ca28 100644 --- a/arch/arm/src/stm32l4/stm32l4_otgfsdev.c +++ b/arch/arm/src/stm32l4/stm32l4_otgfsdev.c @@ -225,6 +225,27 @@ # error "CONFIG_USBDEV_EP5_TXFIFO_SIZE is out of range" #endif +#define OTGFS_GINT_RESERVED (OTGFS_GINT_RES89 | \ + OTGFS_GINT_RES1617 | \ + OTGFS_GINT_RES22) + +#define OTGFS_GINT_RC_W1 (OTGFS_GINT_MMIS | \ + OTGFS_GINT_SOF | \ + OTGFS_GINT_ESUSP | \ + OTGFS_GINT_USBSUSP | \ + OTGFS_GINT_USBRST | \ + OTGFS_GINT_ENUMDNE | \ + OTGFS_GINT_ISOODRP | \ + OTGFS_GINT_EOPF | \ + OTGFS_GINT_IISOIXFR | \ + OTGFS_GINT_IISOOXFR | \ + OTGFS_GINT_RSTDET | \ + OTGFS_GINT_LPMINT | \ + OTGFS_GINT_CIDSCHG | \ + OTGFS_GINT_DISC | \ + OTGFS_GINT_SRQ | \ + OTGFS_GINT_WKUP) + /* Debug ***********************************************************************/ /* Trace error codes */ @@ -3221,154 +3242,163 @@ static inline void stm32l4_rxinterrupt(FAR struct stm32l4_usbdev_s *priv) /* Disable the Rx status queue level interrupt */ - regval = stm32l4_getreg(STM32L4_OTGFS_GINTMSK); - regval &= ~OTGFS_GINT_RXFLVL; - stm32l4_putreg(regval, STM32L4_OTGFS_GINTMSK); + while(0 != (stm32l4_getreg(STM32L4_OTGFS_GINTSTS) & OTGFS_GINT_RXFLVL)) + { - /* Get the status from the top of the FIFO */ + /* Get the status from the top of the FIFO */ - regval = stm32l4_getreg(STM32L4_OTGFS_GRXSTSP); + regval = stm32l4_getreg(STM32L4_OTGFS_GRXSTSP); - /* Decode status fields */ + /* Decode status fields */ - epphy = (regval & OTGFS_GRXSTSD_EPNUM_MASK) >> OTGFS_GRXSTSD_EPNUM_SHIFT; + epphy = (regval & OTGFS_GRXSTSD_EPNUM_MASK) >> OTGFS_GRXSTSD_EPNUM_SHIFT; - if (epphy < STM32L4_NENDPOINTS) - { - privep = &priv->epout[epphy]; + /* Workaround for bad values read from the STM32L4_OTGFS_GRXSTSP register + * happens regval is 0xb4e48168 or 0xa80c9367 or 267E781c + * All of which provide out of range indexes for epout[epphy] + */ - /* Handle the RX event according to the packet status field */ + if (epphy < STM32L4_NENDPOINTS) + { + privep = &priv->epout[epphy]; - switch (regval & OTGFS_GRXSTSD_PKTSTS_MASK) - { - /* Global OUT NAK. This indicate that the global OUT NAK bit has taken - * effect. - * - * PKTSTS = Global OUT NAK, BCNT = 0, EPNUM = Don't Care, DPID = Don't - * Care. - */ + /* Handle the RX event according to the packet status field */ - case OTGFS_GRXSTSD_PKTSTS_OUTNAK: + switch (regval & OTGFS_GRXSTSD_PKTSTS_MASK) { - usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_OUTNAK), 0); - } - break; + /* Global OUT NAK. This indicate that the global OUT NAK bit has taken + * effect. + * + * PKTSTS = Global OUT NAK, BCNT = 0, EPNUM = Don't Care, DPID = Don't + * Care. + */ - /* OUT data packet received. - * - * PKTSTS = DataOUT, BCNT = size of the received data OUT packet, - * EPNUM = EPNUM on which the packet was received, DPID = Actual Data PID. - */ + case OTGFS_GRXSTSD_PKTSTS_OUTNAK: + { + usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_OUTNAK), 0); + } + break; - case OTGFS_GRXSTSD_PKTSTS_OUTRECVD: - { - usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_OUTRECVD), epphy); - bcnt = (regval & OTGFS_GRXSTSD_BCNT_MASK) >> OTGFS_GRXSTSD_BCNT_SHIFT; - if (bcnt > 0) - { - stm32l4_epout_receive(privep, bcnt); - } - } - break; + /* OUT data packet received. + * + * PKTSTS = DataOUT, BCNT = size of the received data OUT packet, + * EPNUM = EPNUM on which the packet was received, DPID = Actual Data PID. + */ - /* OUT transfer completed. This indicates that an OUT data transfer for - * the specified OUT endpoint has completed. After this entry is popped - * from the receive FIFO, the core asserts a Transfer Completed interrupt - * on the specified OUT endpoint. - * - * PKTSTS = Data OUT Transfer Done, BCNT = 0, EPNUM = OUT EP Num on - * which the data transfer is complete, DPID = Don't Care. - */ + case OTGFS_GRXSTSD_PKTSTS_OUTRECVD: + { + usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_OUTRECVD), epphy); + bcnt = (regval & OTGFS_GRXSTSD_BCNT_MASK) >> OTGFS_GRXSTSD_BCNT_SHIFT; + if (bcnt > 0) + { + stm32l4_epout_receive(privep, bcnt); + } + } + break; - case OTGFS_GRXSTSD_PKTSTS_OUTDONE: - { - usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_OUTDONE), epphy); - } - break; + /* OUT transfer completed. This indicates that an OUT data transfer for + * the specified OUT endpoint has completed. After this entry is popped + * from the receive FIFO, the core asserts a Transfer Completed interrupt + * on the specified OUT endpoint. + * + * PKTSTS = Data OUT Transfer Done, BCNT = 0, EPNUM = OUT EP Num on + * which the data transfer is complete, DPID = Don't Care. + */ - /* SETUP transaction completed. This indicates that the Setup stage for - * the specified endpoint has completed and the Data stage has started. - * After this entry is popped from the receive FIFO, the core asserts a - * Setup interrupt on the specified control OUT endpoint (triggers an - * interrupt). - * - * PKTSTS = Setup Stage Done, BCNT = 0, EPNUM = Control EP Num, - * DPID = Don't Care. - */ + case OTGFS_GRXSTSD_PKTSTS_OUTDONE: + { + usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_OUTDONE), epphy); + } + break; - case OTGFS_GRXSTSD_PKTSTS_SETUPDONE: - { - usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_SETUPDONE), epphy); - } - break; + /* SETUP transaction completed. This indicates that the Setup stage for + * the specified endpoint has completed and the Data stage has started. + * After this entry is popped from the receive FIFO, the core asserts a + * Setup interrupt on the specified control OUT endpoint (triggers an + * interrupt). + * + * PKTSTS = Setup Stage Done, BCNT = 0, EPNUM = Control EP Num, + * DPID = Don't Care. + */ - /* SETUP data packet received. This indicates that a SETUP packet for the - * specified endpoint is now available for reading from the receive FIFO. - * - * PKTSTS = SETUP, BCNT = 8, EPNUM = Control EP Num, DPID = D0. - */ + case OTGFS_GRXSTSD_PKTSTS_SETUPDONE: + { + usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_SETUPDONE), epphy); - case OTGFS_GRXSTSD_PKTSTS_SETUPRECVD: - { - uint16_t datlen; + /* Now that the Setup Phase is complete if it was an OUT enable + * the endpoint + * (Doing this here prevents the loss of the first FIFO word) + */ + + if (priv->ep0state == EP0STATE_SETUP_OUT) + { - usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_SETUPRECVD), epphy); + /* Clear NAKSTS so that we can receive the data */ - /* Read EP0 setup data. NOTE: If multiple SETUP packets are received, - * the last one overwrites the previous setup packets and only that - * last SETUP packet will be processed. - */ + regval = stm32l4_getreg(STM32L4_OTGFS_DOEPCTL0); + regval |= OTGFS_DOEPCTL0_CNAK; + stm32l4_putreg(regval, STM32L4_OTGFS_DOEPCTL0); - stm32l4_rxfifo_read(&priv->epout[EP0], (FAR uint8_t *)&priv->ctrlreq, - USB_SIZEOF_CTRLREQ); + } + } + break; - /* Was this an IN or an OUT SETUP packet. If it is an OUT SETUP, - * then we need to wait for the completion of the data phase to - * process the setup command. If it is an IN SETUP packet, then - * we must processing the command BEFORE we enter the DATA phase. - * - * If the data associated with the OUT SETUP packet is zero length, - * then, of course, we don't need to wait. - */ + /* SETUP data packet received. This indicates that a SETUP packet for the + * specified endpoint is now available for reading from the receive FIFO. + * + * PKTSTS = SETUP, BCNT = 8, EPNUM = Control EP Num, DPID = D0. + */ - datlen = GETUINT16(priv->ctrlreq.len); - if (USB_REQ_ISOUT(priv->ctrlreq.type) && datlen > 0) - { - /* Clear NAKSTS so that we can receive the data */ + case OTGFS_GRXSTSD_PKTSTS_SETUPRECVD: + { + uint16_t datlen; - regval = stm32l4_getreg(STM32L4_OTGFS_DOEPCTL0); - regval |= OTGFS_DOEPCTL0_CNAK; - stm32l4_putreg(regval, STM32L4_OTGFS_DOEPCTL0); + usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_SETUPRECVD), epphy); - /* Wait for the data phase. */ + /* Read EP0 setup data. NOTE: If multiple SETUP packets are received, + * the last one overwrites the previous setup packets and only that + * last SETUP packet will be processed. + */ - priv->ep0state = EP0STATE_SETUP_OUT; - } - else - { - /* We can process the setup data as soon as SETUP done word is - * popped of the RxFIFO. - */ + stm32l4_rxfifo_read(&priv->epout[EP0], (FAR uint8_t *)&priv->ctrlreq, + USB_SIZEOF_CTRLREQ); - priv->ep0state = EP0STATE_SETUP_READY; - } - } - break; + /* Was this an IN or an OUT SETUP packet. If it is an OUT SETUP, + * then we need to wait for the completion of the data phase to + * process the setup command. If it is an IN SETUP packet, then + * we must processing the command BEFORE we enter the DATA phase. + * + * If the data associated with the OUT SETUP packet is zero length, + * then, of course, we don't need to wait. + */ - default: - { - usbtrace(TRACE_DEVERROR(STM32L4_TRACEERR_INVALIDPARMS), - (regval & OTGFS_GRXSTSD_PKTSTS_MASK) >> OTGFS_GRXSTSD_PKTSTS_SHIFT); - } - break; - } - } + datlen = GETUINT16(priv->ctrlreq.len); + if (USB_REQ_ISOUT(priv->ctrlreq.type) && datlen > 0) + { + /* Wait for the data phase. */ - /* Enable the Rx Status Queue Level interrupt */ + priv->ep0state = EP0STATE_SETUP_OUT; + } + else + { + /* We can process the setup data as soon as SETUP done word is + * popped of the RxFIFO. + */ - regval = stm32l4_getreg(STM32L4_OTGFS_GINTMSK); - regval |= OTGFS_GINT_RXFLVL; - stm32l4_putreg(regval, STM32L4_OTGFS_GINTMSK); + priv->ep0state = EP0STATE_SETUP_READY; + } + } + break; + + default: + { + usbtrace(TRACE_DEVERROR(STM32L4_TRACEERR_INVALIDPARMS), + (regval & OTGFS_GRXSTSD_PKTSTS_MASK) >> OTGFS_GRXSTSD_PKTSTS_SHIFT); + } + break; + } + } + } } /**************************************************************************** @@ -3391,7 +3421,7 @@ static inline void stm32l4_enuminterrupt(FAR struct stm32l4_usbdev_s *priv) regval = stm32l4_getreg(STM32L4_OTGFS_GUSBCFG); regval &= ~OTGFS_GUSBCFG_TRDT_MASK; - regval |= OTGFS_GUSBCFG_TRDT(5); + regval |= OTGFS_GUSBCFG_TRDT(6); stm32l4_putreg(regval, STM32L4_OTGFS_GUSBCFG); } @@ -3605,32 +3635,38 @@ static int stm32l4_usbinterrupt(int irq, FAR void *context) /* At present, there is only a single OTG FS device support. Hence it is * pre-allocated as g_otgfsdev. However, in most code, the private data * structure will be referenced using the 'priv' pointer (rather than the - * global data) in order to simplify any future support for multiple - * devices. + * global data) in order to simplify any future support for multiple devices. */ FAR struct stm32l4_usbdev_s *priv = &g_otgfsdev; uint32_t regval; + uint32_t reserved; usbtrace(TRACE_INTENTRY(STM32L4_TRACEINTID_USB), 0); /* Assure that we are in device mode */ - DEBUGASSERT((stm32l4_getreg(STM32L4_OTGFS_GINTSTS) & OTGFS_GINTSTS_CMOD) == - OTGFS_GINTSTS_DEVMODE); + DEBUGASSERT((stm32l4_getreg(STM32L4_OTGFS_GINTSTS) & OTGFS_GINTSTS_CMOD) == OTGFS_GINTSTS_DEVMODE); /* Get the state of all enabled interrupts. We will do this repeatedly * some interrupts (like RXFLVL) will generate additional interrupting * events. */ - for (; ; ) { /* Get the set of pending, un-masked interrupts */ regval = stm32l4_getreg(STM32L4_OTGFS_GINTSTS); + reserved = (regval & OTGFS_GINT_RESERVED); regval &= stm32l4_getreg(STM32L4_OTGFS_GINTMSK); + /* With out modifying the reserved bits, acknowledge all + * **Writable** pending irqs we will service below + */ + + stm32l4_putreg(((regval | reserved) & OTGFS_GINT_RC_W1), STM32L4_OTGFS_GINTSTS); + + /* Break out of the loop when there are no further pending (and * unmasked) interrupts to be processes. */ @@ -3639,7 +3675,6 @@ static int stm32l4_usbinterrupt(int irq, FAR void *context) { break; } - usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_INTPENDING), (uint16_t)regval); /* OUT endpoint interrupt. The core sets this bit to indicate that an @@ -3650,7 +3685,6 @@ static int stm32l4_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_EPOUT), (uint16_t)regval); stm32l4_epout_interrupt(priv); - stm32l4_putreg(OTGFS_GINT_OEP, STM32L4_OTGFS_GINTSTS); } /* IN endpoint interrupt. The core sets this bit to indicate that @@ -3661,7 +3695,6 @@ static int stm32l4_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_EPIN), (uint16_t)regval); stm32l4_epin_interrupt(priv); - stm32l4_putreg(OTGFS_GINT_IEP, STM32L4_OTGFS_GINTSTS); } /* Host/device mode mismatch error interrupt */ @@ -3670,7 +3703,6 @@ static int stm32l4_usbinterrupt(int irq, FAR void *context) if ((regval & OTGFS_GINT_MMIS) != 0) { usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_MISMATCH), (uint16_t)regval); - stm32l4_putreg(OTGFS_GINT_MMIS, STM32L4_OTGFS_GINTSTS); } #endif @@ -3680,7 +3712,6 @@ static int stm32l4_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_WAKEUP), (uint16_t)regval); stm32l4_resumeinterrupt(priv); - stm32l4_putreg(OTGFS_GINT_WKUP, STM32L4_OTGFS_GINTSTS); } /* USB suspend interrupt */ @@ -3689,7 +3720,6 @@ static int stm32l4_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_SUSPEND), (uint16_t)regval); stm32l4_suspendinterrupt(priv); - stm32l4_putreg(OTGFS_GINT_USBSUSP, STM32L4_OTGFS_GINTSTS); } /* Start of frame interrupt */ @@ -3698,7 +3728,6 @@ static int stm32l4_usbinterrupt(int irq, FAR void *context) if ((regval & OTGFS_GINT_SOF) != 0) { usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_SOF), (uint16_t)regval); - stm32l4_putreg(OTGFS_GINT_SOF, STM32L4_OTGFS_GINTSTS); } #endif @@ -3710,12 +3739,11 @@ static int stm32l4_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_RXFIFO), (uint16_t)regval); stm32l4_rxinterrupt(priv); - stm32l4_putreg(OTGFS_GINT_RXFLVL, STM32L4_OTGFS_GINTSTS); } /* USB reset interrupt */ - if ((regval & OTGFS_GINT_USBRST) != 0) + if ((regval & (OTGFS_GINT_USBRST | OTGFS_GINT_RSTDET)) != 0) { usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_DEVRESET), (uint16_t)regval); @@ -3723,7 +3751,6 @@ static int stm32l4_usbinterrupt(int irq, FAR void *context) stm32l4_usbreset(priv); usbtrace(TRACE_INTEXIT(STM32L4_TRACEINTID_USB), 0); - stm32l4_putreg(OTGFS_GINT_USBRST, STM32L4_OTGFS_GINTSTS); return OK; } @@ -3733,7 +3760,6 @@ static int stm32l4_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_ENUMDNE), (uint16_t)regval); stm32l4_enuminterrupt(priv); - stm32l4_putreg(OTGFS_GINT_ENUMDNE, STM32L4_OTGFS_GINTSTS); } /* Incomplete isochronous IN transfer interrupt. When the core finds @@ -3747,7 +3773,6 @@ static int stm32l4_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_IISOIXFR), (uint16_t)regval); stm32l4_isocininterrupt(priv); - stm32l4_putreg(OTGFS_GINT_IISOIXFR, STM32L4_OTGFS_GINTSTS); } /* Incomplete isochronous OUT transfer. For isochronous OUT @@ -3764,7 +3789,6 @@ static int stm32l4_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_IISOOXFR), (uint16_t)regval); stm32l4_isocoutinterrupt(priv); - stm32l4_putreg(OTGFS_GINT_IISOOXFR, STM32L4_OTGFS_GINTSTS); } #endif @@ -3775,7 +3799,6 @@ static int stm32l4_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_SRQ), (uint16_t)regval); stm32l4_sessioninterrupt(priv); - stm32l4_putreg(OTGFS_GINT_SRQ, STM32L4_OTGFS_GINTSTS); } /* OTG interrupt */ @@ -3784,7 +3807,6 @@ static int stm32l4_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(STM32L4_TRACEINTID_OTG), (uint16_t)regval); stm32l4_otginterrupt(priv); - stm32l4_putreg(OTGFS_GINT_OTG, STM32L4_OTGFS_GINTSTS); } #endif } @@ -5458,7 +5480,9 @@ static void stm32l4_hwinitialize(FAR struct stm32l4_usbdev_s *priv) /* Clear any pending interrupts */ - stm32l4_putreg(0xbfffffff, STM32L4_OTGFS_GINTSTS); + regval = stm32l4_getreg(STM32L4_OTGFS_GINTSTS); + regval &= OTGFS_GINT_RESERVED; + stm32l4_putreg(regval | OTGFS_GINT_RC_W1, STM32L4_OTGFS_GINTSTS); /* Enable the interrupts in the INTMSK */ diff --git a/arch/arm/src/stm32l4/stm32l4_spi.c b/arch/arm/src/stm32l4/stm32l4_spi.c index 3d64d812729aa51b82b8038803c01508114e64b9..bc61ed744601e08c6268858c80d9dabb867ef7fd 100644 --- a/arch/arm/src/stm32l4/stm32l4_spi.c +++ b/arch/arm/src/stm32l4/stm32l4_spi.c @@ -163,7 +163,7 @@ struct stm32l4_spidev_s 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 (8 or 16) */ + uint8_t nbits; /* Width of word in bits (4 through 16) */ uint8_t mode; /* Mode 0,1,2,3 */ }; @@ -203,6 +203,10 @@ 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); +#ifdef CONFIG_SPI_HWFEATURES +static int spi_hwfeatures(FAR struct spi_dev_s *dev, + spi_hwfeatures_t features); +#endif 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); @@ -230,7 +234,7 @@ static const struct spi_ops_s g_spi1ops = .setmode = spi_setmode, .setbits = spi_setbits, #ifdef CONFIG_SPI_HWFEATURES - .hwfeatures = 0, /* Not supported */ + .hwfeatures = spi_hwfeatures, #endif .status = stm32l4_spi1status, #ifdef CONFIG_SPI_CMDDATA @@ -274,6 +278,9 @@ static const struct spi_ops_s g_spi2ops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = spi_hwfeatures, +#endif .status = stm32l4_spi2status, #ifdef CONFIG_SPI_CMDDATA .cmddata = stm32l4_spi2cmddata, @@ -315,6 +322,9 @@ static const struct spi_ops_s g_spi3ops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = spi_hwfeatures, +#endif .status = stm32l4_spi3status, #ifdef CONFIG_SPI_CMDDATA .cmddata = stm32l4_spi3cmddata, @@ -348,12 +358,6 @@ static struct stm32l4_spidev_s g_spi3dev = }; #endif -/*endif?*/ - -/************************************************************************************ - * Public Data - ************************************************************************************/ - /************************************************************************************ * Private Functions ************************************************************************************/ @@ -557,22 +561,7 @@ static inline void spi_writebyte(FAR struct stm32l4_spidev_s *priv, uint8_t byte static inline bool spi_16bitmode(FAR struct stm32l4_spidev_s *priv) { - uint8_t bits = priv->nbits; - - /* Get the real number of bits */ - - if (bits < 0) - { - bits = -bits; - } - - return (bits > 8); - - /* Should we read the hardware regs? seems to be equivalent ~~ sebastien lorquet - * (20160413) - */ - -// return ((spi_getreg(priv, STM32L4_SPI_CR2_OFFSET) & SPI_CR2_DS_MASK) == SPI_CR2_DS_16BIT); + return (priv->nbits > 8); } /************************************************************************************ @@ -845,7 +834,8 @@ static inline void spi_dmatxstart(FAR struct stm32l4_spidev_s *priv) * ************************************************************************************/ -static void spi_modifycr(uint32_t addr, FAR struct stm32l4_spidev_s *priv, uint16_t setbits, uint16_t clrbits) +static void spi_modifycr(uint32_t addr, FAR struct stm32l4_spidev_s *priv, + uint16_t setbits, uint16_t clrbits) { uint16_t cr; @@ -1092,8 +1082,8 @@ 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) { FAR struct stm32l4_spidev_s *priv = (FAR struct stm32l4_spidev_s *)dev; - uint16_t setbits1, setbits2; - uint16_t clrbits1, clrbits2; + uint16_t setbits; + uint16_t clrbits; int savbits = nbits; spiinfo("nbits=%d\n", nbits); @@ -1102,30 +1092,17 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) if (nbits != priv->nbits) { - /* Yes... Set CR1/2 appropriately */ - /* Negative sign means LSBFIRST, set this in CR1*/ - - if (nbits < 0) - { - setbits1 = SPI_CR1_LSBFIRST; - clrbits1 = 0; - nbits = -nbits; - } - else - { - setbits1 = 0; - clrbits1 = SPI_CR1_LSBFIRST; - } - + /* Yes... Set CR2 appropriately */ /* Set the number of bits (valid range 4-16) */ if (nbits < 4 || nbits > 16) { + spierr("ERROR: nbits out of range: %d\n", nbits); return; } - clrbits2 = SPI_CR2_DS_MASK; - setbits2 = SPI_CR2_DS_VAL(nbits); + clrbits = SPI_CR2_DS_MASK; + setbits = 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). @@ -1133,16 +1110,15 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) if (nbits < 9) { - setbits2 |= SPI_CR2_FRXTH; /* RX FIFO Threshold = 1 byte */ + setbits |= SPI_CR2_FRXTH; /* RX FIFO Threshold = 1 byte */ } else { - clrbits2 |= SPI_CR2_FRXTH; /* RX FIFO Threshold = 2 bytes */ + clrbits |= SPI_CR2_FRXTH; /* RX FIFO Threshold = 2 bytes */ } spi_modifycr(STM32L4_SPI_CR1_OFFSET, priv, 0, SPI_CR1_SPE); - spi_modifycr(STM32L4_SPI_CR1_OFFSET, priv, setbits1, clrbits1); - spi_modifycr(STM32L4_SPI_CR2_OFFSET, priv, setbits2, clrbits2); + spi_modifycr(STM32L4_SPI_CR2_OFFSET, priv, setbits, clrbits); spi_modifycr(STM32L4_SPI_CR1_OFFSET, priv, SPI_CR1_SPE, 0); /* Save the selection so the subsequence re-configurations will be faster */ @@ -1151,6 +1127,58 @@ static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) } } +/**************************************************************************** + * Name: spi_hwfeatures + * + * Description: + * Set hardware-specific feature flags. + * + * Input Parameters: + * dev - Device-specific state data + * features - H/W feature flags + * + * Returned Value: + * Zero (OK) if the selected H/W features are enabled; A negated errno + * value if any H/W feature is not supportable. + * + ****************************************************************************/ + +#ifdef CONFIG_SPI_HWFEATURES +static int spi_hwfeatures(FAR struct spi_dev_s *dev, spi_hwfeatures_t features) +{ +#ifdef CONFIG_SPI_BITORDER + FAR struct stm32l4_spidev_s *priv = (FAR struct stm32l4_spidev_s *)dev; + uint16_t setbits; + uint16_t clrbits; + + spiinfo("features=%08x\n", features); + + /* Transfer data LSB first? */ + + if ((features & HWFEAT_LSBFIRST) != 0) + { + setbits = SPI_CR1_LSBFIRST; + clrbits = 0; + } + else + { + setbits = 0; + clrbits = SPI_CR1_LSBFIRST; + } + + spi_modifycr(STM32L4_SPI_CR1_OFFSET, priv, 0, SPI_CR1_SPE); + spi_modifycr(STM32L4_SPI_CR1_OFFSET, priv, setbits, clrbits); + spi_modifycr(STM32L4_SPI_CR1_OFFSET, priv, SPI_CR1_SPE, 0); + + /* Other H/W features are not supported */ + + return ((features & ~HWFEAT_LSBFIRST) == 0) ? OK : -ENOSYS; +#else + return -ENOSYS; +#endif +} +#endif + /************************************************************************************ * Name: spi_send * @@ -1501,7 +1529,7 @@ static void spi_bus_initialize(FAR struct stm32l4_spidev_s *priv) priv->txdma = stm32l4_dmachannel(priv->txch); DEBUGASSERT(priv->rxdma && priv->txdma); - spi_putreg(priv, STM32L4_SPI_CR2_OFFSET, SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN); + spi_modifycr(STM32L4_SPI_CR2_OFFSET, priv, SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN, 0); #endif /* Enable spi */ @@ -1606,7 +1634,7 @@ FAR struct spi_dev_s *stm32l4_spibus_initialize(int bus) else #endif { - spierr("ERROR: Unsupbused SPI bus: %d\n", bus); + spierr("ERROR: Unsupported SPI bus: %d\n", bus); return NULL; } diff --git a/arch/arm/src/tiva/Make.defs b/arch/arm/src/tiva/Make.defs index 0ba34f6751ab221e1d0d68054c7caaeff740b436..f3eb92fadcef431ebc532694df7f70a9506a8b03 100644 --- a/arch/arm/src/tiva/Make.defs +++ b/arch/arm/src/tiva/Make.defs @@ -101,6 +101,10 @@ ifeq ($(CONFIG_TIVA_I2C),y) CHIP_CSRCS += tiva_i2c.c endif +ifeq ($(CONFIG_TIVA_PWM),y) +CHIP_CSRCS += tiva_pwm.c +endif + ifeq ($(CONFIG_TIVA_TIMER),y) CHIP_CSRCS += tiva_timerlib.c ifeq ($(CONFIG_TIVA_TIMER32_PERIODIC),y) diff --git a/arch/arm/src/tiva/chip/tiva_pwm.h b/arch/arm/src/tiva/chip/tiva_pwm.h new file mode 100644 index 0000000000000000000000000000000000000000..f0af47a66965b78d25ac266a474a265b3f0bf33d --- /dev/null +++ b/arch/arm/src/tiva/chip/tiva_pwm.h @@ -0,0 +1,112 @@ +/************************************************************************************ + * arch/arm/src/tiva/chip/tiva_pwm.h + * + * Copyright (C) 2016 Young Mu. All rights reserved. + * Author: Young Mu + * + * 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_TIVA_CHIP_TIVA_PWM_H +#define __ARCH_ARM_SRC_TIVA_CHIP_TIVA_PWM_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +#define TIVA_PWM_CTL_OFFSET (0x0) /* PWM Master Control */ +#define TIVA_PWM_SYNC_OFFSET (0x4) /* PWM Time Base Sync */ +#define TIVA_PWM_ENABLE_OFFSET (0x8) /* PWM Output Enable */ +#define TIVA_PWM_INVERT_OFFSET (0xc) /* PWM Output Inversion */ +#define TIVA_PWM_FAULT_OFFSET (0x10) /* PWM Output Fault */ +#define TIVA_PWM_INTEN_OFFSET (0x14) /* PWM Interrupt Enable */ +#define TIVA_PWM_RIS_OFFSET (0x18) /* PWM Raw Interrupt Status */ +#define TIVA_PWM_ISC_OFFSET (0x1c) /* PWM Interrupt Status and Clear */ +#define TIVA_PWM_STATUS_OFFSET (0x20) /* PWM Status */ +#define TIVA_PWM_FAULTVAL_OFFSET (0x24) /* PWM Fault Condition Value */ +#define TIVA_PWM_ENUPD_OFFSET (0x28) /* PWM Enable Update */ + +#define TIVA_PWMn_BASE (0x40) /* PWMn Base */ +#define TIVA_PWMn_INTERVAL (0x40) /* PWMn Interval */ + +#define TIVA_PWMn_CTL_OFFSET (0x0) /* PWMn Control */ +#define TIVA_PWMn_INTEN_OFFSET (0x4) /* PWMn Interrupt and Trigger Enable */ +#define TIVA_PWMn_RIS_OFFSET (0x8) /* PWMn Raw Interrupt Status */ +#define TIVA_PWMn_ISC_OFFSET (0xc) /* PWMn Interrupt Status and Clear */ +#define TIVA_PWMn_LOAD_OFFSET (0x10) /* PWMn Load */ +#define TIVA_PWMn_COUNT_OFFSET (0x14) /* PWMn Counter */ +#define TIVA_PWMn_CMPA_OFFSET (0x18) /* PWMn Compare A */ +#define TIVA_PWMn_CMPB_OFFSET (0x1c) /* PWMn Compare B */ +#define TIVA_PWMn_GENA_OFFSET (0x20) /* PWMn Generator A Control */ +#define TIVA_PWMn_GENB_OFFSET (0x24) /* PWMn Generator B Control */ +#define TIVA_PWMn_DBCTL_OFFSET (0x28) /* PWMn Dead-Band Control */ +#define TIVA_PWMn_DBRISE_OFFSET (0x2c) /* PWMn Dead-Band Rising-Edge-Delay */ +#define TIVA_PWMn_DBFALL_OFFSET (0x30) /* PWMn Dead-Band Falling-Edge-Delay */ +#define TIVA_PWMn_FLTSRC0_OFFSET (0x34) /* PWMn Fault Source 0 */ +#define TIVA_PWMn_FLTSRC1_OFFSET (0x38) /* PWMn Fault Source 1 */ +#define TIVA_PWMn_MINFLTPER_OFFSET (0x3c) /* PWMn Minimum Fault Period */ + +#define TIVA_PWMn_FAULT_BASE (0x800) /* PWMn Fault Base */ +#define TIVA_PWMn_FAULT_INTERVAL (0x80) /* PWMn Fault Interval */ + +#define TIVA_PWMn_FAULT_SEN_OFFSET (0x0) /* PWMn Fault Pin Logic Sense */ +#define TIVA_PWMn_FAULT_STAT0_OFFSET (0x4) /* PWMn Fault Status 0 */ +#define TIVA_PWMn_FAULT_STAT1_OFFSET (0x8) /* PWMn Fault Status 1 */ + +#define TIVA_PWM_PP (0xfc0) /* PWM Peripheral Properties */ +#define TIVA_PWM_CC (0xfc8) /* PWM Clock Configuration */ + +#define TIVA_PWMn_GENx_ACTCMPBD (10) /* (Bit) Action for Comparator B Down */ +#define TIVA_PWMn_GENx_ACTCMPBU (8) /* (Bit) Action for Comparator B Up */ +#define TIVA_PWMn_GENx_ACTCMPAD (6) /* (Bit) Action for Comparator A Down */ +#define TIVA_PWMn_GENx_ACTCMPAU (4) /* (Bit) Action for Comparator A Up */ +#define TIVA_PWMn_GENx_ACTLOAD (2) /* (Bit) Action for Counter equals LOAD */ +#define TIVA_PWMn_GENx_ACTZERO (0) /* (Bit) Action for Counter equals ZERO */ +#define GENx_INVERT (0x1) /* (Value) Invert */ +#define GENx_LOW (0x2) /* (Value) Drive Low */ +#define GENx_HIGH (0x3) /* (Value) Drive High */ + +#define TIVA_PWM_CC_USEPWM (8) /* (Bit) Use PWM Clock Divisor */ +#define TIVA_PWM_CC_PWMDIV (0) /* (Bit) PWM Clock Divider */ +#define CC_USEPWM (0x1) /* (Value) Use PWM divider as clock source */ +#define CC_PWMDIV_2 (0x0) /* (Value) Divided by 2 */ +#define CC_PWMDIV_4 (0x1) /* (Value) Divided by 4 */ +#define CC_PWMDIV_8 (0x2) /* (Value) Divided by 8 */ +#define CC_PWMDIV_16 (0x3) /* (Value) Divided by 16 */ +#define CC_PWMDIV_32 (0x4) /* (Value) Divided by 32 */ +#define CC_PWMDIV_64 (0x5) /* (Value) Divided by 64 */ + +#define TIVA_PWMn_CTL_ENABLE (0) /* (Bit) PWM Block Enable */ +#define CTL_ENABLE (1) /* (Value) Enable */ + +#endif /* __ARCH_ARM_SRC_TIVA_CHIP_TIVA_PWM_H */ diff --git a/arch/arm/src/tiva/chip/tm4c129_syscontrol.h b/arch/arm/src/tiva/chip/tm4c129_syscontrol.h index 928be38e95adaec1f6447b1c172098ca25060e9b..9578313b86be63642f19726aa9c28bd85f7363fc 100644 --- a/arch/arm/src/tiva/chip/tm4c129_syscontrol.h +++ b/arch/arm/src/tiva/chip/tm4c129_syscontrol.h @@ -1895,7 +1895,9 @@ /* PWM Power Control */ -#define SYSCON_PCPWM_P0 (1 << 0) /* Bit 0: PWM Module 0 Power Control */ +#define SYSCON_PCPWM(n) (1 << (n)) /* Bit n: PWM module n Power Control */ +# define SYSCON_PCPWM_P0 (1 << 0) /* Bit 0: PWM Module 0 Power Control */ +# define SYSCON_PCPWM_P1 (1 << 1) /* Bit 1: PWM Module 1 Power Control */ /* QE Interface Power Control */ diff --git a/arch/arm/src/tiva/tiva_pwm.c b/arch/arm/src/tiva/tiva_pwm.c new file mode 100644 index 0000000000000000000000000000000000000000..b5032aeb21dfb73c8130edcdd60ff6a8f5b1e3f8 --- /dev/null +++ b/arch/arm/src/tiva/tiva_pwm.c @@ -0,0 +1,577 @@ +/************************************************************************************ + * arch/arm/src/tiva/tiva_pwm.c + * + * Copyright (C) 2016 Young Mu. All rights reserved. + * Author: Young Mu + * + * The basic structure of this driver derives in spirit (if nothing more) from the + * NuttX SAM PWM driver which has: + * + * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include +#include + +#include + +#include "up_arch.h" +#include "tiva_gpio.h" +#include "tiva_pwm.h" +#include "tiva_enablepwr.h" +#include "tiva_enableclks.h" + +#include "chip/tiva_pwm.h" +#include "chip/tiva_pinmap.h" +#include "chip/tm4c_memorymap.h" + +/************************************************************************************ + * Private Types + ************************************************************************************/ + +uint32_t g_pwm_pinset[] = +{ + GPIO_M0_PWM0, + GPIO_M0_PWM1, + GPIO_M0_PWM2, + GPIO_M0_PWM3, + GPIO_M0_PWM4, + GPIO_M0_PWM5, + GPIO_M0_PWM6, + GPIO_M0_PWM7, +}; + +struct tiva_pwm_chan_s +{ + const struct pwm_ops_s *ops; + uint8_t controller_id; + uintptr_t controller_base; + uint8_t generator_id; + uintptr_t generator_base; + uint8_t channel_id; +}; + +/************************************************************************************ + * Private Function Prototypes + ************************************************************************************/ + +static inline void tiva_pwm_putreg(struct tiva_pwm_chan_s *chan, + unsigned int offset, uint32_t regval); +static inline uint32_t tiva_pwm_getreg(struct tiva_pwm_chan_s *chan, + unsigned int offset); + +static int tiva_pwm_setup(FAR struct pwm_lowerhalf_s *dev); +static int tiva_pwm_shutdown(FAR struct pwm_lowerhalf_s *dev); +static int tiva_pwm_start(FAR struct pwm_lowerhalf_s *dev, + FAR const struct pwm_info_s *info); +static int tiva_pwm_stop(FAR struct pwm_lowerhalf_s *dev); +static int tiva_pwm_ioctl(FAR struct pwm_lowerhalf_s *dev, + int cmd, unsigned long arg); + +/************************************************************************************ + * Private Data + ************************************************************************************/ + +static uint32_t g_pwm_freq = 15000000; +static uint32_t g_pwm_counter = (1 << 16); + +static const struct pwm_ops_s g_pwm_ops = +{ + .setup = tiva_pwm_setup, + .shutdown = tiva_pwm_shutdown, + .start = tiva_pwm_start, + .stop = tiva_pwm_stop, + .ioctl = tiva_pwm_ioctl, +}; + +#ifdef CONFIG_TIVA_PWM0_CHAN0 +static struct tiva_pwm_chan_s g_pwm_chan0 = +{ + .ops = &g_pwm_ops, + .controller_id = 0, + .controller_base = TIVA_PWM0_BASE, + .generator_id = 0, + .generator_base = TIVA_PWM0_BASE + TIVA_PWMn_BASE + TIVA_PWMn_INTERVAL * 0, + .channel_id = 0, +}; +#endif + +#ifdef CONFIG_TIVA_PWM0_CHAN1 +static struct tiva_pwm_chan_s g_pwm_chan1 = +{ + .ops = &g_pwm_ops, + .controller_id = 0, + .controller_base = TIVA_PWM0_BASE, + .generator_id = 0, + .generator_base = TIVA_PWM0_BASE + TIVA_PWMn_BASE + TIVA_PWMn_INTERVAL * 0, + .channel_id = 1, +}; +#endif + +#ifdef CONFIG_TIVA_PWM0_CHAN2 +static struct tiva_pwm_chan_s g_pwm_chan2 = +{ + .ops = &g_pwm_ops, + .controller_id = 0, + .controller_base = TIVA_PWM0_BASE, + .generator_id = 1, + .generator_base = TIVA_PWM0_BASE + TIVA_PWMn_BASE + TIVA_PWMn_INTERVAL * 1, + .channel_id = 2, +}; +#endif + +#ifdef CONFIG_TIVA_PWM0_CHAN3 +static struct tiva_pwm_chan_s g_pwm_chan3 = +{ + .ops = &g_pwm_ops, + .controller_id = 0, + .controller_base = TIVA_PWM0_BASE, + .generator_id = 1, + .generator_base = TIVA_PWM0_BASE + TIVA_PWMn_BASE + TIVA_PWMn_INTERVAL * 1, + .channel_id = 3, +}; +#endif + +#ifdef CONFIG_TIVA_PWM0_CHAN4 +static struct tiva_pwm_chan_s g_pwm_chan4 = +{ + .ops = &g_pwm_ops, + .controller_id = 0, + .controller_base = TIVA_PWM0_BASE, + .generator_id = 2, + .generator_base = TIVA_PWM0_BASE + TIVA_PWMn_BASE + TIVA_PWMn_INTERVAL * 2, + .channel_id = 4, +}; +#endif + +#ifdef CONFIG_TIVA_PWM0_CHAN5 +static struct tiva_pwm_chan_s g_pwm_chan5 = +{ + .ops = &g_pwm_ops, + .controller_id = 0, + .controller_base = TIVA_PWM0_BASE, + .generator_id = 2, + .generator_base = TIVA_PWM0_BASE + TIVA_PWMn_BASE + TIVA_PWMn_INTERVAL * 2, + .channel_id = 5, +}; +#endif + +#ifdef CONFIG_TIVA_PWM0_CHAN6 +static struct tiva_pwm_chan_s g_pwm_chan6 = +{ + .ops = &g_pwm_ops, + .controller_id = 0, + .controller_base = TIVA_PWM0_BASE, + .generator_id = 3, + .generator_base = TIVA_PWM0_BASE + TIVA_PWMn_BASE + TIVA_PWMn_INTERVAL * 3, + .channel_id = 6, +}; +#endif + +#ifdef CONFIG_TIVA_PWM0_CHAN7 +static struct tiva_pwm_chan_s g_pwm_chan7 = +{ + .ops = &g_pwm_ops, + .controller_id = 0, + .controller_base = TIVA_PWM0_BASE, + .generator_id = 3, + .generator_base = TIVA_PWM0_BASE + TIVA_PWMn_BASE + TIVA_PWMn_INTERVAL * 3, + .channel_id = 7, +}; +#endif + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: tiva_pwm_getreg + * + * Description: + * Get a 32-bit register value by offset + * + ************************************************************************************/ + +static inline uint32_t tiva_pwm_getreg(struct tiva_pwm_chan_s *chan, + unsigned int offset) +{ + uintptr_t regaddr = chan->generator_base + offset; + return getreg32(regaddr); +} + +/************************************************************************************ + * Name: tiva_pwm_putreg + * + * Description: + * Put a 32-bit register value by offset + * + ************************************************************************************/ + +static inline void tiva_pwm_putreg(struct tiva_pwm_chan_s *chan, + unsigned int offset, uint32_t regval) +{ + uintptr_t regaddr = chan->generator_base + offset; + putreg32(regval, regaddr); +} + +/**************************************************************************** + * Name: pwm_setup + * + * Description: + * This method is called when the driver is opened. The lower half driver + * will be configured and initialized the device so that it is ready for + * use. It will 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 + * + ****************************************************************************/ + +static int tiva_pwm_setup(FAR struct pwm_lowerhalf_s *dev) +{ + FAR struct tiva_pwm_chan_s *chan = (FAR struct tiva_pwm_chan_s *)dev; + pwminfo("setup PWM for channel %d\n", chan->channel_id); + + /* Enable GPIO port, GPIO pin type and GPIO alternate function (refer to + * TM4C1294NC 23.4.2-4) + */ + + int ret = tiva_configgpio(g_pwm_pinset[chan->channel_id]); + if (ret < 0) + { + pwmerr("ERROR: tiva_configgpio failed (%x)\n", + g_pwm_pinset[chan->channel_id]); + return ret; + } + + 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 tiva_pwm_shutdown(FAR struct pwm_lowerhalf_s *dev) +{ + FAR struct tiva_pwm_chan_s *chan = (FAR struct tiva_pwm_chan_s *)dev; + pwminfo("shutdown PWM for channel %d\n", chan->channel_id); + + /* Remove unused-variable warning */ + + (void)chan; + + /* Ensure the PWM channel has been stopped */ + + tiva_pwm_stop(dev); + + 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 tiva_pwm_start(FAR struct pwm_lowerhalf_s *dev, + FAR const struct pwm_info_s *info) +{ + FAR struct tiva_pwm_chan_s *chan = (FAR struct tiva_pwm_chan_s *)dev; + pwminfo("start PWM for channel %d\n", chan->channel_id); + + uint16_t duty = info->duty; + uint32_t frequency = info->frequency; + + /* Configure PWM countdown mode (refer to TM4C1294NC 23.4.6) */ + + tiva_pwm_putreg(chan, TIVA_PWMn_CTL_OFFSET, 0); + if (chan->channel_id % 2 == 0) + { + tiva_pwm_putreg(chan, TIVA_PWMn_GENA_OFFSET, + GENx_LOW << TIVA_PWMn_GENx_ACTCMPAD | GENx_HIGH << TIVA_PWMn_GENx_ACTLOAD); + } + else + { + tiva_pwm_putreg(chan, TIVA_PWMn_GENB_OFFSET, + GENx_LOW << TIVA_PWMn_GENx_ACTCMPBD | GENx_HIGH << TIVA_PWMn_GENx_ACTLOAD); + } + + /* Set the PWM period (refer to TM4C1294NC 23.4.7) */ + + uint32_t pwm_min_freq = (uint32_t)(g_pwm_freq / g_pwm_counter) + 1; + uint32_t pwm_max_freq = g_pwm_freq; + uint32_t load = (uint32_t)(g_pwm_freq / frequency); + + pwminfo("channel %d: load = %u (%08x)\n", chan->channel_id, load, load); + + if (load >= g_pwm_counter || load < 1) + { + pwmerr("ERROR: frequency should be in [%d, %d] Hz\n", + pwm_min_freq, pwm_max_freq); + return -ERANGE; + } + + tiva_pwm_putreg(chan, TIVA_PWMn_LOAD_OFFSET, load - 1); + + /* Configure PWM duty (refer to TM4C1294NC 23.4.8-9) + * + * Workaround: + * When comp equals to load, the signal is never pulled down, + * so let comp equals to (comp-1) + */ + + uint32_t comp = (uint32_t)((1 - (float)duty / g_pwm_counter) * load); + comp = (duty == 0) ? (comp - 1) : (comp); + pwminfo("channel %d: comp = %u (%08x)\n", chan->channel_id, comp, comp); + + if (chan->channel_id % 2 == 0) + { + tiva_pwm_putreg(chan, TIVA_PWMn_CMPA_OFFSET, comp - 1); + } + else + { + tiva_pwm_putreg(chan, TIVA_PWMn_CMPB_OFFSET, comp - 1); + } + + /* Enable the PWM generator (refer to TM4C1294NC 23.4.10) */ + + tiva_pwm_putreg(chan, TIVA_PWMn_CTL_OFFSET, CTL_ENABLE << TIVA_PWMn_CTL_ENABLE); + + /* Enable PWM channel (refer to TM4C1294NC 23.4.11) */ + + uint32_t enable = getreg32(chan->controller_base + TIVA_PWM_ENABLE_OFFSET); + enable |= (1 << chan->channel_id); + putreg32(enable, chan->controller_base + TIVA_PWM_ENABLE_OFFSET); + + return OK; +} + +/**************************************************************************** + * 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 tiva_pwm_stop(FAR struct pwm_lowerhalf_s *dev) +{ + FAR struct tiva_pwm_chan_s *chan = (FAR struct tiva_pwm_chan_s *)dev; + pwminfo("stop PWM for channel %d\n", chan->channel_id); + + /* Disable PWM channel */ + + uint32_t value = getreg32(chan->controller_base + TIVA_PWM_ENABLE_OFFSET); + value &= ~(1 << chan->channel_id); + putreg32(value, chan->controller_base + TIVA_PWM_ENABLE_OFFSET); + + 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 tiva_pwm_ioctl(FAR struct pwm_lowerhalf_s *dev, int cmd, + unsigned long arg) +{ + FAR struct tiva_pwm_chan_s *chan = (FAR struct tiva_pwm_chan_s *)dev; + pwminfo("ioctl PWM for channel %d\n", chan->channel_id); + + /* Remove unused-variable warning */ + + (void)chan; + + /* There are no platform-specific ioctl commands */ + + return -ENOTTY; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: tiva_pwm_initialize + * + * Description: + * Initialize one PWM channel for use with the upper_level PWM driver. + * + * Input Parameters: + * channel - A number identifying the PWM channel use. + * + * Returned Value: + * On success, a pointer to the SAMA5 lower half PWM driver is returned. + * NULL is returned on any failure. + * + ****************************************************************************/ + +FAR struct pwm_lowerhalf_s *tiva_pwm_initialize(int channel) +{ + assert(channel >= 0 && channel <= 7); + FAR struct tiva_pwm_chan_s *chan; + + switch (channel) + { +#ifdef CONFIG_TIVA_PWM0_CHAN0 + case 0: + chan = &g_pwm_chan0; + break; +#endif + +#ifdef CONFIG_TIVA_PWM0_CHAN1 + case 1: + chan = &g_pwm_chan1; + break; +#endif + +#ifdef CONFIG_TIVA_PWM0_CHAN2 + case 2: + chan = &g_pwm_chan2; + break; +#endif + +#ifdef CONFIG_TIVA_PWM0_CHAN3 + case 3: + chan = &g_pwm_chan3; + break; +#endif + +#ifdef CONFIG_TIVA_PWM0_CHAN4 + case 4: + chan = &g_pwm_chan4; + break; +#endif + +#ifdef CONFIG_TIVA_PWM0_CHAN5 + case 5: + chan = &g_pwm_chan5; + break; +#endif + +#ifdef CONFIG_TIVA_PWM0_CHAN6 + case 6: + chan = &g_pwm_chan6; + break; +#endif + +#ifdef CONFIG_TIVA_PWM0_CHAN7 + case 7: + chan = &g_pwm_chan7; + break; +#endif + + default: + pwmerr("ERROR: invalid channel %d\n", channel); + return NULL; + } + + pwminfo("channel %d: channel_id=%d, ", channel, chan->channel_id); + pwminfo("controller_id=%d, controller_base=%08x, ", + chan->controller_id, chan->controller_base); + pwminfo("generator_id=%d, generator_base=%08x\n", + chan->generator_id, chan->generator_base); + + /* Enable PWM controller (refer to TM4C1294NC 23.4.1) */ + + assert(chan->controller_id == 0); + tiva_pwm_enablepwr(chan->controller_id); + tiva_pwm_enableclk(chan->controller_id); + + /* Configure PWM Clock Configuration (refer to TM4C1294NC 23.4.5) + * + * On TM4C1294NC, configure the PWM clock source as 15MHz (the system + * clock 120MHz divided by 8) + * + * TODO: need an algorithm to choose the best divider and load value combo. + */ + + putreg32(CC_USEPWM << TIVA_PWM_CC_USEPWM | CC_PWMDIV_8 << TIVA_PWM_CC_PWMDIV, + chan->controller_base + TIVA_PWM_CC); + + return (FAR struct pwm_lowerhalf_s *)chan; +} diff --git a/arch/arm/src/tiva/tiva_pwm.h b/arch/arm/src/tiva/tiva_pwm.h new file mode 100644 index 0000000000000000000000000000000000000000..c60b37617b2566b7dae1afc6b5c1467655a04d80 --- /dev/null +++ b/arch/arm/src/tiva/tiva_pwm.h @@ -0,0 +1,52 @@ +/************************************************************************************ + * arch/arm/src/tiva/tiva_pwm.h + * + * Copyright (C) 2016 Young Mu. All rights reserved. + * Author: Young Mu + * + * 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_TIVA_TIVA_PWM_H +#define __ARCH_ARM_SRC_TIVA_TIVA_PWM_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +FAR struct pwm_lowerhalf_s *tiva_pwm_initialize(int channel); +void tm4c_pwm_register(int channel); + +#endif /* __ARCH_ARM_SRC_TIVA_TIVA_PWM_H */ diff --git a/arch/arm/src/tiva/tiva_timerlow32.c b/arch/arm/src/tiva/tiva_timerlow32.c index 2491e01f63476bf825a679adeb545e316b2b54be..2fcf9694298c2caf34f672a528475a2634bf342a 100644 --- a/arch/arm/src/tiva/tiva_timerlow32.c +++ b/arch/arm/src/tiva/tiva_timerlow32.c @@ -511,7 +511,7 @@ static int tiva_ioctl(struct timer_lowerhalf_s *lower, int cmd, { int ret = -ENOTTY; - DEBUGASSERT(priv); + DEBUGASSERT(lower); tmrinfo("Entry: cmd=%d arg=%ld\n", cmd, arg); return ret; diff --git a/arch/hc/src/m9s12/Make.defs b/arch/hc/src/m9s12/Make.defs index 97fc4861a927b5efea8dad117bb9fb1900b31520..5b7ffaffea4f0251172e100aea53e4a53f76cfbf 100644 --- a/arch/hc/src/m9s12/Make.defs +++ b/arch/hc/src/m9s12/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# arch/arm/src/m9s12/Make.defs +# arch/hc/src/m9s12/Make.defs # # Copyright (C) 2009, 2011, 2014 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/arch/hc/src/m9s12/m9s12_atd.h b/arch/hc/src/m9s12/m9s12_atd.h index 6c6946bceb66319ca895b49b619a25a54b64650c..6df615b31a6510ad8eaaf630e1a0dc433889b4ed 100644 --- a/arch/hc/src/m9s12/m9s12_atd.h +++ b/arch/hc/src/m9s12/m9s12_atd.h @@ -1,6 +1,6 @@ /************************************************************************************ * arch/hc/src/m9s12/m9s12_atd.h - * Defintions for ATD10b8c v3 + * Definitions for ATD10b8c v3 * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/hc/src/m9s12/m9s12_dumpgpio.c b/arch/hc/src/m9s12/m9s12_dumpgpio.c index ad6ce5860fbd08eb8d213b6820b64fb6f6b57322..4a7d3860fa2c15d0c76e1a7f2600d037075dcfa8 100644 --- a/arch/hc/src/m9s12/m9s12_dumpgpio.c +++ b/arch/hc/src/m9s12/m9s12_dumpgpio.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/m9s12/m9s12_dumpgpio.c + * arch/hc/src/m9s12/m9s12_dumpgpio.c * * Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/hc/src/m9s12/m9s12_ethernet.c b/arch/hc/src/m9s12/m9s12_ethernet.c index 958a10affec76ba08056588a610c394ef6d1081f..fe2656e97a94c72ae3d81899cd9db5750890a473 100644 --- a/arch/hc/src/m9s12/m9s12_ethernet.c +++ b/arch/hc/src/m9s12/m9s12_ethernet.c @@ -1,5 +1,5 @@ /**************************************************************************** - * drivers/net/m9s12_ethernet.c + * arch/hc/src/m9s12/m9s12_ethernet.c * * Copyright (C) 2011, 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/hc/src/m9s12/m9s12_gpio.c b/arch/hc/src/m9s12/m9s12_gpio.c index 0004bdf5de7af9886749dedee39b299c19911e3e..b861ee2b402630092763f72c8bde58c1d29f8710 100644 --- a/arch/hc/src/m9s12/m9s12_gpio.c +++ b/arch/hc/src/m9s12/m9s12_gpio.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/m9s12/m9s12_gpio.c + * arch/hc/src/m9s12/m9s12_gpio.c * * Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/hc/src/m9s12/m9s12_gpioirq.c b/arch/hc/src/m9s12/m9s12_gpioirq.c index d16c208f4cb2038f978ded1edf6bf6c78c52c701..b0f72d77622527c34fa8b974cfa437cfc0848071 100644 --- a/arch/hc/src/m9s12/m9s12_gpioirq.c +++ b/arch/hc/src/m9s12/m9s12_gpioirq.c @@ -1,6 +1,5 @@ /**************************************************************************** - * arch/arm/src/m9s12/m9s12_gpioirq.c - * arch/arm/src/chip/m9s12_gpioirq.c + * arch/hc/src/m9s12/m9s12_gpioirq.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/hc/src/m9s12/m9s12_irq.c b/arch/hc/src/m9s12/m9s12_irq.c index 4ce19d70e90042ef240c83a74c36539d2b22cc30..9f95388915c0267bb94b2da5192c8cc0bc25f705 100644 --- a/arch/hc/src/m9s12/m9s12_irq.c +++ b/arch/hc/src/m9s12/m9s12_irq.c @@ -1,6 +1,5 @@ /**************************************************************************** - * arch/arm/src/m9s12/m9s12_irq.c - * arch/arm/src/chip/m9s12_irq.c + * arch/hc/src/m9s12/m9s12_irq.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/hc/src/m9s12/m9s12_lowputc.S b/arch/hc/src/m9s12/m9s12_lowputc.S index 1b363435e9ac2b8ef2ffe8fad2b9d1941717f45f..ca7f0647846ba46862cb07a2bae38cca4b2dbe37 100644 --- a/arch/hc/src/m9s12/m9s12_lowputc.S +++ b/arch/hc/src/m9s12/m9s12_lowputc.S @@ -1,5 +1,5 @@ /************************************************************************** - * arch/arm/src/m9s12/m9s12_lowputc.S + * arch/hc/src/m9s12/m9s12_lowputc.S * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/hc/src/m9s12/m9s12_saveusercontext.S b/arch/hc/src/m9s12/m9s12_saveusercontext.S index 8538cc1f063ba41deb31010baa6741211f40bbf2..417af5a66e1f80ba54eea7daffd813a4008b7ba7 100644 --- a/arch/hc/src/m9s12/m9s12_saveusercontext.S +++ b/arch/hc/src/m9s12/m9s12_saveusercontext.S @@ -1,5 +1,5 @@ /************************************************************************** - * arch/arm/src/m9s12/m9s12_saveusercontext.S + * arch/hc/src/m9s12/m9s12_saveusercontext.S * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/hc/src/m9s12/m9s12_start.S b/arch/hc/src/m9s12/m9s12_start.S index 3747967f5b76b447e213f4454897d411d3d2dd47..f6b54ad58f0400e52c7c5693d1542b5b7d4aebde 100644 --- a/arch/hc/src/m9s12/m9s12_start.S +++ b/arch/hc/src/m9s12/m9s12_start.S @@ -1,6 +1,5 @@ /**************************************************************************** * arch/hc/src/m9s12/m9s12_start.S - * arch/hc/src/chip/m9s12_start.S * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/hc/src/m9s12/m9s12_vectors.S b/arch/hc/src/m9s12/m9s12_vectors.S index fbe4d69f0a7d14a6ea75c89d9f4e5e28bb0b9bf8..10bbe54064873e56c96967533716004f219c6d97 100644 --- a/arch/hc/src/m9s12/m9s12_vectors.S +++ b/arch/hc/src/m9s12/m9s12_vectors.S @@ -1,6 +1,5 @@ /************************************************************************************ * arch/hc/src/m9s12/m9s12_vectors.S - * arch/hc/src/chip/m9s12_vectors.S * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/mips/src/pic32mx/pic32mx-ethernet.c b/arch/mips/src/pic32mx/pic32mx-ethernet.c index 8578977b3b47787426e46a78ecf04238595d9cfe..8a1bc0848288f407c672380ecba6079c37e16651 100644 --- a/arch/mips/src/pic32mx/pic32mx-ethernet.c +++ b/arch/mips/src/pic32mx/pic32mx-ethernet.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/pic32mx/pic32mx_ethernet.c + * arch/mips/src/pic32mx/pic32mx_ethernet.c * * Copyright (C) 2012, 2014-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/mips/src/pic32mx/pic32mx-irq.c b/arch/mips/src/pic32mx/pic32mx-irq.c index ded512f6e1ddeb00c052dd62b76bf4f206c55361..f9e82155dc296669fb595b331d1beb5e304b4ed0 100644 --- a/arch/mips/src/pic32mx/pic32mx-irq.c +++ b/arch/mips/src/pic32mx/pic32mx-irq.c @@ -1,6 +1,5 @@ /**************************************************************************** * arch/mips/src/pic32mx/pic32mx-irq.c - * arch/mips/src/chip/pic32mx-irq.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/mips/src/pic32mz/pic32mz-ethernet.c b/arch/mips/src/pic32mz/pic32mz-ethernet.c index 87a91962d4e6b92dc72307986ca05dc5ab0b48cc..b2df36544972d2e940a298fcaa20c648b3d86042 100644 --- a/arch/mips/src/pic32mz/pic32mz-ethernet.c +++ b/arch/mips/src/pic32mz/pic32mz-ethernet.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/pic32mz/pic32mz_ethernet.c + * arch/mips/src/pic32mz/pic32mz_ethernet.c * * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/Kconfig b/arch/renesas/Kconfig similarity index 75% rename from arch/sh/Kconfig rename to arch/renesas/Kconfig index 48c76f3ca03da56f1578e092eb746f00b19ef35d..c8818030d790c860ebe745f269d9dc5e558d45e6 100644 --- a/arch/sh/Kconfig +++ b/arch/renesas/Kconfig @@ -3,10 +3,10 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -if ARCH_SH +if ARCH_RENESAS choice - prompt "SH chip selection" + prompt "Renesas chip selection" default ARCH_CHIP_SH7032 config ARCH_CHIP_SH7032 @@ -37,8 +37,8 @@ config ARCH_CHIP default "sh1" if ARCH_SH1 default "m16c" if ARCH_M16C -source arch/sh/src/common/Kconfig -source arch/sh/src/m16c/Kconfig -source arch/sh/src/sh1/Kconfig +source arch/renesas/src/common/Kconfig +source arch/renesas/src/m16c/Kconfig +source arch/renesas/src/sh1/Kconfig -endif # ARCH_SH +endif # ARCH_RENESAS diff --git a/arch/sh/include/README.txt b/arch/renesas/include/README.txt similarity index 100% rename from arch/sh/include/README.txt rename to arch/renesas/include/README.txt diff --git a/arch/sh/include/arch.h b/arch/renesas/include/arch.h similarity index 95% rename from arch/sh/include/arch.h rename to arch/renesas/include/arch.h index 4b4c7e934d9e39d2b9a3775842d75d866fb4cd7b..a4824ce98419d97256486fd124d29e3acf506d7a 100644 --- a/arch/sh/include/arch.h +++ b/arch/renesas/include/arch.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/include/arch.h + * arch/renesas/include/arch.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -37,8 +37,8 @@ * only indirectly through nuttx/arch.h */ -#ifndef __ARCH_SH_INCLUDE_ARCH_H -#define __ARCH_SH_INCLUDE_ARCH_H +#ifndef __ARCH_RENESAS_INCLUDE_ARCH_H +#define __ARCH_RENESAS_INCLUDE_ARCH_H /**************************************************************************** * Included Files @@ -77,4 +77,4 @@ extern "C" } #endif -#endif /* __ARCH_SH_INCLUDE_ARCH_H */ +#endif /* __ARCH_RENESAS_INCLUDE_ARCH_H */ diff --git a/arch/sh/include/irq.h b/arch/renesas/include/irq.h similarity index 95% rename from arch/sh/include/irq.h rename to arch/renesas/include/irq.h index 78617accce61722ad5a92ffdb8f4c898beb59ba6..4f365ceaa842ddb4a14156bb8f69e529c2e796c5 100644 --- a/arch/sh/include/irq.h +++ b/arch/renesas/include/irq.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/include/irq.h + * arch/renesas/include/irq.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -37,8 +37,8 @@ * only indirectly through nuttx/irq.h */ -#ifndef __ARCH_SH_INCLUDE_IRQ_H -#define __ARCH_SH_INCLUDE_IRQ_H +#ifndef __ARCH_RENESAS_INCLUDE_IRQ_H +#define __ARCH_RENESAS_INCLUDE_IRQ_H /**************************************************************************** * Included Files @@ -82,5 +82,5 @@ extern "C" #endif #endif -#endif /* __ARCH_SH_INCLUDE_IRQ_H */ +#endif /* __ARCH_RENESAS_INCLUDE_IRQ_H */ diff --git a/arch/sh/include/limits.h b/arch/renesas/include/limits.h similarity index 93% rename from arch/sh/include/limits.h rename to arch/renesas/include/limits.h index feb02e5d6f38f9a7cfc9bcd2ee07b5827577ea94..56c729c0c7478741b53a3eb383b076bc9fe937a0 100644 --- a/arch/sh/include/limits.h +++ b/arch/renesas/include/limits.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/include/limits.h + * arch/renesas/include/limits.h * * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __ARCH_SH_INCLUDE_LIMITS_H -#define __ARCH_SH_INCLUDE_LIMITS_H +#ifndef __ARCH_RENESAS_INCLUDE_LIMITS_H +#define __ARCH_RENESAS_INCLUDE_LIMITS_H /**************************************************************************** * Included Files @@ -46,4 +46,4 @@ * Pre-processor Definitions ****************************************************************************/ -#endif /* __ARCH_SH_INCLUDE_LIMITS_H */ +#endif /* __ARCH_RENESAS_INCLUDE_LIMITS_H */ diff --git a/arch/sh/include/m16c/irq.h b/arch/renesas/include/m16c/irq.h similarity index 98% rename from arch/sh/include/m16c/irq.h rename to arch/renesas/include/m16c/irq.h index 2528e911eb73700f704d880b4cdb070335cab71e..0d000f975f8d767db4b94a89b030baf9ae92e767 100644 --- a/arch/sh/include/m16c/irq.h +++ b/arch/renesas/include/m16c/irq.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/sh/include/m16c/irq.h + * arch/renesas/include/m16c/irq.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -37,8 +37,8 @@ * only indirectly through nuttx/irq.h */ -#ifndef __ARCH_SH_INCLUDE_M16C_IRQ_H -#define __ARCH_SH_INCLUDE_M16C_IRQ_H +#ifndef __ARCH_RENESAS_INCLUDE_M16C_IRQ_H +#define __ARCH_RENESAS_INCLUDE_M16C_IRQ_H /************************************************************************************ * Included Files @@ -328,5 +328,5 @@ static inline void up_irq_restore(irqstate_t flags) #endif #endif -#endif /* __ARCH_SH_INCLUDE_M16C_IRQ_H */ +#endif /* __ARCH_RENESAS_INCLUDE_M16C_IRQ_H */ diff --git a/arch/sh/include/m16c/limits.h b/arch/renesas/include/m16c/limits.h similarity index 94% rename from arch/sh/include/m16c/limits.h rename to arch/renesas/include/m16c/limits.h index 27723d99686748d6b2ce97b7d8389818df5c084f..26cb2726f3674be117a6900a01aa6a013917d45a 100644 --- a/arch/sh/include/m16c/limits.h +++ b/arch/renesas/include/m16c/limits.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/include/m16c/limits.h + * arch/renesas/include/m16c/limits.h * * Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __ARCH_SH_INCLUDE_M16C_LIMITS_H -#define __ARCH_SH_INCLUDE_M16C_LIMITS_H +#ifndef __ARCH_RENESAS_INCLUDE_M16C_LIMITS_H +#define __ARCH_RENESAS_INCLUDE_M16C_LIMITS_H /**************************************************************************** * Included Files @@ -85,4 +85,4 @@ #define PTR_MAX 32767 #define UPTR_MAX 65535U -#endif /* __ARCH_SH_INCLUDE_M16C_LIMITS_H */ +#endif /* __ARCH_RENESAS_INCLUDE_M16C_LIMITS_H */ diff --git a/arch/sh/include/m16c/types.h b/arch/renesas/include/m16c/types.h similarity index 95% rename from arch/sh/include/m16c/types.h rename to arch/renesas/include/m16c/types.h index 3211209e93f20e15630605ea9a856d015a1e0c9c..8eb3528833776dbbdf0329128120933270eddc19 100644 --- a/arch/sh/include/m16c/types.h +++ b/arch/renesas/include/m16c/types.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/include/m16c/types.h + * arch/renesas/include/m16c/types.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -37,8 +37,8 @@ * through sys/types.h */ -#ifndef __ARCH_SH_INCLUDE_M16C_TYPES_H -#define __ARCH_SH_INCLUDE_M16C_TYPES_H +#ifndef __ARCH_RENESAS_INCLUDE_M16C_TYPES_H +#define __ARCH_RENESAS_INCLUDE_M16C_TYPES_H /**************************************************************************** * Included Files @@ -95,4 +95,4 @@ typedef _uint16_t irqstate_t; * Public Function Prototypes ****************************************************************************/ -#endif /* __ARCH_SH_INCLUDE_M16C_TYPES_H */ +#endif /* __ARCH_RENESAS_INCLUDE_M16C_TYPES_H */ diff --git a/arch/sh/include/serial.h b/arch/renesas/include/serial.h similarity index 94% rename from arch/sh/include/serial.h rename to arch/renesas/include/serial.h index 2ec4ac9054a47ad0918eb69951ea00280da4eec3..224e769c1e0745d2e9d2164cb986dd1e2aff33eb 100644 --- a/arch/sh/include/serial.h +++ b/arch/renesas/include/serial.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/include/serial.h + * arch/renesas/include/serial.h * * Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __ARCH_SH_INCLUDE_SERIAL_H -#define __ARCH_SH_INCLUDE_SERIAL_H +#ifndef __ARCH_RENESAS_INCLUDE_SERIAL_H +#define __ARCH_RENESAS_INCLUDE_SERIAL_H /**************************************************************************** * Included Files @@ -54,4 +54,4 @@ * Public Functions ****************************************************************************/ -#endif /* __ARCH_SH_INCLUDE_SERIAL_H */ +#endif /* __ARCH_RENESAS_INCLUDE_SERIAL_H */ diff --git a/arch/sh/include/sh1/irq.h b/arch/renesas/include/sh1/irq.h similarity index 99% rename from arch/sh/include/sh1/irq.h rename to arch/renesas/include/sh1/irq.h index b4af921bdbbf280d66211ea7f9dc67e58d6f084d..9c82e0b39e0ce88dd8153ed1c221a757fe7e86eb 100644 --- a/arch/sh/include/sh1/irq.h +++ b/arch/renesas/include/sh1/irq.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/sh/include/sh1/irq.h + * arch/renesas/include/sh1/irq.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -37,8 +37,8 @@ * only indirectly through nuttx/irq.h */ -#ifndef __ARCH_SH_INCLUDE_SH1_IRQ_H -#define __ARCH_SH_INCLUDE_SH1_IRQ_H +#ifndef __ARCH_RENESAS_INCLUDE_SH1_IRQ_H +#define __ARCH_RENESAS_INCLUDE_SH1_IRQ_H /************************************************************************************ * Included Files @@ -563,5 +563,5 @@ static inline void up_irq_restore(irqstate_t flags) #endif #endif -#endif /* __ARCH_SH_INCLUDE_SH1_IRQ_H */ +#endif /* __ARCH_RENESAS_INCLUDE_SH1_IRQ_H */ diff --git a/arch/sh/include/sh1/limits.h b/arch/renesas/include/sh1/limits.h similarity index 94% rename from arch/sh/include/sh1/limits.h rename to arch/renesas/include/sh1/limits.h index 071189c4ec1afdf1a77634b6f221620a80be9cec..661ed6bd1ee0507f9e87b89ab275a9512c8a6429 100644 --- a/arch/sh/include/sh1/limits.h +++ b/arch/renesas/include/sh1/limits.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/include/sh1/limits.h + * arch/renesas/include/sh1/limits.h * * Copyright (C) 2008, 2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __ARCH_SH_INCLUDE_SH1_LIMITS_H -#define __ARCH_SH_INCLUDE_SH1_LIMITS_H +#ifndef __ARCH_RENESAS_INCLUDE_SH1_LIMITS_H +#define __ARCH_RENESAS_INCLUDE_SH1_LIMITS_H /**************************************************************************** * Included Files @@ -85,4 +85,4 @@ #define PTR_MAX 2147483647 #define UPTR_MAX 4294967295U -#endif /* __ARCH_SH_INCLUDE_SH1_LIMITS_H */ +#endif /* __ARCH_RENESAS_INCLUDE_SH1_LIMITS_H */ diff --git a/arch/sh/include/sh1/types.h b/arch/renesas/include/sh1/types.h similarity index 95% rename from arch/sh/include/sh1/types.h rename to arch/renesas/include/sh1/types.h index aeafe71c3d6cc4eb08971ba29bc3ff8c1e6a152c..86d7b5b9bb39aba7c41566ebebab269c190566ba 100644 --- a/arch/sh/include/sh1/types.h +++ b/arch/renesas/include/sh1/types.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/include/sh1/types.h + * arch/renesas/include/sh1/types.h * * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -37,8 +37,8 @@ * through sys/types.h */ -#ifndef __ARCH_SH_INCLUDE_SH1_TYPES_H -#define __ARCH_SH_INCLUDE_SH1_TYPES_H +#ifndef __ARCH_RENESAS_INCLUDE_SH1_TYPES_H +#define __ARCH_RENESAS_INCLUDE_SH1_TYPES_H /**************************************************************************** * Included Files @@ -93,4 +93,4 @@ typedef unsigned long irqstate_t; * Public Function Prototypes ****************************************************************************/ -#endif /* __ARCH_SH_INCLUDE_SH1_TYPES_H */ +#endif /* __ARCH_RENESAS_INCLUDE_SH1_TYPES_H */ diff --git a/arch/renesas/include/sh1Plimits.h b/arch/renesas/include/sh1Plimits.h new file mode 100644 index 0000000000000000000000000000000000000000..661ed6bd1ee0507f9e87b89ab275a9512c8a6429 --- /dev/null +++ b/arch/renesas/include/sh1Plimits.h @@ -0,0 +1,88 @@ +/**************************************************************************** + * arch/renesas/include/sh1/limits.h + * + * Copyright (C) 2008, 2009, 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_RENESAS_INCLUDE_SH1_LIMITS_H +#define __ARCH_RENESAS_INCLUDE_SH1_LIMITS_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define CHAR_BIT 8 +#define SCHAR_MIN (-SCHAR_MAX - 1) +#define SCHAR_MAX 127 +#define UCHAR_MAX 255 + +/* These could be different on machines where char is unsigned */ + +#ifdef __CHAR_UNSIGNED__ +#define CHAR_MIN 0 +#define CHAR_MAX UCHAR_MAX +#else +#define CHAR_MIN SCHAR_MIN +#define CHAR_MAX SCHAR_MAX +#endif + +#define SHRT_MIN (-SHRT_MAX - 1) +#define SHRT_MAX 32767 +#define USHRT_MAX 65535U + +/* On SH-1, type 'int' is 32-bits */ + +#define INT_MIN (-INT_MAX - 1) +#define INT_MAX 2147483647 +#define UINT_MAX 4294967295U + +/* On SH-1, type 'long' is the same size as type 'int', 32-bits */ + +#define LONG_MIN (-LONG_MAX - 1) +#define LONG_MAX 2147483647L +#define ULONG_MAX 4294967295UL + +#define LLONG_MIN (-LLONG_MAX - 1) +#define LLONG_MAX 9223372036854775807LL +#define ULLONG_MAX 18446744073709551615ULL + +/* A pointer is 4 bytes */ + +#define PTR_MIN (-PTR_MAX - 1) +#define PTR_MAX 2147483647 +#define UPTR_MAX 4294967295U + +#endif /* __ARCH_RENESAS_INCLUDE_SH1_LIMITS_H */ diff --git a/arch/renesas/include/sh1Ptypes.h b/arch/renesas/include/sh1Ptypes.h new file mode 100644 index 0000000000000000000000000000000000000000..86d7b5b9bb39aba7c41566ebebab269c190566ba --- /dev/null +++ b/arch/renesas/include/sh1Ptypes.h @@ -0,0 +1,96 @@ +/**************************************************************************** + * arch/renesas/include/sh1/types.h + * + * Copyright (C) 2008, 2009 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. + * + ****************************************************************************/ + +/* This file should never be included directed but, rather, only indirectly\ + * through sys/types.h + */ + +#ifndef __ARCH_RENESAS_INCLUDE_SH1_TYPES_H +#define __ARCH_RENESAS_INCLUDE_SH1_TYPES_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Type Declarations + ****************************************************************************/ + +#ifndef __ASSEMBLY__ + +/* These are the sizes of the standard integer types. NOTE that these type + * names have a leading underscore character. This file will be included + * (indirectly) by include/stdint.h and typedef'ed to the final name without + * the underscore character. This roundabout way of doings things allows + * the stdint.h to be removed from the include/ directory in the event that + * the user prefers to use the definitions provided by their toolchain header + * files + */ + +typedef signed char _int8_t; +typedef unsigned char _uint8_t; + +typedef signed short _int16_t; +typedef unsigned short _uint16_t; + +typedef signed int _int32_t; +typedef unsigned int _uint32_t; + +typedef signed long long _int64_t; +typedef unsigned long long _uint64_t; +#define __INT64_DEFINED + +/* A pointer is 4 bytes */ + +typedef signed int _intptr_t; +typedef unsigned int _uintptr_t; + +/* This is the size of the interrupt state save returned by + * up_irq_save() + */ + +typedef unsigned long irqstate_t; + +#endif /* __ASSEMBLY__ */ + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#endif /* __ARCH_RENESAS_INCLUDE_SH1_TYPES_H */ diff --git a/arch/sh/include/syscall.h b/arch/renesas/include/syscall.h similarity index 95% rename from arch/sh/include/syscall.h rename to arch/renesas/include/syscall.h index b26dffcd39ca1b7d3c3c0597b037a143146f8ac4..afe93f6976178504436fe14f9a4b1dd4517a0a2e 100644 --- a/arch/sh/include/syscall.h +++ b/arch/renesas/include/syscall.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/include/syscall.h + * arch/renesas/include/syscall.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -37,8 +37,8 @@ * through include/syscall.h or include/sys/sycall.h */ -#ifndef __ARCH_SH_INCLUDE_SYSCALL_H -#define __ARCH_SH_INCLUDE_SYSCALL_H +#ifndef __ARCH_RENESAS_INCLUDE_SYSCALL_H +#define __ARCH_RENESAS_INCLUDE_SYSCALL_H /**************************************************************************** * Included Files @@ -79,5 +79,5 @@ extern "C" #endif #endif -#endif /* __ARCH_SH_INCLUDE_SYSCALL_H */ +#endif /* __ARCH_RENESAS_INCLUDE_SYSCALL_H */ diff --git a/arch/sh/include/types.h b/arch/renesas/include/types.h similarity index 94% rename from arch/sh/include/types.h rename to arch/renesas/include/types.h index db6c6178ad30cc9b66fb14381d45d4edba009a1c..aca5f94463569a07ec1e454feef503a27f81589f 100644 --- a/arch/sh/include/types.h +++ b/arch/renesas/include/types.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/include/types.h + * arch/renesas/include/types.h * * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -37,8 +37,8 @@ * through sys/types.h */ -#ifndef __ARCH_SH_INCLUDE_TYPES_H -#define __ARCH_SH_INCLUDE_TYPES_H +#ifndef __ARCH_RENESAS_INCLUDE_TYPES_H +#define __ARCH_RENESAS_INCLUDE_TYPES_H /**************************************************************************** * Included Files @@ -58,4 +58,4 @@ * Public Function Prototypes ****************************************************************************/ -#endif /* __ARCH_SH_INCLUDE_TYPES_H */ +#endif /* __ARCH_RENESAS_INCLUDE_TYPES_H */ diff --git a/arch/sh/include/watchdog.h b/arch/renesas/include/watchdog.h similarity index 94% rename from arch/sh/include/watchdog.h rename to arch/renesas/include/watchdog.h index 091729833cd5c55b7639dc0e3339f83283df08f7..002bc4205955c30d9d4bd90fdb27204d5ace7272 100644 --- a/arch/sh/include/watchdog.h +++ b/arch/renesas/include/watchdog.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/include/watchdog.h + * arch/renesas/include/watchdog.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __ARCH_SH_INCLUDE_WATCHDOG_H -#define __ARCH_SH_INCLUDE_WATCHDOG_H +#ifndef __ARCH_RENESAS_INCLUDE_WATCHDOG_H +#define __ARCH_RENESAS_INCLUDE_WATCHDOG_H /**************************************************************************** * Included Files @@ -56,4 +56,4 @@ * Public Functions ****************************************************************************/ -#endif /* __ARCH_SH_INCLUDE_WATCHDOG_H */ +#endif /* __ARCH_RENESAS_INCLUDE_WATCHDOG_H */ diff --git a/arch/sh/src/.gitignore b/arch/renesas/src/.gitignore similarity index 100% rename from arch/sh/src/.gitignore rename to arch/renesas/src/.gitignore diff --git a/arch/sh/src/Makefile b/arch/renesas/src/Makefile similarity index 99% rename from arch/sh/src/Makefile rename to arch/renesas/src/Makefile index 81e0b5b8c14567a82bd382fe9c4314cb84eeba1b..14e4bc23122b7bd1bfb07278cfd033d30640070d 100644 --- a/arch/sh/src/Makefile +++ b/arch/renesas/src/Makefile @@ -1,5 +1,5 @@ ############################################################################ -# arch/sh/src/Makefile +# arch/renesas/src/Makefile # # Copyright (C) 2008, 2011-2012, 2014, 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/arch/renesas/src/README.txt b/arch/renesas/src/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..77c3cdeca8755b3562b33f9d37080d2dfc869b4b --- /dev/null +++ b/arch/renesas/src/README.txt @@ -0,0 +1,7 @@ +This directory provides a build area for all Renesas and legacy Hitachi +architectures. The 'common' subdirectory contains source files shared by +all Renesas architectures; Source files unique to a specific Renesas chip +architecture are contained in a subdirectory named after the chip. At +configuration time, additional directories will be linked here: 'board' +will be a link to the configs/*/src directory; 'chip' will be a link to +the SH chip sub-directory. diff --git a/arch/sh/src/common/Kconfig b/arch/renesas/src/common/Kconfig similarity index 89% rename from arch/sh/src/common/Kconfig rename to arch/renesas/src/common/Kconfig index f6c044427debf10bca58f8bfa665ec29b9b44b2d..cb8747aca763913cb0613ec5856f2bcc821bba88 100644 --- a/arch/sh/src/common/Kconfig +++ b/arch/renesas/src/common/Kconfig @@ -3,5 +3,5 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -if ARCH_SH +if ARCH_RENESAS endif diff --git a/arch/sh/src/common/up_allocateheap.c b/arch/renesas/src/common/up_allocateheap.c similarity index 98% rename from arch/sh/src/common/up_allocateheap.c rename to arch/renesas/src/common/up_allocateheap.c index ddf287983a19badb829b1994dc7c4542daf91abc..4148407fb79bad5675eb279790160ea6498934e8 100644 --- a/arch/sh/src/common/up_allocateheap.c +++ b/arch/renesas/src/common/up_allocateheap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_allocateheap.c + * arch/renesas/src/common/up_allocateheap.c * * Copyright (C) 2008, 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_arch.h b/arch/renesas/src/common/up_arch.h similarity index 94% rename from arch/sh/src/common/up_arch.h rename to arch/renesas/src/common/up_arch.h index b624da189d5e2128f09c1043fdea0d69aa0efbc1..5637ddf5a2d4948c4a7d6a12a292596e4ccd3855 100644 --- a/arch/sh/src/common/up_arch.h +++ b/arch/renesas/src/common/up_arch.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_arch.h + * arch/renesas/src/common/up_arch.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef ___ARCH_SH_SRC_COMMON_UP_ARCH_H -#define ___ARCH_SH_SRC_COMMON_UP_ARCH_H +#ifndef ___ARCH_RENESAS_SRC_COMMON_UP_ARCH_H +#define ___ARCH_RENESAS_SRC_COMMON_UP_ARCH_H /**************************************************************************** * Included Files @@ -67,4 +67,4 @@ #endif -#endif /* ___ARCH_SH_SRC_COMMON_UP_ARCH_H */ +#endif /* ___ARCH_RENESAS_SRC_COMMON_UP_ARCH_H */ diff --git a/arch/sh/src/common/up_assert.c b/arch/renesas/src/common/up_assert.c similarity index 99% rename from arch/sh/src/common/up_assert.c rename to arch/renesas/src/common/up_assert.c index ec02578cfd04d00666cddec13f8cfcffacefeeca..eaee6f7fec074207f374e56608e4a777c09a2e4a 100644 --- a/arch/sh/src/common/up_assert.c +++ b/arch/renesas/src/common/up_assert.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_assert.c + * arch/renesas/src/common/up_assert.c * * Copyright (C) 2008-2009, 2012-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_blocktask.c b/arch/renesas/src/common/up_blocktask.c similarity index 99% rename from arch/sh/src/common/up_blocktask.c rename to arch/renesas/src/common/up_blocktask.c index 75ecdef5077c7f98b4f0804d5f46385514ab105e..9e8ba57db75b6d0b4c030cd42f7aa0db2267b9bb 100644 --- a/arch/sh/src/common/up_blocktask.c +++ b/arch/renesas/src/common/up_blocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_blocktask.c + * arch/renesas/src/common/up_blocktask.c * * Copyright (C) 2008-2009, 2013-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_createstack.c b/arch/renesas/src/common/up_createstack.c similarity index 99% rename from arch/sh/src/common/up_createstack.c rename to arch/renesas/src/common/up_createstack.c index 3a2a4118119997cdc4e1c121fa9c80b63c62ca6a..1bbf3cc8e0f20b89b60c820861ba8855c425bdb4 100644 --- a/arch/sh/src/common/up_createstack.c +++ b/arch/renesas/src/common/up_createstack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_createstack.c + * arch/renesas/src/common/up_createstack.c * * Copyright (C) 2008-2009, 2013-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_doirq.c b/arch/renesas/src/common/up_doirq.c similarity index 99% rename from arch/sh/src/common/up_doirq.c rename to arch/renesas/src/common/up_doirq.c index a2996c9f4820e0cb073938b88fa7bd7944b6e92d..9ac9d99aa004c5972fdd6061473b32e6c655a5c2 100644 --- a/arch/sh/src/common/up_doirq.c +++ b/arch/renesas/src/common/up_doirq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_doirq.c + * arch/renesas/src/common/up_doirq.c * * Copyright (C) 2008-2009, 2011, 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_exit.c b/arch/renesas/src/common/up_exit.c similarity index 99% rename from arch/sh/src/common/up_exit.c rename to arch/renesas/src/common/up_exit.c index 1aa9644dba9ca0c5c1894a18cef6efa2506465bc..f565d3d3d4390bab6d8c272d5747f3d9693073c2 100644 --- a/arch/sh/src/common/up_exit.c +++ b/arch/renesas/src/common/up_exit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_exit.c + * arch/renesas/src/=common/up_exit.c * * Copyright (C) 2008-2009, 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_idle.c b/arch/renesas/src/common/up_idle.c similarity index 98% rename from arch/sh/src/common/up_idle.c rename to arch/renesas/src/common/up_idle.c index 0333722347b2df15108151ac1c172bed63c84784..c1fc2ed0ce457243ff190ea988503db217072731 100644 --- a/arch/sh/src/common/up_idle.c +++ b/arch/renesas/src/common/up_idle.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_idle.c + * arch/renesas/src/common/up_idle.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_initialize.c b/arch/renesas/src/common/up_initialize.c similarity index 99% rename from arch/sh/src/common/up_initialize.c rename to arch/renesas/src/common/up_initialize.c index 2cd40a071887fbe7c8cc386686c8d3f71525f154..fc61dc0e363d80d0bc1a8273db1a224b50679c2b 100644 --- a/arch/sh/src/common/up_initialize.c +++ b/arch/renesas/src/common/up_initialize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_initialize.c + * arch/renesas/src/common/up_initialize.c * * Copyright (C) 2008-2010, 2012-2013, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_internal.h b/arch/renesas/src/common/up_internal.h similarity index 97% rename from arch/sh/src/common/up_internal.h rename to arch/renesas/src/common/up_internal.h index c055436edb6f4f32ac2b31df9ad9939face99e6e..e04157953a0a4818c1d31469f87ea34cb4b949df 100644 --- a/arch/sh/src/common/up_internal.h +++ b/arch/renesas/src/common/up_internal.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_internal.h + * arch/renesas/src/common/up_internal.h * * Copyright (C) 2008-2009, 2012-2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef ___ARCH_SH_SRC_COMMON_UP_INTERNAL_H -#define ___ARCH_SH_SRC_COMMON_UP_INTERNAL_H +#ifndef ___ARCH_RENESAS_SRC_COMMON_UP_INTERNAL_H +#define ___ARCH_RENESAS_SRC_COMMON_UP_INTERNAL_H /**************************************************************************** * Included Files @@ -237,4 +237,4 @@ void up_dumpstate(void); #endif #endif /* __ASSEMBLY__ */ -#endif /* ___ARCH_SH_SRC_COMMON_UP_INTERNAL_H */ +#endif /* ___ARCH_RENESAS_SRC_COMMON_UP_INTERNAL_H */ diff --git a/arch/sh/src/common/up_interruptcontext.c b/arch/renesas/src/common/up_interruptcontext.c similarity index 98% rename from arch/sh/src/common/up_interruptcontext.c rename to arch/renesas/src/common/up_interruptcontext.c index 56e4f9478ea0becd6ab0614880abb60250b2e186..a67f13d0c306e581b2b5cf2bb911ff37f8800f15 100644 --- a/arch/sh/src/common/up_interruptcontext.c +++ b/arch/renesas/src/common/up_interruptcontext.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_interruptcontext.c + * arch/renesas/src/common/up_interruptcontext.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_lowputs.c b/arch/renesas/src/common/up_lowputs.c similarity index 98% rename from arch/sh/src/common/up_lowputs.c rename to arch/renesas/src/common/up_lowputs.c index 592ea8177f70068b833d1c1690b8cb1e1c409f7d..76617901e782863ca8c301e43516608bd34143f6 100644 --- a/arch/sh/src/common/up_lowputs.c +++ b/arch/renesas/src/common/up_lowputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_lowputs.c + * arch/renesas/src/common/up_lowputs.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_mdelay.c b/arch/renesas/src/common/up_mdelay.c similarity index 98% rename from arch/sh/src/common/up_mdelay.c rename to arch/renesas/src/common/up_mdelay.c index e7ed4f9015626678a767ef762afc8f12b1469a61..e3120ce74b4a195a44ebffa1169002d806cfabe3 100644 --- a/arch/sh/src/common/up_mdelay.c +++ b/arch/renesas/src/common/up_mdelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_mdelay.c + * arch/renesas/src/common/up_mdelay.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_puts.c b/arch/renesas/src/common/up_puts.c similarity index 98% rename from arch/sh/src/common/up_puts.c rename to arch/renesas/src/common/up_puts.c index 24dccecbe404c3b7e9b9ac3af4955c9fa211ef56..5bc2cc8433f52d84fe98af95a7ea1096714ce4f8 100644 --- a/arch/sh/src/common/up_puts.c +++ b/arch/renesas/src/common/up_puts.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_puts.c + * arch/renesas/src/common/up_puts.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_releasepending.c b/arch/renesas/src/common/up_releasepending.c similarity index 99% rename from arch/sh/src/common/up_releasepending.c rename to arch/renesas/src/common/up_releasepending.c index 195935ff458d3b101ba2c5bcf163762fb99d3321..5c3f57482178a62e4db35e648e684294795de8a8 100644 --- a/arch/sh/src/common/up_releasepending.c +++ b/arch/renesas/src/common/up_releasepending.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_releasepending.c + * arch/renesas/src/common/up_releasepending.c * * Copyright (C) 2008-2009, 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_releasestack.c b/arch/renesas/src/common/up_releasestack.c similarity index 99% rename from arch/sh/src/common/up_releasestack.c rename to arch/renesas/src/common/up_releasestack.c index 8e01456fdbf7cb766b315081e1bbc795461be7fe..e2b5948b142fb84272ab588875403528e17dcefc 100644 --- a/arch/sh/src/common/up_releasestack.c +++ b/arch/renesas/src/common/up_releasestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_releasestack.c + * arch/renesas/src/common/up_releasestack.c * * Copyright (C) 2008-2009, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_reprioritizertr.c b/arch/renesas/src/common/up_reprioritizertr.c similarity index 99% rename from arch/sh/src/common/up_reprioritizertr.c rename to arch/renesas/src/common/up_reprioritizertr.c index f2d0d1a2266038d108a3577bba9450c56e3114fa..c476dbad376420d5ff9fc712764c9bdb3d754c0b 100644 --- a/arch/sh/src/common/up_reprioritizertr.c +++ b/arch/renesas/src/common/up_reprioritizertr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_reprioritizertr.c + * arch/renesas/src/common/up_reprioritizertr.c * * Copyright (C) 2008-2009, 2011, 2013-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_stackframe.c b/arch/renesas/src/common/up_stackframe.c similarity index 99% rename from arch/sh/src/common/up_stackframe.c rename to arch/renesas/src/common/up_stackframe.c index 06d2c218a3464555c6b529e700cc148149cfdd24..811fcd4aad1b007466f7258b522b4dd4a4e8afeb 100644 --- a/arch/sh/src/common/up_stackframe.c +++ b/arch/renesas/src/common/up_stackframe.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_stackframe.c + * arch/renesas/src/common/up_stackframe.c * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_udelay.c b/arch/renesas/src/common/up_udelay.c similarity index 99% rename from arch/sh/src/common/up_udelay.c rename to arch/renesas/src/common/up_udelay.c index 6af5d2f76d471d175a748b7a5bd30d502b53418b..9f9bda30330613796ed6950e1fd10b5d1b448c22 100644 --- a/arch/sh/src/common/up_udelay.c +++ b/arch/renesas/src/common/up_udelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_udelay.c + * arch/renesas/src/common/up_udelay.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_unblocktask.c b/arch/renesas/src/common/up_unblocktask.c similarity index 99% rename from arch/sh/src/common/up_unblocktask.c rename to arch/renesas/src/common/up_unblocktask.c index d506d97d094cd6fb1408e90eb703336861849862..de3008f98a00bb11ee11c698d95c9d61b94f1c28 100644 --- a/arch/sh/src/common/up_unblocktask.c +++ b/arch/renesas/src/common/up_unblocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_unblocktask.c + * arch/renesas/src/common/up_unblocktask.c * * Copyright (C) 2008-2009, 2013-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/common/up_usestack.c b/arch/renesas/src/common/up_usestack.c similarity index 99% rename from arch/sh/src/common/up_usestack.c rename to arch/renesas/src/common/up_usestack.c index 2da654391ca22b8ac430e5af41d33793058e130c..de4c4aca95f7cdcf5e21539a6badc85171bb01c6 100644 --- a/arch/sh/src/common/up_usestack.c +++ b/arch/renesas/src/common/up_usestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/common/up_usestack.c + * arch/renesas/src/common/up_usestack.c * * Copyright (C) 2008-2009, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/m16c/Kconfig b/arch/renesas/src/m16c/Kconfig similarity index 100% rename from arch/sh/src/m16c/Kconfig rename to arch/renesas/src/m16c/Kconfig diff --git a/arch/sh/src/m16c/Make.defs b/arch/renesas/src/m16c/Make.defs similarity index 98% rename from arch/sh/src/m16c/Make.defs rename to arch/renesas/src/m16c/Make.defs index 6995d37b1e456dd320d2ecfb95f42d3e7360b513..d44d9b2f0973dec7c7df7d51744da7626b021c14 100644 --- a/arch/sh/src/m16c/Make.defs +++ b/arch/renesas/src/m16c/Make.defs @@ -1,5 +1,5 @@ ############################################################################## -# arch/sh/src/m16c/Make.defs +# arch/renesas/src/m16c/Make.defs # # Copyright (C) 2009, 2014 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/arch/sh/src/m16c/chip.h b/arch/renesas/src/m16c/chip.h similarity index 98% rename from arch/sh/src/m16c/chip.h rename to arch/renesas/src/m16c/chip.h index 695814d4324cb87b47cb7d83a6647752480f12ad..80fbc0e734d6d6b615e93243d6a37124fb5b96c3 100644 --- a/arch/sh/src/m16c/chip.h +++ b/arch/renesas/src/m16c/chip.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/sh/src/m16c/chip.h + * arch/renesas/src/m16c/chip.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __ARCH_SH_SRC_M16C_CHIP_H -#define __ARCH_SH_SRC_M16C_CHIP_H +#ifndef __ARCH_RENESAS_SRC_M16C_CHIP_H +#define __ARCH_RENESAS_SRC_M16C_CHIP_H /************************************************************************************ * Included Files @@ -278,4 +278,4 @@ extern uint32_t g_idle_topstack; /* Start of the heap */ #endif /* __ASSEMBLY__ */ -#endif /* __ARCH_SH_SRC_M16C_CHIP_H */ +#endif /* __ARCH_RENESAS_SRC_M16C_CHIP_H */ diff --git a/arch/sh/src/m16c/m16c_copystate.c b/arch/renesas/src/m16c/m16c_copystate.c similarity index 98% rename from arch/sh/src/m16c/m16c_copystate.c rename to arch/renesas/src/m16c/m16c_copystate.c index 2aa48d6c72a6b15d478e3d68410050f8ca5b949a..662a6870f634feb42f6d4a137e3ed4d8daa548a2 100644 --- a/arch/sh/src/m16c/m16c_copystate.c +++ b/arch/renesas/src/m16c/m16c_copystate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/m16c/up_copystate.c + * arch/renesas/src/m16c/up_copystate.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/m16c/m16c_dumpstate.c b/arch/renesas/src/m16c/m16c_dumpstate.c similarity index 99% rename from arch/sh/src/m16c/m16c_dumpstate.c rename to arch/renesas/src/m16c/m16c_dumpstate.c index 7dc1a74ee43d6b0544f2d075dc061da51563bf33..cfd9bd0fdb265403f6c67773b1124f9955748e95 100644 --- a/arch/sh/src/m16c/m16c_dumpstate.c +++ b/arch/renesas/src/m16c/m16c_dumpstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/m16c/m16c_assert.c + * arch/renesas/src/m16c/m16c_assert.c * * Copyright (C) 2009, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/m16c/m16c_head.S b/arch/renesas/src/m16c/m16c_head.S similarity index 99% rename from arch/sh/src/m16c/m16c_head.S rename to arch/renesas/src/m16c/m16c_head.S index 711ce26aaaf16b09a8fcefbeac13d0fcd9a02907..2ed97e4853b99e49cc85ed288d13aeeb92d3ee4f 100644 --- a/arch/sh/src/m16c/m16c_head.S +++ b/arch/renesas/src/m16c/m16c_head.S @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/sh/src/m16c/m16c_head.S + * arch/renesas/src/m16c/m16c_head.S * * Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/m16c/m16c_initialstate.c b/arch/renesas/src/m16c/m16c_initialstate.c similarity index 98% rename from arch/sh/src/m16c/m16c_initialstate.c rename to arch/renesas/src/m16c/m16c_initialstate.c index cc913fde649e8eceac8f519a87b49d90a490b94e..abf31035d106dfb963b730c693db101482d0724c 100644 --- a/arch/sh/src/m16c/m16c_initialstate.c +++ b/arch/renesas/src/m16c/m16c_initialstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/m16c/m16c_initialstate.c + * arch/renesas/src/m16c/m16c_initialstate.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/m16c/m16c_irq.c b/arch/renesas/src/m16c/m16c_irq.c similarity index 99% rename from arch/sh/src/m16c/m16c_irq.c rename to arch/renesas/src/m16c/m16c_irq.c index 2951033206e487d8a85fe3463ad160763be0d253..ce94eb4d344ad74962418158904f80e7c64ee923 100644 --- a/arch/sh/src/m16c/m16c_irq.c +++ b/arch/renesas/src/m16c/m16c_irq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/m16c/m16c_irq.c + * arch/renesas/src/m16c/m16c_irq.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/m16c/m16c_lowputc.c b/arch/renesas/src/m16c/m16c_lowputc.c similarity index 99% rename from arch/sh/src/m16c/m16c_lowputc.c rename to arch/renesas/src/m16c/m16c_lowputc.c index 5ec641fbec605d7b09c2139a4e62a521d9101887..ecda7343800ce79cd6bcf216dd63a319338ca714 100644 --- a/arch/sh/src/m16c/m16c_lowputc.c +++ b/arch/renesas/src/m16c/m16c_lowputc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/m16c/m16c_lowputc.c + * arch/renesas/src/m16c/m16c_lowputc.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/m16c/m16c_schedulesigaction.c b/arch/renesas/src/m16c/m16c_schedulesigaction.c similarity index 99% rename from arch/sh/src/m16c/m16c_schedulesigaction.c rename to arch/renesas/src/m16c/m16c_schedulesigaction.c index 23d105240bf2d498f224877b5c4a07b6090fa90d..699139446636c8f62c106bfa085c1ef619ccd04b 100644 --- a/arch/sh/src/m16c/m16c_schedulesigaction.c +++ b/arch/renesas/src/m16c/m16c_schedulesigaction.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/m16c/m16c_schedulesigaction.c + * arch/renesas/src/m16c/m16c_schedulesigaction.c * * Copyright (C) 2009-2010, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/m16c/m16c_serial.c b/arch/renesas/src/m16c/m16c_serial.c similarity index 99% rename from arch/sh/src/m16c/m16c_serial.c rename to arch/renesas/src/m16c/m16c_serial.c index 4bc1f969ce6cd2ab4199b1d4d5d3e17ff8e44039..cdbcc2471c833da6412de63cebbb932982da5214 100644 --- a/arch/sh/src/m16c/m16c_serial.c +++ b/arch/renesas/src/m16c/m16c_serial.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/m16c/m16c_serial.c + * arch/renesas/src/m16c/m16c_serial.c * * Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/m16c/m16c_sigdeliver.c b/arch/renesas/src/m16c/m16c_sigdeliver.c similarity index 99% rename from arch/sh/src/m16c/m16c_sigdeliver.c rename to arch/renesas/src/m16c/m16c_sigdeliver.c index 40976346f3dcea748084a2bb1dae345612cec363..a56448c36bc623656919b4d6098270ac0540e377 100644 --- a/arch/sh/src/m16c/m16c_sigdeliver.c +++ b/arch/renesas/src/m16c/m16c_sigdeliver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/m16c/m16c_sigdeliver.c + * arch/renesas/src/m16c/m16c_sigdeliver.c * * Copyright (C) 2009-2010, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/m16c/m16c_timer.h b/arch/renesas/src/m16c/m16c_timer.h similarity index 98% rename from arch/sh/src/m16c/m16c_timer.h rename to arch/renesas/src/m16c/m16c_timer.h index ff542163222159572d398265906ddc2522a781a0..5c19ff6ed55f4dea43a0c49702fd61d3d24593b6 100644 --- a/arch/sh/src/m16c/m16c_timer.h +++ b/arch/renesas/src/m16c/m16c_timer.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/sh/src/m16c/m16c_timer.h + * arch/renesas/src/m16c/m16c_timer.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __ARCH_SH_SRC_M16C_M16C_TIMER_H -#define __ARCH_SH_SRC_M16C_M16C_TIMER_H +#ifndef __ARCH_RENESAS_SRC_M16C_M16C_TIMER_H +#define __ARCH_RENESAS_SRC_M16C_M16C_TIMER_H /************************************************************************************ * Included Files @@ -223,4 +223,4 @@ #endif /* __ASSEMBLY__ */ -#endif /* __ARCH_SH_SRC_M16C_M16C_TIMER_H */ +#endif /* __ARCH_RENESAS_SRC_M16C_M16C_TIMER_H */ diff --git a/arch/sh/src/m16c/m16c_timerisr.c b/arch/renesas/src/m16c/m16c_timerisr.c similarity index 99% rename from arch/sh/src/m16c/m16c_timerisr.c rename to arch/renesas/src/m16c/m16c_timerisr.c index adaa18af022ba7270ea7310bd810400dd7ad94a1..02570de1cc07792f907a1c62ff1c3292c9009421 100644 --- a/arch/sh/src/m16c/m16c_timerisr.c +++ b/arch/renesas/src/m16c/m16c_timerisr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/m16c/m16c_timerisr.c + * arch/renesas/src/m16c/m16c_timerisr.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/m16c/m16c_uart.h b/arch/renesas/src/m16c/m16c_uart.h similarity index 97% rename from arch/sh/src/m16c/m16c_uart.h rename to arch/renesas/src/m16c/m16c_uart.h index 382411538d3be8f5845a051f9122f32a7a66d693..c50d9b90183f5e4df876576e328b6de970abb5e1 100644 --- a/arch/sh/src/m16c/m16c_uart.h +++ b/arch/renesas/src/m16c/m16c_uart.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/sh/src/m16c/m16c_uart.h + * arch/renesas/src/m16c/m16c_uart.h * * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __ARCH_SH_SRC_M16C_M16C_UART_H -#define __ARCH_SH_SRC_M16C_M16C_UART_H +#ifndef __ARCH_RENESAS_SRC_M16C_M16C_UART_H +#define __ARCH_RENESAS_SRC_M16C_M16C_UART_H /************************************************************************************ * Included Files @@ -142,4 +142,4 @@ #endif /* __ASSEMBLY__ */ -#endif /* __ARCH_SH_SRC_M16C_M16C_UART_H */ +#endif /* __ARCH_RENESAS_SRC_M16C_M16C_UART_H */ diff --git a/arch/sh/src/m16c/m16c_vectors.S b/arch/renesas/src/m16c/m16c_vectors.S similarity index 99% rename from arch/sh/src/m16c/m16c_vectors.S rename to arch/renesas/src/m16c/m16c_vectors.S index b59f179864f811adfe19d4402f19111a18fdaa4a..0925db3e4edabd8819e46155aa011fb785bf2b85 100644 --- a/arch/sh/src/m16c/m16c_vectors.S +++ b/arch/renesas/src/m16c/m16c_vectors.S @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/sh/src/m16c/m16c_vectors.S + * arch/renesas/src/m16c/m16c_vectors.S * * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/sh1/Kconfig b/arch/renesas/src/sh1/Kconfig similarity index 100% rename from arch/sh/src/sh1/Kconfig rename to arch/renesas/src/sh1/Kconfig diff --git a/arch/sh/src/sh1/Make.defs b/arch/renesas/src/sh1/Make.defs similarity index 98% rename from arch/sh/src/sh1/Make.defs rename to arch/renesas/src/sh1/Make.defs index 180034a72d26bf124d90e0df7f28e2305b2d6f42..adbfd361986ab7547d37a62677c44163a06ccce6 100644 --- a/arch/sh/src/sh1/Make.defs +++ b/arch/renesas/src/sh1/Make.defs @@ -1,5 +1,5 @@ ############################################################################## -# arch/sh/src/sh1/Make.defs +# arch/renesas/src/sh1/Make.defs # # Copyright (C) 2008, 2009, 2014 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/arch/sh/src/sh1/chip.h b/arch/renesas/src/sh1/chip.h similarity index 95% rename from arch/sh/src/sh1/chip.h rename to arch/renesas/src/sh1/chip.h index 490b20973e8d9b6864c08dec100d609f4480604b..4459bdcadb3a12b34872d442b1cc73752913ca17 100644 --- a/arch/sh/src/sh1/chip.h +++ b/arch/renesas/src/sh1/chip.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/sh/src/sh1/chip.h + * arch/renesas/src/sh1/chip.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __ARCH_SH_SRC_SH1_CHIP_H -#define __ARCH_SH_SRC_SH1_CHIP_H +#ifndef __ARCH_RENESAS_SRC_SH1_CHIP_H +#define __ARCH_RENESAS_SRC_SH1_CHIP_H /************************************************************************************ * Included Files @@ -71,4 +71,4 @@ * Public Functions ************************************************************************************/ -#endif /* __ARCH_SH_SRC_SH1_CHIP_H */ +#endif /* __ARCH_RENESAS_SRC_SH1_CHIP_H */ diff --git a/arch/sh/src/sh1/sh1_703x.h b/arch/renesas/src/sh1/sh1_703x.h similarity index 99% rename from arch/sh/src/sh1/sh1_703x.h rename to arch/renesas/src/sh1/sh1_703x.h index 87f2c1bcd1749d16d2714c403a19c71ab8f9e42d..ba5ab4d627032ba3cab6e931e40012015f30957a 100644 --- a/arch/sh/src/sh1/sh1_703x.h +++ b/arch/renesas/src/sh1/sh1_703x.h @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/sh/src/sh1/sh1_703x.h + * arch/renesas/src/sh1/sh1_703x.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __ARCH_SH_SRC_SH1_703X_H -#define __ARCH_SH_SRC_SH1_703X_H +#ifndef __ARCH_RENESAS_SRC_SH1_703X_H +#define __ARCH_RENESAS_SRC_SH1_703X_H /************************************************************************************ * Included Files @@ -459,7 +459,7 @@ * Public Functions ************************************************************************************/ -#endif /* __ARCH_SH_SRC_SH1_703X_H */ +#endif /* __ARCH_RENESAS_SRC_SH1_703X_H */ diff --git a/arch/sh/src/sh1/sh1_copystate.c b/arch/renesas/src/sh1/sh1_copystate.c similarity index 98% rename from arch/sh/src/sh1/sh1_copystate.c rename to arch/renesas/src/sh1/sh1_copystate.c index 57fa2d463869126e8733d03102c468488fd739e4..8b2404ca2571d553d2107a8a4451a06d92358a3f 100644 --- a/arch/sh/src/sh1/sh1_copystate.c +++ b/arch/renesas/src/sh1/sh1_copystate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/sh1/up_copystate.c + * arch/renesas/src/sh1/up_copystate.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/sh1/sh1_dumpstate.c b/arch/renesas/src/sh1/sh1_dumpstate.c similarity index 99% rename from arch/sh/src/sh1/sh1_dumpstate.c rename to arch/renesas/src/sh1/sh1_dumpstate.c index e9b0e59078479efa09d760819f4bdea9bee36d12..4609b4355915ca83ef9b34dfb231060dbe8cf87e 100644 --- a/arch/sh/src/sh1/sh1_dumpstate.c +++ b/arch/renesas/src/sh1/sh1_dumpstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/sh1/sh1_assert.c + * arch/renesas/src/sh1/sh1_assert.c * * Copyright (C) 2008-2009, 2011, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/sh1/sh1_head.S b/arch/renesas/src/sh1/sh1_head.S similarity index 99% rename from arch/sh/src/sh1/sh1_head.S rename to arch/renesas/src/sh1/sh1_head.S index e46522da8851794a4d977de14c3adfd51a213a57..695e0d865374bb0e18309c709c9eb0a0efe24486 100644 --- a/arch/sh/src/sh1/sh1_head.S +++ b/arch/renesas/src/sh1/sh1_head.S @@ -1,5 +1,5 @@ /***************************************************************************** - * arch/sh/src/sh1/sh1_head.S + * arch/renesas/src/sh1/sh1_head.S * * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/sh1/sh1_initialstate.c b/arch/renesas/src/sh1/sh1_initialstate.c similarity index 99% rename from arch/sh/src/sh1/sh1_initialstate.c rename to arch/renesas/src/sh1/sh1_initialstate.c index 984829a370d3fb8f34ba4209028dfe0ffc365cfa..0575b0300f6d2faf06e5465a694b542059daed19 100644 --- a/arch/sh/src/sh1/sh1_initialstate.c +++ b/arch/renesas/src/sh1/sh1_initialstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/sh1/sh1_initialstate.c + * arch/renesas/src/sh1/sh1_initialstate.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/sh1/sh1_irq.c b/arch/renesas/src/sh1/sh1_irq.c similarity index 99% rename from arch/sh/src/sh1/sh1_irq.c rename to arch/renesas/src/sh1/sh1_irq.c index bb5987734026786845e220eecf76450f4ce54895..8fe7241c6076bb6b8636c23fae7c7f5cb0695e6c 100644 --- a/arch/sh/src/sh1/sh1_irq.c +++ b/arch/renesas/src/sh1/sh1_irq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/sh1/sh1_irq.c + * arch/renesas/src/sh1/sh1_irq.c * * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/sh1/sh1_lowputc.c b/arch/renesas/src/sh1/sh1_lowputc.c similarity index 99% rename from arch/sh/src/sh1/sh1_lowputc.c rename to arch/renesas/src/sh1/sh1_lowputc.c index 8b423b75b8f0030ab6264e53e980c55d83662490..b04612b7024b8d4e0c2ced16798228738b47a4f3 100644 --- a/arch/sh/src/sh1/sh1_lowputc.c +++ b/arch/renesas/src/sh1/sh1_lowputc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/sh1/sh1_lowputc.c + * arch/renesas/src/sh1/sh1_lowputc.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/sh1/sh1_saveusercontext.S b/arch/renesas/src/sh1/sh1_saveusercontext.S similarity index 99% rename from arch/sh/src/sh1/sh1_saveusercontext.S rename to arch/renesas/src/sh1/sh1_saveusercontext.S index 8084e5bd0d8ccee59ed364d93abfc767c5de2bdd..e2fcebd7ef3a2ed6cf513f7f7a72a458c3629bf4 100644 --- a/arch/sh/src/sh1/sh1_saveusercontext.S +++ b/arch/renesas/src/sh1/sh1_saveusercontext.S @@ -1,5 +1,5 @@ /************************************************************************** - * arch/sh/src/sh1/sh1_saveusercontext.S + * arch/renesas/src/sh1/sh1_saveusercontext.S * * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/sh1/sh1_schedulesigaction.c b/arch/renesas/src/sh1/sh1_schedulesigaction.c similarity index 99% rename from arch/sh/src/sh1/sh1_schedulesigaction.c rename to arch/renesas/src/sh1/sh1_schedulesigaction.c index 11c241ddea36204814ecbc46447d406855f084ab..503272b5a95baa93364b000c010f33c1df18fc36 100644 --- a/arch/sh/src/sh1/sh1_schedulesigaction.c +++ b/arch/renesas/src/sh1/sh1_schedulesigaction.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/sh1/sh1_schedulesigaction.c + * arch/renesas/src/sh1/sh1_schedulesigaction.c * * Copyright (C) 2008-2010, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/sh1/sh1_serial.c b/arch/renesas/src/sh1/sh1_serial.c similarity index 99% rename from arch/sh/src/sh1/sh1_serial.c rename to arch/renesas/src/sh1/sh1_serial.c index 44c9cf8a93409e59f9a3dde7a5936f41646c8e8c..ff9246fad99630c6975d3457df6f531d0bc99be9 100644 --- a/arch/sh/src/sh1/sh1_serial.c +++ b/arch/renesas/src/sh1/sh1_serial.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/sh1/sh1_serial.c + * arch/renesas/src/sh1/sh1_serial.c * * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/sh1/sh1_sigdeliver.c b/arch/renesas/src/sh1/sh1_sigdeliver.c similarity index 99% rename from arch/sh/src/sh1/sh1_sigdeliver.c rename to arch/renesas/src/sh1/sh1_sigdeliver.c index 85b8f57978dd43fc35751f03888b8e620b52dec3..8662cb47c5fe19da60be9a19002ebc0d01b55ca8 100644 --- a/arch/sh/src/sh1/sh1_sigdeliver.c +++ b/arch/renesas/src/sh1/sh1_sigdeliver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_sigdeliver.c + * arch/renesas/src/common/up_sigdeliver.c * * Copyright (C) 2008-2010, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/sh1/sh1_timerisr.c b/arch/renesas/src/sh1/sh1_timerisr.c similarity index 99% rename from arch/sh/src/sh1/sh1_timerisr.c rename to arch/renesas/src/sh1/sh1_timerisr.c index 08647be112f7b77286142583c74b003f42fa2427..c291735ad22b6701b812e9e46e1c06743c74dac2 100644 --- a/arch/sh/src/sh1/sh1_timerisr.c +++ b/arch/renesas/src/sh1/sh1_timerisr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sh/src/sh1/sh1_timerisr.c + * arch/renesas/src/sh1/sh1_timerisr.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/sh1/sh1_vector.S b/arch/renesas/src/sh1/sh1_vector.S similarity index 99% rename from arch/sh/src/sh1/sh1_vector.S rename to arch/renesas/src/sh1/sh1_vector.S index 396e33cd2761b95ae6e76172c391b87f7fc69c31..78ec75f310c3279ca63aa84ed6ab8911a9e8e6eb 100644 --- a/arch/sh/src/sh1/sh1_vector.S +++ b/arch/renesas/src/sh1/sh1_vector.S @@ -1,5 +1,5 @@ /***************************************************************************** - * arch/sh/src/sh1/sh1_vector.S + * arch/renesas/src/sh1/sh1_vector.S * * Copyright (C) 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sh/src/README.txt b/arch/sh/src/README.txt deleted file mode 100644 index 3cbd17c0fd886419e52664bf67e8b9899cdfb560..0000000000000000000000000000000000000000 --- a/arch/sh/src/README.txt +++ /dev/null @@ -1,7 +0,0 @@ -This directory provides a build area for all SH architectures. -The 'common' subdirectory contains source files shared by all SH -architectures; Source files unique to a specific SH chip -architecture are contained in a subdirectory named after the chip. -At configuration time, additional directories will be linked here: -'build' will be a link to the configs/*/src directory; 'chip' will -be a link to the SH chip sub-directory. diff --git a/arch/sim/Kconfig b/arch/sim/Kconfig index 614b8e7ef7ed5d49671f9afb17d35aaaf230d6e1..975d0449a5b6d44f9e89e529a13b80e248b4f617 100644 --- a/arch/sim/Kconfig +++ b/arch/sim/Kconfig @@ -211,8 +211,33 @@ config SIM_TCNWAITERS default 4 depends on !POLL_DISABLE && SIM_TOUCHSCREEN ---help--- - The maximum number of threads that can be waiting on poll() for a touchscreen event. - Default: 4 + The maximum number of threads that can be waiting on poll() for a + touchscreen event. Default: 4 + +config SIM_IOEXPANDER + bool "Simulated I/O Expander" + default n + depends on IOEXPANDER + select IOEXPANDER_INT_ENABLE + ---help--- + Build a simple, simulated I/O Expander chip simulation (for testing + purposes only). + +if SIM_IOEXPANDER + +config SIM_INT_NCALLBACKS + int "Max number of interrupt callbacks" + default 4 + ---help--- + This is the maximum number of interrupt callbacks supported + +config SIM_INT_POLLDELAY + int "Interrupt poll delay (used)" + default 500000 + ---help--- + This microsecond delay defines the polling rate for missed interrupts. + +endif # SIM_IOEXPANDER config SIM_SPIFLASH bool "Simulated SPI FLASH with SMARTFS" @@ -395,4 +420,4 @@ config SIM_QSPIFLASH_PAGESIZE "wrap" causing the initial data sent to be overwritten. This is consistent with standard SPI FLASH operation. -endif +endif # ARCH_SIM diff --git a/arch/sim/include/arch.h b/arch/sim/include/arch.h index 29cf6495fce21545af5132b51188e3110397e126..83fdc737c45ad528a0067e80da4d760f36fa1884 100644 --- a/arch/sim/include/arch.h +++ b/arch/sim/include/arch.h @@ -37,8 +37,8 @@ * only indirectly through nuttx/arch.h */ -#ifndef __ARCH_ARCH_H -#define __ARCH_ARCH_H +#ifndef __ARCH_SIM_INCLUDE_ARCH_H +#define __ARCH_SIM_INCLUDE_ARCH_H /**************************************************************************** * Included Files @@ -77,5 +77,5 @@ extern "C" } #endif -#endif /* __ARCH_ARCH_H */ +#endif /* __ARCH_SIM_INCLUDE_ARCH_H */ diff --git a/arch/sim/include/irq.h b/arch/sim/include/irq.h index 9a9781dda46afe2bac55e0502447704bea862c60..ae95625ace73dc39bdeca180feed9c0b99983b3a 100644 --- a/arch/sim/include/irq.h +++ b/arch/sim/include/irq.h @@ -1,5 +1,5 @@ /**************************************************************************** - * irq.h + * arch/sim/include/irq.h * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -37,8 +37,8 @@ * only indirectly through nuttx/irq.h */ -#ifndef __ARCH_IRQ_H -#define __ARCH_IRQ_H +#ifndef __ARCH_SIM_INCLUDE_IRQ_H +#define __ARCH_SIM_INCLUDE_IRQ_H /**************************************************************************** * Included Files @@ -132,5 +132,5 @@ extern "C" } #endif -#endif /* __ARCH_IRQ_H */ +#endif /* __ARCH_SIM_INCLUDE_IRQ_H */ diff --git a/arch/sim/include/tls.h b/arch/sim/include/tls.h index ae2cf3b85a243b097a80396a0aeadf204903ae35..6df7505714b39bf9d22d3606c6cd65d284c1d262 100644 --- a/arch/sim/include/tls.h +++ b/arch/sim/include/tls.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sin/include/tls.h + * arch/sim/include/tls.h * * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile index fdac7796be54a0193490637fb0a6503c054f1f70..69d8e85b1e308900044a9a6ffdf4a582f9b1f80a 100644 --- a/arch/sim/src/Makefile +++ b/arch/sim/src/Makefile @@ -85,6 +85,10 @@ ifeq ($(CONFIG_DEV_CONSOLE),y) HOSTSRCS += up_simuart.c endif +ifeq ($(CONFIG_ONESHOT),y) + CSRCS += up_oneshot.c +endif + ifeq ($(CONFIG_NX_LCDDRIVER),y) CSRCS += board_lcd.c else @@ -103,6 +107,10 @@ endif endif endif +ifeq ($(CONFIG_SIM_IOEXPANDER),y) + CSRCS += up_ioexpander.c +endif + ifeq ($(CONFIG_ELF),y) CSRCS += up_elf.c endif diff --git a/arch/sim/src/nuttx-names.dat b/arch/sim/src/nuttx-names.dat index 13c064b1778e17324a9173df001df7073e4c7e42..759743be5348a5450f65d814738774a060183db4 100644 --- a/arch/sim/src/nuttx-names.dat +++ b/arch/sim/src/nuttx-names.dat @@ -88,6 +88,7 @@ setenv NXsetenv setlogmask NXsetlogmask setsockopt NXsetsockopt sigaction NXsigaction +sigaddset NXsigaddset sigdelset NXsigdelset sigemptyset NXsigemptyset sigfillset NXsigfillset diff --git a/arch/sim/src/up_internal.h b/arch/sim/src/up_internal.h index 1304419af342a261a8cfa9b904b8f52d6a768f5c..658ec0539bc19c31be0216f3505501fb9a3c56b1 100644 --- a/arch/sim/src/up_internal.h +++ b/arch/sim/src/up_internal.h @@ -296,6 +296,13 @@ int up_buttonevent(int x, int y, int buttons); int sim_ajoy_initialize(void); #endif +/* up_ioexpander.c ********************************************************/ + +#ifdef CONFIG_SIM_IOEXPANDER +struct ioexpander_dev_s; +FAR struct ioexpander_dev_s *sim_ioexpander_initialize(void); +#endif + /* up_tapdev.c ************************************************************/ #if defined(CONFIG_NET_ETHERNET) && !defined(__CYGWIN__) diff --git a/arch/sim/src/up_ioexpander.c b/arch/sim/src/up_ioexpander.c new file mode 100644 index 0000000000000000000000000000000000000000..584a2e97f69b98f5e32f14df083c998839cdfa70 --- /dev/null +++ b/arch/sim/src/up_ioexpander.c @@ -0,0 +1,866 @@ +/**************************************************************************** + * arch/sim/src/up_ioexpander.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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "up_internal.h" + +#ifdef CONFIG_SIM_IOEXPANDER + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define SIM_POLLDELAY (CONFIG_SIM_INT_POLLDELAY / USEC_PER_TICK) + +#define SIM_INT_ENABLED(d,p) \ + (((d)->intenab & ((ioe_pinset_t)1 << (p))) != 0) +#define SIM_INT_DISABLED(d,p) \ + (((d)->intenab & ((ioe_pinset_t)1 << (p))) == 0) + +#define SIM_LEVEL_SENSITIVE(d,p) \ + (((d)->trigger & ((ioe_pinset_t)1 << (p))) == 0) +#define SIM_LEVEL_HIGH(d,p) \ + (((d)->level[0] & ((ioe_pinset_t)1 << (p))) != 0) +#define SIM_LEVEL_LOW(d,p) \ + (((d)->level[1] & ((ioe_pinset_t)1 << (p))) != 0) + +#define SIM_EDGE_SENSITIVE(d,p) \ + (((d)->trigger & ((ioe_pinset_t)1 << (p))) != 0) +#define SIM_EDGE_RISING(d,p) \ + (((d)->level[0] & ((ioe_pinset_t)1 << (p))) != 0) +#define SIM_EDGE_FALLING(d,p) \ + (((d)->level[1] & ((ioe_pinset_t)1 << (p))) != 0) +#define SIM_EDGE_BOTH(d,p) \ + (SIM_LEVEL_RISING(d,p) && SIM_LEVEL_FALLING(d,p)) + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* This type represents on registered pin interrupt callback */ + +struct sim_callback_s +{ + ioe_pinset_t pinset; /* Set of pin interrupts that will generate + * the callback. */ + ioe_callback_t cbfunc; /* The saved callback function pointer */ + FAR void *cbarg; /* Callback argument */ +}; + +/* This structure represents the state of the I/O Expander driver */ + +struct sim_dev_s +{ + struct ioexpander_dev_s dev; /* Nested structure to allow casting as public gpio + * expander. */ + ioe_pinset_t inpins; /* Pins select as inputs */ + ioe_pinset_t invert; /* Pin value inversion */ + ioe_pinset_t outval; /* Value of output pins */ + ioe_pinset_t inval; /* Simulated input register */ + ioe_pinset_t intenab; /* Interrupt enable */ + ioe_pinset_t last; /* Last pin inputs (for detection of changes) */ + ioe_pinset_t trigger; /* Bit encoded: 0=level 1=edge */ + ioe_pinset_t level[2]; /* Bit encoded: 01=high/rising, 10 low/falling, 11 both */ + + WDOG_ID wdog; /* Timer used to poll for interrupt simulation */ + struct work_s work; /* Supports the interrupt handling "bottom half" */ + + /* Saved callback information for each I/O expander client */ + + struct sim_callback_s cb[CONFIG_SIM_INT_NCALLBACKS]; +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/* I/O Expander Methods */ + +static int sim_direction(FAR struct ioexpander_dev_s *dev, uint8_t pin, + int dir); +static int sim_option(FAR struct ioexpander_dev_s *dev, uint8_t pin, + int opt, void *regval); +static int sim_writepin(FAR struct ioexpander_dev_s *dev, uint8_t pin, + bool value); +static int sim_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin, + FAR bool *value); +#ifdef CONFIG_IOEXPANDER_MULTIPIN +static int sim_multiwritepin(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, int count); +static int sim_multireadpin(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, int count); +#endif +static FAR void *sim_attach(FAR struct ioexpander_dev_s *dev, + ioe_pinset_t pinset, ioe_callback_t callback, FAR void *arg); +static int sim_detach(FAR struct ioexpander_dev_s *dev, FAR void *handle); + +static ioe_pinset_t sim_int_update(FAR struct sim_dev_s *priv); +static void sim_interrupt_work(void *arg); +static void sim_interrupt(int argc, wdparm_t arg1, ...); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* Since only single device is supported, the driver state structure may as + * well be pre-allocated. + */ + +static struct sim_dev_s g_ioexpander; + +/* I/O expander vtable */ + +static const struct ioexpander_ops_s g_sim_ops = +{ + sim_direction, + sim_option, + sim_writepin, + sim_readpin, + sim_readpin +#ifdef CONFIG_IOEXPANDER_MULTIPIN + , sim_multiwritepin + , sim_multireadpin + , sim_multireadpin +#endif + , sim_attach + , sim_detach +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: sim_direction + * + * Description: + * Set the direction of an ioexpander pin. Required. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin to alter in this call + * dir - One of the IOEXPANDER_DIRECTION_ macros + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int sim_direction(FAR struct ioexpander_dev_s *dev, uint8_t pin, + int direction) +{ + FAR struct sim_dev_s *priv = (FAR struct sim_dev_s *)dev; + + DEBUGASSERT(priv != NULL && pin < CONFIG_IOEXPANDER_NPINS && + (direction == IOEXPANDER_DIRECTION_IN || + direction == IOEXPANDER_DIRECTION_OUT)); + + gpioinfo("pin=%u direction=%s\n", + pin, (direction == IOEXPANDER_DIRECTION_IN) ? "IN" : "OUT"); + + /* Set the pin direction */ + + if (direction == IOEXPANDER_DIRECTION_IN) + { + /* Configure pin as input. */ + + priv->inpins |= (1 << pin); + } + else /* if (direction == IOEXPANDER_DIRECTION_OUT) */ + { + /* Configure pin as output. If a bit in this register is cleared to + * 0, the corresponding port pin is enabled as an output. + * + * REVISIT: The value of output has not been selected! This might + * put a glitch on the output. + */ + + priv->inpins &= ~(1 << pin); + } + + return OK; +} + +/**************************************************************************** + * Name: sim_option + * + * Description: + * Set pin options. Required. + * Since all IO expanders have various pin options, this API allows setting + * pin options in a flexible way. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin to alter in this call + * opt - One of the IOEXPANDER_OPTION_ macros + * val - The option's value + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int sim_option(FAR struct ioexpander_dev_s *dev, uint8_t pin, + int opt, FAR void *value) +{ + FAR struct sim_dev_s *priv = (FAR struct sim_dev_s *)dev; + int ret = -ENOSYS; + + DEBUGASSERT(priv != NULL); + + gpioinfo("pin=%u option=%u\n", pin, opt); + + /* Check for pin polarity inversion. The Polarity Inversion Register + * allows polarity inversion of pins defined as inputs by the + * Configuration Register. If a bit in this register is set, the + * corresponding port pin's polarity is inverted. If a bit in this + * register is cleared, the corresponding port pin's original polarity + * is retained. + */ + + if (opt == IOEXPANDER_OPTION_INVERT) + { + if ((uintptr_t)value == IOEXPANDER_OPTION_INVERT) + { + priv->invert |= (1 << pin); + } + else + { + priv->invert &= ~(1 << pin); + } + } + + /* Interrupt configuration */ + + else if (opt == IOEXPANDER_OPTION_INTCFG) + { + ioe_pinset_t bit = ((ioe_pinset_t)1 << pin); + + ret = OK; + switch ((uintptr_t)value) + { + case IOEXPANDER_VAL_HIGH: /* Interrupt on high level */ + priv->intenab |= bit; + priv->trigger &= ~bit; + priv->level[0] |= bit; + priv->level[1] &= ~bit; + break; + + case IOEXPANDER_VAL_LOW: /* Interrupt on low level */ + priv->intenab |= bit; + priv->trigger &= ~bit; + priv->level[0] &= ~bit; + priv->level[1] |= bit; + break; + + case IOEXPANDER_VAL_RISING: /* Interrupt on rising edge */ + priv->intenab |= bit; + priv->trigger |= bit; + priv->level[0] |= bit; + priv->level[1] &= ~bit; + break; + + case IOEXPANDER_VAL_FALLING: /* Interrupt on falling edge */ + priv->intenab |= bit; + priv->trigger |= bit; + priv->level[0] &= ~bit; + priv->level[1] |= bit; + break; + + case IOEXPANDER_VAL_BOTH: /* Interrupt on both edges */ + priv->intenab |= bit; + priv->trigger |= bit; + priv->level[0] |= bit; + priv->level[1] |= bit; + break; + + case IOEXPANDER_VAL_DISABLE: + priv->trigger &= ~bit; + break; + + default: + ret = -EINVAL; + break; + } + } + + return ret; +} + +/**************************************************************************** + * Name: sim_writepin + * + * Description: + * Set the pin level. Required. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin to alter in this call + * val - The pin level. Usually TRUE will set the pin high, + * except if OPTION_INVERT has been set on this pin. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int sim_writepin(FAR struct ioexpander_dev_s *dev, uint8_t pin, + bool value) +{ + FAR struct sim_dev_s *priv = (FAR struct sim_dev_s *)dev; + + DEBUGASSERT(priv != NULL && pin < CONFIG_IOEXPANDER_NPINS); + + gpioinfo("pin=%u value=%u\n", pin, (unsigned int)value); + + /* Set output pins default value (before configuring it as output) The + * Output Port Register shows the outgoing logic levels of the pins + * defined as outputs by the Configuration Register. + */ + + if (value && (priv->invert & (1 << pin)) == 0) + { + priv->outval |= (1 << pin); + } + else + { + priv->outval &= ~(1 << pin); + } + + return OK; +} + +/**************************************************************************** + * Name: sim_readpin + * + * Description: + * Read the actual PIN level. This can be different from the last value written + * to this pin. Required. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin + * valptr - Pointer to a buffer where the pin level is stored. Usually TRUE + * if the pin is high, except if OPTION_INVERT has been set on this pin. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int sim_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin, + FAR bool *value) +{ + FAR struct sim_dev_s *priv = (FAR struct sim_dev_s *)dev; + ioe_pinset_t inval; + bool retval; + + DEBUGASSERT(priv != NULL && pin < CONFIG_IOEXPANDER_NPINS && value != NULL); + + gpioinfo("pin=%u\n", pin); + + /* Is this an output pin? */ + + if ((priv->inpins & (1 << pin)) != 0) + { + inval = priv->inval; + } + else + { + inval = priv->outval; + } + + /* Return 0 or 1 to indicate the state of pin */ + + retval = (((inval >> pin) & 1) != 0); + *value = ((priv->invert & (1 << pin)) != 0) ? !retval : retval; + return OK; +} + +/**************************************************************************** + * Name: sim_multiwritepin + * + * Description: + * Set the pin level for multiple pins. This routine may be faster than + * individual pin accesses. Optional. + * + * Input Parameters: + * dev - Device-specific state data + * pins - The list of pin indexes to alter in this call + * val - The list of pin levels. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_MULTIPIN +static int sim_multiwritepin(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, + int count) +{ + FAR struct sim_dev_s *priv = (FAR struct sim_dev_s *)dev; + uint8_t pin; + int i; + + gpioinfo("count=%d\n", count); + DEBUGASSERT(priv != NULL && pins != NULL && values != NULL && count > 0); + + /* Apply the user defined changes */ + + for (i = 0; i < count; i++) + { + pin = pins[i]; + DEBUGASSERT(pin < CONFIG_IOEXPANDER_NPINS); + + if (values[i] && (priv->invert & (1 << pin)) == 0) + { + priv->outval |= (1 << pin); + } + else + { + priv->outval &= ~(1 << pin); + } + } + + return OK; +} +#endif + +/**************************************************************************** + * Name: sim_multireadpin + * + * Description: + * Read the actual level for multiple pins. This routine may be faster than + * individual pin accesses. Optional. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The list of pin indexes to read + * valptr - Pointer to a buffer where the pin levels are stored. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_MULTIPIN +static int sim_multireadpin(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, + int count) +{ + FAR struct sim_dev_s *priv = (FAR struct sim_dev_s *)dev; + ioe_pinset_t inval; + uint8_t pin; + bool pinval; + int i; + + gpioinfo("count=%d\n", count); + DEBUGASSERT(priv != NULL && pins != NULL && values != NULL && count > 0); + + /* Update the input status with the 8 bits read from the expander */ + + for (i = 0; i < count; i++) + { + pin = pins[i]; + DEBUGASSERT(pin < CONFIG_IOEXPANDER_NPINS); + + /* Is this an output pin? */ + + if ((priv->inpins & (1 << pin)) != 0) + { + inval = priv->inval; + } + else + { + inval = priv->outval; + } + + pinval = ((inval & (1 << pin)) != 0); + values[i] = ((priv->invert & (1 << pin)) != 0) ? !pinval : pinval; + } + + return OK; +} +#endif + +/**************************************************************************** + * Name: sim_attach + * + * Description: + * Attach and enable a pin interrupt callback function. + * + * Input Parameters: + * dev - Device-specific state data + * pinset - The set of pin events that will generate the callback + * callback - The pointer to callback function. NULL will detach the + * callback. + * arg - User-provided callback argument + * + * Returned Value: + * A non-NULL handle value is returned on success. This handle may be + * used later to detach and disable the pin interrupt. + * + ****************************************************************************/ + +static FAR void *sim_attach(FAR struct ioexpander_dev_s *dev, + ioe_pinset_t pinset, ioe_callback_t callback, + FAR void *arg) +{ + FAR struct sim_dev_s *priv = (FAR struct sim_dev_s *)dev; + FAR void *handle = NULL; + int i; + + gpioinfo("pinset=%lx callback=%p arg=%p\n", + (unsigned long)pinset, callback, arg); + + /* Find and available in entry in the callback table */ + + for (i = 0; i < CONFIG_SIM_INT_NCALLBACKS; i++) + { + /* Is this entry available (i.e., no callback attached) */ + + if (priv->cb[i].cbfunc == NULL) + { + /* Yes.. use this entry */ + + priv->cb[i].pinset = pinset; + priv->cb[i].cbfunc = callback; + priv->cb[i].cbarg = arg; + handle = &priv->cb[i]; + break; + } + } + + return handle; +} + +/**************************************************************************** + * Name: sim_detach + * + * Description: + * Detach and disable a pin interrupt callback function. + * + * Input Parameters: + * dev - Device-specific state data + * handle - The non-NULL opaque value return by sim_attch() + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int sim_detach(FAR struct ioexpander_dev_s *dev, FAR void *handle) +{ + FAR struct sim_dev_s *priv = (FAR struct sim_dev_s *)dev; + FAR struct sim_callback_s *cb = (FAR struct sim_callback_s *)handle; + + gpioinfo("handle=%p\n", handle); + + DEBUGASSERT(priv != NULL && cb != NULL); + DEBUGASSERT((uintptr_t)cb >= (uintptr_t)&priv->cb[0] && + (uintptr_t)cb <= (uintptr_t)&priv->cb[CONFIG_SIM_INT_NCALLBACKS-1]); + UNUSED(priv); + + cb->pinset = 0; + cb->cbfunc = NULL; + cb->cbarg = NULL; + return OK; +} + +/**************************************************************************** + * Name: sim_int_update + * + * Description: + * Check for pending interrupts. + * + ****************************************************************************/ + +static ioe_pinset_t sim_int_update(FAR struct sim_dev_s *priv) +{ + ioe_pinset_t toggles; + ioe_pinset_t diff; + ioe_pinset_t input; + ioe_pinset_t intstat; + bool pinval; + int pin; + int i; + + /* First, toggle all input bits that have associated, attached interrupt + * handler. This is a crude simulation for toggle interrupt inputs. + */ + + toggles = 0; + for (i = 0; i < CONFIG_SIM_INT_NCALLBACKS; i++) + { + /* Is there a callback attached? */ + + if (priv->cb[i].cbfunc != NULL) + { + /* Yes, add the input pins to set of pins to toggle */ + + toggles |= (priv->cb[i].pinset & priv->inpins); + } + } + + priv->inval = (priv->inval & ~toggles) | (~priv->inval & toggles); + + /* Check the changed bits from last read (Only applies to input pins) */ + + input = priv->inval; + diff = priv->last ^ input; + if (diff != 0) + { + gpioinfo("toggles=%lx inval=%lx last=%lx diff=%lx\n", + (unsigned long)toggles, (unsigned long)priv->inval, + (unsigned long)priv->last, (unsigned long)diff); + } + + priv->last = input; + intstat = 0; + + /* Check for changes in pins that could generate an interrupt. */ + + for (pin = 0; pin < CONFIG_IOEXPANDER_NPINS; pin++) + { + /* Get the value of the pin (accounting for inversion) */ + + pinval = ((input & 1) != 0); + if ((priv->invert & (1 << pin)) != 0) + { + pinval = !pinval; + } + + if (SIM_INT_DISABLED(priv, pin)) + { + /* Interrupts disabled on this pin. Do nothing.. just skip to the + * next pin. + */ + } + else if (SIM_EDGE_SENSITIVE(priv, pin)) + { + /* Edge triggered. Was there a change in the level? */ + + if ((diff & 1) != 0) + { + /* Set interrupt as a function of edge type */ + + if ((!pinval && SIM_EDGE_FALLING(priv, pin)) || + ( pinval && SIM_EDGE_RISING(priv, pin))) + { + intstat |= 1 << pin; + } + } + } + else /* if (SIM_LEVEL_SENSITIVE(priv, pin)) */ + { + /* Level triggered. Set intstat if match in level type. */ + + if ((pinval && SIM_LEVEL_HIGH(priv, pin)) || + (!pinval && SIM_LEVEL_LOW(priv, pin))) + { + intstat |= 1 << pin; + } + } + + diff >>= 1; + input >>= 1; + } + + return intstat; +} + +/**************************************************************************** + * Name: sim_interrupt_work + * + * Description: + * Handle GPIO interrupt events (this function actually executes in the + * context of the worker thread). + * + ****************************************************************************/ + +static void sim_interrupt_work(void *arg) +{ + FAR struct sim_dev_s *priv = (FAR struct sim_dev_s *)arg; + ioe_pinset_t intstat; + int ret; + int i; + + DEBUGASSERT(priv != NULL); + + /* Update the input status with the 32 bits read from the expander */ + + intstat = sim_int_update(priv); + if (intstat != 0) + { + gpioinfo("intstat=%lx\n", (unsigned long)intstat); + + /* Perform pin interrupt callbacks */ + + for (i = 0; i < CONFIG_SIM_INT_NCALLBACKS; i++) + { + /* Is this entry valid (i.e., callback attached)? */ + + if (priv->cb[i].cbfunc != NULL) + { + /* Did any of the requested pin interrupts occur? */ + + ioe_pinset_t match = intstat & priv->cb[i].pinset; + if (match != 0) + { + /* Yes.. perform the callback */ + + (void)priv->cb[i].cbfunc(&priv->dev, match, + priv->cb[i].cbarg); + } + } + } + } + + /* Re-start the poll timer */ + + ret = wd_start(priv->wdog, SIM_POLLDELAY, (wdentry_t)sim_interrupt, + 1, (wdparm_t)priv); + if (ret < 0) + { + gpioerr("ERROR: Failed to start poll timer\n"); + } +} + +/**************************************************************************** + * Name: sim_interrupt + * + * Description: + * The poll timer has expired; check for missed interrupts + * + * Input Parameters: + * Standard wdog expiration arguments. + * + ****************************************************************************/ + +static void sim_interrupt(int argc, wdparm_t arg1, ...) +{ + FAR struct sim_dev_s *priv; + + DEBUGASSERT(argc == 1); + priv = (FAR struct sim_dev_s *)arg1; + DEBUGASSERT(priv != NULL); + + /* Defer interrupt processing to the worker thread. This is not only + * much kinder in the use of system resources but is probably necessary + * to access the I/O expander device. + * + * Notice that further GPIO interrupts are disabled until the work is + * actually performed. This is to prevent overrun of the worker thread. + * Interrupts are re-enabled in sim_interrupt_work() when the work is + * completed. + */ + + if (work_available(&priv->work)) + { + /* Schedule interrupt related work on the high priority worker thread. */ + + work_queue(HPWORK, &priv->work, sim_interrupt_work, + (FAR void *)priv, 0); + } +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: sim_ioexpander_initialize + * + * Description: + * Instantiate and configure the I/O Expander device driver to use the provided + * I2C device instance. + * + * Input Parameters: + * i2c - An I2C driver instance + * minor - The device i2c address + * config - Persistent board configuration data + * + * Returned Value: + * an ioexpander_dev_s instance on success, NULL on failure. + * + ****************************************************************************/ + +FAR struct ioexpander_dev_s *sim_ioexpander_initialize(void) +{ + FAR struct sim_dev_s *priv = &g_ioexpander; + int ret; + + /* Initialize the device state structure */ + + priv->dev.ops = &g_sim_ops; + + /* Initial interrupt state: Edge triggered on both edges */ + + priv->trigger = PINSET_ALL; /* All edge triggered */ + priv->level[0] = PINSET_ALL; /* All rising edge */ + priv->level[1] = PINSET_ALL; /* All falling edge */ + + /* Set up a timer to poll for simulated interrupts */ + + priv->wdog = wd_create(); + DEBUGASSERT(priv->wdog != NULL); + + ret = wd_start(priv->wdog, SIM_POLLDELAY, (wdentry_t)sim_interrupt, + 1, (wdparm_t)priv); + if (ret < 0) + { + gpioerr("ERROR: Failed to start poll timer\n"); + } + + return &priv->dev; +} + +#endif /* CONFIG_SIM_IOEXPANDER */ diff --git a/arch/sim/src/up_oneshot.c b/arch/sim/src/up_oneshot.c new file mode 100644 index 0000000000000000000000000000000000000000..7481e40017b9572d9ee0fd8b49f7c9ee0350fc5c --- /dev/null +++ b/arch/sim/src/up_oneshot.c @@ -0,0 +1,322 @@ +/**************************************************************************** + * arch/sim/src/up_oneshot.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 +#include +#include + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* This structure describes the state of the oneshot timer lower-half driver */ + +struct sim_oneshot_lowerhalf_s +{ + /* This is the part of the lower half driver that is visible to the upper- + * half client of the driver. This must be the first thing in this + * structure so that pointers to struct oneshot_lowerhalf_s are cast + * compatible to struct sim_oneshot_lowerhalf_s and vice versa. + */ + + struct oneshot_lowerhalf_s lh; /* Common lower-half driver fields */ + + /* Private lower half data follows */ + + WDOG_ID wdog; /* Simulates oneshot timer */ + oneshot_callback_t callback; /* internal handler that receives callback */ + FAR void *arg; /* Argument that is passed to the handler */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static void sim_oneshot_handler(int argc, wdparm_t arg1, ...); + +static int sim_max_delay(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts); +static int sim_start(FAR struct oneshot_lowerhalf_s *lower, + oneshot_callback_t callback, FAR void *arg, + FAR const struct timespec *ts); +static int sim_cancel(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* Lower half operations */ + +static const struct oneshot_operations_s g_oneshot_ops = +{ + .max_delay = sim_max_delay, + .start = sim_start, + .cancel = sim_cancel, +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: sim_oneshot_handler + * + * Description: + * Timer expiration handler + * + * Input Parameters: + * arg - Should be the same argument provided when sim_oneshot_start() + * was called. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void sim_oneshot_handler(int argc, wdparm_t arg1, ...) +{ + FAR struct sim_oneshot_lowerhalf_s *priv = + (FAR struct sim_oneshot_lowerhalf_s *)arg1; + oneshot_callback_t callback; + FAR void *cbarg; + + DEBUGASSERT(argc == 1 && priv != NULL); + + /* Perhaps the callback was nullified in a race condition with + * sim_cancel? + */ + + if (priv->callback) + { + /* Sample and nullify BEFORE executing callback (in case the callback + * restarts the oneshot). + */ + + callback = priv->callback; + cbarg = priv->arg; + priv->callback = NULL; + priv->arg = NULL; + + /* Then perform the callback */ + + callback(&priv->lh, cbarg); + } +} + +/**************************************************************************** + * Name: sim_max_delay + * + * Description: + * Determine the maximum delay of the one-shot timer (in microseconds) + * + * Input Parameters: + * lower An instance of the lower-half oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * ts The location in which to return the maxumum delay. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +static int sim_max_delay(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts) +{ + DEBUGASSERT(lower != NULL && ts != NULL); + + ts->tv_sec = INT_MAX; + ts->tv_nsec = 1000000000ul - 1; + return OK; +} + +/**************************************************************************** + * Name: sim_start + * + * Description: + * Start the oneshot timer + * + * Input Parameters: + * lower An instance of the lower-half oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * handler The function to call when when the oneshot timer expires. + * arg An opaque argument that will accompany the callback. + * ts Provides the duration of the one shot timer. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +static int sim_start(FAR struct oneshot_lowerhalf_s *lower, + oneshot_callback_t callback, FAR void *arg, + FAR const struct timespec *ts) +{ + FAR struct sim_oneshot_lowerhalf_s *priv = + (FAR struct sim_oneshot_lowerhalf_s *)lower; + systime_t ticks; + int64_t nsec; + + DEBUGASSERT(priv != NULL && callback != NULL && ts != NULL); + + /* Convert time to ticks */ + + nsec = (int64_t)ts->tv_sec * NSEC_PER_SEC + + (int64_t)ts->tv_nsec; + ticks = (systime_t)((nsec + NSEC_PER_TICK - 1) / NSEC_PER_TICK); + + /* Save the callback information and start the timer */ + + priv->callback = callback; + priv->arg = arg; + + return wd_start(priv->wdog, ticks, (wdentry_t)sim_oneshot_handler, + 1, (wdparm_t)priv); +} + +/**************************************************************************** + * Name: sim_cancel + * + * Description: + * Cancel the oneshot timer and return the time remaining on the timer. + * + * NOTE: This function may execute at a high rate with no timer running (as + * when pre-emption is enabled and disabled). + * + * Input Parameters: + * lower Caller allocated instance of the oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * ts The location in which to return the time remaining on the + * oneshot timer. A time of zero is returned if the timer is + * not running. + * + * Returned Value: + * Zero (OK) is returned on success. A call to up_timer_cancel() when + * the timer is not active should also return success; a negated errno + * value is returned on any failure. + * + ****************************************************************************/ + +static int sim_cancel(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts) +{ + FAR struct sim_oneshot_lowerhalf_s *priv = + (FAR struct sim_oneshot_lowerhalf_s *)lower; + int ret; + + DEBUGASSERT(priv != NULL); + + /* Cancel the timer */ + + ret = wd_cancel(priv->wdog); + priv->callback = NULL; + priv->arg = NULL; + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: oneshot_initialize + * + * Description: + * Initialize the oneshot timer and return a oneshot lower half driver + * instance. + * + * Input Parameters: + * chan Timer counter channel to be used. + * resolution The required resolution of the timer in units of + * microseconds. NOTE that the range is restricted to the + * range of uint16_t (excluding zero). + * + * Returned Value: + * On success, a non-NULL instance of the oneshot lower-half driver is + * returned. NULL is return on any failure. + * + ****************************************************************************/ + +FAR struct oneshot_lowerhalf_s *oneshot_initialize(int chan, + uint16_t resolution) +{ + FAR struct sim_oneshot_lowerhalf_s *priv; + + /* Allocate an instance of the lower half driver */ + + priv = (FAR struct sim_oneshot_lowerhalf_s *) + kmm_zalloc(sizeof(struct sim_oneshot_lowerhalf_s)); + + if (priv == NULL) + { + tmrerr("ERROR: Failed to initialized state structure\n"); + return NULL; + } + + /* Initialize the lower-half driver structure */ + + priv->lh.ops = &g_oneshot_ops; + + /* Initialize the contained watchdog timer */ + + priv->wdog = wd_create(); + if (priv->wdog == NULL) + { + tmrerr("ERROR: Failed to create wdog\n"); + kmm_free(priv); + return NULL; + } + + return &priv->lh; +} \ No newline at end of file diff --git a/arch/x86/include/i486/io.h b/arch/x86/include/i486/io.h index 56471b5ab5451642fd323eb24e1a3e8ecb1ed7ac..a6f455b79c35b3fe055a2f3615ec07805760b083 100644 --- a/arch/x86/include/i486/io.h +++ b/arch/x86/include/i486/io.h @@ -1,6 +1,5 @@ /**************************************************************************** * arch/x86/include/i486/io.h - * arch/chip/io.h * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z16/include/arch.h b/arch/z16/include/arch.h index cb574663df12b708fb79f5f8ef185c5f3af93711..350a94b419637ae7943527438fb905b31fd5a730 100644 --- a/arch/z16/include/arch.h +++ b/arch/z16/include/arch.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arch.h + * arch/z16/include/arch/arch.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -37,8 +37,8 @@ * only indirectly through nuttx/arch.h */ -#ifndef __ARCH_ARCH_H -#define __ARCH_ARCH_H +#ifndef __ARCH_Z16_INCLUDE_ARCH_H +#define __ARCH_Z16_INCLUDE_ARCH_H /**************************************************************************** * Included Files @@ -77,5 +77,5 @@ extern "C" } #endif -#endif /* __ARCH_ARCH_H */ +#endif /* __ARCH_Z16_INCLUDE_ARCH_H */ diff --git a/arch/z16/include/irq.h b/arch/z16/include/irq.h index 9aab0cc1331ebd4ec8664fb8e5cfab39e01bd04c..5fcd165487ff9ed5a0c5da70340d247a4be4399f 100644 --- a/arch/z16/include/irq.h +++ b/arch/z16/include/irq.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/irq.h + * arch/z16/include/irq.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -37,8 +37,8 @@ * only indirectly through nuttx/irq.h */ -#ifndef __ARCH_IRQ_H -#define __ARCH_IRQ_H +#ifndef __ARCH_Z16_INCLUDE_IRQ_H +#define __ARCH_Z16_INCLUDE_IRQ_H /**************************************************************************** * Included Files @@ -78,5 +78,5 @@ extern "C" #endif #endif -#endif /* __ARCH_IRQ_H */ +#endif /* __ARCH_Z16_INCLUDE_IRQ_H */ diff --git a/arch/z16/include/serial.h b/arch/z16/include/serial.h index c1ce4aa1f18f4d534fde74c461bb798c07253970..ced8e9e596f313185742755f4d70bb5f556fcd94 100644 --- a/arch/z16/include/serial.h +++ b/arch/z16/include/serial.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/serial.h + * arch/z16/include/serial.h * * Copyright (C) 2007 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __ARCH_SERIAL_H -#define __ARCH_SERIAL_H +#ifndef __ARCH_Z16_INCLUDE_SERIAL_H +#define __ARCH_Z16_INCLUDE_SERIAL_H /**************************************************************************** * Included Files @@ -52,4 +52,4 @@ * Public Functions ****************************************************************************/ -#endif /* __ARCH_SERIAL_H */ +#endif /* __ARCH_Z16_INCLUDE_SERIAL_H */ diff --git a/arch/z16/src/common/up_allocateheap.c b/arch/z16/src/common/up_allocateheap.c index f307a8a73e22461f435b9cc7d126227cbc33ec76..948f770210acb802238d7ca73253fa4f1ef0bb19 100644 --- a/arch/z16/src/common/up_allocateheap.c +++ b/arch/z16/src/common/up_allocateheap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_allocateheap.c + * arch/z16/src/common/up_allocateheap.c * * Copyright (C) 2008, 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z16/src/common/up_arch.h b/arch/z16/src/common/up_arch.h index be1f77d67de37176113c5105dee3ade5065944d4..1b98ccc2aea8a5ca6810972335f6a747b60da36f 100644 --- a/arch/z16/src/common/up_arch.h +++ b/arch/z16/src/common/up_arch.h @@ -1,5 +1,5 @@ /************************************************************************************ - * common/up_arch.h + * arch/z16/src/common/up_arch.h * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z16/src/common/up_blocktask.c b/arch/z16/src/common/up_blocktask.c index 584aec0ea83626f1eb633131d868e5f5013153fe..8328086de622b75e53dbc2e6b9fde822e465520a 100644 --- a/arch/z16/src/common/up_blocktask.c +++ b/arch/z16/src/common/up_blocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_blocktask.c + * arch/z16/src/common/up_blocktask.c * * Copyright (C) 2008-2009, 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z16/src/common/up_copystate.c b/arch/z16/src/common/up_copystate.c index f9240c7445082c0f72301bd89d5246b9af58c651..8ef14c7394719601b835361431986078ec6d1159 100644 --- a/arch/z16/src/common/up_copystate.c +++ b/arch/z16/src/common/up_copystate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_copystate.c + * arch/z16/src/common/up_copystate.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,18 +43,6 @@ #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/z16/src/common/up_doirq.c b/arch/z16/src/common/up_doirq.c index d401f580f6b573ae0cd8bb078c995fa97309b5e7..fb4954fc61839392e2d26fd8e992eb775ee08898 100644 --- a/arch/z16/src/common/up_doirq.c +++ b/arch/z16/src/common/up_doirq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_doirq.c + * arch/z16/src/common/up_doirq.c * * Copyright (C) 2008-2009, 2011, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -49,22 +49,6 @@ #include "chip/chip.h" #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/z16/src/common/up_exit.c b/arch/z16/src/common/up_exit.c index a47e042b38c05495e062a6ed2b5a6ad3359e065a..0fbb210ea034596d1923716ec584bd36384edbba 100644 --- a/arch/z16/src/common/up_exit.c +++ b/arch/z16/src/common/up_exit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_exit.c + * arch/z16/src/common/up_exit.c * * Copyright (C) 2008-2009, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z16/src/common/up_idle.c b/arch/z16/src/common/up_idle.c index 01aa0f8d6d893f20ae90c8de3636b3a706a3f689..58ddb4d455e424b0a5fbb7618d5ce7a32aa3a8e8 100644 --- a/arch/z16/src/common/up_idle.c +++ b/arch/z16/src/common/up_idle.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_idle.c + * arch/z16/src/common/up_idle.c * * Copyright (C) 2008-2009, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -47,10 +47,6 @@ #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Private Data ****************************************************************************/ @@ -59,10 +55,6 @@ static uint8_t g_ledtoggle = 0; #endif -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/z16/src/common/up_initialstate.c b/arch/z16/src/common/up_initialstate.c index 246dc3dc53b8d61772ded4cfca62c33cd3399ca9..4509e1eba0eba7288645d2f29dd786b099272b4e 100644 --- a/arch/z16/src/common/up_initialstate.c +++ b/arch/z16/src/common/up_initialstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_initialstate.c + * arch/z16/src/common/up_initialstate.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -46,18 +46,6 @@ #include "chip/chip.h" #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/z16/src/common/up_internal.h b/arch/z16/src/common/up_internal.h index c959bb095622274a8646dde3073f6b0fec777e5b..d0fc6d440452914a8f5d5ecda0db466b24512a17 100644 --- a/arch/z16/src/common/up_internal.h +++ b/arch/z16/src/common/up_internal.h @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_internal.h + * arch/z16/src/common/up_internal.h * * Copyright (C) 2008-2009, 2011-2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __UP_INTERNAL_H -#define __UP_INTERNAL_H +#ifndef __ARCH_Z16_SRC_COMMON_UP_INTERNAL_H +#define __ARCH_Z16_SRC_COMMON_UP_INTERNAL_H /**************************************************************************** * Included Files @@ -203,4 +203,4 @@ void up_registerdump(void); #endif /* __ASSEMBLY__ */ -#endif /* __UP_INTERNAL_H */ +#endif /* __ARCH_Z16_SRC_COMMON_UP_INTERNAL_H */ diff --git a/arch/z16/src/common/up_interruptcontext.c b/arch/z16/src/common/up_interruptcontext.c index c45cf376e5c6ecff37c025865047998296e3059e..96c9521b0d7dcd47656a20d81027319c377fac76 100644 --- a/arch/z16/src/common/up_interruptcontext.c +++ b/arch/z16/src/common/up_interruptcontext.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_interruptcontext.c + * arch/z16/src/common/up_interruptcontext.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -46,14 +46,6 @@ #include "up_internal.h" -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/z16/src/common/up_mdelay.c b/arch/z16/src/common/up_mdelay.c index 810754dd908646c3ecfc36db0885bcdbc0958bc2..b4981ac04f5a656b28da9dde0cc9babb6d33714d 100644 --- a/arch/z16/src/common/up_mdelay.c +++ b/arch/z16/src/common/up_mdelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_mdelay.c + * arch/z16/src/common/up_mdelay.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -42,26 +42,6 @@ #ifdef CONFIG_BOARD_LOOPSPERMSEC -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/z16/src/common/up_registerdump.c b/arch/z16/src/common/up_registerdump.c index dbee6553dd36d7d6f169f1c06e7d1a9e31d9d811..4e3088bf5792fd4f50f4634ecd3f026cf91f31ef 100644 --- a/arch/z16/src/common/up_registerdump.c +++ b/arch/z16/src/common/up_registerdump.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_registerdump.c + * arch/z16/src/common/up_registerdump.c * * Copyright (C) 2008-2009, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z16/src/common/up_releasepending.c b/arch/z16/src/common/up_releasepending.c index ddac88d6c4ce6256512daeb43a6bb7d7df3048a5..41ee99c7ed17ea8775e68adc1a412446b749ef9a 100644 --- a/arch/z16/src/common/up_releasepending.c +++ b/arch/z16/src/common/up_releasepending.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_releasepending.c + * arch/z16/src/common/up_releasepending.c * * Copyright (C) 2008-2009, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z16/src/common/up_releasestack.c b/arch/z16/src/common/up_releasestack.c index f1ab953741c28295b9a4868d1da7d405c2545d65..e0f4c4b27fe33a9a0a836ac8ac6af289298029f1 100644 --- a/arch/z16/src/common/up_releasestack.c +++ b/arch/z16/src/common/up_releasestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_releasestack.c + * arch/z16/src/common/up_releasestack.c * * Copyright (C) 2008-2009, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z16/src/common/up_reprioritizertr.c b/arch/z16/src/common/up_reprioritizertr.c index 4724fc2f29445dbfb73d7228f77f1892bf7d11f9..d4fde47f31d7a94150486ed4db78c776c79c9c69 100644 --- a/arch/z16/src/common/up_reprioritizertr.c +++ b/arch/z16/src/common/up_reprioritizertr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_reprioritizertr.c + * arch/z16/src/common/up_reprioritizertr.c * * Copyright (C) 2008-2009, 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z16/src/common/up_schedulesigaction.c b/arch/z16/src/common/up_schedulesigaction.c index 557dcdf5f478a2a6691c7b0d4540f55a28d59073..8fde953c393ed542a65675adc6f7f11f16663565 100644 --- a/arch/z16/src/common/up_schedulesigaction.c +++ b/arch/z16/src/common/up_schedulesigaction.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_schedulesigaction.c + * arch/z16/src/common/up_schedulesigaction.c * * Copyright (C) 2008-2010, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z16/src/common/up_sigdeliver.c b/arch/z16/src/common/up_sigdeliver.c index 7860f1d1de4eb408f956f5f9fad12fab4c37b336..f9429d041b571ae44897cc96d5554b30aa0ed008 100644 --- a/arch/z16/src/common/up_sigdeliver.c +++ b/arch/z16/src/common/up_sigdeliver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_sigdeliver.c + * arch/z16/src/common/up_sigdeliver.c * * Copyright (C) 2008-2010, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z16/src/common/up_stackdump.c b/arch/z16/src/common/up_stackdump.c index 3dc17151dd159efeb44e44cd6f0562fe80514065..e9eb80ef9440083cdf3f71fa471ba84c776387c8 100644 --- a/arch/z16/src/common/up_stackdump.c +++ b/arch/z16/src/common/up_stackdump.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_stackdump.c + * arch/z16/src/common/up_stackdump.c * * Copyright (C) 2008-2009, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z16/src/common/up_udelay.c b/arch/z16/src/common/up_udelay.c index 54545ac072c23ba995d189c3d84edab6e9cd37a0..4b36bc2d3c4c4ec92ac03ab18731d48453d8af81 100644 --- a/arch/z16/src/common/up_udelay.c +++ b/arch/z16/src/common/up_udelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_udelay.c + * arch/z16/src/common/up_udelay.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z16/src/common/up_unblocktask.c b/arch/z16/src/common/up_unblocktask.c index 8fe8beccfa82e384e9e72509b6706cf3c3c80085..d9de4e43b95030761a314d7869f5ffea4f033f25 100644 --- a/arch/z16/src/common/up_unblocktask.c +++ b/arch/z16/src/common/up_unblocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_unblocktask.c + * arch/z16/src/common/up_unblocktask.c * * Copyright (C) 2008-2009, 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z16/src/z16f/z16f_clkinit.c b/arch/z16/src/z16f/z16f_clkinit.c index 883a5d840762714fb6664ab74bc4fca272eb300b..314020257bb872f9eb261bfe07395eda9ca14443 100644 --- a/arch/z16/src/z16f/z16f_clkinit.c +++ b/arch/z16/src/z16f/z16f_clkinit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * z16f/z16f_clkinit.c + * arch/z16/src/z16f/z16f_clkinit.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z16/src/z16f/z16f_sysexec.c b/arch/z16/src/z16f/z16f_sysexec.c index 7c3eafa0ab60ec9a8508fc3c01dc3fc70f74cad8..86ed1e4eb0b29164e712ccd90217fb3a9b3f65b5 100644 --- a/arch/z16/src/z16f/z16f_sysexec.c +++ b/arch/z16/src/z16f/z16f_sysexec.c @@ -1,5 +1,5 @@ /**************************************************************************** - * z16f/z16f_sysexec.c + * arch/z16/src/1`z16f/z16f_sysexec.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -47,18 +47,6 @@ #include "chip/chip.h" #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/z16/src/z16f/z16f_timerisr.c b/arch/z16/src/z16f/z16f_timerisr.c index 24b12a46953a2e49283c60c6374c39a7229c2952..ad6e4993859d3da36323dc9b84b142af63417b6b 100644 --- a/arch/z16/src/z16f/z16f_timerisr.c +++ b/arch/z16/src/z16f/z16f_timerisr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * z16f/z16f_timerisr.c + * arch/z16/src/z16f/z16f_timerisr.c * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/include/arch.h b/arch/z80/include/arch.h index 123ea4bada34bc513e90ba5c3cf5b743593879a7..a99247972c14ecdc0ecb644cb5618ad139ce3bea 100644 --- a/arch/z80/include/arch.h +++ b/arch/z80/include/arch.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arch.h + * arch/z80/include/arch.h * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/include/ez80/arch.h b/arch/z80/include/ez80/arch.h index f210332399c31ba1323a3baa77c1b9a24a48c574..b8e3eecc8a2c2ffef4615aeba3234700991d8c78 100644 --- a/arch/z80/include/ez80/arch.h +++ b/arch/z80/include/ez80/arch.h @@ -1,6 +1,5 @@ /**************************************************************************** - * arch/ez80/arch.h - * arch/chip/arch.h + * arch/z80/include/ez80/arch.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -38,8 +37,8 @@ * only indirectly through nuttx/arch.h (via arch/arch.h) */ -#ifndef __ARCH_EZ80_ARCH_H -#define __ARCH_EZ80_ARCH_H +#ifndef __ARCH_Z80_INCLUDE_EZ80_ARCH_H +#define __ARCH_Z80_INCLUDE_EZ80_ARCH_H /**************************************************************************** * Included Files @@ -74,5 +73,5 @@ extern "C" } #endif -#endif /* __ARCH_EZ80_ARCH_H */ +#endif /* __ARCH_Z80_INCLUDE_EZ80_ARCH_H */ diff --git a/arch/z80/include/ez80/io.h b/arch/z80/include/ez80/io.h index 2ae92c8ba5f62e02bd155fdef90568fefe219c99..e843db3567d4f0ff82ab58c8ed317315b8d18ba5 100644 --- a/arch/z80/include/ez80/io.h +++ b/arch/z80/include/ez80/io.h @@ -1,6 +1,5 @@ /**************************************************************************** * arch/z80/include/ez80/io.h - * arch/chip/io.h * * Copyright (C) 2008-2009, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -38,8 +37,8 @@ * through arch/io.h */ -#ifndef __ARCH_EZ80_IO_H -#define __ARCH_EZ80_IO_H +#ifndef __ARCH_Z80_INCLUDE_EZ80_IO_H +#define __ARCH_Z80_INCLUDE_EZ80_IO_H /**************************************************************************** * Included Files @@ -85,4 +84,4 @@ uint8_t inp(uint16_t p); #endif #endif -#endif /* __ARCH_EZ80_IO_H */ +#endif /* __ARCH_Z80_INCLUDE_EZ80_IO_H */ diff --git a/arch/z80/include/ez80/irq.h b/arch/z80/include/ez80/irq.h index 33b00783effbd7ee0d3ee1b1e93217b76d9243d5..ace37f74b9b8bd9a42de337099b67c03fce0a6cc 100644 --- a/arch/z80/include/ez80/irq.h +++ b/arch/z80/include/ez80/irq.h @@ -1,6 +1,5 @@ /**************************************************************************** - * arch/ez80/include/ez80/irq.h - * arch/chip/irq.h + * arch/z80/include/ez80/irq.h * * Copyright (C) 2008-2009, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/include/ez80/types.h b/arch/z80/include/ez80/types.h index 1f0d46957d263d2ec177c31c5995344eedc263c1..21f256d6ef8e0652799b243a80a9a5f65257d4d6 100644 --- a/arch/z80/include/ez80/types.h +++ b/arch/z80/include/ez80/types.h @@ -1,6 +1,5 @@ /**************************************************************************** * arch/z80/include/ez80/types.h - * include/arch/chip/types.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/include/io.h b/arch/z80/include/io.h index bd97c3792fa60e30519b8364646ac3078ac551de..27cdae39c21f17524930f92e8dbf02e735d5b100 100644 --- a/arch/z80/include/io.h +++ b/arch/z80/include/io.h @@ -1,6 +1,5 @@ /**************************************************************************** * arch/z80/include/io.h - * arch/chip/io.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/include/z180/chip.h b/arch/z80/include/z180/chip.h index 88df7a2b4b17d4873a0d0bb1602b3fee75c885fe..9d8775f938118f7bdc4f1ffd0c8651f17af769bd 100644 --- a/arch/z80/include/z180/chip.h +++ b/arch/z80/include/z180/chip.h @@ -1,6 +1,5 @@ /**************************************************************************** * arch/z80/include/z180/chip.h - * arch/chip/io.h * * Copyright (C) 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/include/z180/io.h b/arch/z80/include/z180/io.h index 12bf6219e31b3ea8e87242a0c639b5aa8c8316c7..d976b0aa5ed0a3b89ce02b8acacf25e092c3984a 100644 --- a/arch/z80/include/z180/io.h +++ b/arch/z80/include/z180/io.h @@ -1,6 +1,5 @@ /**************************************************************************** * arch/z80/include/z80/io.h - * arch/chip/io.h * * Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/include/z180/irq.h b/arch/z80/include/z180/irq.h index ec2dbb7b57354d3b538088617a9882d0257794be..a467a7b307c917243c8347ee1f034c405f27926d 100644 --- a/arch/z80/include/z180/irq.h +++ b/arch/z80/include/z180/irq.h @@ -1,6 +1,5 @@ /**************************************************************************** * arch/z80/include/z180/irq.h - * arch/chip/irq.h * * Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/include/z180/types.h b/arch/z80/include/z180/types.h index 39498a9002b6583674cd875a3dfa4271f668299e..16460dca5c26ed7077d61f57933be01a9546cc79 100644 --- a/arch/z80/include/z180/types.h +++ b/arch/z80/include/z180/types.h @@ -1,6 +1,5 @@ /**************************************************************************** * arch/z80/include/z180/types.h - * include/arch/chip/types.h * * Copyright (C) 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -38,8 +37,8 @@ * through sys/types.h */ -#ifndef __ARC_Z80_INCLUDE_Z180_TYPES_H -#define __ARC_Z80_INCLUDE_Z180_TYPES_H +#ifndef __ARCH_Z80_INCLUDE_Z180_TYPES_H +#define __ARCH_Z80_INCLUDE_Z180_TYPES_H /**************************************************************************** * Included Files @@ -96,4 +95,4 @@ typedef _uint16_t irqstate_t; * Public Function Prototypes ****************************************************************************/ -#endif /* __ARC_Z80_INCLUDE_Z180_TYPES_H */ +#endif /* __ARCH_Z80_INCLUDE_Z180_TYPES_H */ diff --git a/arch/z80/include/z8/arch.h b/arch/z80/include/z8/arch.h index 8d913a73499562f036225cd4bcd86570fbfa5459..3d03dea67bdc0fcd701ec6f4bfefaaeeeb51797e 100644 --- a/arch/z80/include/z8/arch.h +++ b/arch/z80/include/z8/arch.h @@ -1,6 +1,5 @@ /**************************************************************************** - * arch/z8/arch.h - * arch/chip/arch.h + * arch/z80/include/z8/arch.h * * Copyright (C) 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -38,8 +37,8 @@ * only indirectly through nuttx/arch.h (via arch/arch.h) */ -#ifndef __ARCH_Z8_ARCH_H -#define __ARCH_Z8_ARCH_H +#ifndef __ARCH_Z80_INCLUDE_Z8_ARCH_H +#define __ARCH_Z80_INCLUDE_Z8_ARCH_H /**************************************************************************** * Included Files @@ -74,5 +73,5 @@ extern "C" } #endif -#endif /* __ARCH_Z8_ARCH_H */ +#endif /* __ARCH_Z80_INCLUDE_Z8_ARCH_H */ diff --git a/arch/z80/include/z8/irq.h b/arch/z80/include/z8/irq.h index 7088234f6b5b9ccec3a4d8ec08804e41b11520e8..10693fd517c66ca8623e31c546162170448f0f43 100644 --- a/arch/z80/include/z8/irq.h +++ b/arch/z80/include/z8/irq.h @@ -1,6 +1,5 @@ /**************************************************************************** - * arch/z8/include/z8/irq.h - * arch/chip/irq.h + * arch/z80/include/z8/irq.h * * Copyright (C) 2008-2009, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -38,8 +37,8 @@ * only indirectly through nuttx/irq.h (via arch/irq.h) */ -#ifndef __ARCH_Z8_IRQ_H -#define __ARCH_Z8_IRQ_H +#ifndef __ARCH_Z80_INCLUDE_Z8_IRQ_H +#define __ARCH_Z80_INCLUDE_Z8_IRQ_H /**************************************************************************** * Included Files @@ -374,5 +373,5 @@ void up_irq_restore(irqstate_t flags); #endif #endif -#endif /* __ARCH_Z8_IRQ_H */ +#endif /* __ARCH_Z80_INCLUDE_Z8_IRQ_H */ diff --git a/arch/z80/include/z8/types.h b/arch/z80/include/z8/types.h index 4c66f56871027e858b6f453a2cf3f3a1c6d99622..01e642cc6dda10c08e562693219b44b531d64d35 100644 --- a/arch/z80/include/z8/types.h +++ b/arch/z80/include/z8/types.h @@ -1,6 +1,5 @@ /**************************************************************************** * arch/z80/include/z8/types.h - * include/arch/chip/types.h * * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/include/z80/arch.h b/arch/z80/include/z80/arch.h index d40c84b4d67977ebb1afb52de5dc4954330358be..b3aebc5ca0eea1e13f18aff0633598c8798c3bfa 100644 --- a/arch/z80/include/z80/arch.h +++ b/arch/z80/include/z80/arch.h @@ -1,6 +1,5 @@ /**************************************************************************** - * arch/z80/arch.h - * arch/chip/arch.h + * arch/z80/include/arch.h * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/include/z80/io.h b/arch/z80/include/z80/io.h index e8545a719cc92b5c86692a675bad16d1cd5a6885..d69381d1343b8c2456f012a1309f05e5d4ae9d4e 100644 --- a/arch/z80/include/z80/io.h +++ b/arch/z80/include/z80/io.h @@ -1,6 +1,5 @@ /**************************************************************************** * arch/z80/include/z80/io.h - * arch/chip/io.h * * Copyright (C) 2008-2009, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/include/z80/irq.h b/arch/z80/include/z80/irq.h index 020c777a1c6f0dedc86125195d4516c5343c09e9..9a88a8084d1781925167cd3f9ed6854eb6170af5 100644 --- a/arch/z80/include/z80/irq.h +++ b/arch/z80/include/z80/irq.h @@ -1,6 +1,5 @@ /**************************************************************************** * arch/z80/include/z80/irq.h - * arch/chip/irq.h * * Copyright (C) 2007-2009, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/include/z80/types.h b/arch/z80/include/z80/types.h index 4d6d8ed5b1168bd2ebb2087ba0ec772d5d8a278a..ecf2cc4132b1ceb0ad2bda7ac58942b18da58487 100644 --- a/arch/z80/include/z80/types.h +++ b/arch/z80/include/z80/types.h @@ -1,6 +1,5 @@ /**************************************************************************** * arch/z80/include/z80/types.h - * include/arch/chip/types.h * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -38,8 +37,8 @@ * through sys/types.h */ -#ifndef __ARC_Z80_INCLUDE_Z80_TYPES_H -#define __ARC_Z80_INCLUDE_Z80_TYPES_H +#ifndef __ARCH_Z80_INCLUDE_Z80_TYPES_H +#define __ARCH_Z80_INCLUDE_Z80_TYPES_H /**************************************************************************** * Included Files @@ -96,4 +95,4 @@ typedef _uint16_t irqstate_t; * Public Function Prototypes ****************************************************************************/ -#endif /* __ARC_Z80_INCLUDE_Z80_TYPES_H */ +#endif /* __ARCH_Z80_INCLUDE_Z80_TYPES_H */ diff --git a/arch/z80/src/common/up_allocateheap.c b/arch/z80/src/common/up_allocateheap.c index 7ea677c5f943271732d70ffbefa93c8b3df0c5d2..818739cedab715d5cd4bcc715cf0b414ced1210d 100644 --- a/arch/z80/src/common/up_allocateheap.c +++ b/arch/z80/src/common/up_allocateheap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_allocateheap.c + * arch/z80/src/common/up_allocateheap.c * * Copyright (C) 2007, 2008, 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/src/common/up_assert.c b/arch/z80/src/common/up_assert.c index da899feb6f478f875c32415838fac8b971286cab..8a2765af90da4398bbcabc19cf3f7887a57aa0e6 100644 --- a/arch/z80/src/common/up_assert.c +++ b/arch/z80/src/common/up_assert.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_assert.c + * arch/z80/src/common/up_assert.c * * Copyright (C) 2007-2009, 2012-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/src/common/up_exit.c b/arch/z80/src/common/up_exit.c index 29860f7d296c62e19000022e5b30ce7280121499..7df1610845bea2ec499d9dd086b3ae9336b01ebd 100644 --- a/arch/z80/src/common/up_exit.c +++ b/arch/z80/src/common/up_exit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_exit.c + * arch/z80/src/common/up_exit.c * * Copyright (C) 2007-2009, 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/src/common/up_idle.c b/arch/z80/src/common/up_idle.c index 43deca5aa0f7cbfa73008c624126d061038a1e57..7d18a454f830dbe6c85330d0c79c823a45aa831a 100644 --- a/arch/z80/src/common/up_idle.c +++ b/arch/z80/src/common/up_idle.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_idle.c + * arch/z80/src/common/up_idle.c * * Copyright (C) 2007-2009, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/src/common/up_mdelay.c b/arch/z80/src/common/up_mdelay.c index 607ce484538540521c9c3a8b55cabf9c8a7de0d4..24566b93e3c9df1e55ed8646d83995308f6737d3 100644 --- a/arch/z80/src/common/up_mdelay.c +++ b/arch/z80/src/common/up_mdelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_mdelay.c + * arch/z80/src/common/up_mdelay.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/src/common/up_releasestack.c b/arch/z80/src/common/up_releasestack.c index 63b55720306d27ee4adbb0b6dc28f905bfd6cbef..31237a3ee669a3750855fb37b1a6e5bbd2b36be3 100644 --- a/arch/z80/src/common/up_releasestack.c +++ b/arch/z80/src/common/up_releasestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_releasestack.c + * arch/z80/src/common/up_releasestack.c * * Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/src/common/up_stackdump.c b/arch/z80/src/common/up_stackdump.c index 1ad64c66a946a82f54a9191fc9fbf4d1f9ff483e..ccb8cbd8ddd0b70f413cea347bdd18031a15c59a 100644 --- a/arch/z80/src/common/up_stackdump.c +++ b/arch/z80/src/common/up_stackdump.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_stackdump.c + * arch/z80/src/common/up_stackdump.c * * Copyright (C) 2007-2009, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/src/common/up_udelay.c b/arch/z80/src/common/up_udelay.c index be5224a20d2690ec96b39cb395f272c268aebed5..85a1494b2fa3df6cec14a8a149935129b41602d7 100644 --- a/arch/z80/src/common/up_udelay.c +++ b/arch/z80/src/common/up_udelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * common/up_udelay.c + * arch/z80/src/common/up_udelay.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/src/ez80/ez80_emac.c b/arch/z80/src/ez80/ez80_emac.c index 640c1d3fc21f0137d484236e7d04f206ddb8f126..d4e56bf04f9ba58b0a2eaa30e6746ef54d68cd96 100644 --- a/arch/z80/src/ez80/ez80_emac.c +++ b/arch/z80/src/ez80/ez80_emac.c @@ -1,5 +1,5 @@ /**************************************************************************** - * drivers/net/ez80_emac.c + * arch/z80/src/ez80/ez80_emac.c * * Copyright (C) 2009-2010, 2012, 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/src/ez80/switch.h b/arch/z80/src/ez80/switch.h index a6e46204d952b0431f9333bef3ba6802e1f99982..fae313befd359747c42d294cf8ebcdd3373169e5 100644 --- a/arch/z80/src/ez80/switch.h +++ b/arch/z80/src/ez80/switch.h @@ -1,6 +1,5 @@ /************************************************************************************ * arch/z80/src/ez80/switch.h - * arch/z80/src/chip/switch.h * * Copyright (C) 2008-2009, 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -34,8 +33,8 @@ * ************************************************************************************/ -#ifndef __EZ80_SWITCH_H -#define __EZ80_SWITCH_H +#ifndef __ARCH_Z80_SRC_EZ80_SWITCH_H +#define __ARCH_Z80_SRC_EZ80_SWITCH_H /************************************************************************************ * Included Files @@ -168,4 +167,4 @@ void ez80_registerdump(void); #endif #endif -#endif /* __EZ80_SWITCH_H */ +#endif /* __ARCH_Z80_SRC_EZ80_SWITCH_H */ diff --git a/arch/z80/src/ez80/up_mem.h b/arch/z80/src/ez80/up_mem.h index 9f65b5d084203797c6747edc665281b9cc9cf1dd..a64bddb73b2b59891d113bf934862fb261c61367 100644 --- a/arch/z80/src/ez80/up_mem.h +++ b/arch/z80/src/ez80/up_mem.h @@ -34,8 +34,8 @@ * ************************************************************************************/ -#ifndef __EZ80_UP_MEM_H -#define __EZ80_UP_MEM_H +#ifndef __ARCH_Z80_SRC_EZ80_UP_MEM_H +#define __ARCH_Z80_SRC_EZ80_UP_MEM_H /************************************************************************************ * Included Files @@ -86,4 +86,4 @@ extern "C" #endif #endif -#endif /* __EZ80_UP_MEM_H */ +#endif /* __ARCH_Z80_SRC_EZ80_UP_MEM_H */ diff --git a/arch/z80/src/z180/up_mem.h b/arch/z80/src/z180/up_mem.h index 351c1f2205efffaf651fb4b277d2d8f9643e383f..8a1389ee22f870dd0ee3d8e1abf9659cad8f04cf 100644 --- a/arch/z80/src/z180/up_mem.h +++ b/arch/z80/src/z180/up_mem.h @@ -1,5 +1,5 @@ /************************************************************************************ - * common/sdcc.h + * arch/z80/common/sdcc.h * * Copyright (C) 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef __ARCH_Z180_SRC_COMMON_UP_MEM_H -#define __ARCH_Z180_SRC_COMMON_UP_MEM_H +#ifndef __ARCH_Z80_SRC_Z180_UP_MEM_H +#define __ARCH_Z80_SRC_Z180_UP_MEM_H /************************************************************************************ * Included Files @@ -72,4 +72,4 @@ extern const uint16_t g_heapbase; -#endif /* __ARCH_Z180_SRC_COMMON_UP_MEM_H */ +#endif /* __ARCH_Z80_SRC_Z180_UP_MEM_H */ diff --git a/arch/z80/src/z180/z180_modifiyreg8.c b/arch/z80/src/z180/z180_modifiyreg8.c index bfeec463eeb7a5474a2e787235f329c6d899aaa3..a7b45d5f5c5807119426c6b21a65d27d334784f1 100644 --- a/arch/z80/src/z180/z180_modifiyreg8.c +++ b/arch/z80/src/z180/z180_modifiyreg8.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/arm/src/common/up_modifyreg8.c + * arch/z80/src/common/up_modifyreg8.c * * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/arch/z80/src/z8/chip.h b/arch/z80/src/z8/chip.h index b85b478f13829167ee4aff56b21cdd708780c456..1e9035a3bf142ea0033a24dc4cf35ced3839dbff 100644 --- a/arch/z80/src/z8/chip.h +++ b/arch/z80/src/z8/chip.h @@ -34,8 +34,8 @@ * ************************************************************************************/ -#ifndef __Z8_CHIP_H -#define __Z8_CHIP_H +#ifndef __ARCH_Z80_SRC_Z8_CHIP_H +#define __ARCH_Z80_SRC_Z8_CHIP_H /************************************************************************************ * Included Files @@ -236,4 +236,4 @@ extern "C" #endif #endif -#endif /* __Z8_CHIP_H */ +#endif /* __ARCH_Z80_SRC_Z8_CHIP_H */ diff --git a/arch/z80/src/z8/switch.h b/arch/z80/src/z8/switch.h index b8e23f597b8fc2049943223bc9d8cdbdd06da12f..7c54e34ca5ec71566f8bfabb0a14eca8c23913bd 100644 --- a/arch/z80/src/z8/switch.h +++ b/arch/z80/src/z8/switch.h @@ -34,8 +34,8 @@ * ************************************************************************************/ -#ifndef __Z80_SWITCH_H -#define __Z80_SWITCH_H +#ifndef __ARCH_Z80_SRC_Z8_SWITCH_H +#define __ARCH_Z80_SRC_Z8_SWITCH_H /************************************************************************************ * Included Files @@ -255,4 +255,4 @@ void z8_registerdump(void); #endif #endif -#endif /* __Z80_SWITCH_H */ +#endif /* __ARCH_Z80_SRC_Z8_SWITCH_H */ diff --git a/arch/z80/src/z8/up_mem.h b/arch/z80/src/z8/up_mem.h index fe6854b4764e51d3c5ff6450646834951810b673..ffe3b2210e06f8f7b52730d2dcb245cac0f061ea 100644 --- a/arch/z80/src/z8/up_mem.h +++ b/arch/z80/src/z8/up_mem.h @@ -34,8 +34,8 @@ * ************************************************************************************/ -#ifndef __Z8_UP_MEM_H -#define __Z8_UP_MEM_H +#ifndef __ARCH_Z80_SRC_Z8_UP_MEM_H +#define __ARCH_Z80_SRC_Z8_UP_MEM_H /************************************************************************************ * Included Files @@ -86,4 +86,4 @@ extern "C" #endif #endif -#endif /* __Z8_UP_MEM_H */ +#endif /* __ARCH_Z80_SRC_Z8_UP_MEM_H */ diff --git a/arch/z80/src/z80/switch.h b/arch/z80/src/z80/switch.h index f277893a33d4f8710c63e5f698226e2d7dc154e8..c3403e1ea78a86d03e4546237078e95cb2b6395f 100644 --- a/arch/z80/src/z80/switch.h +++ b/arch/z80/src/z80/switch.h @@ -34,8 +34,8 @@ * ************************************************************************************/ -#ifndef __Z80_SWITCH_H -#define __Z80_SWITCH_H +#ifndef __ARCH_Z80_SRC_Z80_SWITCH_H +#define __ARCH_Z80_SRC_Z80_SWITCH_H /************************************************************************************ * Included Files @@ -167,4 +167,4 @@ void z80_registerdump(void); #endif #endif -#endif /* __Z80_SWITCH_H */ +#endif /* __ARCH_Z80_SRC_Z80_SWITCH_H */ diff --git a/arch/z80/src/z80/up_mem.h b/arch/z80/src/z80/up_mem.h index 2b9c356779607b53ac673791b0b3839df0fa1187..af2ee81a0740166683a3bfe39055cecc4ef70eec 100644 --- a/arch/z80/src/z80/up_mem.h +++ b/arch/z80/src/z80/up_mem.h @@ -1,5 +1,5 @@ /************************************************************************************ - * common/sdcc.h + * arch/z80/src/common/sdcc.h * * Copyright (C) 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/configs/Kconfig b/configs/Kconfig index a46efb462a9c15f370bc52940f47b3c5b2da667c..bf5f3a4859ceb232533bef30b6bdbd9ed5538050 100644 --- a/configs/Kconfig +++ b/configs/Kconfig @@ -936,6 +936,16 @@ config ARCH_BOARD_SPARK (http://www.spark.io). This board features the STM32103CBT6 MCU from STMicro. +config ARCH_BOARD_STM32_BUTTERFLY2 + bool "Kamami STM32Butterfly2 development board" + depends on ARCH_CHIP_STM32F107VC + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + ---help--- + A configuration for the Kamami STM32Butterfly2 development board + based on STM32F107VC micro-controler chip with optional ETH + board. + config ARCH_BOARD_STM32_TINY bool "STM32-Tiny board" depends on ARCH_CHIP_STM32F103C8 @@ -1433,6 +1443,7 @@ config ARCH_BOARD default "shenzhou" if ARCH_BOARD_SHENZHOU default "skp16c26" if ARCH_BOARD_SKP16C26 default "spark" if ARCH_BOARD_SPARK + default "stm32butterfly2" if ARCH_BOARD_STM32_BUTTERFLY2 default "stm32_tiny" if ARCH_BOARD_STM32_TINY default "stm32f103-minimum" if ARCH_BOARD_STM32F103_MINIMUM default "stm3210e-eval" if ARCH_BOARD_STM3210E_EVAL @@ -1775,6 +1786,9 @@ endif if ARCH_BOARD_SPARK source "configs/spark/Kconfig" endif +if ARCH_BOARD_STM32_BUTTERFLY2 +source "configs/stm32butterfly2/Kconfig" +endif if ARCH_BOARD_STM32_TINY source "configs/stm32_tiny/Kconfig" endif diff --git a/configs/Makefile b/configs/Makefile index 4ae15b8777ad341cb06c503321aa6b71d76e8a3f..9a04b131bb6d9d6d005e5b2e6682d0cb4afc48a4 100644 --- a/configs/Makefile +++ b/configs/Makefile @@ -103,6 +103,8 @@ $(DUMMY_KCONFIG): $(BOARD_KCONFIG) $(call DELFILE, $(DUMMY_KCONFIG)) $(Q) cp -f $(BOARD_KCONFIG) $(DUMMY_KCONFIG) +dirlinks: $(DUMMY_KCONFIG) + context: $(DUMMY_KCONFIG) clean_context: diff --git a/configs/README.txt b/configs/README.txt index 6f30c63104c74bcb21bd242920736bd6007eaad6..65c481fc129dd59de401e020ce4ccce926e8c56b 100644 --- a/configs/README.txt +++ b/configs/README.txt @@ -648,6 +648,9 @@ configs/stm3240g-eval microcontroller (ARM Cortex-M4 with FPU). This port uses a GNU Cortex-M4 toolchain (such as CodeSourcery). +configs/stm32butterfly2 + Kamami stm32butterfly2 development board with optional ETH phy. + configs/stm32f103-minimum Generic STM32F103C8T6 Minimum ARM Development Board. diff --git a/configs/amber/hello/Make.defs b/configs/amber/hello/Make.defs index d618c22cd3bd15e615667f56e0ff1acd326fa0d1..f29c795612df11edd22cb56883911e08156a60e2 100644 --- a/configs/amber/hello/Make.defs +++ b/configs/amber/hello/Make.defs @@ -71,7 +71,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/amber/hello/defconfig b/configs/amber/hello/defconfig index 506a83f03ecbf10d8f871b1b7f12b59935e9e660..cbad0a8ece7a1a867a73e1e11666540b2b228997 100644 --- a/configs/amber/hello/defconfig +++ b/configs/amber/hello/defconfig @@ -59,7 +59,7 @@ CONFIG_ARCH_AVR=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/arduino-due/nsh/Make.defs b/configs/arduino-due/nsh/Make.defs index d31a08dd18a8e3f9a28cc637c4c0ba55b5e36f2a..b4601eb781b6d257166ed67e17bda284c0a35c41 100644 --- a/configs/arduino-due/nsh/Make.defs +++ b/configs/arduino-due/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/arduino-due/nsh/defconfig b/configs/arduino-due/nsh/defconfig index f3ee262739aebd011984a52b1bee5881915c2f35..4aa125358a12537ee76b3acd04aef484999f986e 100644 --- a/configs/arduino-due/nsh/defconfig +++ b/configs/arduino-due/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/arduino-mega2560/hello/Make.defs b/configs/arduino-mega2560/hello/Make.defs index 9eb35f515d0ab8492afaa4b96d96177709bc56a0..6371c1a5888d9c52351c0ba10c015e139fa877e1 100644 --- a/configs/arduino-mega2560/hello/Make.defs +++ b/configs/arduino-mega2560/hello/Make.defs @@ -73,7 +73,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/arduino-mega2560/hello/defconfig b/configs/arduino-mega2560/hello/defconfig index 129b81c4806373cfbd0d506365b3ebae62a56a49..67cb895808b44cd55f3055ec554fe5839f0922c3 100644 --- a/configs/arduino-mega2560/hello/defconfig +++ b/configs/arduino-mega2560/hello/defconfig @@ -63,7 +63,7 @@ CONFIG_ARCH_AVR=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/arduino-mega2560/nsh/Make.defs b/configs/arduino-mega2560/nsh/Make.defs index b007c01f8abc44bf36419806425c3bff0e7260f1..b18a53d33cf70c1801179afa3aca157b97f806f7 100644 --- a/configs/arduino-mega2560/nsh/Make.defs +++ b/configs/arduino-mega2560/nsh/Make.defs @@ -73,7 +73,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/arduino-mega2560/nsh/defconfig b/configs/arduino-mega2560/nsh/defconfig index fb6c5ddeae60cabaf483df6c6b9e3a88a68ff036..81605c97eba65e1d2be12f4258795423c6c89c5b 100644 --- a/configs/arduino-mega2560/nsh/defconfig +++ b/configs/arduino-mega2560/nsh/defconfig @@ -64,7 +64,7 @@ CONFIG_ARCH_AVR=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/avr32dev1/nsh/Make.defs b/configs/avr32dev1/nsh/Make.defs index 6b1f20c0a3c556505946ac248653e4e3adc199ed..e6326948d0330d27b848303d21c2ee8aacb8e1a2 100644 --- a/configs/avr32dev1/nsh/Make.defs +++ b/configs/avr32dev1/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -muse-rodata-section -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/avr32dev1/nsh/defconfig b/configs/avr32dev1/nsh/defconfig index caac23498a1e671b64efb9ee237fc5054d7594a4..d0ff348be0c8483be64d0a47e86d634d3498b06c 100644 --- a/configs/avr32dev1/nsh/defconfig +++ b/configs/avr32dev1/nsh/defconfig @@ -59,7 +59,7 @@ CONFIG_ARCH_AVR=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/avr32dev1/ostest/Make.defs b/configs/avr32dev1/ostest/Make.defs index d3265550b1e107999d4930633c9a5f40789310bc..148184d6e88dc29576f00c09d7fe66c93f9442bc 100644 --- a/configs/avr32dev1/ostest/Make.defs +++ b/configs/avr32dev1/ostest/Make.defs @@ -88,7 +88,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -muse-rodata-section -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/avr32dev1/ostest/defconfig b/configs/avr32dev1/ostest/defconfig index 0576325bf00c86c205b9b015a3f21a548a422650..dd8088c35a1e057586b7b6657104c897b88cbe5d 100644 --- a/configs/avr32dev1/ostest/defconfig +++ b/configs/avr32dev1/ostest/defconfig @@ -59,7 +59,7 @@ CONFIG_ARCH_AVR=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/c5471evm/httpd/Make.defs b/configs/c5471evm/httpd/Make.defs index aa491bb2bc750e87155b94edc1b1c32e19c192d8..04559d8c88194a82d533dcf3b26f6438ac202dad 100644 --- a/configs/c5471evm/httpd/Make.defs +++ b/configs/c5471evm/httpd/Make.defs @@ -86,7 +86,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/c5471evm/httpd/defconfig b/configs/c5471evm/httpd/defconfig index e7a99b43015b66e8fe5acf6b117d5b905f2e6553..b3979e7bc78fa9302dc42361f68b734873298eb8 100644 --- a/configs/c5471evm/httpd/defconfig +++ b/configs/c5471evm/httpd/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/c5471evm/nettest/Make.defs b/configs/c5471evm/nettest/Make.defs index 0cd136c400e3c36bcd975dd59e5007128b134077..e820990001c9d4bf4390d59190410dcc462ecab1 100644 --- a/configs/c5471evm/nettest/Make.defs +++ b/configs/c5471evm/nettest/Make.defs @@ -86,7 +86,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/c5471evm/nettest/defconfig b/configs/c5471evm/nettest/defconfig index 4c63b6f380916b4ae8ea25281807d0ddb71a2e1a..699e8aac8dca53c181e78186928fa730d493073b 100644 --- a/configs/c5471evm/nettest/defconfig +++ b/configs/c5471evm/nettest/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/c5471evm/nsh/Make.defs b/configs/c5471evm/nsh/Make.defs index 9e22f8ef31ce5e7f2a54c8607cdb8f9c181693bf..a9cf4c6de9a326e04017308eb5e772586e5379eb 100644 --- a/configs/c5471evm/nsh/Make.defs +++ b/configs/c5471evm/nsh/Make.defs @@ -86,7 +86,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/c5471evm/nsh/defconfig b/configs/c5471evm/nsh/defconfig index 204c435266efc556bdbb3eceed454d5dea5a1f0c..d0b20303056fc724eb5d1edb1bfceea0c8b77824 100644 --- a/configs/c5471evm/nsh/defconfig +++ b/configs/c5471evm/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/cc3200-launchpad/nsh/Make.defs b/configs/cc3200-launchpad/nsh/Make.defs index cfd7bd2380187b6b79fc7613d814ef24478a1957..42caa758dc5ac60c867c3ed6b9c982a454825a10 100644 --- a/configs/cc3200-launchpad/nsh/Make.defs +++ b/configs/cc3200-launchpad/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/cc3200-launchpad/nsh/defconfig b/configs/cc3200-launchpad/nsh/defconfig index ef25a4302f468ef86b7edc829dc263011fb234e4..377ac04c427891247e6844e8a7f7d5d33de30764 100644 --- a/configs/cc3200-launchpad/nsh/defconfig +++ b/configs/cc3200-launchpad/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/cloudctrl/nsh/Make.defs b/configs/cloudctrl/nsh/Make.defs index c4fddea57633f5e8f8000db4a52ef5c7eb6be2b4..e2befae18eed0b61cc6193870d3cfcea1914950a 100644 --- a/configs/cloudctrl/nsh/Make.defs +++ b/configs/cloudctrl/nsh/Make.defs @@ -82,7 +82,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/cloudctrl/nsh/defconfig b/configs/cloudctrl/nsh/defconfig index c881714fe94cd0c2e445db8f376b4123506e9508..1c91205536271cd8fbe51bee56a73b593167ebe9 100644 --- a/configs/cloudctrl/nsh/defconfig +++ b/configs/cloudctrl/nsh/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -340,7 +340,7 @@ 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_TIM8 is not set # CONFIG_STM32_HAVE_TIM9 is not set # CONFIG_STM32_HAVE_TIM10 is not set # CONFIG_STM32_HAVE_TIM11 is not set @@ -396,7 +396,6 @@ CONFIG_STM32_SPI1=y # 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 is not set CONFIG_STM32_USART2=y # CONFIG_STM32_USART3 is not set @@ -424,11 +423,12 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set # CONFIG_STM32_TIM5_CAP is not set -# CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y CONFIG_STM32_SERIALDRIVER=y @@ -573,13 +573,11 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 -CONFIG_NSH_MMCSDSPIPORTNO=1 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -602,9 +600,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 @@ -699,6 +700,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -718,11 +720,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -741,7 +746,12 @@ CONFIG_RTC=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -867,8 +877,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -883,6 +895,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1122,6 +1135,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1154,7 +1168,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1185,9 +1198,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1314,7 +1327,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1338,6 +1350,9 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 +CONFIG_NSH_MMCSDSPIPORTNO=1 # # Configure Command Options @@ -1411,7 +1426,7 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/compal_e86/nsh_highram/Make.defs b/configs/compal_e86/nsh_highram/Make.defs index 2ecbdabf7f2ec1280c8ae46a97926138d0ce9f72..c06a6821b16cbde4da3b9ab9dbb8434c53e06aa3 100644 --- a/configs/compal_e86/nsh_highram/Make.defs +++ b/configs/compal_e86/nsh_highram/Make.defs @@ -104,7 +104,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/compal_e86/nsh_highram/defconfig b/configs/compal_e86/nsh_highram/defconfig index f3366ba3c1e4f7b0657dda0a2d93b65a5071b7bb..0eb2bee40dfd948ca71e364f46b1a7497628e208 100644 --- a/configs/compal_e86/nsh_highram/defconfig +++ b/configs/compal_e86/nsh_highram/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/compal_e88/nsh_highram/Make.defs b/configs/compal_e88/nsh_highram/Make.defs index 707d08fb0c31deccbd113649bdeb6ae4c350b7c3..e9c3e239431e0a716da999916dd6d0d8a1473b0d 100644 --- a/configs/compal_e88/nsh_highram/Make.defs +++ b/configs/compal_e88/nsh_highram/Make.defs @@ -72,7 +72,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/compal_e88/nsh_highram/defconfig b/configs/compal_e88/nsh_highram/defconfig index 90d01e30457eb5badc915b95c4718aaa44064721..36fe799d21966fca5b887161961be9871aef9a55 100644 --- a/configs/compal_e88/nsh_highram/defconfig +++ b/configs/compal_e88/nsh_highram/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/compal_e99/nsh_compalram/Make.defs b/configs/compal_e99/nsh_compalram/Make.defs index 2920fb27d693490654b5b8714b662f488bc9e05a..ce04422ec83a1186bfa1b5fa4fdae7ea9772d872 100644 --- a/configs/compal_e99/nsh_compalram/Make.defs +++ b/configs/compal_e99/nsh_compalram/Make.defs @@ -86,7 +86,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/compal_e99/nsh_compalram/defconfig b/configs/compal_e99/nsh_compalram/defconfig index 0d5d9a0ac8dba2d99cb5583c667defbdbd6a5355..919de8f67d9b1df8fda7a8a35182eb589a686582 100644 --- a/configs/compal_e99/nsh_compalram/defconfig +++ b/configs/compal_e99/nsh_compalram/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/compal_e99/nsh_highram/Make.defs b/configs/compal_e99/nsh_highram/Make.defs index 28c0f00c54a94e26c5a495157cf30db1c2d7404e..7eaac99e8bbe5337af304659eca785794736fa94 100644 --- a/configs/compal_e99/nsh_highram/Make.defs +++ b/configs/compal_e99/nsh_highram/Make.defs @@ -86,7 +86,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/compal_e99/nsh_highram/defconfig b/configs/compal_e99/nsh_highram/defconfig index c126366add2e597c4b911fb903a923c621c406d4..282935437276a9b68ed34dc74ea07de7dbebd1bd 100644 --- a/configs/compal_e99/nsh_highram/defconfig +++ b/configs/compal_e99/nsh_highram/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/demo9s12ne64/ostest/Make.defs b/configs/demo9s12ne64/ostest/Make.defs index 10da8b273bcdba9e2affcdae8013cc9922a77554..ade31496484d169bbe3d40e4422025cc2f556686 100644 --- a/configs/demo9s12ne64/ostest/Make.defs +++ b/configs/demo9s12ne64/ostest/Make.defs @@ -93,7 +93,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/demo9s12ne64/ostest/defconfig b/configs/demo9s12ne64/ostest/defconfig index f9ee45ac71cae2ca6c188c08e3d1d0580fe1061f..42c0db51c7b86005a1072617de90b314b8636c25 100644 --- a/configs/demo9s12ne64/ostest/defconfig +++ b/configs/demo9s12ne64/ostest/defconfig @@ -54,7 +54,7 @@ CONFIG_DEBUG_FULLOPT=y CONFIG_ARCH_HC=y # CONFIG_ARCH_MIPS is not set # CONFIG_ARCH_RGMP is not set -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/dk-tm4c129x/ipv6/Make.defs b/configs/dk-tm4c129x/ipv6/Make.defs index 4bfa5b11400afe41de3f33584ed83ca99b0e9592..549d8e15041e6f7e9fe9112419f1f7d874868b18 100644 --- a/configs/dk-tm4c129x/ipv6/Make.defs +++ b/configs/dk-tm4c129x/ipv6/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/dk-tm4c129x/ipv6/defconfig b/configs/dk-tm4c129x/ipv6/defconfig index 817e669b1dafb9ddb96f1b16608b76422043888e..7e10afee1a12b400156065a30d3ff9e8bce33b75 100644 --- a/configs/dk-tm4c129x/ipv6/defconfig +++ b/configs/dk-tm4c129x/ipv6/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/dk-tm4c129x/nsh/Make.defs b/configs/dk-tm4c129x/nsh/Make.defs index f4cb4a1c4253b9a2449b4eff0b375036d49595d5..fedf001b9a788f9feedfd7d2a6a66ba0d324a913 100644 --- a/configs/dk-tm4c129x/nsh/Make.defs +++ b/configs/dk-tm4c129x/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/dk-tm4c129x/nsh/defconfig b/configs/dk-tm4c129x/nsh/defconfig index 0fb44482270f7a5b35b285877b2dcfbb737c64ee..671ba7c4d8b9db4785035473573dfdcb74161546 100644 --- a/configs/dk-tm4c129x/nsh/defconfig +++ b/configs/dk-tm4c129x/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ea3131/nsh/Make.defs b/configs/ea3131/nsh/Make.defs index 34d4de104c9f1c0e1cfdabc40999b3dcda5976d2..e893667463880fe3a59c3ac28d0f44e16a537fbc 100644 --- a/configs/ea3131/nsh/Make.defs +++ b/configs/ea3131/nsh/Make.defs @@ -80,7 +80,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/ea3131/nsh/defconfig b/configs/ea3131/nsh/defconfig index d53178fc423b554a718f46643824a7bc17d8e5c9..3d086897d1e60d4c2087daffad7639f93acc5322 100644 --- a/configs/ea3131/nsh/defconfig +++ b/configs/ea3131/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ea3131/pgnsh/Make.defs b/configs/ea3131/pgnsh/Make.defs index 6fc835901273c87d8d3a0e3255b42a976af7ef44..aa4ce223e7247631e1894b10c84fc555777ec9c7 100644 --- a/configs/ea3131/pgnsh/Make.defs +++ b/configs/ea3131/pgnsh/Make.defs @@ -80,7 +80,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/ea3131/pgnsh/defconfig b/configs/ea3131/pgnsh/defconfig index a49bd3421f4ca7e3abfdeee1d8f19d6dc5c1aeb1..923ad083f16d5d71cfe6f633fcedd4609c1036c5 100644 --- a/configs/ea3131/pgnsh/defconfig +++ b/configs/ea3131/pgnsh/defconfig @@ -68,7 +68,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ea3131/usbserial/Make.defs b/configs/ea3131/usbserial/Make.defs index 197b58b394b84818e9631265d8d09c60a2858844..815235e27c63549ffd6ff75b7110a463cdafc289 100644 --- a/configs/ea3131/usbserial/Make.defs +++ b/configs/ea3131/usbserial/Make.defs @@ -80,7 +80,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/ea3131/usbserial/defconfig b/configs/ea3131/usbserial/defconfig index 3c15c8bb079c8b60ffd8c650a48bbb3e932e7089..069331dd50972d2cd870f78779763fa9fdf53746 100644 --- a/configs/ea3131/usbserial/defconfig +++ b/configs/ea3131/usbserial/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ea3152/ostest/Make.defs b/configs/ea3152/ostest/Make.defs index 633fbdaedf9766ddeff0a6293b3601998f903db4..c905c78101f6954927e815018e87d3a8efaba922 100644 --- a/configs/ea3152/ostest/Make.defs +++ b/configs/ea3152/ostest/Make.defs @@ -80,7 +80,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/ea3152/ostest/defconfig b/configs/ea3152/ostest/defconfig index 542bde2f8a96296383d1a32d88518c05eeb53766..ee7349d7cb46f040241a946ddd4252bd55b3c663 100644 --- a/configs/ea3152/ostest/defconfig +++ b/configs/ea3152/ostest/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/eagle100/httpd/Make.defs b/configs/eagle100/httpd/Make.defs index 285185d1e59506943bc82520891cc907f9ebf700..122c5ae5685c50dd39f8117e251c3fe80e009181 100644 --- a/configs/eagle100/httpd/Make.defs +++ b/configs/eagle100/httpd/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/eagle100/httpd/defconfig b/configs/eagle100/httpd/defconfig index 9db394eac5ab555bd34f3686dcf0e84da6284a73..5c8ace100e10e3cd14180e03c64b9004243a0742 100644 --- a/configs/eagle100/httpd/defconfig +++ b/configs/eagle100/httpd/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/eagle100/nettest/Make.defs b/configs/eagle100/nettest/Make.defs index 93d96b81d5d8fa556ae77ae4dccaaa8f3de432fa..98547e9e3143ec0d8468186825ccf13d4e7d6ca1 100644 --- a/configs/eagle100/nettest/Make.defs +++ b/configs/eagle100/nettest/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/eagle100/nettest/defconfig b/configs/eagle100/nettest/defconfig index b19e984e0497f7351f2bf406e0440e04a584ea13..4b22994e83e7e71f876015ca7c105275dab79fc4 100644 --- a/configs/eagle100/nettest/defconfig +++ b/configs/eagle100/nettest/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/eagle100/nsh/Make.defs b/configs/eagle100/nsh/Make.defs index 58144909900e16f2c4184a36eed44139959eb1f5..5709148db6958df019358d72d97739164663d700 100644 --- a/configs/eagle100/nsh/Make.defs +++ b/configs/eagle100/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/eagle100/nsh/defconfig b/configs/eagle100/nsh/defconfig index 452f24ecde7bde945b08ceb9a2c6e3865169c572..c05da40e4758abaa2e0bf9bd86e50f3c4f0a7a14 100644 --- a/configs/eagle100/nsh/defconfig +++ b/configs/eagle100/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/eagle100/nxflat/Make.defs b/configs/eagle100/nxflat/Make.defs index a3ded7f0c44dae87e158bf6ceb2beaaa21a73254..a412063356779d8e84ed6ebc7cc16bb581d746cb 100644 --- a/configs/eagle100/nxflat/Make.defs +++ b/configs/eagle100/nxflat/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/eagle100/nxflat/defconfig b/configs/eagle100/nxflat/defconfig index f328bb6c89fddc5286ea45adeb4db82f9a19ffc2..26d9a50f20ae0de23bc1c0678844708b712e5830 100644 --- a/configs/eagle100/nxflat/defconfig +++ b/configs/eagle100/nxflat/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/eagle100/thttpd/Make.defs b/configs/eagle100/thttpd/Make.defs index e5405e96bc7598955fa8395769646a959eb4a044..061b695fe7cc326ac700bfa7e2c9f55277ad2f23 100644 --- a/configs/eagle100/thttpd/Make.defs +++ b/configs/eagle100/thttpd/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/eagle100/thttpd/defconfig b/configs/eagle100/thttpd/defconfig index 509f67357f7fd859b9bd4e9d3d8c9b6bedda9454..3d65f0d25f4aa61d0626a6d93210a1f751387fb1 100644 --- a/configs/eagle100/thttpd/defconfig +++ b/configs/eagle100/thttpd/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/efm32-g8xx-stk/nsh/Make.defs b/configs/efm32-g8xx-stk/nsh/Make.defs index d1fd99eca4c428b0b6c82fb4894a83ff54ac116f..c9feff08e217dfbf80d60b4a56ffa11748833fb3 100644 --- a/configs/efm32-g8xx-stk/nsh/Make.defs +++ b/configs/efm32-g8xx-stk/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/efm32-g8xx-stk/nsh/defconfig b/configs/efm32-g8xx-stk/nsh/defconfig index 082ffa6848a15ecb2bcaed4b2c617b58745638d8..4a0b9d4bec054c21d93527606036bdabaa84b36f 100644 --- a/configs/efm32-g8xx-stk/nsh/defconfig +++ b/configs/efm32-g8xx-stk/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -280,7 +280,6 @@ CONFIG_ARCH_HAVE_LEDS=y CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options @@ -290,6 +289,7 @@ CONFIG_NSH_MMCSDMINOR=0 # EFM32 G8XX STK Hardware Configuration # # CONFIG_EFM32G8STK_BCEN is not set +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -308,6 +308,7 @@ CONFIG_DISABLE_ENVIRON=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2010 CONFIG_START_MONTH=5 @@ -400,6 +401,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -415,6 +417,7 @@ CONFIG_DEV_NULL=y # CONFIG_ARCH_HAVE_I2CRESET is not set # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -428,7 +431,12 @@ CONFIG_DEV_NULL=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -487,8 +495,10 @@ CONFIG_STANDARD_SERIAL=y # CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set CONFIG_OTHER_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -503,6 +513,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -605,6 +616,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -625,7 +637,6 @@ CONFIG_ARCH_HAVE_TLS=y # # 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 @@ -651,10 +662,9 @@ CONFIG_EXAMPLES_NSH=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -756,7 +766,6 @@ 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 @@ -778,6 +787,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -819,7 +829,7 @@ CONFIG_SYSTEM_CLE=y CONFIG_SYSTEM_CLE_DEBUGLEVEL=0 # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/efm32gg-stk3700/nsh/Make.defs b/configs/efm32gg-stk3700/nsh/Make.defs index d1fd99eca4c428b0b6c82fb4894a83ff54ac116f..c9feff08e217dfbf80d60b4a56ffa11748833fb3 100644 --- a/configs/efm32gg-stk3700/nsh/Make.defs +++ b/configs/efm32gg-stk3700/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/efm32gg-stk3700/nsh/defconfig b/configs/efm32gg-stk3700/nsh/defconfig index 79397ebf07d2852a7cdc703f4bb4f78838b2b74a..1de3b218cdb7b54b3e2ea6ce38656cf763c676fe 100644 --- a/configs/efm32gg-stk3700/nsh/defconfig +++ b/configs/efm32gg-stk3700/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -280,7 +280,6 @@ CONFIG_ARCH_HAVE_LEDS=y CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options @@ -290,6 +289,7 @@ CONFIG_NSH_MMCSDMINOR=0 # EFM32GG-STK3700 Hardware Configuration # # CONFIG_EFM32GG_STK3700_BCEN is not set +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -308,6 +308,7 @@ CONFIG_DISABLE_ENVIRON=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2010 CONFIG_START_MONTH=5 @@ -400,6 +401,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -415,6 +417,7 @@ CONFIG_DEV_NULL=y # CONFIG_ARCH_HAVE_I2CRESET is not set # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -428,7 +431,12 @@ CONFIG_DEV_NULL=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -487,8 +495,10 @@ CONFIG_STANDARD_SERIAL=y # CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set CONFIG_OTHER_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -503,6 +513,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -605,6 +616,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -625,7 +637,6 @@ CONFIG_ARCH_HAVE_TLS=y # # 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 @@ -651,10 +662,9 @@ CONFIG_EXAMPLES_NSH=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -756,7 +766,6 @@ 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 @@ -778,6 +787,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -819,7 +829,7 @@ CONFIG_SYSTEM_CLE=y CONFIG_SYSTEM_CLE_DEBUGLEVEL=0 # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/ekk-lm3s9b96/nsh/Make.defs b/configs/ekk-lm3s9b96/nsh/Make.defs index 83c70458db4ca67b1c2b6aefec02e02786f53499..7fdee356dcbb2ed485e836bfecdc5dc6ba3bf190 100644 --- a/configs/ekk-lm3s9b96/nsh/Make.defs +++ b/configs/ekk-lm3s9b96/nsh/Make.defs @@ -75,7 +75,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/ekk-lm3s9b96/nsh/defconfig b/configs/ekk-lm3s9b96/nsh/defconfig index 4141e117c214a89db371ff717156aaeb644a6228..242ef3b8cfc111980064bcdd58d5905aab1e1cc4 100644 --- a/configs/ekk-lm3s9b96/nsh/defconfig +++ b/configs/ekk-lm3s9b96/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ez80f910200kitg/ostest/defconfig b/configs/ez80f910200kitg/ostest/defconfig index 05d2ec3e5e315812a2de87e9b098eb2183e6301b..37192e23e0792f23dec3c8c1e780bbf34e421ff0 100644 --- a/configs/ez80f910200kitg/ostest/defconfig +++ b/configs/ez80f910200kitg/ostest/defconfig @@ -63,7 +63,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ez80f910200zco/dhcpd/defconfig b/configs/ez80f910200zco/dhcpd/defconfig index 9655c84a0b7305f494c15bf0166c5d2fadd0a151..77b5b02b1020843df7c29e1850c3f890b6397ac7 100644 --- a/configs/ez80f910200zco/dhcpd/defconfig +++ b/configs/ez80f910200zco/dhcpd/defconfig @@ -63,7 +63,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ez80f910200zco/httpd/defconfig b/configs/ez80f910200zco/httpd/defconfig index 5304e13743f626d5d4eb0ff5874d3eac839864e7..71218967014ecbeb7016d1fa1b8d2648160f647a 100644 --- a/configs/ez80f910200zco/httpd/defconfig +++ b/configs/ez80f910200zco/httpd/defconfig @@ -63,7 +63,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ez80f910200zco/nettest/defconfig b/configs/ez80f910200zco/nettest/defconfig index d6aa5b20eddf2f08c0d5ec7734f90ef003f707ec..333e68eadbc2b3a8864c1785ccd12180e41ecb0b 100644 --- a/configs/ez80f910200zco/nettest/defconfig +++ b/configs/ez80f910200zco/nettest/defconfig @@ -63,7 +63,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ez80f910200zco/nsh/defconfig b/configs/ez80f910200zco/nsh/defconfig index c6893e00a1041060cb74ab76bcb72d206b4e462d..a4ee41fe440fc05682fa2f0894f812cc569747cd 100644 --- a/configs/ez80f910200zco/nsh/defconfig +++ b/configs/ez80f910200zco/nsh/defconfig @@ -63,7 +63,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ez80f910200zco/poll/defconfig b/configs/ez80f910200zco/poll/defconfig index f6ed6625456a4539854fc76413584b8669feac76..e70d6999a6696b7dcf528f59b12d81f1110d13cb 100644 --- a/configs/ez80f910200zco/poll/defconfig +++ b/configs/ez80f910200zco/poll/defconfig @@ -63,7 +63,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/fire-stm32v2/nsh/Make.defs b/configs/fire-stm32v2/nsh/Make.defs index 6c57737576b52a6a34854c4c88b2f0f6d4d40ad7..a9dd58a11e6bd44612ddb3658e911cbfaac719cc 100644 --- a/configs/fire-stm32v2/nsh/Make.defs +++ b/configs/fire-stm32v2/nsh/Make.defs @@ -82,7 +82,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/fire-stm32v2/nsh/defconfig b/configs/fire-stm32v2/nsh/defconfig index 0190388cd3de5ac911d726cdb00e3f22cf829a80..e1ecadbd7507f0e1fe300d855597d675cd7dc18d 100644 --- a/configs/fire-stm32v2/nsh/defconfig +++ b/configs/fire-stm32v2/nsh/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -431,6 +431,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -576,9 +578,6 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 -CONFIG_NSH_MMCSDSPIPORTNO=0 # # Board-Specific Options @@ -589,6 +588,7 @@ CONFIG_NSH_MMCSDSPIPORTNO=0 # CONFIG_ARCH_BOARD_FIRE_STM32V2=y # CONFIG_ARCH_BOARD_FIRE_STM32V3 is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -612,9 +612,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=16 @@ -709,6 +712,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -733,11 +737,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -757,7 +764,12 @@ CONFIG_RTC=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -888,6 +900,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -925,6 +938,7 @@ CONFIG_USBMSC_REMOVABLE=y CONFIG_USBMSC_SCSI_PRIO=128 CONFIG_USBMSC_SCSI_STACKSIZE=2048 # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -939,6 +953,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1178,6 +1193,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1203,7 +1219,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1232,9 +1247,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1359,7 +1374,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1383,6 +1397,9 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 +CONFIG_NSH_MMCSDSPIPORTNO=0 # # Configure Command Options @@ -1456,7 +1473,7 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN is not set +# CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=1 diff --git a/configs/freedom-k64f/include/board.h b/configs/freedom-k64f/include/board.h index 198915caa9e57fc16d9d23f9452b6a9e10c7c94a..4bc7ac9ffcd4d0486137a3067397eabe40f1e140 100644 --- a/configs/freedom-k64f/include/board.h +++ b/configs/freedom-k64f/include/board.h @@ -134,6 +134,17 @@ # define BOARD_SDHC_SD4MODE_DIVISOR SDHC_SYSCTL_DVS_DIV(3) #endif +/* PWM Configuration */ +/* FTM0 Channels */ +/* Channels can be modified using kinetis_k64pinmux.h */ + +#define GPIO_FTM0_CH0OUT PIN_FTM0_CH0_1 +#define GPIO_FTM0_CH1OUT PIN_FTM0_CH1_1 +#define GPIO_FTM0_CH2OUT PIN_FTM0_CH2_2 +#define GPIO_FTM0_CH3OUT PIN_FTM0_CH3_1 +#define GPIO_FTM0_CH4OUT PIN_FTM0_CH4_1 +#define GPIO_FTM0_CH5OUT PIN_FTM0_CH5_1 + /* LED definitions ******************************************************************/ /* The Freedom K64F has a single RGB LED driven by the K64F as follows: * diff --git a/configs/freedom-k64f/netnsh/Make.defs b/configs/freedom-k64f/netnsh/Make.defs index 81ee818d815351756d4ce85707954cd05dc31d9e..aca1ad4843a13d415265ffa5f6510f31b5ebdec8 100644 --- a/configs/freedom-k64f/netnsh/Make.defs +++ b/configs/freedom-k64f/netnsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/freedom-k64f/netnsh/defconfig b/configs/freedom-k64f/netnsh/defconfig index 5dc3f9d2d37196ab41f55002f2b25b3cc893909f..3b9a628960871aa25f2e772ec2f6f12189b8512d 100644 --- a/configs/freedom-k64f/netnsh/defconfig +++ b/configs/freedom-k64f/netnsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/freedom-k64f/nsh/Make.defs b/configs/freedom-k64f/nsh/Make.defs index c0f3c57b41e8bf320c58df0da0d0d4895f3cf116..4163c0a7f1f9c3dfa55d3b0de4e7c9a76d4e50c2 100644 --- a/configs/freedom-k64f/nsh/Make.defs +++ b/configs/freedom-k64f/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/freedom-k64f/nsh/defconfig b/configs/freedom-k64f/nsh/defconfig index 66503cfa66dea18bc7e5841b0e1e6f499161e6f6..660add23d5b8bd3c3a779268d6fb15ad2d885191 100644 --- a/configs/freedom-k64f/nsh/defconfig +++ b/configs/freedom-k64f/nsh/defconfig @@ -8,14 +8,10 @@ # # 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 @@ -65,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -139,15 +135,11 @@ 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_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 is not set # CONFIG_ARMV7M_ITMSYSLOG is not set @@ -216,7 +208,7 @@ CONFIG_KINETIS_UART0=y # CONFIG_KINETIS_CMP is not set # CONFIG_KINETIS_VREF is not set CONFIG_KINETIS_SDHC=y -# CONFIG_KINETIS_FTM0 is not set +CONFIG_KINETIS_FTM0=y # CONFIG_KINETIS_FTM1 is not set # CONFIG_KINETIS_FTM2 is not set # CONFIG_KINETIS_LPTIMER is not set @@ -233,6 +225,12 @@ CONFIG_KINETIS_SDHC=y # CONFIG_KINETIS_PDB is not set # CONFIG_KINETIS_PIT is not set +# +# Kinetis FTM PWM Configuration +# +CONFIG_KINETIS_FTM0_PWM=y +CONFIG_KINETIS_FTM0_CHANNEL=2 + # # Kinetis GPIO Interrupt Configuration # @@ -339,7 +337,7 @@ 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_PWMTEST=y # CONFIG_BOARDCTL_GRAPHICS is not set # CONFIG_BOARDCTL_IOCTL is not set @@ -347,11 +345,11 @@ CONFIG_LIB_BOARDCTL=y # RTOS Features # CONFIG_DISABLE_OS_API=y -# CONFIG_DISABLE_POSIX_TIMERS is not set +CONFIG_DISABLE_POSIX_TIMERS=y # 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_MQUEUE=y +CONFIG_DISABLE_ENVIRON=y # # Clocks and Timers @@ -423,12 +421,6 @@ 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 # @@ -468,7 +460,7 @@ CONFIG_DEV_NULL=y # 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_PWM=y # CONFIG_ARCH_HAVE_I2CRESET is not set # CONFIG_I2C is not set # CONFIG_SPI is not set @@ -619,7 +611,6 @@ CONFIG_SYSLOG_CONSOLE=y 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 @@ -671,7 +662,6 @@ CONFIG_MM_REGIONS=1 # 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 @@ -688,7 +678,6 @@ CONFIG_BUILTIN=y 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 @@ -707,7 +696,6 @@ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 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 @@ -777,6 +765,11 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_PCA9635 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_DURATION=5 +CONFIG_EXAMPLES_PWM_DUTYPCT=50 # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set diff --git a/configs/freedom-k64f/src/Makefile b/configs/freedom-k64f/src/Makefile index 3538dc384bee0f601aadd3879c3895ef59fbe995..8c533ec8494b82a3183cc6070a8590e4969624ea 100644 --- a/configs/freedom-k64f/src/Makefile +++ b/configs/freedom-k64f/src/Makefile @@ -69,4 +69,8 @@ ifeq ($(CONFIG_USBMSC),y) CSRCS += k64_usbmsc.c endif +ifeq ($(CONFIG_PWM),y) +CSRCS += k64_pwm.c +endif + include $(TOPDIR)/configs/Board.mk diff --git a/configs/freedom-k64f/src/k64_pwm.c b/configs/freedom-k64f/src/k64_pwm.c new file mode 100644 index 0000000000000000000000000000000000000000..2434974122ac1ac2eaed412cd8446306c62d2184 --- /dev/null +++ b/configs/freedom-k64f/src/k64_pwm.c @@ -0,0 +1,107 @@ +/************************************************************************************ + * configs/freedom-k64f/src/k64_pwm.c + * + * Copyright (C) 2013, 2015, 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * Jordan MacIntyre + * + * 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" + +#ifdef CONFIG_PWM + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: board_pwm_setup + * + * Description: + * All Kinetis K architectures must provide the following interface to work with + * examples/pwm. + * + ************************************************************************************/ + +int board_pwm_setup(void) +{ + FAR struct pwm_lowerhalf_s *pwm; + static bool initialized = false; + int ret; + + /* Have we already initialized? */ + + if (!initialized) + { + /* Call k64_pwminitialize() to get an instance of the PWM interface */ + + pwm = kinetis_pwminitialize(0); + if (!pwm) + { + aerr("ERROR: Failed to get the K64 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 */ + + initialized = true; + } + + return OK; +} + +#endif /* CONFIG_PWM */ diff --git a/configs/freedom-kl25z/minnsh/Make.defs b/configs/freedom-kl25z/minnsh/Make.defs index c3ff3df814461ca5db24cde5b540a8179b18ab4a..453b86e4cfa7886b5f569edab76e6cd576376b16 100644 --- a/configs/freedom-kl25z/minnsh/Make.defs +++ b/configs/freedom-kl25z/minnsh/Make.defs @@ -72,7 +72,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/freedom-kl25z/minnsh/defconfig b/configs/freedom-kl25z/minnsh/defconfig index bf20f0e90f52df5631c79637d188903da5e4348b..89935cad023bc6ced325547d60218e1a5df5c950 100644 --- a/configs/freedom-kl25z/minnsh/defconfig +++ b/configs/freedom-kl25z/minnsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/freedom-kl25z/nsh/Make.defs b/configs/freedom-kl25z/nsh/Make.defs index eac2f1bdbc441d0ba923ce2e904b643a3a93bc1b..4eb098fbe9bfd1787ac6322f71612c47ed078b0e 100644 --- a/configs/freedom-kl25z/nsh/Make.defs +++ b/configs/freedom-kl25z/nsh/Make.defs @@ -72,7 +72,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/freedom-kl25z/nsh/defconfig b/configs/freedom-kl25z/nsh/defconfig index eac5cf656966b7e84f9e66f635ba19ae86dc58c2..c313a38f01fafface810637be4170361c6f71cf8 100644 --- a/configs/freedom-kl25z/nsh/defconfig +++ b/configs/freedom-kl25z/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -135,7 +135,6 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV6M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV6M_TOOLCHAIN_CODESOURCERYL is not set CONFIG_ARMV6M_TOOLCHAIN_GNU_EABIL=y -# CONFIG_KL_GPIOIRQ is not set # # Kinetis Configuration Options @@ -191,6 +190,7 @@ CONFIG_KL_TPM0_CHANNEL=0 # # Kinetis GPIO Interrupt Configuration # +# CONFIG_KL_GPIOIRQ is not set # # Architecture Options @@ -259,11 +259,11 @@ CONFIG_ARCH_BOARD="freedom-kl25z" # CONFIG_ARCH_HAVE_LEDS=y CONFIG_ARCH_LEDS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -375,6 +375,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=1536 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -403,7 +404,12 @@ CONFIG_PWM=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -476,8 +482,10 @@ CONFIG_UART0_2STOP=0 # CONFIG_UART0_IFLOWCONTROL is not set # CONFIG_UART0_OFLOWCONTROL is not set # CONFIG_UART0_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -492,6 +500,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -594,6 +603,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -619,7 +629,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -645,7 +654,6 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set CONFIG_EXAMPLES_PWM=y @@ -757,7 +765,6 @@ 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 @@ -779,6 +786,7 @@ CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_USLEEP is not set CONFIG_NSH_DISABLE_WGET=y # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -816,7 +824,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/freedom-kl26z/minnsh/Make.defs b/configs/freedom-kl26z/minnsh/Make.defs index ed7eb039329957e6800e48b16e1d9df363359f28..380541961dc0b32a9f32f1711594c92d0089c256 100644 --- a/configs/freedom-kl26z/minnsh/Make.defs +++ b/configs/freedom-kl26z/minnsh/Make.defs @@ -72,7 +72,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/freedom-kl26z/minnsh/defconfig b/configs/freedom-kl26z/minnsh/defconfig index 3fba07ddfa95eafd68371056797d4a57fa65434f..8852ec343bbf4eec4c09b78d9b09ba181e7e4642 100644 --- a/configs/freedom-kl26z/minnsh/defconfig +++ b/configs/freedom-kl26z/minnsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/freedom-kl26z/nsh/Make.defs b/configs/freedom-kl26z/nsh/Make.defs index 2b9689badcf39be8119c85f0d4317b1a3d2f2f41..4d982e93b7fd0047ec585ff36eebfa9eea5da350 100644 --- a/configs/freedom-kl26z/nsh/Make.defs +++ b/configs/freedom-kl26z/nsh/Make.defs @@ -72,7 +72,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/freedom-kl26z/nsh/defconfig b/configs/freedom-kl26z/nsh/defconfig index 32f0bdf6be267c3a5794772a54e10657235d96a2..73010ec82437a9e087b8b0d3749a58312fa2c44d 100644 --- a/configs/freedom-kl26z/nsh/defconfig +++ b/configs/freedom-kl26z/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/hymini-stm32v/buttons/Make.defs b/configs/hymini-stm32v/buttons/Make.defs index 47431700b7d7e2e6990cb734526368fcaae684bb..8a2b9857ab32d81bdccc1c986075a3b573ff9ed4 100644 --- a/configs/hymini-stm32v/buttons/Make.defs +++ b/configs/hymini-stm32v/buttons/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/hymini-stm32v/buttons/defconfig b/configs/hymini-stm32v/buttons/defconfig index a1d993bdc0cd4a43ef4e104edd566cbc73a0927c..159cb319de8865c32955f84759fb61560f5bae4b 100644 --- a/configs/hymini-stm32v/buttons/defconfig +++ b/configs/hymini-stm32v/buttons/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -415,6 +415,8 @@ CONFIG_STM32_JTAG_DISABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -539,6 +541,7 @@ CONFIG_ARCH_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -554,9 +557,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=7 @@ -653,6 +659,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -668,6 +675,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -681,7 +689,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -754,8 +767,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -770,6 +785,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -876,6 +892,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -909,7 +926,6 @@ CONFIG_EXAMPLES_BUTTONS_NAME6="Button 6" CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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 @@ -935,10 +951,9 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1013,7 +1028,7 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/hymini-stm32v/nsh/Make.defs b/configs/hymini-stm32v/nsh/Make.defs index dd649da9384ed623ab1e34cadb1aa5732ae4e38b..c9945fc47a10fac4f60384c9a18d830a154cc03f 100644 --- a/configs/hymini-stm32v/nsh/Make.defs +++ b/configs/hymini-stm32v/nsh/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/hymini-stm32v/nsh/defconfig b/configs/hymini-stm32v/nsh/defconfig index 0411715e505688e3eaf8f99d2d298881ca7cb816..1278418787c555319080f8a797360e1244454f9f 100644 --- a/configs/hymini-stm32v/nsh/defconfig +++ b/configs/hymini-stm32v/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -418,6 +418,8 @@ CONFIG_STM32_JTAG_DISABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -543,12 +545,11 @@ CONFIG_ARCH_HAVE_BUTTONS=y CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_HAVE_IRQBUTTONS=y CONFIG_ARCH_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -571,9 +572,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=7 @@ -670,6 +674,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -685,6 +690,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -698,7 +704,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -783,8 +794,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -799,6 +812,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -914,6 +928,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -935,7 +950,6 @@ CONFIG_ARCH_HAVE_TLS=y # 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_ELF is not set # CONFIG_EXAMPLES_FSTEST is not set @@ -962,10 +976,9 @@ CONFIG_EXAMPLES_NSH=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1072,7 +1085,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1094,6 +1106,8 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 # # Configure Command Options @@ -1134,7 +1148,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/hymini-stm32v/nsh2/Make.defs b/configs/hymini-stm32v/nsh2/Make.defs index 27b64cc342a317acc48ff927a37b8ad6433773bd..3d9cfeb6d0a93ac4e214616a7c6b32bdeb6de91b 100644 --- a/configs/hymini-stm32v/nsh2/Make.defs +++ b/configs/hymini-stm32v/nsh2/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/hymini-stm32v/nsh2/defconfig b/configs/hymini-stm32v/nsh2/defconfig index 826bd059a2106b47b1f9dac3115ce3b79bb56c35..45c640cacfbeb9598bd94afa8fc8bc1c1119948e 100644 --- a/configs/hymini-stm32v/nsh2/defconfig +++ b/configs/hymini-stm32v/nsh2/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -424,6 +424,8 @@ CONFIG_STM32_JTAG_DISABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM3_PWM is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -464,9 +466,6 @@ CONFIG_STM32_USART1_SERIALDRIVER=y CONFIG_SDIO_DMAPRIO=0x00001000 CONFIG_STM32_HAVE_RTC_COUNTER=y # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set -CONFIG_RTC_LSECLOCK=y -# CONFIG_RTC_LSICLOCK is not set -# CONFIG_RTC_HSECLOCK is not set # # USB FS Host Configuration @@ -560,13 +559,11 @@ CONFIG_ARCH_HAVE_BUTTONS=y CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_HAVE_IRQBUTTONS=y CONFIG_ARCH_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 -CONFIG_NSH_MMCSDSPIPORTNO=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -590,10 +587,16 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2016 +CONFIG_START_MONTH=7 +CONFIG_START_DAY=28 CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 CONFIG_WDOG_INTRESERVE=1 @@ -687,6 +690,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -706,23 +710,21 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # # Timer Driver Support # # CONFIG_TIMER is not set -CONFIG_RTC=y -# CONFIG_RTC_DATETIME is not set -# CONFIG_RTC_HIRES is not set -# CONFIG_RTC_ALARM is not set -# CONFIG_RTC_DRIVER is not set -# CONFIG_RTC_EXTERNAL is not set +# CONFIG_RTC is not set # CONFIG_WATCHDOG is not set # CONFIG_ANALOG is not set # CONFIG_AUDIO_DEVICES is not set @@ -746,7 +748,12 @@ CONFIG_ADS7843E_THRESHY=12 # CONFIG_BUTTONS is not set # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -868,6 +875,7 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -907,6 +915,8 @@ CONFIG_USBMSC_REMOVABLE=y CONFIG_USBMSC_SCSI_PRIO=128 CONFIG_USBMSC_SCSI_STACKSIZE=2048 # CONFIG_USBHOST is not set +CONFIG_HAVE_USBTRACE=y +# CONFIG_USBMONITOR is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -921,6 +931,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1129,6 +1140,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1167,7 +1179,6 @@ CONFIG_EXAMPLES_BUTTONS_NAME6="Button 6" CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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 @@ -1229,9 +1240,9 @@ CONFIG_EXAMPLES_NXIMAGE_YSCALE1p0=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set @@ -1347,7 +1358,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1369,6 +1379,9 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 +CONFIG_NSH_MMCSDSPIPORTNO=0 # # Configure Command Options @@ -1415,7 +1428,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 @@ -1426,7 +1439,6 @@ CONFIG_READLINE_ECHO=y # CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_UBLOXMODEM is not set -# CONFIG_USBMONITOR is not set CONFIG_SYSTEM_USBMSC=y CONFIG_SYSTEM_USBMSC_NLUNS=1 CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 diff --git a/configs/hymini-stm32v/usbmsc/Make.defs b/configs/hymini-stm32v/usbmsc/Make.defs index f459f47fcb5efbd5f3f5813c23757a33bba8ef14..55dec5b64873666d308951cec11e1ec8fe630fae 100644 --- a/configs/hymini-stm32v/usbmsc/Make.defs +++ b/configs/hymini-stm32v/usbmsc/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/hymini-stm32v/usbmsc/defconfig b/configs/hymini-stm32v/usbmsc/defconfig index 50290a135f2fef8c696caa7d13d7b73c9f452602..a9bf81df95d745506a626be6cf11d04cae28e946 100644 --- a/configs/hymini-stm32v/usbmsc/defconfig +++ b/configs/hymini-stm32v/usbmsc/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -420,6 +420,8 @@ CONFIG_STM32_JTAG_DISABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -551,6 +553,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -574,9 +577,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2009 CONFIG_START_MONTH=11 @@ -674,6 +680,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -689,6 +696,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -702,7 +710,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -801,6 +814,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -838,6 +852,7 @@ CONFIG_USBMSC_REMOVABLE=y CONFIG_USBMSC_SCSI_PRIO=128 CONFIG_USBMSC_SCSI_STACKSIZE=2048 # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -852,6 +867,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -966,6 +982,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -986,7 +1003,6 @@ CONFIG_ARCH_HAVE_TLS=y # # 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 @@ -1013,10 +1029,9 @@ CONFIG_ARCH_HAVE_TLS=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1094,7 +1109,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/hymini-stm32v/usbnsh/Make.defs b/configs/hymini-stm32v/usbnsh/Make.defs index 5df2960ed6a9aece7288eec320221f4416ef6674..4bd8b6ed893de68ec6732a252f7e119e881db34c 100644 --- a/configs/hymini-stm32v/usbnsh/Make.defs +++ b/configs/hymini-stm32v/usbnsh/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/hymini-stm32v/usbnsh/defconfig b/configs/hymini-stm32v/usbnsh/defconfig index c794400467b55fc8723b9f04b385ebac9c1def32..f482b3328d27b6516e3fcd5f1d06126effdd072c 100644 --- a/configs/hymini-stm32v/usbnsh/defconfig +++ b/configs/hymini-stm32v/usbnsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -415,6 +415,8 @@ CONFIG_STM32_JTAG_DISABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -535,11 +537,11 @@ CONFIG_ARCH_HAVE_BUTTONS=y CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_HAVE_IRQBUTTONS=y CONFIG_ARCH_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -563,9 +565,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=7 @@ -662,6 +667,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -677,6 +683,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -690,7 +697,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -763,6 +775,7 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -805,6 +818,7 @@ CONFIG_CDCACM_VENDORSTR="NuttX" CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -822,6 +836,7 @@ CONFIG_SYSLOG_CHAR=y # CONFIG_CONSOLE_SYSLOG is not set CONFIG_SYSLOG_CHAR_CRLF=y CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -928,6 +943,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -961,7 +977,6 @@ CONFIG_EXAMPLES_BUTTONS_NAME6="Button 6" CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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 @@ -987,10 +1002,9 @@ CONFIG_EXAMPLES_NSH=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1094,7 +1108,6 @@ 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 @@ -1116,6 +1129,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1158,7 +1172,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/hymini-stm32v/usbserial/Make.defs b/configs/hymini-stm32v/usbserial/Make.defs index 8209827f16e0a61a3674caf102599f36b97329db..e7799b6b6c219b408f857fa1e86eb6d24236708c 100644 --- a/configs/hymini-stm32v/usbserial/Make.defs +++ b/configs/hymini-stm32v/usbserial/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/hymini-stm32v/usbserial/defconfig b/configs/hymini-stm32v/usbserial/defconfig index 0771b22ef0c9c9afd24fa7d9441e5cc054739771..eb86d3a7e525d66d957947497125da083b248438 100644 --- a/configs/hymini-stm32v/usbserial/defconfig +++ b/configs/hymini-stm32v/usbserial/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -416,6 +416,8 @@ CONFIG_STM32_JTAG_DISABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -542,6 +544,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -565,9 +568,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2009 CONFIG_START_MONTH=10 @@ -660,6 +666,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -675,6 +682,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -688,7 +696,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -775,6 +788,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -811,6 +825,7 @@ CONFIG_PL2303_PRODUCTSTR="USBdev Serial" # CONFIG_CDCACM is not set # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -825,6 +840,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -930,6 +946,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -950,7 +967,6 @@ CONFIG_ARCH_HAVE_TLS=y # # 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 @@ -976,10 +992,9 @@ CONFIG_ARCH_HAVE_TLS=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1056,7 +1071,7 @@ CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/kwikstik-k40/ostest/Make.defs b/configs/kwikstik-k40/ostest/Make.defs index b7632320e7550b1f256bc185407f9206706a62dc..c1e82ed935e61629deb0209b8693eadfbfd5cf3c 100644 --- a/configs/kwikstik-k40/ostest/Make.defs +++ b/configs/kwikstik-k40/ostest/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/kwikstik-k40/ostest/defconfig b/configs/kwikstik-k40/ostest/defconfig index 2582f887cd3e30b30196bf7767165f19ce21fcd5..f80657b514cd284f16969404555f282bd736826e 100644 --- a/configs/kwikstik-k40/ostest/defconfig +++ b/configs/kwikstik-k40/ostest/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/launchxl-tms57004/nsh/Make.defs b/configs/launchxl-tms57004/nsh/Make.defs index db2eff3d693960ad7c3bcf60d9d1007a45941149..fffb827e25564af69e6fb23f0011280653a3c9cc 100644 --- a/configs/launchxl-tms57004/nsh/Make.defs +++ b/configs/launchxl-tms57004/nsh/Make.defs @@ -70,7 +70,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-r4 -mbig-endian ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/launchxl-tms57004/nsh/defconfig b/configs/launchxl-tms57004/nsh/defconfig index 5dac2700b4e7a7bde34841fc41846ed4457e930e..c52311e79a24b63d6fa0d37c31093e8253f27a69 100644 --- a/configs/launchxl-tms57004/nsh/defconfig +++ b/configs/launchxl-tms57004/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lincoln60/netnsh/Make.defs b/configs/lincoln60/netnsh/Make.defs index 991b367b280142eadace682e7b42afd1b0c7b7ed..509e132306c86a383fb5e182de2604b5d7514d98 100644 --- a/configs/lincoln60/netnsh/Make.defs +++ b/configs/lincoln60/netnsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lincoln60/netnsh/defconfig b/configs/lincoln60/netnsh/defconfig index 4d5cabba0125cbfd2663d7160f1600168b2b5e28..a323b8474ed6c133f8ec9fa39dd646477d675d0d 100644 --- a/configs/lincoln60/netnsh/defconfig +++ b/configs/lincoln60/netnsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lincoln60/nsh/Make.defs b/configs/lincoln60/nsh/Make.defs index 30722c1d3a5be9416f480a5707791db026eb73a4..d7d518c15cc815fa5bd6794201f32f03cacb9308 100644 --- a/configs/lincoln60/nsh/Make.defs +++ b/configs/lincoln60/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lincoln60/nsh/defconfig b/configs/lincoln60/nsh/defconfig index 4b9b3f2e1bbc29f2be0886f18f5b0d5fc955002c..524b76aec81eba8d8da7bf3e7b72a23b474ef35a 100644 --- a/configs/lincoln60/nsh/defconfig +++ b/configs/lincoln60/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lincoln60/thttpd-binfs/Make.defs b/configs/lincoln60/thttpd-binfs/Make.defs index a9f026a8ee5c5758f4d784295f2290c965ac328d..715f8f5965850f2b981ebf1b0cfd41ae1928e7c5 100644 --- a/configs/lincoln60/thttpd-binfs/Make.defs +++ b/configs/lincoln60/thttpd-binfs/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lincoln60/thttpd-binfs/defconfig b/configs/lincoln60/thttpd-binfs/defconfig index babe05b6f3b1dceaf6dd5183b20588a529a29414..6637795fede2182eeccbd313d00160e2e97fe482 100644 --- a/configs/lincoln60/thttpd-binfs/defconfig +++ b/configs/lincoln60/thttpd-binfs/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lm3s6432-s2e/nsh/Make.defs b/configs/lm3s6432-s2e/nsh/Make.defs index fda1b4dad9170414f9d16f0e25520d75eeb80faa..09536ab68ddd781d60e3753d92976e872fc65cb2 100644 --- a/configs/lm3s6432-s2e/nsh/Make.defs +++ b/configs/lm3s6432-s2e/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lm3s6432-s2e/nsh/defconfig b/configs/lm3s6432-s2e/nsh/defconfig index cbf540affc3abcdb0f4307326a22217289c0c1a6..ddd1c6a354d304521ae926ebbec13db43805aec4 100644 --- a/configs/lm3s6432-s2e/nsh/defconfig +++ b/configs/lm3s6432-s2e/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lm3s6965-ek/discover/Make.defs b/configs/lm3s6965-ek/discover/Make.defs index b3578aa89b123618b303f2d2a1f1e978f6359c64..cd1c5fbb77319b690e80afdfab680b94b2d2ca59 100644 --- a/configs/lm3s6965-ek/discover/Make.defs +++ b/configs/lm3s6965-ek/discover/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lm3s6965-ek/discover/defconfig b/configs/lm3s6965-ek/discover/defconfig index abe5b4dce60c9d3a3165475fd2e707a20de53e49..b5099e6034af13edffafa865b55b742cb299896e 100644 --- a/configs/lm3s6965-ek/discover/defconfig +++ b/configs/lm3s6965-ek/discover/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lm3s6965-ek/nsh/Make.defs b/configs/lm3s6965-ek/nsh/Make.defs index 035e23651bd54920cd65f496b340913d25d2c603..86704811fa571341665bbbaa684ee65668a9e72e 100644 --- a/configs/lm3s6965-ek/nsh/Make.defs +++ b/configs/lm3s6965-ek/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lm3s6965-ek/nsh/defconfig b/configs/lm3s6965-ek/nsh/defconfig index abe5b4dce60c9d3a3165475fd2e707a20de53e49..b5099e6034af13edffafa865b55b742cb299896e 100644 --- a/configs/lm3s6965-ek/nsh/defconfig +++ b/configs/lm3s6965-ek/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lm3s6965-ek/nx/Make.defs b/configs/lm3s6965-ek/nx/Make.defs index bfd85cbf5447f6e75ec228a48780b6c0e95a55cb..b9daa76e00796de2e9567d2357eab475905a00b0 100644 --- a/configs/lm3s6965-ek/nx/Make.defs +++ b/configs/lm3s6965-ek/nx/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lm3s6965-ek/nx/defconfig b/configs/lm3s6965-ek/nx/defconfig index b9c138e539b5cf843a68ae479a18d7bd3062e3e3..a11d8d14927840f26c14288228cd376a43679e7c 100644 --- a/configs/lm3s6965-ek/nx/defconfig +++ b/configs/lm3s6965-ek/nx/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lm3s6965-ek/tcpecho/Make.defs b/configs/lm3s6965-ek/tcpecho/Make.defs index dbe06b64b0d868a33995a59d2b593fada06a55b3..2b735fe89202495a88e051f0dbcd6f953337765a 100644 --- a/configs/lm3s6965-ek/tcpecho/Make.defs +++ b/configs/lm3s6965-ek/tcpecho/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lm3s6965-ek/tcpecho/defconfig b/configs/lm3s6965-ek/tcpecho/defconfig index eef4cfa398b9c3306dbc154e9509e80e78a2753f..3829162ce4a26ebe71dfc3a3a6008457286f0607 100644 --- a/configs/lm3s6965-ek/tcpecho/defconfig +++ b/configs/lm3s6965-ek/tcpecho/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lm3s8962-ek/nsh/Make.defs b/configs/lm3s8962-ek/nsh/Make.defs index 473080351afe2211adbf6bb56624e26acabacd65..eddb4e1b06b0ed856bb216687e77647a51f82c35 100644 --- a/configs/lm3s8962-ek/nsh/Make.defs +++ b/configs/lm3s8962-ek/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lm3s8962-ek/nsh/defconfig b/configs/lm3s8962-ek/nsh/defconfig index fbfabcd052995eae31de50337a3ff5e6745738a2..ca57326f759268294d534271b3d27c3e2b6e3f8c 100644 --- a/configs/lm3s8962-ek/nsh/defconfig +++ b/configs/lm3s8962-ek/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lm3s8962-ek/nx/Make.defs b/configs/lm3s8962-ek/nx/Make.defs index aa65554d0c366b582a14f94dbbb3f53e3483d551..49e399f502c10bcd245b1ad324481f4198159834 100644 --- a/configs/lm3s8962-ek/nx/Make.defs +++ b/configs/lm3s8962-ek/nx/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lm3s8962-ek/nx/defconfig b/configs/lm3s8962-ek/nx/defconfig index 5f8a28db200b8e6d0222dbc1747ab57e2a79c97c..1dc355b04f068c63f1304743587d7ec6ffaff0bf 100644 --- a/configs/lm3s8962-ek/nx/defconfig +++ b/configs/lm3s8962-ek/nx/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lm4f120-launchpad/nsh/Make.defs b/configs/lm4f120-launchpad/nsh/Make.defs index c9ff1c67c4026bcac5951434fe2fa7e278e675f2..de827838bdcd552ec1ee7ee58c83247adf1a3e03 100644 --- a/configs/lm4f120-launchpad/nsh/Make.defs +++ b/configs/lm4f120-launchpad/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lm4f120-launchpad/nsh/defconfig b/configs/lm4f120-launchpad/nsh/defconfig index f69c7c30895a02672fd705036824d89622f41d77..d94d6182509237119303a97ce9839f41916cf7d9 100644 --- a/configs/lm4f120-launchpad/nsh/defconfig +++ b/configs/lm4f120-launchpad/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lpc4330-xplorer/nsh/Make.defs b/configs/lpc4330-xplorer/nsh/Make.defs index e5d4fc2f4f80778c73b2069162f135c850280dcc..ec8fc2a59c8cd6b5cda2759ea9dbd4a8bd9538e3 100644 --- a/configs/lpc4330-xplorer/nsh/Make.defs +++ b/configs/lpc4330-xplorer/nsh/Make.defs @@ -94,7 +94,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lpc4330-xplorer/nsh/defconfig b/configs/lpc4330-xplorer/nsh/defconfig index 96cee0346b9ff6cfdd3c29ed1a40705101d125c1..43d7da3c855334bd755b2c31209e1482a5fc29f2 100644 --- a/configs/lpc4330-xplorer/nsh/defconfig +++ b/configs/lpc4330-xplorer/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lpc4337-ws/nsh/Make.defs b/configs/lpc4337-ws/nsh/Make.defs index 2192ced6f12767e18392ca885e7218867991e3f6..2800be7c26d3e3f18c55cc57863b963eff473d62 100644 --- a/configs/lpc4337-ws/nsh/Make.defs +++ b/configs/lpc4337-ws/nsh/Make.defs @@ -94,7 +94,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lpc4337-ws/nsh/defconfig b/configs/lpc4337-ws/nsh/defconfig index 128ae9ca59008cdef1683ffa7b499dabab50ce6a..e643242d3ce3344a45a651a8683d1a423349bd32 100644 --- a/configs/lpc4337-ws/nsh/defconfig +++ b/configs/lpc4337-ws/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lpc4357-evb/nsh/Make.defs b/configs/lpc4357-evb/nsh/Make.defs index 544476cdd10b6a6904430fc8f08bf1880a0cd021..d0fe9706c8bb7ad8a02ddd63fde959d94bb64cf7 100644 --- a/configs/lpc4357-evb/nsh/Make.defs +++ b/configs/lpc4357-evb/nsh/Make.defs @@ -94,7 +94,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lpc4357-evb/nsh/defconfig b/configs/lpc4357-evb/nsh/defconfig index 58f05c236e05502811d92102d414c59f788f1e28..475a16e1cdc7c1868246a781a1766d30f426b84b 100644 --- a/configs/lpc4357-evb/nsh/defconfig +++ b/configs/lpc4357-evb/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lpc4370-link2/nsh/Make.defs b/configs/lpc4370-link2/nsh/Make.defs index d4b811e51f7d682037d38b141f5aae335cfb3264..0dfbced77385334d11e387cc5db43a751d78b390 100644 --- a/configs/lpc4370-link2/nsh/Make.defs +++ b/configs/lpc4370-link2/nsh/Make.defs @@ -94,7 +94,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lpc4370-link2/nsh/defconfig b/configs/lpc4370-link2/nsh/defconfig index f740cfd7bf7a0b946f96d304e93f02801cbf1bcd..f6a52ca1fe3fb9de7269105f201c6101bfb21d95 100644 --- a/configs/lpc4370-link2/nsh/defconfig +++ b/configs/lpc4370-link2/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lpcxpresso-lpc1115/minnsh/Make.defs b/configs/lpcxpresso-lpc1115/minnsh/Make.defs index caef0baee284b50b20dd06a5fbfe2925b46fefbb..5024dbe9ca5bb29065aca2ac828843f10e6b2456 100644 --- a/configs/lpcxpresso-lpc1115/minnsh/Make.defs +++ b/configs/lpcxpresso-lpc1115/minnsh/Make.defs @@ -72,7 +72,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lpcxpresso-lpc1115/minnsh/defconfig b/configs/lpcxpresso-lpc1115/minnsh/defconfig index edc83097727c59ded5222fd5fd5f696b63ce6eb1..dbae4a0abc924764151e01d3d795c65349487ba4 100644 --- a/configs/lpcxpresso-lpc1115/minnsh/defconfig +++ b/configs/lpcxpresso-lpc1115/minnsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lpcxpresso-lpc1115/nsh/Make.defs b/configs/lpcxpresso-lpc1115/nsh/Make.defs index f04d2f6b4a2cba05bd50efa47d0cba44000ff63b..aac34e079d10cf189ff1ae1b25dac6aea00a092c 100644 --- a/configs/lpcxpresso-lpc1115/nsh/Make.defs +++ b/configs/lpcxpresso-lpc1115/nsh/Make.defs @@ -72,7 +72,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lpcxpresso-lpc1115/nsh/defconfig b/configs/lpcxpresso-lpc1115/nsh/defconfig index c8b7d4b11c32a71320ed9fc2dc919d4e594ced1d..4853dd1d67b06ab6c740b4a7f831463f778c05ac 100644 --- a/configs/lpcxpresso-lpc1115/nsh/defconfig +++ b/configs/lpcxpresso-lpc1115/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lpcxpresso-lpc1768/dhcpd/Make.defs b/configs/lpcxpresso-lpc1768/dhcpd/Make.defs index 0e863a3a679c0cd316da93d1f136b9fde8ad3dd8..9520c26d7024058e734db21af3ab780027b3d95e 100644 --- a/configs/lpcxpresso-lpc1768/dhcpd/Make.defs +++ b/configs/lpcxpresso-lpc1768/dhcpd/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lpcxpresso-lpc1768/dhcpd/defconfig b/configs/lpcxpresso-lpc1768/dhcpd/defconfig index 1bd6f34549bd00f8c04384a381d45741dc9055ef..05f8641ee28cda6bc6c48805ad8b3a92b3f77094 100644 --- a/configs/lpcxpresso-lpc1768/dhcpd/defconfig +++ b/configs/lpcxpresso-lpc1768/dhcpd/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lpcxpresso-lpc1768/nsh/Make.defs b/configs/lpcxpresso-lpc1768/nsh/Make.defs index f1d73a762ba3fd16477f6fcc5c41aed01bb07e52..63cc8080b648e74f802d8826dc62beff8f89de4d 100644 --- a/configs/lpcxpresso-lpc1768/nsh/Make.defs +++ b/configs/lpcxpresso-lpc1768/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lpcxpresso-lpc1768/nsh/defconfig b/configs/lpcxpresso-lpc1768/nsh/defconfig index e28399a97a65fe9f4d903d49adb5112215caf09a..0d195735b95801fefbe8ccc12322bd5208fc1979 100644 --- a/configs/lpcxpresso-lpc1768/nsh/defconfig +++ b/configs/lpcxpresso-lpc1768/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lpcxpresso-lpc1768/nx/Make.defs b/configs/lpcxpresso-lpc1768/nx/Make.defs index 859d8b1ced1f918fb0e2be977a2cba3242a5bab3..8d38fdf494eddb8788621b213c745b9c3cb44d9a 100644 --- a/configs/lpcxpresso-lpc1768/nx/Make.defs +++ b/configs/lpcxpresso-lpc1768/nx/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lpcxpresso-lpc1768/nx/defconfig b/configs/lpcxpresso-lpc1768/nx/defconfig index ad93523748a2bcf788ceadcd569291951ab73db8..5cf05e397d732425d05cd2f26cbe2fce06a8fcf3 100644 --- a/configs/lpcxpresso-lpc1768/nx/defconfig +++ b/configs/lpcxpresso-lpc1768/nx/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lpcxpresso-lpc1768/thttpd/Make.defs b/configs/lpcxpresso-lpc1768/thttpd/Make.defs index eaf80e626973e9aac6de57f7db948707c76c629e..8ce4329157fe0442712b137670434238084ce502 100644 --- a/configs/lpcxpresso-lpc1768/thttpd/Make.defs +++ b/configs/lpcxpresso-lpc1768/thttpd/Make.defs @@ -79,7 +79,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lpcxpresso-lpc1768/thttpd/defconfig b/configs/lpcxpresso-lpc1768/thttpd/defconfig index 0fbcd2047d9aa41d1723e22d1a9421613fdd88ac..000402cb54752aba1d607a5b2e40a75b63e67700 100644 --- a/configs/lpcxpresso-lpc1768/thttpd/defconfig +++ b/configs/lpcxpresso-lpc1768/thttpd/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/lpcxpresso-lpc1768/usbmsc/Make.defs b/configs/lpcxpresso-lpc1768/usbmsc/Make.defs index 540f585a1d3bba9a0f0d07f67ede66ef4e8333f0..783f3adbacaff76fc38b8c0f28fbd6f38fc89a37 100644 --- a/configs/lpcxpresso-lpc1768/usbmsc/Make.defs +++ b/configs/lpcxpresso-lpc1768/usbmsc/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/lpcxpresso-lpc1768/usbmsc/defconfig b/configs/lpcxpresso-lpc1768/usbmsc/defconfig index e553a9db14c3ca81d22d5892ed0e501448fd5d9f..ec43ec9a66f70e1d6ac352f98929aca2860fc303 100644 --- a/configs/lpcxpresso-lpc1768/usbmsc/defconfig +++ b/configs/lpcxpresso-lpc1768/usbmsc/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/maple/nsh/Make.defs b/configs/maple/nsh/Make.defs index 4516544f1a0dc01af6bf8fcfc9090e1bdc516195..38f114a8f42da8c44ecdda67fd161e93aad4e7dc 100644 --- a/configs/maple/nsh/Make.defs +++ b/configs/maple/nsh/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/maple/nsh/defconfig b/configs/maple/nsh/defconfig index 643f6bd63896b2e57c21c114eeafbfe46f920e38..68678b4a89d786359ed5548da87d10b33738ac69 100644 --- a/configs/maple/nsh/defconfig +++ b/configs/maple/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -412,6 +412,8 @@ CONFIG_STM32_JTAG_DISABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -532,12 +534,12 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # CONFIG_MAPLE_MINI=y +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -548,9 +550,12 @@ CONFIG_MAPLE_MINI=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2009 CONFIG_START_MONTH=10 @@ -643,6 +648,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=1024 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -658,6 +664,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -671,7 +678,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -744,6 +756,7 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -768,6 +781,8 @@ CONFIG_USBDEV_TRACE_NRECORDS=32 # CONFIG_CDCACM is not set # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +CONFIG_HAVE_USBTRACE=y +# CONFIG_USBMONITOR is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -782,6 +797,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -894,6 +910,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -919,7 +936,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -945,9 +961,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1052,7 +1068,6 @@ 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 @@ -1074,6 +1089,7 @@ CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1118,7 +1134,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 @@ -1129,6 +1145,5 @@ CONFIG_READLINE_ECHO=y # CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_UBLOXMODEM is not set -# CONFIG_USBMONITOR is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/maple/nx/Make.defs b/configs/maple/nx/Make.defs index 3d223e0c770049a6dab5b9970052cdb034d09d90..bdd3f1ad2b9b9087ddd57911caf143503df5fa58 100644 --- a/configs/maple/nx/Make.defs +++ b/configs/maple/nx/Make.defs @@ -78,7 +78,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/maple/nx/defconfig b/configs/maple/nx/defconfig index 1ba42c9fc0a5e768ad93ba9e870f50b44e3eb2f1..ec0a3a53adfce8e001b9c07a394a8e5d19e1e825 100644 --- a/configs/maple/nx/defconfig +++ b/configs/maple/nx/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -420,6 +420,8 @@ CONFIG_STM32_JTAG_DISABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM2_PWM is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -557,12 +559,12 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # CONFIG_MAPLE_MINI=y +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -581,9 +583,12 @@ CONFIG_BOARDCTL_USBDEVCTRL=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2009 CONFIG_START_MONTH=10 @@ -676,6 +681,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=1024 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -700,11 +706,14 @@ CONFIG_SPI=y 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_HWFEATURES=y +# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +CONFIG_SPI_BITORDER=y # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -719,7 +728,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -827,6 +841,7 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -871,6 +886,8 @@ CONFIG_CDCACM_VENDORSTR="NuttX" CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +CONFIG_HAVE_USBTRACE=y +# CONFIG_USBMONITOR is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -884,6 +901,7 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_SYSLOG_CHAR is not set CONFIG_SYSLOG_NONE=y # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1082,6 +1100,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1107,7 +1126,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1156,9 +1174,9 @@ CONFIG_EXAMPLES_NXHELLO_DEFAULT_FONT=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1264,7 +1282,6 @@ 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 @@ -1286,6 +1303,7 @@ CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1333,7 +1351,7 @@ CONFIG_USBDEV_MINOR=0 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN is not set +# CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_INSTALL is not set @@ -1345,6 +1363,5 @@ CONFIG_READLINE_ECHO=y # CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_UBLOXMODEM is not set -# CONFIG_USBMONITOR is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/maple/usbnsh/Make.defs b/configs/maple/usbnsh/Make.defs index 8820947ef8f3f037a12cccad2b637aef02e0eb92..a52241bf0c36b270c0358f6a4a7662413bbcbb13 100644 --- a/configs/maple/usbnsh/Make.defs +++ b/configs/maple/usbnsh/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/maple/usbnsh/defconfig b/configs/maple/usbnsh/defconfig index 17283af76e25554a7caac0f09eb87c7a4d78c4af..8340e5872260fa101c2f8c6c5214371f6f27fccf 100644 --- a/configs/maple/usbnsh/defconfig +++ b/configs/maple/usbnsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -412,6 +412,8 @@ CONFIG_STM32_JTAG_DISABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -532,12 +534,12 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # CONFIG_MAPLE_MINI=y +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -556,9 +558,12 @@ CONFIG_BOARDCTL_USBDEVCTRL=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2009 CONFIG_START_MONTH=10 @@ -651,6 +656,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=1024 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -671,6 +677,7 @@ CONFIG_I2C=y # CONFIG_I2C_TRACE is not set # CONFIG_I2C_DRIVER is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -685,7 +692,12 @@ CONFIG_I2C=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -757,6 +769,7 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -801,6 +814,8 @@ CONFIG_CDCACM_VENDORSTR="NuttX" CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +CONFIG_HAVE_USBTRACE=y +# CONFIG_USBMONITOR is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -814,6 +829,7 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_SYSLOG_CHAR is not set CONFIG_SYSLOG_NONE=y # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -926,6 +942,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -951,7 +968,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -977,9 +993,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1085,7 +1101,6 @@ 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 @@ -1107,6 +1122,7 @@ CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1154,7 +1170,7 @@ CONFIG_USBDEV_MINOR=0 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN is not set +# CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_INSTALL is not set @@ -1166,6 +1182,5 @@ CONFIG_READLINE_ECHO=y # CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_UBLOXMODEM is not set -# CONFIG_USBMONITOR is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/mbed/hidkbd/Make.defs b/configs/mbed/hidkbd/Make.defs index fc07f4425f0ca7e4fdc6a80ebee42f3445d55960..564ab05bd6efb962c774ab78c77b453eb0100df8 100644 --- a/configs/mbed/hidkbd/Make.defs +++ b/configs/mbed/hidkbd/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/mbed/hidkbd/defconfig b/configs/mbed/hidkbd/defconfig index a45e4315cbb96608767120c355b8886633b4ebc5..0b1188bcbd005d2972af086ebe094c0433cc3506 100644 --- a/configs/mbed/hidkbd/defconfig +++ b/configs/mbed/hidkbd/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/mbed/nsh/Make.defs b/configs/mbed/nsh/Make.defs index 24a6a0563699701f4634e09624f02bda69cd54d2..e51bd0cc197863237ceeb66ee7a6020f78def717 100644 --- a/configs/mbed/nsh/Make.defs +++ b/configs/mbed/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/mbed/nsh/defconfig b/configs/mbed/nsh/defconfig index d5c241c67a89c94b43c24ac07ae033e36c8a9954..a1237556ce0878d8765eca0a4c7248b5535127b4 100644 --- a/configs/mbed/nsh/defconfig +++ b/configs/mbed/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/mcu123-lpc214x/composite/Make.defs b/configs/mcu123-lpc214x/composite/Make.defs index 8d1cd5305eab2e42d96460fe623c517d8b747ef8..2d895b3b04e5e3533c9615e735649b0778f36f4a 100644 --- a/configs/mcu123-lpc214x/composite/Make.defs +++ b/configs/mcu123-lpc214x/composite/Make.defs @@ -86,7 +86,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/mcu123-lpc214x/composite/defconfig b/configs/mcu123-lpc214x/composite/defconfig index 1a279cc8bfd8b7c3d0d911620a14f2912f8cbba2..2ec8c826ccb0ddb2a593c7d007785ef75ace76c1 100644 --- a/configs/mcu123-lpc214x/composite/defconfig +++ b/configs/mcu123-lpc214x/composite/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/mcu123-lpc214x/nsh/Make.defs b/configs/mcu123-lpc214x/nsh/Make.defs index e7f4792f8a064dbb3b1adca0e8000a256250ec48..0ff9eb008702be0fcf59439e71c2d1d8286d27cf 100644 --- a/configs/mcu123-lpc214x/nsh/Make.defs +++ b/configs/mcu123-lpc214x/nsh/Make.defs @@ -86,7 +86,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/mcu123-lpc214x/nsh/defconfig b/configs/mcu123-lpc214x/nsh/defconfig index 73c0d6685f699951b5679ff2100407eadb7bb965..029eb95dc79292f371cd3eb1fc6197239b3624b4 100644 --- a/configs/mcu123-lpc214x/nsh/defconfig +++ b/configs/mcu123-lpc214x/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/mcu123-lpc214x/usbmsc/Make.defs b/configs/mcu123-lpc214x/usbmsc/Make.defs index cbdb32871ac7a99173615cfd3e6e40e36fe51126..3a8b2bb9e2010fcb13fe021809b81efb73ebad4e 100644 --- a/configs/mcu123-lpc214x/usbmsc/Make.defs +++ b/configs/mcu123-lpc214x/usbmsc/Make.defs @@ -86,7 +86,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/mcu123-lpc214x/usbmsc/defconfig b/configs/mcu123-lpc214x/usbmsc/defconfig index 1b5e5bd05d7c44589ba0d51ebf56223196b13c36..83450481f8f592bd1a69788e464a15537a0749b6 100644 --- a/configs/mcu123-lpc214x/usbmsc/defconfig +++ b/configs/mcu123-lpc214x/usbmsc/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/mcu123-lpc214x/usbserial/Make.defs b/configs/mcu123-lpc214x/usbserial/Make.defs index 5e6d6aa799a6c993bfa8e394544e298e12dd3518..e5b9f6ea347aabdb99db8632616805ddb0fb2bbc 100644 --- a/configs/mcu123-lpc214x/usbserial/Make.defs +++ b/configs/mcu123-lpc214x/usbserial/Make.defs @@ -86,7 +86,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/mcu123-lpc214x/usbserial/defconfig b/configs/mcu123-lpc214x/usbserial/defconfig index 0fd83ba665ab207ce9369f1074bc1978d6da4a55..09fd06afceb29233fcec6e3144286565af09d1f0 100644 --- a/configs/mcu123-lpc214x/usbserial/defconfig +++ b/configs/mcu123-lpc214x/usbserial/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/micropendous3/hello/Make.defs b/configs/micropendous3/hello/Make.defs index 3319e5ddf08ce17db8b08c6ff36bce7a7979a1a7..cb4766fc67a4d37da163e0913043ddecec10dbaa 100644 --- a/configs/micropendous3/hello/Make.defs +++ b/configs/micropendous3/hello/Make.defs @@ -71,7 +71,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/micropendous3/hello/defconfig b/configs/micropendous3/hello/defconfig index a1de9375e28f5f45cd3929eb96c4fef76d0d56ae..4b37ae8ecf996c2e306f06e6db6625f9d55991c5 100644 --- a/configs/micropendous3/hello/defconfig +++ b/configs/micropendous3/hello/defconfig @@ -59,7 +59,7 @@ CONFIG_ARCH_AVR=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/mikroe-stm32f4/fulldemo/Make.defs b/configs/mikroe-stm32f4/fulldemo/Make.defs index 6dbe0a0fa380fedbc0578e836eb2eec31b89cc33..dea26ef117025bbb13305013603c6f05e31b17f9 100644 --- a/configs/mikroe-stm32f4/fulldemo/Make.defs +++ b/configs/mikroe-stm32f4/fulldemo/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/mikroe-stm32f4/fulldemo/defconfig b/configs/mikroe-stm32f4/fulldemo/defconfig index 1091be92d6388a93acc1588d564149d56b9fad3d..d57290807febfe475809c7b8fb11fec471cd4707 100644 --- a/configs/mikroe-stm32f4/fulldemo/defconfig +++ b/configs/mikroe-stm32f4/fulldemo/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -437,6 +437,8 @@ CONFIG_STM32_DMACAPABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM1_ADC is not set # CONFIG_STM32_TIM1_CAP is not set @@ -576,9 +578,6 @@ CONFIG_ARCH_BOARD="mikroe-stm32f4" # # Common Board Options # -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 -CONFIG_NSH_MMCSDSPIPORTNO=0 # # Board-Specific Options @@ -590,6 +589,7 @@ CONFIG_MIKROE_FLASH_CONFIG_PART=y CONFIG_MIKROE_FLASH_CONFIG_PART_NUMBER=0 CONFIG_MIKROE_FLASH_PART_LIST="8,248,768" # CONFIG_MIKROE_RAMMTD is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -613,9 +613,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 @@ -713,6 +716,7 @@ CONFIG_DEV_NULL=y CONFIG_DEV_ZERO=y CONFIG_ARCH_HAVE_RNG=y CONFIG_DEV_RANDOM=y +# CONFIG_DEV_URANDOM is not set CONFIG_DEV_LOOP=y # @@ -732,11 +736,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -769,7 +776,12 @@ CONFIG_INPUT=y # CONFIG_BUTTONS is not set # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -930,6 +942,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -972,6 +985,7 @@ CONFIG_CDCACM_VENDORSTR="NuttX" CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -987,6 +1001,7 @@ CONFIG_SYSLOG_CHAR=y # CONFIG_SYSLOG_FILE is not set CONFIG_SYSLOG_CHAR_CRLF=y CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1256,6 +1271,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1288,7 +1304,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1338,10 +1353,10 @@ CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4 # CONFIG_EXAMPLES_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_RANDOM is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set @@ -1459,7 +1474,6 @@ CONFIG_NSH_DISABLE_IFUPDOWN=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS is not set -# CONFIG_NSH_DISABLE_MKFIFO is not set # CONFIG_NSH_DISABLE_MKRD is not set # CONFIG_NSH_DISABLE_MKSMARTFS is not set # CONFIG_NSH_DISABLE_MH is not set @@ -1482,6 +1496,9 @@ CONFIG_NSH_DISABLE_IFUPDOWN=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 +CONFIG_NSH_MMCSDSPIPORTNO=0 # # Configure Command Options @@ -1730,6 +1747,9 @@ 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 @@ -1739,7 +1759,7 @@ CONFIG_PLATFORM_CONFIGDATA=y # CONFIG_SYSTEM_CUTERM is not set CONFIG_SYSTEM_FLASH_ERASEALL=y # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/mikroe-stm32f4/kostest/Make.defs b/configs/mikroe-stm32f4/kostest/Make.defs index 15aaec72bcd17a540f456691161237d8938f05ca..82008eeefbfb9e6338664059c8d64ff1bb0f3c02 100644 --- a/configs/mikroe-stm32f4/kostest/Make.defs +++ b/configs/mikroe-stm32f4/kostest/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/mikroe-stm32f4/kostest/defconfig b/configs/mikroe-stm32f4/kostest/defconfig index 5a711c2010c27f56f5fac43649a44789b9ec24ac..639bfafc1ad7aa681131b95a41330f7e3e210ec4 100644 --- a/configs/mikroe-stm32f4/kostest/defconfig +++ b/configs/mikroe-stm32f4/kostest/defconfig @@ -67,7 +67,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -442,6 +442,8 @@ CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM1_ADC is not set # CONFIG_STM32_TIM1_CAP is not set @@ -580,9 +582,6 @@ CONFIG_ARCH_BOARD="mikroe-stm32f4" # # Common Board Options # -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 -CONFIG_NSH_MMCSDSPIPORTNO=0 # # Board-Specific Options @@ -592,6 +591,7 @@ CONFIG_MIKROE_FLASH_MINOR=0 CONFIG_MIKROE_FLASH_PART=y CONFIG_MIKROE_FLASH_PART_LIST="256,768" # CONFIG_MIKROE_RAMMTD is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -615,9 +615,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 @@ -716,6 +719,7 @@ CONFIG_DEV_NULL=y CONFIG_DEV_ZERO=y CONFIG_ARCH_HAVE_RNG=y CONFIG_DEV_RANDOM=y +# CONFIG_DEV_URANDOM is not set CONFIG_DEV_LOOP=y # @@ -735,11 +739,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -758,7 +765,12 @@ CONFIG_RTC_NALARMS=1 # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -886,6 +898,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -928,6 +941,7 @@ CONFIG_CDCACM_VENDORSTR="NuttX" CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -943,6 +957,7 @@ CONFIG_SYSLOG_CHAR=y # CONFIG_SYSLOG_FILE is not set CONFIG_SYSLOG_CHAR_CRLF=y CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1070,6 +1085,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_USRWORK is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1097,7 +1113,6 @@ CONFIG_HAVE_CXXINITIALIZE=y # # 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 @@ -1132,11 +1147,10 @@ CONFIG_EXAMPLES_OSTEST_RR_RANGE=10000 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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1245,7 +1259,6 @@ CONFIG_NSH_DISABLE_IFUPDOWN=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS is not set -# CONFIG_NSH_DISABLE_MKFIFO is not set # CONFIG_NSH_DISABLE_MKRD is not set # CONFIG_NSH_DISABLE_MKSMARTFS is not set # CONFIG_NSH_DISABLE_MH is not set @@ -1268,6 +1281,9 @@ CONFIG_NSH_DISABLE_PS=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 +CONFIG_NSH_MMCSDSPIPORTNO=0 # # Configure Command Options @@ -1312,7 +1328,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/mikroe-stm32f4/nsh/Make.defs b/configs/mikroe-stm32f4/nsh/Make.defs index fbf03ea8531755b7c2d2628ec2f2ba2942c6cdb2..6cfdaa9437200db8f6194ebe9c35f05e8efbe7b9 100644 --- a/configs/mikroe-stm32f4/nsh/Make.defs +++ b/configs/mikroe-stm32f4/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/mikroe-stm32f4/nsh/defconfig b/configs/mikroe-stm32f4/nsh/defconfig index 6a58a8add3d7847335e85d2de5b73d38d172e5d6..fde82bf7ebd450b03af5d264d360920906af0cb4 100644 --- a/configs/mikroe-stm32f4/nsh/defconfig +++ b/configs/mikroe-stm32f4/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -435,6 +435,8 @@ CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -562,9 +564,6 @@ CONFIG_ARCH_BOARD="mikroe-stm32f4" # # Common Board Options # -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 -CONFIG_NSH_MMCSDSPIPORTNO=0 # # Board-Specific Options @@ -574,6 +573,7 @@ CONFIG_MIKROE_FLASH_MINOR=0 CONFIG_MIKROE_FLASH_PART=y CONFIG_MIKROE_FLASH_PART_LIST="256,768" # CONFIG_MIKROE_RAMMTD is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -591,9 +591,12 @@ CONFIG_LIB_BOARDCTL=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=1 @@ -688,6 +691,7 @@ CONFIG_DEV_NULL=y CONFIG_DEV_ZERO=y CONFIG_ARCH_HAVE_RNG=y CONFIG_DEV_RANDOM=y +# CONFIG_DEV_URANDOM is not set CONFIG_DEV_LOOP=y # @@ -707,11 +711,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -725,7 +732,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -853,8 +865,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -870,6 +884,7 @@ CONFIG_SYSLOG_CHAR=y # CONFIG_SYSLOG_FILE is not set CONFIG_SYSLOG_CHAR_CRLF=y CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -996,6 +1011,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1028,7 +1044,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1060,10 +1075,10 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set @@ -1177,7 +1192,6 @@ CONFIG_NSH_DISABLE_IFUPDOWN=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS is not set -# CONFIG_NSH_DISABLE_MKFIFO is not set # CONFIG_NSH_DISABLE_MKRD is not set # CONFIG_NSH_DISABLE_MKSMARTFS is not set # CONFIG_NSH_DISABLE_MH is not set @@ -1200,6 +1214,9 @@ CONFIG_NSH_DISABLE_IFUPDOWN=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 +CONFIG_NSH_MMCSDSPIPORTNO=0 # # Configure Command Options @@ -1243,7 +1260,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CUTERM is not set CONFIG_SYSTEM_FLASH_ERASEALL=y # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/mikroe-stm32f4/nx/Make.defs b/configs/mikroe-stm32f4/nx/Make.defs index 6dbe0a0fa380fedbc0578e836eb2eec31b89cc33..dea26ef117025bbb13305013603c6f05e31b17f9 100644 --- a/configs/mikroe-stm32f4/nx/Make.defs +++ b/configs/mikroe-stm32f4/nx/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/mikroe-stm32f4/nx/defconfig b/configs/mikroe-stm32f4/nx/defconfig index 0a73409cf40b22d58f4b7d1b6ad6865a2fbb0c0d..e766cd139b70bb47a6c542ec61b3daba5388dde1 100644 --- a/configs/mikroe-stm32f4/nx/defconfig +++ b/configs/mikroe-stm32f4/nx/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -433,6 +433,8 @@ CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -533,13 +535,13 @@ CONFIG_ARCH_BOARD="mikroe-stm32f4" # # Common Board Options # -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # # CONFIG_MIKROE_FLASH is not set # CONFIG_MIKROE_RAMMTD is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -562,9 +564,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=1 @@ -657,6 +662,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y # CONFIG_DEV_NULL is not set # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -672,6 +678,7 @@ CONFIG_DISABLE_POLL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -685,7 +692,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -741,6 +753,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -756,6 +769,7 @@ CONFIG_SYSLOG_CHAR=y # CONFIG_SYSLOG_FILE is not set CONFIG_SYSLOG_CHAR_CRLF=y CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -958,6 +972,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -990,7 +1005,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1027,9 +1041,9 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1135,7 +1149,6 @@ 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 @@ -1157,6 +1170,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1199,7 +1213,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/mikroe-stm32f4/nxlines/Make.defs b/configs/mikroe-stm32f4/nxlines/Make.defs index 6dbe0a0fa380fedbc0578e836eb2eec31b89cc33..dea26ef117025bbb13305013603c6f05e31b17f9 100644 --- a/configs/mikroe-stm32f4/nxlines/Make.defs +++ b/configs/mikroe-stm32f4/nxlines/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/mikroe-stm32f4/nxlines/defconfig b/configs/mikroe-stm32f4/nxlines/defconfig index a83f543825f5f1aa22f9b3959ce2b78153fb9ce5..762e07fd5aeccbafafa027763a360e036d7481bb 100644 --- a/configs/mikroe-stm32f4/nxlines/defconfig +++ b/configs/mikroe-stm32f4/nxlines/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -433,6 +433,8 @@ CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -533,13 +535,13 @@ CONFIG_ARCH_BOARD="mikroe-stm32f4" # # Common Board Options # -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # # CONFIG_MIKROE_FLASH is not set # CONFIG_MIKROE_RAMMTD is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -562,9 +564,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=1 @@ -657,6 +662,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y # CONFIG_DEV_NULL is not set # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -672,6 +678,7 @@ CONFIG_DISABLE_POLL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -685,7 +692,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -741,6 +753,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -756,6 +769,7 @@ CONFIG_SYSLOG_CHAR=y # CONFIG_SYSLOG_FILE is not set CONFIG_SYSLOG_CHAR_CRLF=y CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -957,6 +971,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -989,7 +1004,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1029,9 +1043,9 @@ CONFIG_EXAMPLES_NXLINES_BPP=16 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1137,7 +1151,6 @@ 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 @@ -1159,6 +1172,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1200,7 +1214,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/mikroe-stm32f4/nxtext/Make.defs b/configs/mikroe-stm32f4/nxtext/Make.defs index 6dbe0a0fa380fedbc0578e836eb2eec31b89cc33..dea26ef117025bbb13305013603c6f05e31b17f9 100644 --- a/configs/mikroe-stm32f4/nxtext/Make.defs +++ b/configs/mikroe-stm32f4/nxtext/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/mikroe-stm32f4/nxtext/defconfig b/configs/mikroe-stm32f4/nxtext/defconfig index 73fdaa7411d024bddc223f6c968441c56e1081b3..e178ae9af5fff62ae79edbae1a4bb5f19fceadb9 100644 --- a/configs/mikroe-stm32f4/nxtext/defconfig +++ b/configs/mikroe-stm32f4/nxtext/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -433,6 +433,8 @@ CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -533,13 +535,13 @@ CONFIG_ARCH_BOARD="mikroe-stm32f4" # # Common Board Options # -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # # CONFIG_MIKROE_FLASH is not set # CONFIG_MIKROE_RAMMTD is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -562,9 +564,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=1 @@ -657,6 +662,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y # CONFIG_DEV_NULL is not set # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -672,6 +678,7 @@ CONFIG_DISABLE_POLL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -685,7 +692,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -741,6 +753,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -756,6 +769,7 @@ CONFIG_SYSLOG_CHAR=y # CONFIG_SYSLOG_FILE is not set CONFIG_SYSLOG_CHAR_CRLF=y CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -957,6 +971,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -989,7 +1004,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1038,9 +1052,9 @@ CONFIG_EXAMPLES_NXTEXT_DEFAULT_FONT=y # 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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1146,7 +1160,6 @@ 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 @@ -1168,6 +1181,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1209,7 +1223,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/mikroe-stm32f4/usbnsh/Make.defs b/configs/mikroe-stm32f4/usbnsh/Make.defs index 6dbe0a0fa380fedbc0578e836eb2eec31b89cc33..dea26ef117025bbb13305013603c6f05e31b17f9 100644 --- a/configs/mikroe-stm32f4/usbnsh/Make.defs +++ b/configs/mikroe-stm32f4/usbnsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/mikroe-stm32f4/usbnsh/defconfig b/configs/mikroe-stm32f4/usbnsh/defconfig index 666bf64382c9d01429556123ccbed73fb007304f..d33f84fee3711840b82c33e3d74a217c4b1dfc66 100644 --- a/configs/mikroe-stm32f4/usbnsh/defconfig +++ b/configs/mikroe-stm32f4/usbnsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -435,6 +435,8 @@ CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -562,9 +564,6 @@ CONFIG_ARCH_BOARD="mikroe-stm32f4" # # Common Board Options # -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 -CONFIG_NSH_MMCSDSPIPORTNO=0 # # Board-Specific Options @@ -576,6 +575,7 @@ CONFIG_MIKROE_FLASH_PART_LIST="256,768" CONFIG_MIKROE_RAMMTD=y CONFIG_MIKROE_RAMMTD_MINOR=1 CONFIG_MIKROE_RAMMTD_SIZE=32 +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -599,9 +599,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=1 @@ -696,6 +699,7 @@ CONFIG_DEV_NULL=y CONFIG_DEV_ZERO=y CONFIG_ARCH_HAVE_RNG=y CONFIG_DEV_RANDOM=y +# CONFIG_DEV_URANDOM is not set CONFIG_DEV_LOOP=y # @@ -715,11 +719,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -733,7 +740,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -861,6 +873,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -903,6 +916,7 @@ CONFIG_CDCACM_VENDORSTR="NuttX" CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -918,6 +932,7 @@ CONFIG_SYSLOG_CHAR=y # CONFIG_SYSLOG_FILE is not set CONFIG_SYSLOG_CHAR_CRLF=y CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1044,6 +1059,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1076,7 +1092,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1108,10 +1123,10 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set @@ -1225,7 +1240,6 @@ CONFIG_NSH_DISABLE_IFUPDOWN=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS is not set -# CONFIG_NSH_DISABLE_MKFIFO is not set # CONFIG_NSH_DISABLE_MKRD is not set # CONFIG_NSH_DISABLE_MKSMARTFS is not set # CONFIG_NSH_DISABLE_MH is not set @@ -1248,6 +1262,9 @@ CONFIG_NSH_DISABLE_IFUPDOWN=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 +CONFIG_NSH_MMCSDSPIPORTNO=0 # # Configure Command Options @@ -1293,7 +1310,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CUTERM is not set CONFIG_SYSTEM_FLASH_ERASEALL=y # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/mirtoo/nsh/Make.defs b/configs/mirtoo/nsh/Make.defs index e7bff768910e11b6bc0bce600ff7fbb3366d2b3a..9bd36ad8f772a26116430d6dbce973fd25341184 100644 --- a/configs/mirtoo/nsh/Make.defs +++ b/configs/mirtoo/nsh/Make.defs @@ -71,7 +71,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/mirtoo/nsh/defconfig b/configs/mirtoo/nsh/defconfig index 81c76714ba74b75f4c9ee86112fe01d31d637521..125afec3bbd914cfe06cf028c1dbf23b39a94574 100644 --- a/configs/mirtoo/nsh/defconfig +++ b/configs/mirtoo/nsh/defconfig @@ -64,7 +64,7 @@ CONFIG_DEBUG_FULLOPT=y # CONFIG_ARCH_HC is not set CONFIG_ARCH_MIPS=y # CONFIG_ARCH_RGMP is not set -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/mirtoo/nxffs/Make.defs b/configs/mirtoo/nxffs/Make.defs index 8943e8f1b60a9251684ad19dbd4d3b45bc576f8e..ffffe47aa3be6e094e2688c41853ce3f7ec3aa1e 100644 --- a/configs/mirtoo/nxffs/Make.defs +++ b/configs/mirtoo/nxffs/Make.defs @@ -71,7 +71,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/mirtoo/nxffs/defconfig b/configs/mirtoo/nxffs/defconfig index 229dcf2e0ff36846bcf857d02f23ec51d33af131..3ec96c7bca1386d93b4808c05b601ceefbc9c39b 100644 --- a/configs/mirtoo/nxffs/defconfig +++ b/configs/mirtoo/nxffs/defconfig @@ -64,7 +64,7 @@ CONFIG_DEBUG_FULLOPT=y # CONFIG_ARCH_HC is not set CONFIG_ARCH_MIPS=y # CONFIG_ARCH_RGMP is not set -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/moteino-mega/hello/Make.defs b/configs/moteino-mega/hello/Make.defs index 75bb1f6e6b9b947c51ffdceb3c0913c6afaae58a..02037786d8f1f2010848c5fb44a378e12c5d0db7 100644 --- a/configs/moteino-mega/hello/Make.defs +++ b/configs/moteino-mega/hello/Make.defs @@ -71,7 +71,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/moteino-mega/hello/defconfig b/configs/moteino-mega/hello/defconfig index 50794734d6598df0aa3dd552aaa5854a6d8c05e8..089bec4099d7bd38883fe94e51e7b91044bb6a86 100644 --- a/configs/moteino-mega/hello/defconfig +++ b/configs/moteino-mega/hello/defconfig @@ -57,7 +57,7 @@ CONFIG_ARCH_AVR=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/moteino-mega/nsh/Make.defs b/configs/moteino-mega/nsh/Make.defs index bb1d1deb7be37e785fb4fb27d5ad146c07d27eb4..85b71ddc105a8a83c7462e62dc760b10da552950 100644 --- a/configs/moteino-mega/nsh/Make.defs +++ b/configs/moteino-mega/nsh/Make.defs @@ -71,7 +71,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/moteino-mega/nsh/defconfig b/configs/moteino-mega/nsh/defconfig index f01eb772eae668aea5651fa558caea2ed5c55041..83a2446ef46cbc3f631656c560ea1b4df46a181f 100644 --- a/configs/moteino-mega/nsh/defconfig +++ b/configs/moteino-mega/nsh/defconfig @@ -57,7 +57,7 @@ CONFIG_ARCH_AVR=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/moxa/nsh/Make.defs b/configs/moxa/nsh/Make.defs index 99cc86d7d83d2ce0a740e317360f9d6469a2de32..900a83664f04bd478b0bb2f8cd455b4646e9a21d 100644 --- a/configs/moxa/nsh/Make.defs +++ b/configs/moxa/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -mno-thumb-interwork -march=armv4 -Uarm -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -mno-thumb-interwork -march=armv4 -Uarm +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -mno-thumb-interwork -march=armv4 -Uarm ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/moxa/nsh/defconfig b/configs/moxa/nsh/defconfig index 29d3c506170d8e7ef760d76ef91a3507c07f3927..51db5ca2ff73ef62c989aa771f05ab1084bade65 100644 --- a/configs/moxa/nsh/defconfig +++ b/configs/moxa/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/mx1ads/ostest/Make.defs b/configs/mx1ads/ostest/Make.defs index 8588969b68f71431ad020ee63fadd7df703d04b3..23c9179cce0e2813541d03a500599ac54bd17293 100644 --- a/configs/mx1ads/ostest/Make.defs +++ b/configs/mx1ads/ostest/Make.defs @@ -51,7 +51,7 @@ ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^g ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/mx1ads/ostest/defconfig b/configs/mx1ads/ostest/defconfig index 1ed8296f8d60f76e999305e910bc5dead262d544..a370cb04354d6dedab4dba4eaddbd55eb2722cd4 100644 --- a/configs/mx1ads/ostest/defconfig +++ b/configs/mx1ads/ostest/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ne64badge/ostest/Make.defs b/configs/ne64badge/ostest/Make.defs index 113d980e3062ae43c188d7ed367618e82740c498..49ba82d8cffaabb3f41cab701e57a4f344ceb323 100644 --- a/configs/ne64badge/ostest/Make.defs +++ b/configs/ne64badge/ostest/Make.defs @@ -93,7 +93,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/ne64badge/ostest/defconfig b/configs/ne64badge/ostest/defconfig index 8566d4ab1fa27e62ad890f6005bba3c814a6ca66..6d75dbaf0be49f65fcd0632c45d2ea557b65bbea 100644 --- a/configs/ne64badge/ostest/defconfig +++ b/configs/ne64badge/ostest/defconfig @@ -54,7 +54,7 @@ CONFIG_DEBUG_FULLOPT=y CONFIG_ARCH_HC=y # CONFIG_ARCH_MIPS is not set # CONFIG_ARCH_RGMP is not set -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ntosd-dm320/nettest/Make.defs b/configs/ntosd-dm320/nettest/Make.defs index fb41fda097973d40b55c122b18e25845e3c195b8..c743f36264faab14393d470cd1217e23b17a4bcd 100644 --- a/configs/ntosd-dm320/nettest/Make.defs +++ b/configs/ntosd-dm320/nettest/Make.defs @@ -82,7 +82,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/ntosd-dm320/nettest/defconfig b/configs/ntosd-dm320/nettest/defconfig index 6cefdd76bbb13936c43fadc1432d5243f571cb39..159babcd83c8cf15b6b79e9760798bc6b8847ec5 100644 --- a/configs/ntosd-dm320/nettest/defconfig +++ b/configs/ntosd-dm320/nettest/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ntosd-dm320/nsh/Make.defs b/configs/ntosd-dm320/nsh/Make.defs index 1422acda541a91f79cbad603beda62e6b018a906..419ca804a9322b7b006a07f095aa5d5047caa996 100644 --- a/configs/ntosd-dm320/nsh/Make.defs +++ b/configs/ntosd-dm320/nsh/Make.defs @@ -82,7 +82,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/ntosd-dm320/nsh/defconfig b/configs/ntosd-dm320/nsh/defconfig index 91b26d4055a5892317b726f8f7ab870796f29704..f644a93ed9e5ba8f9544705b85a1050107cff0d5 100644 --- a/configs/ntosd-dm320/nsh/defconfig +++ b/configs/ntosd-dm320/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ntosd-dm320/poll/Make.defs b/configs/ntosd-dm320/poll/Make.defs index e5f93d927836b064a72970ae78bdf71b87d2201b..669c2cac529b96dcef10467c0840129e8bf7f55e 100644 --- a/configs/ntosd-dm320/poll/Make.defs +++ b/configs/ntosd-dm320/poll/Make.defs @@ -82,7 +82,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/ntosd-dm320/poll/defconfig b/configs/ntosd-dm320/poll/defconfig index 83e3ba302ba38a96664f8d21adc358f1a4527a95..234bb13bb521e14e1943fe655c66d336a99e96f0 100644 --- a/configs/ntosd-dm320/poll/defconfig +++ b/configs/ntosd-dm320/poll/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ntosd-dm320/thttpd/Make.defs b/configs/ntosd-dm320/thttpd/Make.defs index a251e628852573a7a7500a068a6cca22d2581b6b..37b034d1446fd6491d94fd1f0a305605324df5d6 100644 --- a/configs/ntosd-dm320/thttpd/Make.defs +++ b/configs/ntosd-dm320/thttpd/Make.defs @@ -82,7 +82,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/ntosd-dm320/thttpd/defconfig b/configs/ntosd-dm320/thttpd/defconfig index 456f6d2a3706dd39b9876f6a0abd0dd0f54cfe2c..1c872a4200d8dcee2fbc3b5c01b001afa820f919 100644 --- a/configs/ntosd-dm320/thttpd/defconfig +++ b/configs/ntosd-dm320/thttpd/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ntosd-dm320/udp/Make.defs b/configs/ntosd-dm320/udp/Make.defs index 1cac1699e76964ecfe1a6e5e8591dddf006eba8a..00e5539aa761460d21c6e03f5d2269ff9f714d3f 100644 --- a/configs/ntosd-dm320/udp/Make.defs +++ b/configs/ntosd-dm320/udp/Make.defs @@ -82,7 +82,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/ntosd-dm320/udp/defconfig b/configs/ntosd-dm320/udp/defconfig index e6e82675dcb4e30190576a27ec6ba386b653e5e7..94bf2ad1a35c8190e3a317ea1fbade428e704e55 100644 --- a/configs/ntosd-dm320/udp/defconfig +++ b/configs/ntosd-dm320/udp/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ntosd-dm320/webserver/Make.defs b/configs/ntosd-dm320/webserver/Make.defs index 21f5c71070c8457f036de9a862466285cde8c472..23c005a3ca22fc6dadec8f8b46d2ed94d98fce08 100644 --- a/configs/ntosd-dm320/webserver/Make.defs +++ b/configs/ntosd-dm320/webserver/Make.defs @@ -82,7 +82,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/ntosd-dm320/webserver/defconfig b/configs/ntosd-dm320/webserver/defconfig index d3d1aecf5cdf18956fc0937482796628b16ae86f..298dcae040494a6f698f44b1d99023df4c12bcb3 100644 --- a/configs/ntosd-dm320/webserver/defconfig +++ b/configs/ntosd-dm320/webserver/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/nucleo-144/f746-evalos/Make.defs b/configs/nucleo-144/f746-evalos/Make.defs index 62c52e12f473e895de441805e9af17d070f74aec..1f22b4eee883a7470ea50781fac2ed443b3726cd 100644 --- a/configs/nucleo-144/f746-evalos/Make.defs +++ b/configs/nucleo-144/f746-evalos/Make.defs @@ -78,7 +78,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/nucleo-144/f746-evalos/defconfig b/configs/nucleo-144/f746-evalos/defconfig index 7ca43debd2d1ce6b545913930b4717e4a4bde9a0..6af63a32b897011c848c75c7ec7ab59de7157dcb 100644 --- a/configs/nucleo-144/f746-evalos/defconfig +++ b/configs/nucleo-144/f746-evalos/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -302,6 +302,7 @@ CONFIG_STM32F7_USART=y # CONFIG_STM32F7_OTGFS is not set # CONFIG_STM32F7_OTGHS is not set # CONFIG_STM32F7_QUADSPI is not set +# CONFIG_STM32F7_PWR is not set # CONFIG_STM32F7_RNG is not set # CONFIG_STM32F7_SAI1 is not set # CONFIG_STM32F7_SAI2 is not set @@ -344,7 +345,10 @@ CONFIG_STM32F7_USART3=y CONFIG_STM32F7_FLOWCONTROL_BROKEN=y CONFIG_STM32F7_USART_BREAKS=y CONFIG_STM32F7_SERIALBRK_BSDCOMPAT=y +# CONFIG_STM32F7_HAVE_RTC_COUNTER is not set +# CONFIG_STM32F7_HAVE_RTC_SUBSECONDS is not set # CONFIG_STM32F7_CUSTOM_CLOCKCONFIG is not set +# CONFIG_STM32F7_DTCMEXCLUDE is not set # # Timer Configuration @@ -424,7 +428,6 @@ 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 @@ -434,6 +437,7 @@ 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_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_UNIQUEID is not set # CONFIG_BOARDCTL_TSCTEST is not set @@ -453,6 +457,7 @@ CONFIG_LIB_BOARDCTL=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2015 CONFIG_START_MONTH=11 @@ -557,6 +562,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -576,11 +582,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -594,7 +603,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -668,8 +682,10 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -684,6 +700,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -797,6 +814,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -830,7 +848,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -865,9 +882,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -973,13 +990,13 @@ 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_PSSTACKUSAGE is not set # CONFIG_NSH_DISABLE_PUT is not set # CONFIG_NSH_DISABLE_PWD is not set # CONFIG_NSH_DISABLE_RM is not set @@ -995,6 +1012,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1035,7 +1053,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/nucleo-144/f746-nsh/Make.defs b/configs/nucleo-144/f746-nsh/Make.defs index 758b9eadb855356fa0f6d3daf159e321d3ea0a2d..a75af5d690b24dbb946870c81023f8b6e6fcaf4e 100644 --- a/configs/nucleo-144/f746-nsh/Make.defs +++ b/configs/nucleo-144/f746-nsh/Make.defs @@ -77,7 +77,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/nucleo-144/f746-nsh/defconfig b/configs/nucleo-144/f746-nsh/defconfig index 697bedb51adb327f04873e52c1755da09af557e6..5bbd175b7219c8a5ef531c3f50104d975b63ce2d 100644 --- a/configs/nucleo-144/f746-nsh/defconfig +++ b/configs/nucleo-144/f746-nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -302,6 +302,7 @@ CONFIG_STM32F7_USART=y # CONFIG_STM32F7_OTGFS is not set # CONFIG_STM32F7_OTGHS is not set # CONFIG_STM32F7_QUADSPI is not set +# CONFIG_STM32F7_PWR is not set # CONFIG_STM32F7_RNG is not set # CONFIG_STM32F7_SAI1 is not set # CONFIG_STM32F7_SAI2 is not set @@ -344,7 +345,10 @@ CONFIG_STM32F7_USART6=y CONFIG_STM32F7_FLOWCONTROL_BROKEN=y CONFIG_STM32F7_USART_BREAKS=y CONFIG_STM32F7_SERIALBRK_BSDCOMPAT=y +# CONFIG_STM32F7_HAVE_RTC_COUNTER is not set +# CONFIG_STM32F7_HAVE_RTC_SUBSECONDS is not set # CONFIG_STM32F7_CUSTOM_CLOCKCONFIG is not set +# CONFIG_STM32F7_DTCMEXCLUDE is not set # # Timer Configuration @@ -424,7 +428,6 @@ 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 @@ -434,6 +437,7 @@ CONFIG_NUCLEO_CONSOLE_ARDUINO=y # CONFIG_NUCLEO_CONSOLE_MORPHO is not set # CONFIG_NUCLEO_CONSOLE_NONE is not set # CONFIG_NUCLEO_SPI_TEST is not set +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -452,6 +456,7 @@ CONFIG_DISABLE_OS_API=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2015 CONFIG_START_MONTH=11 @@ -544,6 +549,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -563,11 +569,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -581,7 +590,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -654,8 +668,10 @@ CONFIG_USART6_2STOP=0 # CONFIG_USART6_IFLOWCONTROL is not set # CONFIG_USART6_OFLOWCONTROL is not set # CONFIG_USART6_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -670,6 +686,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -782,6 +799,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -815,7 +833,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -844,9 +861,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -951,13 +968,13 @@ 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_PSSTACKUSAGE is not set # CONFIG_NSH_DISABLE_PUT is not set # CONFIG_NSH_DISABLE_PWD is not set # CONFIG_NSH_DISABLE_RM is not set @@ -973,6 +990,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1013,7 +1031,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/nucleo-144/f767-evalos/Make.defs b/configs/nucleo-144/f767-evalos/Make.defs index 3e25864217f4c8131239c01e65e701c5db329f0b..d4afca2f8a54f198024bc1c7d7dd6cabc1b9b37e 100644 --- a/configs/nucleo-144/f767-evalos/Make.defs +++ b/configs/nucleo-144/f767-evalos/Make.defs @@ -78,7 +78,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/nucleo-144/f767-evalos/defconfig b/configs/nucleo-144/f767-evalos/defconfig index 767cdf7da9da47b6622ed759f59491da07210db5..62ae169e460e89cc755d05e6769dbb9640339dac 100644 --- a/configs/nucleo-144/f767-evalos/defconfig +++ b/configs/nucleo-144/f767-evalos/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -305,6 +305,7 @@ CONFIG_STM32F7_USART=y # CONFIG_STM32F7_OTGFS is not set # CONFIG_STM32F7_OTGHS is not set # CONFIG_STM32F7_QUADSPI is not set +# CONFIG_STM32F7_PWR is not set # CONFIG_STM32F7_RNG is not set # CONFIG_STM32F7_SAI1 is not set # CONFIG_STM32F7_SAI2 is not set @@ -348,7 +349,10 @@ CONFIG_STM32F7_USART3=y CONFIG_STM32F7_FLOWCONTROL_BROKEN=y CONFIG_STM32F7_USART_BREAKS=y CONFIG_STM32F7_SERIALBRK_BSDCOMPAT=y +# CONFIG_STM32F7_HAVE_RTC_COUNTER is not set +# CONFIG_STM32F7_HAVE_RTC_SUBSECONDS is not set # CONFIG_STM32F7_CUSTOM_CLOCKCONFIG is not set +# CONFIG_STM32F7_DTCMEXCLUDE is not set # # Timer Configuration @@ -428,7 +432,6 @@ 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 @@ -438,6 +441,7 @@ 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_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_UNIQUEID is not set # CONFIG_BOARDCTL_TSCTEST is not set @@ -457,6 +461,7 @@ CONFIG_LIB_BOARDCTL=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2015 CONFIG_START_MONTH=11 @@ -561,6 +566,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -580,11 +586,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -598,7 +607,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -672,8 +686,10 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -688,6 +704,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -801,6 +818,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -834,7 +852,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -869,9 +886,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -977,13 +994,13 @@ 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_PSSTACKUSAGE is not set # CONFIG_NSH_DISABLE_PUT is not set # CONFIG_NSH_DISABLE_PWD is not set # CONFIG_NSH_DISABLE_RM is not set @@ -999,6 +1016,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1039,7 +1057,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/nucleo-144/f767-nsh/Make.defs b/configs/nucleo-144/f767-nsh/Make.defs index 9b667c97efcb23e1df7ee9ea1ed0debd965b5d27..43b4e474b6d29a00715ad244b6bdfaf0b6a96f97 100644 --- a/configs/nucleo-144/f767-nsh/Make.defs +++ b/configs/nucleo-144/f767-nsh/Make.defs @@ -77,7 +77,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/nucleo-144/f767-nsh/defconfig b/configs/nucleo-144/f767-nsh/defconfig index b97dfe2d9af0498bd587b0da79fbf4640df793bf..f69821ac7ab390a5d50fa30292a986b73dad1e9f 100644 --- a/configs/nucleo-144/f767-nsh/defconfig +++ b/configs/nucleo-144/f767-nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -305,6 +305,7 @@ CONFIG_STM32F7_USART=y # CONFIG_STM32F7_OTGFS is not set # CONFIG_STM32F7_OTGHS is not set # CONFIG_STM32F7_QUADSPI is not set +# CONFIG_STM32F7_PWR is not set # CONFIG_STM32F7_RNG is not set # CONFIG_STM32F7_SAI1 is not set # CONFIG_STM32F7_SAI2 is not set @@ -348,7 +349,10 @@ CONFIG_STM32F7_USART6=y CONFIG_STM32F7_FLOWCONTROL_BROKEN=y CONFIG_STM32F7_USART_BREAKS=y CONFIG_STM32F7_SERIALBRK_BSDCOMPAT=y +# CONFIG_STM32F7_HAVE_RTC_COUNTER is not set +# CONFIG_STM32F7_HAVE_RTC_SUBSECONDS is not set # CONFIG_STM32F7_CUSTOM_CLOCKCONFIG is not set +# CONFIG_STM32F7_DTCMEXCLUDE is not set # # Timer Configuration @@ -428,7 +432,6 @@ 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 @@ -438,6 +441,7 @@ CONFIG_NUCLEO_CONSOLE_ARDUINO=y # CONFIG_NUCLEO_CONSOLE_MORPHO is not set # CONFIG_NUCLEO_CONSOLE_NONE is not set # CONFIG_NUCLEO_SPI_TEST is not set +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -456,6 +460,7 @@ CONFIG_DISABLE_OS_API=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2015 CONFIG_START_MONTH=11 @@ -548,6 +553,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -567,11 +573,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -585,7 +594,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -658,8 +672,10 @@ CONFIG_USART6_2STOP=0 # CONFIG_USART6_IFLOWCONTROL is not set # CONFIG_USART6_OFLOWCONTROL is not set # CONFIG_USART6_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -674,6 +690,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -786,6 +803,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -819,7 +837,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -848,9 +865,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -955,13 +972,13 @@ 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_PSSTACKUSAGE is not set # CONFIG_NSH_DISABLE_PUT is not set # CONFIG_NSH_DISABLE_PWD is not set # CONFIG_NSH_DISABLE_RM is not set @@ -977,6 +994,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1017,7 +1035,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/nucleo-f303re/adc/Make.defs b/configs/nucleo-f303re/adc/Make.defs index 2b8c2b19e5e2de45de05a59e13926ce5665a6aa8..eed28984cafc62fdd844c5d25b9fd247e136a4bb 100644 --- a/configs/nucleo-f303re/adc/Make.defs +++ b/configs/nucleo-f303re/adc/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/nucleo-f303re/adc/defconfig b/configs/nucleo-f303re/adc/defconfig index e66c60de332d22f7bc8b695ab7b9be41c9be0b6e..630f5b89188ee75ca7ef5ba2d2eda3d3c9d9f632 100644 --- a/configs/nucleo-f303re/adc/defconfig +++ b/configs/nucleo-f303re/adc/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -422,6 +422,8 @@ CONFIG_STM32_CCMEXCLUDE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -528,6 +530,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -550,9 +553,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=1 @@ -645,6 +651,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -660,6 +667,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -680,7 +688,12 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -707,6 +720,7 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -720,6 +734,7 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_SYSLOG_CHAR is not set CONFIG_SYSLOG_NONE=y # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -831,6 +846,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -857,7 +873,6 @@ CONFIG_EXAMPLES_ADC_SWTRIG=y # 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_ELF is not set # CONFIG_EXAMPLES_FTPC is not set @@ -883,10 +898,9 @@ CONFIG_EXAMPLES_ADC_SWTRIG=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -962,7 +976,7 @@ CONFIG_EXAMPLES_ADC_SWTRIG=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/nucleo-f303re/can/Make.defs b/configs/nucleo-f303re/can/Make.defs index ddfedd784105796f2366c483ab4b4893d9370537..25136caf5d09cab2bd4d931fdc4540fe72f2bfde 100644 --- a/configs/nucleo-f303re/can/Make.defs +++ b/configs/nucleo-f303re/can/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/nucleo-f303re/can/defconfig b/configs/nucleo-f303re/can/defconfig index c19a6a4487f5c3b0c7fcaa886fba3a8c26f1d5e2..47529ba808ca997f5a2dd2dabdedc781228adc31 100644 --- a/configs/nucleo-f303re/can/defconfig +++ b/configs/nucleo-f303re/can/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -426,6 +426,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -531,6 +533,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -554,9 +557,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=1 @@ -649,6 +655,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -669,6 +676,7 @@ CONFIG_CAN_NPENDINGRTR=4 CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -682,7 +690,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -709,6 +722,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -722,6 +736,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SYSLOG_CHAR is not set CONFIG_SYSLOG_NONE=y # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -833,6 +848,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -847,6 +863,7 @@ CONFIG_ARCH_HAVE_TLS=y # # CAN Utilities # +# CONFIG_CANUTILS_CANLIB is not set # # Examples @@ -859,7 +876,6 @@ CONFIG_EXAMPLES_CAN_DEVPATH="/dev/can0" CONFIG_EXAMPLES_CAN_READWRITE=y # 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 @@ -885,10 +901,9 @@ CONFIG_EXAMPLES_CAN_READWRITE=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -964,7 +979,7 @@ CONFIG_EXAMPLES_CAN_READWRITE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/nucleo-f303re/nxlines/Make.defs b/configs/nucleo-f303re/nxlines/Make.defs index 5364ea4d45192c2bbed47aa2aa412ee65a16a055..21739b986a9b94186bd44bb688b7431df3558b67 100644 --- a/configs/nucleo-f303re/nxlines/Make.defs +++ b/configs/nucleo-f303re/nxlines/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/nucleo-f303re/nxlines/defconfig b/configs/nucleo-f303re/nxlines/defconfig index ef5f106ef25603564124ed99d3a9741cfda00962..c77961855fc9fcbad6cea1ac3adcbb1b41ce190a 100644 --- a/configs/nucleo-f303re/nxlines/defconfig +++ b/configs/nucleo-f303re/nxlines/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -423,6 +423,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -530,6 +532,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -553,9 +556,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=1 @@ -648,6 +654,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -672,11 +679,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -690,7 +700,12 @@ CONFIG_SPI_CMDDATA=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -772,6 +787,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -789,6 +805,7 @@ CONFIG_RAMLOG_NONBLOCKING=y CONFIG_RAMLOG_SYSLOG=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -986,6 +1003,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1000,6 +1018,7 @@ CONFIG_ARCH_HAVE_TLS=y # # CAN Utilities # +# CONFIG_CANUTILS_CANLIB is not set # # Examples @@ -1008,7 +1027,6 @@ CONFIG_ARCH_HAVE_TLS=y # 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 @@ -1042,10 +1060,9 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1121,7 +1138,7 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/nucleo-f303re/pwm/Make.defs b/configs/nucleo-f303re/pwm/Make.defs index 4149c69beac17968a4b0d4ed4dd30f683300ab6d..f6b4c964af570c8b3e4c9eddc84be0c1a119fc8a 100644 --- a/configs/nucleo-f303re/pwm/Make.defs +++ b/configs/nucleo-f303re/pwm/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/nucleo-f303re/pwm/defconfig b/configs/nucleo-f303re/pwm/defconfig index 677e6672687d9927eb65cec80344a7ee2db6aa36..c0b27a94eeb301e1642cf520febc1b2ff20e54e5 100644 --- a/configs/nucleo-f303re/pwm/defconfig +++ b/configs/nucleo-f303re/pwm/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -420,6 +420,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set CONFIG_STM32_TIM3_PWM=y CONFIG_STM32_TIM3_MODE=0 CONFIG_STM32_TIM3_CHANNEL1=y @@ -528,11 +530,11 @@ 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_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -555,9 +557,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=1 @@ -650,6 +655,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -668,6 +674,7 @@ CONFIG_PWM_NCHANNELS=2 CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -681,7 +688,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -708,6 +720,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -725,6 +738,7 @@ CONFIG_RAMLOG_NONBLOCKING=y CONFIG_RAMLOG_SYSLOG=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -837,6 +851,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -863,7 +878,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_ELF is not set # CONFIG_EXAMPLES_FTPC is not set @@ -889,7 +903,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_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 @@ -900,6 +913,7 @@ CONFIG_EXAMPLES_PWM_DUTYPCT1=50 CONFIG_EXAMPLES_PWM_CHANNEL1=1 CONFIG_EXAMPLES_PWM_DUTYPCT2=50 CONFIG_EXAMPLES_PWM_CHANNEL2=2 +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1005,7 +1019,6 @@ 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 @@ -1027,6 +1040,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1068,7 +1082,7 @@ CONFIG_SYSTEM_CLE=y CONFIG_SYSTEM_CLE_DEBUGLEVEL=0 # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/nucleo-f303re/serialrx/Make.defs b/configs/nucleo-f303re/serialrx/Make.defs index f0190d2363c9ac2a687727e149e2b53a3ee3cf29..ec3b25496fed012fdd657339524cb0dbe3d4e28b 100644 --- a/configs/nucleo-f303re/serialrx/Make.defs +++ b/configs/nucleo-f303re/serialrx/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/nucleo-f303re/serialrx/defconfig b/configs/nucleo-f303re/serialrx/defconfig index 117e0db9985c41017cb102c7cb7cdad799489e2e..19c06fd3fa3f4879676c6559752840f7813463f7 100644 --- a/configs/nucleo-f303re/serialrx/defconfig +++ b/configs/nucleo-f303re/serialrx/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -421,6 +421,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -543,6 +545,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -565,9 +568,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=1 @@ -660,6 +666,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -675,6 +682,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -695,7 +703,12 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -767,8 +780,10 @@ CONFIG_UART4_2STOP=0 # CONFIG_UART4_IFLOWCONTROL is not set # CONFIG_UART4_OFLOWCONTROL is not set # CONFIG_UART4_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -782,6 +797,7 @@ CONFIG_UART4_2STOP=0 # CONFIG_SYSLOG_CHAR is not set CONFIG_SYSLOG_NONE=y # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -893,6 +909,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -915,7 +932,6 @@ CONFIG_ARCH_HAVE_TLS=y # 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_ELF is not set # CONFIG_EXAMPLES_FTPC is not set @@ -941,10 +957,9 @@ CONFIG_ARCH_HAVE_TLS=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1028,7 +1043,7 @@ CONFIG_EXAMPLES_SERIALRX_PRINTSTR=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/nucleo-f303re/uavcan/Make.defs b/configs/nucleo-f303re/uavcan/Make.defs index e29de03492b54a6e87a88cc586163d5911ea11dd..21856722e55f904b7168424ba86fdb9c892f7d8d 100644 --- a/configs/nucleo-f303re/uavcan/Make.defs +++ b/configs/nucleo-f303re/uavcan/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/nucleo-f303re/uavcan/defconfig b/configs/nucleo-f303re/uavcan/defconfig index f85d04410b91bddc97bff1cafe4e1c23b273b409..836893eafc51201f0c9273fb665ba31196abab57 100644 --- a/configs/nucleo-f303re/uavcan/defconfig +++ b/configs/nucleo-f303re/uavcan/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -420,6 +420,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -521,6 +523,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -536,9 +539,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=1 @@ -631,6 +637,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -646,6 +653,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -659,7 +667,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -686,6 +699,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -699,6 +713,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SYSLOG_CHAR is not set CONFIG_SYSLOG_NONE=y # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -810,6 +825,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -868,7 +884,6 @@ CONFIG_LIBUAVCAN_INIT_RETRIES=0 # 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 @@ -896,10 +911,9 @@ CONFIG_LIBUAVCAN_INIT_RETRIES=0 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -979,7 +993,7 @@ CONFIG_EXAMPLES_UAVCAN_NODE_NAME="org.nuttx.apps.examples.uavcan" # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/nucleo-f4x1re/f401-nsh/Make.defs b/configs/nucleo-f4x1re/f401-nsh/Make.defs index 097c20b21ed4d3f822e3265545b72fe68f8711c4..3f23478c90978e82ed8c8447ef9087807789c6de 100644 --- a/configs/nucleo-f4x1re/f401-nsh/Make.defs +++ b/configs/nucleo-f4x1re/f401-nsh/Make.defs @@ -82,7 +82,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/nucleo-f4x1re/f401-nsh/defconfig b/configs/nucleo-f4x1re/f401-nsh/defconfig index 75cc5e9964565f721e23c0e95e46e751e9f4012d..ab3b2df490995a8d79cc5dbaaf67938df42d5cea 100644 --- a/configs/nucleo-f4x1re/f401-nsh/defconfig +++ b/configs/nucleo-f4x1re/f401-nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -415,6 +415,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -536,11 +538,11 @@ 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_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -556,9 +558,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2014 CONFIG_START_MONTH=5 @@ -651,6 +656,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -670,11 +676,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -688,7 +697,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -761,8 +775,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -777,6 +793,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -889,6 +906,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -922,7 +940,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -951,9 +968,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1058,7 +1075,6 @@ 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 @@ -1080,6 +1096,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1120,7 +1137,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/nucleo-f4x1re/f411-nsh/Make.defs b/configs/nucleo-f4x1re/f411-nsh/Make.defs index 1b7212119167c46c7136e491d5652d21390889db..60c7c536f9624d986c220ba388e5e387cbe3470e 100644 --- a/configs/nucleo-f4x1re/f411-nsh/Make.defs +++ b/configs/nucleo-f4x1re/f411-nsh/Make.defs @@ -82,7 +82,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/nucleo-f4x1re/f411-nsh/defconfig b/configs/nucleo-f4x1re/f411-nsh/defconfig index 3a0fd7511a4e3be4f14e77c55e5e5113b50b4839..b0a9f0e526a92bfeb64c209c5afdf192b5d6ad1d 100644 --- a/configs/nucleo-f4x1re/f411-nsh/defconfig +++ b/configs/nucleo-f4x1re/f411-nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -417,6 +417,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -538,11 +540,11 @@ 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_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -558,9 +560,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2014 CONFIG_START_MONTH=10 @@ -653,6 +658,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -672,11 +678,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -690,7 +699,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -763,8 +777,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -779,6 +795,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -891,6 +908,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -924,7 +942,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -953,9 +970,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1060,7 +1077,6 @@ 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 @@ -1082,6 +1098,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1122,7 +1139,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/nucleo-l476rg/nsh/Make.defs b/configs/nucleo-l476rg/nsh/Make.defs index 523dbd8c2285bb258056b739e73f180bd31110b6..7e03d46bb381a4ff12f3b79844ad1c8a0668e3ce 100644 --- a/configs/nucleo-l476rg/nsh/Make.defs +++ b/configs/nucleo-l476rg/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/nucleo-l476rg/nsh/defconfig b/configs/nucleo-l476rg/nsh/defconfig index a63bb883cedfb72f7dfdc891d3ca469f6a3af616..0fda36c2ed2ab3824c2a956e0fb1a6ac86dd9c1a 100644 --- a/configs/nucleo-l476rg/nsh/defconfig +++ b/configs/nucleo-l476rg/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -167,11 +167,15 @@ CONFIG_STM32L4_STM32L476XX=y CONFIG_STM32L4_FLASH_1024KB=y # -# SRAM2 Options +# STM32L4 SRAM2 Options # CONFIG_STM32L4_SRAM2_HEAP=y CONFIG_STM32L4_SRAM2_INIT=y +# +# STM32L4 Peripherals +# + # # STM32L4 Peripheral Support # @@ -271,10 +275,17 @@ CONFIG_STM32L4_RTC_LSECLOCK=y CONFIG_STM32L4_SAI1PLL=y # CONFIG_STM32L4_SAI2PLL is not set +# +# Timer Configuration +# +# CONFIG_STM32L4_ONESHOT is not set +# CONFIG_STM32L4_FREERUN is not set + # # U[S]ART Configuration # # CONFIG_STM32L4_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32L4_USART_BREAKS is not set # # Architecture Options @@ -377,9 +388,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 @@ -471,6 +485,7 @@ CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set CONFIG_ARCH_HAVE_RNG=y CONFIG_DEV_RANDOM=y +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -490,11 +505,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -592,6 +610,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set # CONFIG_HAVE_USBTRACE is not set @@ -760,7 +779,6 @@ CONFIG_EXAMPLES_ALARM_DEVPATH="/dev/rtc0" CONFIG_EXAMPLES_ALARM_SIGNO=1 # 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 @@ -795,12 +813,12 @@ CONFIG_EXAMPLES_OSTEST_RR_RANGE=10000 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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set CONFIG_EXAMPLES_RANDOM=y CONFIG_EXAMPLES_MAXSAMPLES=64 CONFIG_EXAMPLES_NSAMPLES=8 +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -906,7 +924,6 @@ 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 diff --git a/configs/nutiny-nuc120/nsh/Make.defs b/configs/nutiny-nuc120/nsh/Make.defs index 226977656521d5350e188a64ecf4904755756155..80ac8de12f1cb26f51b60457fc44018e0810691d 100644 --- a/configs/nutiny-nuc120/nsh/Make.defs +++ b/configs/nutiny-nuc120/nsh/Make.defs @@ -72,7 +72,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/nutiny-nuc120/nsh/defconfig b/configs/nutiny-nuc120/nsh/defconfig index 60b35489d07e03f9ffe599f6d026a651fa39123e..c6bfab727de8a48887fc09a85093d780a3d0f124 100644 --- a/configs/nutiny-nuc120/nsh/defconfig +++ b/configs/nutiny-nuc120/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/olimex-efm32g880f128-stk/nsh/Make.defs b/configs/olimex-efm32g880f128-stk/nsh/Make.defs index 3e8d7171f32ddb78c7ea49c8c9e62865d6ac5074..a6e5dfddc54f9d271f31a3923ba19292a482e25c 100644 --- a/configs/olimex-efm32g880f128-stk/nsh/Make.defs +++ b/configs/olimex-efm32g880f128-stk/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-efm32g880f128-stk/nsh/defconfig b/configs/olimex-efm32g880f128-stk/nsh/defconfig index 067455ef3e040ebf1365613209af0ce94c368312..bd9a59637f26cb85de11f35fd3d108915f03c544 100644 --- a/configs/olimex-efm32g880f128-stk/nsh/defconfig +++ b/configs/olimex-efm32g880f128-stk/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -279,11 +279,11 @@ 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_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -302,6 +302,7 @@ CONFIG_DISABLE_ENVIRON=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2010 CONFIG_START_MONTH=5 @@ -394,6 +395,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -409,6 +411,7 @@ CONFIG_DEV_NULL=y # CONFIG_ARCH_HAVE_I2CRESET is not set # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -422,7 +425,12 @@ CONFIG_DEV_NULL=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -480,8 +488,10 @@ CONFIG_STANDARD_SERIAL=y # CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set CONFIG_OTHER_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -496,6 +506,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -598,6 +609,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -618,7 +630,6 @@ CONFIG_ARCH_HAVE_TLS=y # # 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 @@ -644,10 +655,9 @@ CONFIG_EXAMPLES_NSH=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -749,7 +759,6 @@ 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 @@ -771,6 +780,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -812,7 +822,7 @@ CONFIG_SYSTEM_CLE=y CONFIG_SYSTEM_CLE_DEBUGLEVEL=0 # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/olimex-lpc-h3131/nsh/Make.defs b/configs/olimex-lpc-h3131/nsh/Make.defs index 4d167115d044a32a9e17fe72dfbfbc9a42d15f2d..9bc12efad6346ba95a3135211bf6b953ab6cd9fc 100644 --- a/configs/olimex-lpc-h3131/nsh/Make.defs +++ b/configs/olimex-lpc-h3131/nsh/Make.defs @@ -80,7 +80,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-lpc-h3131/nsh/defconfig b/configs/olimex-lpc-h3131/nsh/defconfig index a76cfde83d818c13a1ffc0b10b278b9d09cec490..273eab0bdfb268a16197a108ca6e26d7b06c2afe 100644 --- a/configs/olimex-lpc-h3131/nsh/defconfig +++ b/configs/olimex-lpc-h3131/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/olimex-lpc1766stk/ftpc/Make.defs b/configs/olimex-lpc1766stk/ftpc/Make.defs index b2b6be78a57519dca269c3c989a7ef81e1a8413a..78632e875982a21a2d49a984e6f96cf5be0ac3f8 100644 --- a/configs/olimex-lpc1766stk/ftpc/Make.defs +++ b/configs/olimex-lpc1766stk/ftpc/Make.defs @@ -77,7 +77,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-lpc1766stk/ftpc/defconfig b/configs/olimex-lpc1766stk/ftpc/defconfig index 337a9869c49eecf0b8d9d347c2619eea0e7ba2de..04950934e58f3338a17c2d19571b4039ac999d8b 100644 --- a/configs/olimex-lpc1766stk/ftpc/defconfig +++ b/configs/olimex-lpc1766stk/ftpc/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/olimex-lpc1766stk/hidkbd/Make.defs b/configs/olimex-lpc1766stk/hidkbd/Make.defs index e86130ce63a4f6bbe11641c6298dd492e8666ebc..fa1320f7f3197f9e4893b9e12b65b1ab3991577a 100644 --- a/configs/olimex-lpc1766stk/hidkbd/Make.defs +++ b/configs/olimex-lpc1766stk/hidkbd/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-lpc1766stk/hidkbd/defconfig b/configs/olimex-lpc1766stk/hidkbd/defconfig index 5142080c16005697d2ff873719ff9e3ce1a2fa3e..56f0f473569e93eb3f4c4043533e62ab337f6981 100644 --- a/configs/olimex-lpc1766stk/hidkbd/defconfig +++ b/configs/olimex-lpc1766stk/hidkbd/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/olimex-lpc1766stk/hidmouse/Make.defs b/configs/olimex-lpc1766stk/hidmouse/Make.defs index 6ff8eda3fa21d15a7e0770ba6a272997c0925a44..884d0492d7d645b24547802a10f7fdd59c88d6ef 100644 --- a/configs/olimex-lpc1766stk/hidmouse/Make.defs +++ b/configs/olimex-lpc1766stk/hidmouse/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-lpc1766stk/hidmouse/defconfig b/configs/olimex-lpc1766stk/hidmouse/defconfig index bf6af4f1bb5928c2c7a6f43f9ce71dc0a86656e2..0eaf08eb62148bab861dad01832da6f5443588c2 100644 --- a/configs/olimex-lpc1766stk/hidmouse/defconfig +++ b/configs/olimex-lpc1766stk/hidmouse/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/olimex-lpc1766stk/nettest/Make.defs b/configs/olimex-lpc1766stk/nettest/Make.defs index 04883513dd2eae176d02cd5a31d2b0322c4cc8ef..809dbd614c130e96b4225168ab69b3e0b5fe0d00 100644 --- a/configs/olimex-lpc1766stk/nettest/Make.defs +++ b/configs/olimex-lpc1766stk/nettest/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-lpc1766stk/nettest/defconfig b/configs/olimex-lpc1766stk/nettest/defconfig index 9f0ac48d3c82069770321e4426efd74a8568aa78..c4f85cf1e749d83756fd56801f050a03c3dc7fab 100644 --- a/configs/olimex-lpc1766stk/nettest/defconfig +++ b/configs/olimex-lpc1766stk/nettest/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/olimex-lpc1766stk/nsh/Make.defs b/configs/olimex-lpc1766stk/nsh/Make.defs index 6e49ebc92038795826088228ba3f7bab086ae5f9..457bad7bf2692b5cbc485549002ce09f2a282fc8 100644 --- a/configs/olimex-lpc1766stk/nsh/Make.defs +++ b/configs/olimex-lpc1766stk/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-lpc1766stk/nsh/defconfig b/configs/olimex-lpc1766stk/nsh/defconfig index 3138fafdd3a92b453666256d047114f0fc15dcaa..9aa1a8851155ffbfe0ed1014575c279432f6c0a3 100644 --- a/configs/olimex-lpc1766stk/nsh/defconfig +++ b/configs/olimex-lpc1766stk/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/olimex-lpc1766stk/nx/Make.defs b/configs/olimex-lpc1766stk/nx/Make.defs index 82c1d916f594bec51485f2eda528839c661bd0f2..9bab788e75c925c39cf38fd91285c0f60dbf50ad 100644 --- a/configs/olimex-lpc1766stk/nx/Make.defs +++ b/configs/olimex-lpc1766stk/nx/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-lpc1766stk/nx/defconfig b/configs/olimex-lpc1766stk/nx/defconfig index 500331c8bcf306b03dac4e8694e608c66102d440..a05a645c5f4f8df1d8240751f7cd60284e74eb53 100644 --- a/configs/olimex-lpc1766stk/nx/defconfig +++ b/configs/olimex-lpc1766stk/nx/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/olimex-lpc1766stk/slip-httpd/Make.defs b/configs/olimex-lpc1766stk/slip-httpd/Make.defs index 8f67068995c418899a300e9941a590f448f7ef82..072b3cab2859c8b2dc88d8f46fa49f50f1338698 100644 --- a/configs/olimex-lpc1766stk/slip-httpd/Make.defs +++ b/configs/olimex-lpc1766stk/slip-httpd/Make.defs @@ -77,7 +77,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-lpc1766stk/slip-httpd/defconfig b/configs/olimex-lpc1766stk/slip-httpd/defconfig index eaf0a647f7e4fd816e55fa224f974bb895b036e6..e9a7a04a089797814a6cd7b6ea9d0e5fe5ff9727 100644 --- a/configs/olimex-lpc1766stk/slip-httpd/defconfig +++ b/configs/olimex-lpc1766stk/slip-httpd/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/olimex-lpc1766stk/thttpd-binfs/Make.defs b/configs/olimex-lpc1766stk/thttpd-binfs/Make.defs index 9bf88272e98d47727b89d71b8fefa81e46d424f6..e4d75e7d2c7697e8c14ae8abcad75341456be2ed 100644 --- a/configs/olimex-lpc1766stk/thttpd-binfs/Make.defs +++ b/configs/olimex-lpc1766stk/thttpd-binfs/Make.defs @@ -77,7 +77,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-lpc1766stk/thttpd-binfs/defconfig b/configs/olimex-lpc1766stk/thttpd-binfs/defconfig index 1f91e8ad669344af47da94e4c575b386b368f664..a9ad06ecdf686b103ed3ee423b45c8ba84d78d3f 100644 --- a/configs/olimex-lpc1766stk/thttpd-binfs/defconfig +++ b/configs/olimex-lpc1766stk/thttpd-binfs/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/olimex-lpc1766stk/thttpd-nxflat/Make.defs b/configs/olimex-lpc1766stk/thttpd-nxflat/Make.defs index f5553eecad33a1b76f7658a5f78171caa3f7e575..4477c528a46363426363b674ee57e5368d153c2a 100644 --- a/configs/olimex-lpc1766stk/thttpd-nxflat/Make.defs +++ b/configs/olimex-lpc1766stk/thttpd-nxflat/Make.defs @@ -77,7 +77,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-lpc1766stk/thttpd-nxflat/defconfig b/configs/olimex-lpc1766stk/thttpd-nxflat/defconfig index bb5f704d060e94c20384e31bbf40e2479b02ed59..b42ed3303ec0fb7a7241d09adb4e23fa1ac84e10 100644 --- a/configs/olimex-lpc1766stk/thttpd-nxflat/defconfig +++ b/configs/olimex-lpc1766stk/thttpd-nxflat/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/olimex-lpc1766stk/usbmsc/Make.defs b/configs/olimex-lpc1766stk/usbmsc/Make.defs index 01f55f9ce93306fbc257e2d2890b40ea9b350bed..d6efed34aee6c69645472dd31e632408efef618d 100644 --- a/configs/olimex-lpc1766stk/usbmsc/Make.defs +++ b/configs/olimex-lpc1766stk/usbmsc/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-lpc1766stk/usbmsc/defconfig b/configs/olimex-lpc1766stk/usbmsc/defconfig index 00bd628aa8509891dbf80b05d3422d60bb41e598..6aaa47e1651a73de92ba39cf0af851184375aabb 100644 --- a/configs/olimex-lpc1766stk/usbmsc/defconfig +++ b/configs/olimex-lpc1766stk/usbmsc/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/olimex-lpc1766stk/usbserial/Make.defs b/configs/olimex-lpc1766stk/usbserial/Make.defs index 6d17a6ae4977b6a551f61da89539bcc6309d8039..81b8d75306cd182c052dca6d49321f359b0c73c4 100644 --- a/configs/olimex-lpc1766stk/usbserial/Make.defs +++ b/configs/olimex-lpc1766stk/usbserial/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-lpc1766stk/usbserial/defconfig b/configs/olimex-lpc1766stk/usbserial/defconfig index 6ae07cce441ecfeb312d86bd1c743b98c3aa89d4..9aaabe2fcb8552b112fe62fa93ea921890d578ca 100644 --- a/configs/olimex-lpc1766stk/usbserial/defconfig +++ b/configs/olimex-lpc1766stk/usbserial/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/olimex-lpc1766stk/zmodem/Make.defs b/configs/olimex-lpc1766stk/zmodem/Make.defs index a48683a886441516e053fe2ab665ff632e33c941..10efd86e2b244eccf601f54dbd5db1735faa6ea4 100644 --- a/configs/olimex-lpc1766stk/zmodem/Make.defs +++ b/configs/olimex-lpc1766stk/zmodem/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-lpc1766stk/zmodem/defconfig b/configs/olimex-lpc1766stk/zmodem/defconfig index 14e768128ba7c92677b76cf86c016cfe83741308..adbf9f981e2c9a153c1bb63416364a4fa1495234 100644 --- a/configs/olimex-lpc1766stk/zmodem/defconfig +++ b/configs/olimex-lpc1766stk/zmodem/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/olimex-lpc2378/nsh/Make.defs b/configs/olimex-lpc2378/nsh/Make.defs index e623ef3b858938436f6e1ccad889834583d9e58f..65a92de4843bf03e6d462293ede4e9f55f53febe 100644 --- a/configs/olimex-lpc2378/nsh/Make.defs +++ b/configs/olimex-lpc2378/nsh/Make.defs @@ -91,7 +91,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/olimex-lpc2378/nsh/defconfig b/configs/olimex-lpc2378/nsh/defconfig index e6cba4b36faf53cb9a404f479ff435ce59ee4aec..b7496343ace2cd1665cfbf7d085a5a8e8386fb21 100644 --- a/configs/olimex-lpc2378/nsh/defconfig +++ b/configs/olimex-lpc2378/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/olimex-stm32-e407/nsh/Make.defs b/configs/olimex-stm32-e407/nsh/Make.defs index 5b53bc4e2ada3f66a0b796f1b3c848463ca0e623..3a0c05310714dfed8058040a7971a200fcf1927c 100644 --- a/configs/olimex-stm32-e407/nsh/Make.defs +++ b/configs/olimex-stm32-e407/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-stm32-e407/nsh/defconfig b/configs/olimex-stm32-e407/nsh/defconfig index dab00f77d1b6fb86bd056f333d039b16db21adf7..8b39910a0b1f48dec6fc38d5a02cf5f39ab42600 100644 --- a/configs/olimex-stm32-e407/nsh/defconfig +++ b/configs/olimex-stm32-e407/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -434,6 +434,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -581,9 +583,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -676,6 +681,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -691,6 +697,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -782,8 +789,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -798,6 +807,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -919,6 +929,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -952,7 +963,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -984,9 +994,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1093,7 +1103,6 @@ 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 @@ -1157,7 +1166,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/olimex-stm32-e407/usbnsh/Make.defs b/configs/olimex-stm32-e407/usbnsh/Make.defs index a9a8ab3992988854c24b78fc5d093c020c502c9b..7c5392e9442ab8dfc079a3f7af371708c8b1581f 100644 --- a/configs/olimex-stm32-e407/usbnsh/Make.defs +++ b/configs/olimex-stm32-e407/usbnsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-stm32-e407/usbnsh/defconfig b/configs/olimex-stm32-e407/usbnsh/defconfig index 9e1752b9a81bd80b7e7d44d3793bfbeb71b975a7..d25ff45f354641f2d58fe239fa8fba091fd647f0 100644 --- a/configs/olimex-stm32-e407/usbnsh/defconfig +++ b/configs/olimex-stm32-e407/usbnsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -434,6 +434,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -589,9 +591,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=1 @@ -684,6 +689,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -703,11 +709,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -798,6 +807,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -840,6 +850,7 @@ CONFIG_CDCACM_VENDORSTR="NuttX" CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -855,6 +866,7 @@ CONFIG_SYSLOG_CHAR=y # CONFIG_SYSLOG_FILE is not set CONFIG_SYSLOG_CHAR_CRLF=y CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -976,6 +988,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1009,7 +1022,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -1041,9 +1053,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1151,7 +1163,6 @@ 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 @@ -1217,7 +1228,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/olimex-stm32-h405/usbnsh/Make.defs b/configs/olimex-stm32-h405/usbnsh/Make.defs index f9dc1ee405977508998acb9cc00182056ea789c7..1b869db74d0c30e77e29dc9a2fa6f23af5067836 100644 --- a/configs/olimex-stm32-h405/usbnsh/Make.defs +++ b/configs/olimex-stm32-h405/usbnsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-stm32-h405/usbnsh/defconfig b/configs/olimex-stm32-h405/usbnsh/defconfig index 807518f8731d1fd821f4959f0a813ac7c369b394..c9828f8f3ecc500fb446da04ecfd96cf0230c51e 100644 --- a/configs/olimex-stm32-h405/usbnsh/defconfig +++ b/configs/olimex-stm32-h405/usbnsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -441,6 +441,8 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_PWM is not set CONFIG_STM32_TIM1_ADC=y CONFIG_STM32_TIM1_ADC1=y @@ -580,11 +582,11 @@ CONFIG_ARCH_HAVE_BUTTONS=y CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_HAVE_IRQBUTTONS=y CONFIG_ARCH_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -609,9 +611,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=1 @@ -710,6 +715,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -730,6 +736,7 @@ CONFIG_CAN_NPENDINGRTR=4 CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -750,7 +757,12 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -822,6 +834,7 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -864,6 +877,7 @@ CONFIG_CDCACM_VENDORSTR="NuttX" CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -877,6 +891,7 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_SYSLOG_CHAR is not set CONFIG_SYSLOG_NONE=y # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -989,6 +1004,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1015,6 +1031,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # CAN Utilities # +# CONFIG_CANUTILS_CANLIB is not set # # Examples @@ -1044,7 +1061,6 @@ CONFIG_EXAMPLES_CAN_NMSGS=32 CONFIG_EXAMPLES_CAN_READWRITE=y # 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 @@ -1073,9 +1089,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1181,7 +1197,6 @@ 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 @@ -1203,6 +1218,7 @@ CONFIG_NSH_DISABLE_PUT=y # CONFIG_NSH_DISABLE_USLEEP is not set CONFIG_NSH_DISABLE_WGET=y # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1245,7 +1261,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/olimex-stm32-h407/nsh/Make.defs b/configs/olimex-stm32-h407/nsh/Make.defs index 41cbe3331337cbd6b7afd63d80be6c3c692fed06..52dc40979c1f6417209e0d43ac97d560b0d61419 100644 --- a/configs/olimex-stm32-h407/nsh/Make.defs +++ b/configs/olimex-stm32-h407/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-stm32-h407/nsh/defconfig b/configs/olimex-stm32-h407/nsh/defconfig index 9c4da0d2fe41bbcbed044740dad88ecd28a1e5f2..fd02c40d665329ae8714f63998d0519ead963d59 100644 --- a/configs/olimex-stm32-h407/nsh/defconfig +++ b/configs/olimex-stm32-h407/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -434,6 +434,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -548,6 +550,7 @@ CONFIG_RAM_SIZE=114688 # Board Selection # CONFIG_ARCH_BOARD_OLIMEX_STM32H407=y +# CONFIG_ARCH_BOARD_OLIMEX_STM32E407 is not set # CONFIG_ARCH_BOARD_CUSTOM is not set CONFIG_ARCH_BOARD="olimex-stm32-h407" @@ -560,11 +563,11 @@ 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_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -580,9 +583,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2016 CONFIG_START_MONTH=1 @@ -675,6 +681,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -694,11 +701,13 @@ CONFIG_SPI=y # 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -712,7 +721,12 @@ CONFIG_SPI=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -785,8 +799,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -801,6 +817,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -922,6 +939,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -955,7 +973,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -984,9 +1001,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1093,7 +1110,6 @@ 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 @@ -1115,6 +1131,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1156,7 +1173,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/olimex-stm32-p107/nsh/Make.defs b/configs/olimex-stm32-p107/nsh/Make.defs index 97e3247137a2c1d3635d276b4d5e08ec956639ae..b8706f2f514e9eb583a500ba29f172cc7f0b4e8d 100644 --- a/configs/olimex-stm32-p107/nsh/Make.defs +++ b/configs/olimex-stm32-p107/nsh/Make.defs @@ -90,7 +90,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-stm32-p107/nsh/defconfig b/configs/olimex-stm32-p107/nsh/defconfig index 49aeb5af0321b9270c47b0801ce57dd919587717..8b12ab0d32a825a98ec6126f02a00e395cdcca5a 100644 --- a/configs/olimex-stm32-p107/nsh/defconfig +++ b/configs/olimex-stm32-p107/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -334,7 +334,7 @@ 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_TIM8 is not set # CONFIG_STM32_HAVE_TIM9 is not set # CONFIG_STM32_HAVE_TIM10 is not set # CONFIG_STM32_HAVE_TIM11 is not set @@ -390,7 +390,6 @@ CONFIG_STM32_PWR=y # 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 is not set CONFIG_STM32_USART2=y # CONFIG_STM32_USART3 is not set @@ -416,11 +415,12 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set # CONFIG_STM32_TIM5_CAP is not set -# CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y CONFIG_STM32_SERIALDRIVER=y @@ -550,12 +550,11 @@ CONFIG_ARCH_BOARD="olimex-stm32-p107" # # Common Board Options # -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -571,9 +570,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2009 CONFIG_START_MONTH=9 @@ -671,6 +673,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -692,6 +695,7 @@ CONFIG_CAN_NPOLLWAITERS=2 CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -705,7 +709,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -855,8 +864,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -871,6 +882,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1100,6 +1112,7 @@ CONFIG_NETDB_DNSSERVER_IPv4ADDR=0x0a000001 # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1125,7 +1138,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1153,9 +1165,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1279,7 +1291,6 @@ 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 @@ -1303,6 +1314,8 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 # # Configure Command Options @@ -1366,7 +1379,7 @@ CONFIG_NSH_MAX_ROUNDTRIP=20 # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FLASH_ERASEALL is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/olimex-stm32-p207/nsh/Make.defs b/configs/olimex-stm32-p207/nsh/Make.defs index 833e3f52a392fb90a912e388efa4d3ce36a93d6a..7006c8e7626a0db88f88c1613a4d88c9487312b1 100644 --- a/configs/olimex-stm32-p207/nsh/Make.defs +++ b/configs/olimex-stm32-p207/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimex-stm32-p207/nsh/defconfig b/configs/olimex-stm32-p207/nsh/defconfig index bcd74d2971e7c60e22b37e6e51f98699e63a474f..e1d2bf47a25b83d53eb7a15de0b8f38a58bab332 100644 --- a/configs/olimex-stm32-p207/nsh/defconfig +++ b/configs/olimex-stm32-p207/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -442,6 +442,8 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_PWM is not set CONFIG_STM32_TIM1_ADC=y CONFIG_STM32_TIM1_ADC1=y @@ -606,11 +608,11 @@ CONFIG_ARCH_HAVE_BUTTONS=y CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_HAVE_IRQBUTTONS=y CONFIG_ARCH_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -634,9 +636,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=1 @@ -735,6 +740,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -755,6 +761,7 @@ CONFIG_CAN_NPENDINGRTR=4 CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -775,7 +782,12 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -888,6 +900,7 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set CONFIG_USBHOST=y CONFIG_USBHOST_NPREALLOC=4 @@ -900,6 +913,7 @@ CONFIG_USBHOST_HAVE_ASYNCH=y # CONFIG_USBHOST_HIDMOUSE is not set # CONFIG_USBHOST_RTL8187 is not set # CONFIG_USBHOST_TRACE is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -914,6 +928,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1143,6 +1158,7 @@ CONFIG_NETDB_DNSSERVER_IPv4ADDR=0x0a000001 # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1169,6 +1185,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # CAN Utilities # +# CONFIG_CANUTILS_CANLIB is not set # # Examples @@ -1193,7 +1210,6 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_CAN is not set # CONFIG_EXAMPLES_CHAT is not set # CONFIG_EXAMPLES_CONFIGDATA is not set -# CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_DISCOVER is not set @@ -1224,9 +1240,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1345,7 +1361,6 @@ 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 @@ -1369,6 +1384,7 @@ CONFIG_NSH_DISABLE_PUT=y # CONFIG_NSH_DISABLE_USLEEP is not set CONFIG_NSH_DISABLE_WGET=y # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1431,7 +1447,7 @@ CONFIG_NSH_MAX_ROUNDTRIP=20 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/olimex-strp711/nettest/Make.defs b/configs/olimex-strp711/nettest/Make.defs index 67f4f77d6712f7982e90055b1eeadf6cae0322d1..7d96acb8d2e1b68cacdc1227c9b41e3ad9c8dcb7 100644 --- a/configs/olimex-strp711/nettest/Make.defs +++ b/configs/olimex-strp711/nettest/Make.defs @@ -86,7 +86,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/olimex-strp711/nettest/defconfig b/configs/olimex-strp711/nettest/defconfig index 0d4a5ee0fbe204fc2474275eaf7d873eb89b68ad..71fdbf653ae4b2c5adf23b18c70af8242664dedb 100644 --- a/configs/olimex-strp711/nettest/defconfig +++ b/configs/olimex-strp711/nettest/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/olimex-strp711/nsh/Make.defs b/configs/olimex-strp711/nsh/Make.defs index d2750fb667fca0b1f8ccad85b2dd8c41c0e536a5..6710edd75e69a6478a68408646eaec894ed9e856 100644 --- a/configs/olimex-strp711/nsh/Make.defs +++ b/configs/olimex-strp711/nsh/Make.defs @@ -86,7 +86,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/olimex-strp711/nsh/defconfig b/configs/olimex-strp711/nsh/defconfig index 929705039252cd07a259d576e5621d86df78cd7f..6f9794a23e0d360e705f1b190afe47079e521468 100644 --- a/configs/olimex-strp711/nsh/defconfig +++ b/configs/olimex-strp711/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/olimexino-stm32/can/Make.defs b/configs/olimexino-stm32/can/Make.defs index 48d67718ee2b5aba3844bee8c4dd10cd8c6e96a2..73d3f4082972033b2b0258913b905317885fea40 100644 --- a/configs/olimexino-stm32/can/Make.defs +++ b/configs/olimexino-stm32/can/Make.defs @@ -90,7 +90,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimexino-stm32/can/defconfig b/configs/olimexino-stm32/can/defconfig index dbb0994a9dd9d4b32adbefb431848d604ddcac73..df3acfc4e96bee79d624978b747945b3126a78dc 100644 --- a/configs/olimexino-stm32/can/defconfig +++ b/configs/olimexino-stm32/can/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -430,6 +430,8 @@ CONFIG_STM32_FORCEPOWER=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM3_PWM is not set # CONFIG_STM32_TIM1_ADC is not set @@ -578,11 +580,11 @@ CONFIG_ARCH_HAVE_BUTTONS=y CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_HAVE_IRQBUTTONS=y CONFIG_ARCH_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -601,9 +603,12 @@ CONFIG_BOARDCTL_CANINIT=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 CONFIG_SYSTEM_TIME64=y # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2014 CONFIG_START_MONTH=1 @@ -699,6 +704,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=464 # CONFIG_DISABLE_POLL is not set # CONFIG_DEV_NULL is not set # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -729,11 +735,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -750,7 +759,12 @@ CONFIG_ANALOG=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -824,8 +838,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -840,6 +856,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -963,6 +980,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -989,6 +1007,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=768 # # CAN Utilities # +# CONFIG_CANUTILS_CANLIB is not set # CONFIG_CANUTILS_LIBCANARD is not set # @@ -1003,7 +1022,6 @@ CONFIG_EXAMPLES_CAN_NMSGS=32 CONFIG_EXAMPLES_CAN_READWRITE=y # 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 @@ -1034,9 +1052,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1146,13 +1164,13 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set CONFIG_NSH_DISABLE_MKDIR=y CONFIG_NSH_DISABLE_MKFATFS=y -CONFIG_NSH_DISABLE_MKFIFO=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_PSSTACKUSAGE is not set # CONFIG_NSH_DISABLE_PUT is not set # CONFIG_NSH_DISABLE_PWD is not set # CONFIG_NSH_DISABLE_RM is not set @@ -1168,6 +1186,7 @@ CONFIG_NSH_DISABLE_UNAME=y CONFIG_NSH_DISABLE_USLEEP=y CONFIG_NSH_DISABLE_WGET=y # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1206,7 +1225,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN is not set +# CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_INSTALL is not set diff --git a/configs/olimexino-stm32/composite/Make.defs b/configs/olimexino-stm32/composite/Make.defs index 690947c11049f40cb7569b3638b348fadbfb68a8..f80bb51a7a979eda51f40fc160b5fae7a3a8e10b 100644 --- a/configs/olimexino-stm32/composite/Make.defs +++ b/configs/olimexino-stm32/composite/Make.defs @@ -90,7 +90,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimexino-stm32/composite/defconfig b/configs/olimexino-stm32/composite/defconfig index 9a409e64604a4da165c03e924a036dceac0d4299..13806d1ab8d072ce3bc7264e17d6e2257d1c488e 100644 --- a/configs/olimexino-stm32/composite/defconfig +++ b/configs/olimexino-stm32/composite/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -424,6 +424,8 @@ CONFIG_STM32_DMACAPABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM3_PWM is not set # CONFIG_STM32_TIM1_ADC is not set @@ -577,13 +579,11 @@ CONFIG_ARCH_HAVE_BUTTONS=y CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_HAVE_IRQBUTTONS=y CONFIG_ARCH_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 -CONFIG_NSH_MMCSDSPIPORTNO=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -602,9 +602,12 @@ CONFIG_BOARDCTL_USBDEVCTRL=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 CONFIG_SYSTEM_TIME64=y # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=4 @@ -697,6 +700,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=464 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -716,11 +720,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -742,7 +749,12 @@ CONFIG_ANALOG=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -840,6 +852,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -912,6 +925,7 @@ CONFIG_USBMSC_REMOVABLE=y CONFIG_USBMSC_SCSI_PRIO=128 CONFIG_USBMSC_SCSI_STACKSIZE=340 # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -926,6 +940,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1049,6 +1064,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1095,7 +1111,6 @@ CONFIG_EXAMPLES_BUTTONS_NAME6="Button 6" CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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 @@ -1126,9 +1141,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1238,13 +1253,13 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set CONFIG_NSH_DISABLE_MKFATFS=y -# 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_PSSTACKUSAGE is not set # CONFIG_NSH_DISABLE_PUT is not set # CONFIG_NSH_DISABLE_PWD is not set # CONFIG_NSH_DISABLE_RM is not set @@ -1260,6 +1275,9 @@ CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 +CONFIG_NSH_MMCSDSPIPORTNO=0 # # Configure Command Options @@ -1314,7 +1332,7 @@ CONFIG_SYSTEM_COMPOSITE_BUFSIZE=256 # CONFIG_SYSTEM_COMPOSITE_DEBUGMM is not set # CONFIG_SYSTEM_CUTERM is not set CONFIG_SYSTEM_FREE=y -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/olimexino-stm32/nsh/Make.defs b/configs/olimexino-stm32/nsh/Make.defs index 9fd3c82233e638a8e494ff167e9fb5e1240f172b..15e08345e4681706d241b552f921d0d72eae549e 100644 --- a/configs/olimexino-stm32/nsh/Make.defs +++ b/configs/olimexino-stm32/nsh/Make.defs @@ -90,7 +90,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimexino-stm32/nsh/defconfig b/configs/olimexino-stm32/nsh/defconfig index 57700957550872addaed463c34d27a9ac62eaaf2..12a981172daac6a18aba61b2d5f5455be067db93 100644 --- a/configs/olimexino-stm32/nsh/defconfig +++ b/configs/olimexino-stm32/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -424,6 +424,8 @@ CONFIG_STM32_DMACAPABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM3_PWM is not set # CONFIG_STM32_TIM1_ADC is not set @@ -577,13 +579,11 @@ CONFIG_ARCH_HAVE_BUTTONS=y CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_HAVE_IRQBUTTONS=y CONFIG_ARCH_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 -CONFIG_NSH_MMCSDSPIPORTNO=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -601,9 +601,12 @@ CONFIG_LIB_BOARDCTL=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 CONFIG_SYSTEM_TIME64=y # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=4 @@ -696,6 +699,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=464 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -715,11 +719,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -741,7 +748,12 @@ CONFIG_ANALOG=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -839,8 +851,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -855,6 +869,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -978,6 +993,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1024,7 +1040,6 @@ CONFIG_EXAMPLES_BUTTONS_NAME6="Button 6" CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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 @@ -1055,9 +1070,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1167,13 +1182,13 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set CONFIG_NSH_DISABLE_MKFATFS=y -# 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_PSSTACKUSAGE is not set # CONFIG_NSH_DISABLE_PUT is not set # CONFIG_NSH_DISABLE_PWD is not set # CONFIG_NSH_DISABLE_RM is not set @@ -1189,6 +1204,9 @@ CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 +CONFIG_NSH_MMCSDSPIPORTNO=0 # # Configure Command Options @@ -1229,7 +1247,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set CONFIG_SYSTEM_FREE=y -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/olimexino-stm32/smallnsh/Make.defs b/configs/olimexino-stm32/smallnsh/Make.defs index 53f2d3ce6b16f6b43b08234a6221a627d7aa7402..3d08a5e633eb7d168985e2e2a390cb7a49d6ce94 100644 --- a/configs/olimexino-stm32/smallnsh/Make.defs +++ b/configs/olimexino-stm32/smallnsh/Make.defs @@ -90,7 +90,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimexino-stm32/smallnsh/defconfig b/configs/olimexino-stm32/smallnsh/defconfig index a8ff93b3ffd3b84d589be345965fd21443c35b97..6bbd1478c68b48c78fe6a6ef9cc2bc4b341748dd 100644 --- a/configs/olimexino-stm32/smallnsh/defconfig +++ b/configs/olimexino-stm32/smallnsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -428,6 +428,8 @@ CONFIG_STM32_FORCEPOWER=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM3_PWM is not set # CONFIG_STM32_TIM1_CAP is not set @@ -559,11 +561,11 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -582,9 +584,12 @@ CONFIG_BOARDCTL_CANINIT=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2014 CONFIG_START_MONTH=1 @@ -685,6 +690,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=464 # CONFIG_DISABLE_POLL is not set # CONFIG_DEV_NULL is not set # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -710,11 +716,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -728,7 +737,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -802,8 +816,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -818,6 +834,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -930,6 +947,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -956,6 +974,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=768 # # CAN Utilities # +# CONFIG_CANUTILS_CANLIB is not set # CONFIG_CANUTILS_LIBCANARD is not set # @@ -969,7 +988,6 @@ CONFIG_EXAMPLES_CAN_NMSGS=32 CONFIG_EXAMPLES_CAN_READWRITE=y # 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 @@ -998,9 +1016,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1107,13 +1125,13 @@ 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=y 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_PSSTACKUSAGE is not set CONFIG_NSH_DISABLE_PUT=y CONFIG_NSH_DISABLE_PWD=y CONFIG_NSH_DISABLE_RM=y @@ -1129,6 +1147,7 @@ CONFIG_NSH_DISABLE_UNSET=y CONFIG_NSH_DISABLE_USLEEP=y CONFIG_NSH_DISABLE_WGET=y # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1166,7 +1185,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/olimexino-stm32/tiny/Make.defs b/configs/olimexino-stm32/tiny/Make.defs index b9e08679d27a54b690b3188e3f862c171570fb9d..eb7ea80ed5561b7d2b853ea06a4f6832883cc3fc 100644 --- a/configs/olimexino-stm32/tiny/Make.defs +++ b/configs/olimexino-stm32/tiny/Make.defs @@ -90,7 +90,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/olimexino-stm32/tiny/defconfig b/configs/olimexino-stm32/tiny/defconfig index 9bf4ddeff9aaf1f891ff782471b0ec788853dd7d..9a5dc1b90185783365201a8c728b84946ce68ddc 100644 --- a/configs/olimexino-stm32/tiny/defconfig +++ b/configs/olimexino-stm32/tiny/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -428,6 +428,8 @@ CONFIG_STM32_FORCEPOWER=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM3_PWM is not set # CONFIG_STM32_TIM1_CAP is not set @@ -563,6 +565,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -581,9 +584,12 @@ CONFIG_BOARDCTL_CANINIT=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2014 CONFIG_START_MONTH=1 @@ -689,6 +695,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=464 # CONFIG_DISABLE_POLL is not set # CONFIG_DEV_NULL is not set # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -714,11 +721,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -732,7 +742,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -804,8 +819,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -820,6 +837,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -927,6 +945,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -953,6 +972,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=768 # # CAN Utilities # +# CONFIG_CANUTILS_CANLIB is not set # CONFIG_CANUTILS_LIBCANARD is not set # @@ -965,7 +985,6 @@ CONFIG_EXAMPLES_CAN_DEVPATH="/dev/can0" CONFIG_EXAMPLES_CAN_READWRITE=y # 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 @@ -994,10 +1013,9 @@ CONFIG_EXAMPLES_CAN_READWRITE=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1074,7 +1092,7 @@ CONFIG_EXAMPLES_CAN_READWRITE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/open1788/knsh/Make.defs b/configs/open1788/knsh/Make.defs index f4f93007ab342223e140f718156b1de794343fd5..288985bb88fcb51d1358c66d0c4a4c4ecb862207 100644 --- a/configs/open1788/knsh/Make.defs +++ b/configs/open1788/knsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/open1788/knsh/defconfig b/configs/open1788/knsh/defconfig index 6adfc646868ffdc764f07d0eaa56da45a028c66b..3bb6dfcf450d9cb5e7219d43f8ecb3ba20d7828d 100644 --- a/configs/open1788/knsh/defconfig +++ b/configs/open1788/knsh/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/open1788/nsh/Make.defs b/configs/open1788/nsh/Make.defs index 8b6db9259eb05cd35da3c0e74758ca0ee1a12d61..a6cf37202eafdbdb642a12091ff6c1fad245a151 100644 --- a/configs/open1788/nsh/Make.defs +++ b/configs/open1788/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/open1788/nsh/defconfig b/configs/open1788/nsh/defconfig index 82536e3b2f81fd227163e606e5b367e20de298bd..e620dc37677dc07ce954e8023989cfdbba47d244 100644 --- a/configs/open1788/nsh/defconfig +++ b/configs/open1788/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/open1788/nxlines/Make.defs b/configs/open1788/nxlines/Make.defs index fbe022bd306832dfbbd141511eef762b37c7a860..f54f4c07d7cb5b1340f175e05b5e3659ed742bf7 100644 --- a/configs/open1788/nxlines/Make.defs +++ b/configs/open1788/nxlines/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/open1788/nxlines/defconfig b/configs/open1788/nxlines/defconfig index 55a85e14f886b982a882ea4e48df220fe933b3c5..b44db1d026110632515035210ba64899473ef7c8 100644 --- a/configs/open1788/nxlines/defconfig +++ b/configs/open1788/nxlines/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/p112/ostest/defconfig b/configs/p112/ostest/defconfig index 21e3034674667d10f88ef20fbd1c95e882b8bb14..c1da999fc3b6a9b0dc71e423456263b2e9f46040 100644 --- a/configs/p112/ostest/defconfig +++ b/configs/p112/ostest/defconfig @@ -54,7 +54,7 @@ CONFIG_WINDOWS_NATIVE=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/pcblogic-pic32mx/nsh/Make.defs b/configs/pcblogic-pic32mx/nsh/Make.defs index 00cf7c88e31af91fd4148267cb50fb35cf6c2765..ed3b800bf6d1c32e780bf3f4ac35a38d8bd48584 100644 --- a/configs/pcblogic-pic32mx/nsh/Make.defs +++ b/configs/pcblogic-pic32mx/nsh/Make.defs @@ -71,7 +71,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/pcblogic-pic32mx/nsh/defconfig b/configs/pcblogic-pic32mx/nsh/defconfig index d5cb127e3f5f7754ebaea3419e49d84c9f08e717..2b4c87ba8c9c10248359cd7bf3e0dc6be9ab63ed 100644 --- a/configs/pcblogic-pic32mx/nsh/defconfig +++ b/configs/pcblogic-pic32mx/nsh/defconfig @@ -64,7 +64,7 @@ CONFIG_DEBUG_FULLOPT=y # CONFIG_ARCH_HC is not set CONFIG_ARCH_MIPS=y # CONFIG_ARCH_RGMP is not set -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/pcduino-a10/nsh/Make.defs b/configs/pcduino-a10/nsh/Make.defs index 82094d510eccadbf5abda86e5368f2e8cc0f5a93..1a9d6fc14ec141a6027d740f22998d2327bbd1e0 100644 --- a/configs/pcduino-a10/nsh/Make.defs +++ b/configs/pcduino-a10/nsh/Make.defs @@ -70,7 +70,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a8 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/pcduino-a10/nsh/defconfig b/configs/pcduino-a10/nsh/defconfig index 8de6365d1a06a01373a5dde47766db3bc0b47946..03bdbbcf0f2a74e6d53d6a3d3740ed0a9fdb0efd 100644 --- a/configs/pcduino-a10/nsh/defconfig +++ b/configs/pcduino-a10/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/pic32mx-starterkit/nsh/Make.defs b/configs/pic32mx-starterkit/nsh/Make.defs index 8cf55c2e12d7fb7c4bb1088163743305e344049c..f770264923c3da80484dcc9c0b6d88b09a843739 100644 --- a/configs/pic32mx-starterkit/nsh/Make.defs +++ b/configs/pic32mx-starterkit/nsh/Make.defs @@ -87,7 +87,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/pic32mx-starterkit/nsh/defconfig b/configs/pic32mx-starterkit/nsh/defconfig index 4e62e0aaa9c051a64cffcc21bbc767f3a49330f4..0bef836bff754fe1728c2868dc23f2c127745a80 100644 --- a/configs/pic32mx-starterkit/nsh/defconfig +++ b/configs/pic32mx-starterkit/nsh/defconfig @@ -64,7 +64,7 @@ CONFIG_DEBUG_FULLOPT=y # CONFIG_ARCH_HC is not set CONFIG_ARCH_MIPS=y # CONFIG_ARCH_RGMP is not set -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/pic32mx-starterkit/nsh2/Make.defs b/configs/pic32mx-starterkit/nsh2/Make.defs index 20f5175d09d7dfddbf400168b6f183c707621414..89dc5667e0f53dfcfd654cadb6089cd5bfa29c15 100644 --- a/configs/pic32mx-starterkit/nsh2/Make.defs +++ b/configs/pic32mx-starterkit/nsh2/Make.defs @@ -87,7 +87,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/pic32mx-starterkit/nsh2/defconfig b/configs/pic32mx-starterkit/nsh2/defconfig index e348af2a4c50b5df5517017cc0957112644e0aae..904b4f4a4455a32966b596bc55e4f4fa726f6d43 100644 --- a/configs/pic32mx-starterkit/nsh2/defconfig +++ b/configs/pic32mx-starterkit/nsh2/defconfig @@ -64,7 +64,7 @@ CONFIG_DEBUG_FULLOPT=y # CONFIG_ARCH_HC is not set CONFIG_ARCH_MIPS=y # CONFIG_ARCH_RGMP is not set -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/pic32mx7mmb/nsh/Make.defs b/configs/pic32mx7mmb/nsh/Make.defs index ec3f79738fc3b188f3080a2e9bdbb3b349a471b4..5c3e08f7ecfdbd0e597e1e17afac6a9052906347 100644 --- a/configs/pic32mx7mmb/nsh/Make.defs +++ b/configs/pic32mx7mmb/nsh/Make.defs @@ -71,7 +71,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/pic32mx7mmb/nsh/defconfig b/configs/pic32mx7mmb/nsh/defconfig index bd048635e39f498ff7d33ac0eab41aed14c32c7e..e7f5103e13d33c58e909f07ae7c1c32a5c348c3c 100644 --- a/configs/pic32mx7mmb/nsh/defconfig +++ b/configs/pic32mx7mmb/nsh/defconfig @@ -64,7 +64,7 @@ CONFIG_DEBUG_FULLOPT=y # CONFIG_ARCH_HC is not set CONFIG_ARCH_MIPS=y # CONFIG_ARCH_RGMP is not set -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/pic32mz-starterkit/nsh/Make.defs b/configs/pic32mz-starterkit/nsh/Make.defs index ab082145f31007edda98c8bdaec3a996a1bf496b..8d17ed253a4b9f852ed17d7c73b7ed41089e89af 100644 --- a/configs/pic32mz-starterkit/nsh/Make.defs +++ b/configs/pic32mz-starterkit/nsh/Make.defs @@ -97,7 +97,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/pic32mz-starterkit/nsh/defconfig b/configs/pic32mz-starterkit/nsh/defconfig index 2e34b71f23427082e3ab58d5568940f12e277568..9bfa572e1601e905f9e0aff48c9a2980bd96b203 100644 --- a/configs/pic32mz-starterkit/nsh/defconfig +++ b/configs/pic32mz-starterkit/nsh/defconfig @@ -64,7 +64,7 @@ CONFIG_DEBUG_FULLOPT=y # CONFIG_ARCH_HC is not set CONFIG_ARCH_MIPS=y # CONFIG_ARCH_RGMP is not set -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/pirelli_dpl10/nsh_highram/Make.defs b/configs/pirelli_dpl10/nsh_highram/Make.defs index 4b95922be4fe8681d2d7bd3b56abb8fd1677ce3b..6adb17f5a6f4cc9524081b37a3c49ebbb035b002 100644 --- a/configs/pirelli_dpl10/nsh_highram/Make.defs +++ b/configs/pirelli_dpl10/nsh_highram/Make.defs @@ -72,7 +72,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/pirelli_dpl10/nsh_highram/defconfig b/configs/pirelli_dpl10/nsh_highram/defconfig index 0928bf0425ee4296c300c0fcfa1f9628a8942821..37b1fb1ffdaded2ea01138cc1d6bdfa02104e50a 100644 --- a/configs/pirelli_dpl10/nsh_highram/defconfig +++ b/configs/pirelli_dpl10/nsh_highram/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/qemu-i486/nsh/defconfig b/configs/qemu-i486/nsh/defconfig index a7c7b5d4e5242afb70913d6610d3b6be02317799..5389669288151c5d3c5684004052d48c9b2ca489 100644 --- a/configs/qemu-i486/nsh/defconfig +++ b/configs/qemu-i486/nsh/defconfig @@ -55,7 +55,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set CONFIG_ARCH_X86=y # CONFIG_ARCH_Z16 is not set diff --git a/configs/qemu-i486/ostest/defconfig b/configs/qemu-i486/ostest/defconfig index 5e8d9f74c1ff813783d6144bb7edbd8773176834..a637ac91645704998f5f82364f0de1fdf32a9ef1 100644 --- a/configs/qemu-i486/ostest/defconfig +++ b/configs/qemu-i486/ostest/defconfig @@ -55,7 +55,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set CONFIG_ARCH_X86=y # CONFIG_ARCH_Z16 is not set diff --git a/configs/rgmp/arm/default/defconfig b/configs/rgmp/arm/default/defconfig index 6e6f76deeb9ff517c262b6ebdfeec3ba9f6b06a5..d5234fe746b40309002aa771dab9845d3519250e 100644 --- a/configs/rgmp/arm/default/defconfig +++ b/configs/rgmp/arm/default/defconfig @@ -55,7 +55,7 @@ CONFIG_DEBUG_FULLOPT=y # CONFIG_ARCH_HC is not set # CONFIG_ARCH_MIPS is not set CONFIG_ARCH_RGMP=y -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/rgmp/arm/nsh/defconfig b/configs/rgmp/arm/nsh/defconfig index bfe4d8a902d3e2db8e102e9f4a59774b0cae631e..0d907f5dcc778c1c612d63e2bbc56f36b2cd3f83 100644 --- a/configs/rgmp/arm/nsh/defconfig +++ b/configs/rgmp/arm/nsh/defconfig @@ -75,7 +75,7 @@ CONFIG_DEBUG_NOOPT=y # CONFIG_ARCH_HC is not set # CONFIG_ARCH_MIPS is not set CONFIG_ARCH_RGMP=y -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/rgmp/x86/cxxtest/Make.defs b/configs/rgmp/x86/cxxtest/Make.defs index 1070975f21321cf90880f1efad0efc15def2ffc5..b8ab2328bab244e3dd179a864fba0f8bc6efe1b9 100644 --- a/configs/rgmp/x86/cxxtest/Make.defs +++ b/configs/rgmp/x86/cxxtest/Make.defs @@ -50,7 +50,7 @@ else ARCHOPTIMIZATION = -O2 endif -#ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +#ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHCXXFLAGS = -fno-builtin ARCHCPUFLAGS = -fno-builtin -nostdinc -fno-stack-protector ARCHPICFLAGS = -fpic diff --git a/configs/rgmp/x86/cxxtest/defconfig b/configs/rgmp/x86/cxxtest/defconfig index 391c42a3a84966d9ec90630d5a0b5b5e69bbb1f3..f103710ecfd86ff4399a18fbc419ff36c11f08ee 100644 --- a/configs/rgmp/x86/cxxtest/defconfig +++ b/configs/rgmp/x86/cxxtest/defconfig @@ -75,7 +75,7 @@ CONFIG_DEBUG_NOOPT=y # CONFIG_ARCH_HC is not set # CONFIG_ARCH_MIPS is not set CONFIG_ARCH_RGMP=y -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/rgmp/x86/default/defconfig b/configs/rgmp/x86/default/defconfig index 1416b2389378fc78179a87a4d52f4bba0e06bb6e..ac4dc3c6321067890cb4492ded3e13bd7191f4bb 100644 --- a/configs/rgmp/x86/default/defconfig +++ b/configs/rgmp/x86/default/defconfig @@ -55,7 +55,7 @@ CONFIG_DEBUG_NOOPT=y # CONFIG_ARCH_HC is not set # CONFIG_ARCH_MIPS is not set CONFIG_ARCH_RGMP=y -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/rgmp/x86/helloxx/Make.defs b/configs/rgmp/x86/helloxx/Make.defs index 458d1c5fac9692758c0ca3723caba38fe490706d..440c85913590b68a5143780e687ed18251592ae0 100644 --- a/configs/rgmp/x86/helloxx/Make.defs +++ b/configs/rgmp/x86/helloxx/Make.defs @@ -50,7 +50,7 @@ else ARCHOPTIMIZATION = -O2 endif -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHCPUFLAGS = -fno-builtin -nostdinc -fno-stack-protector ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef diff --git a/configs/rgmp/x86/helloxx/defconfig b/configs/rgmp/x86/helloxx/defconfig index 932f82d2168ff7f474c079afb7ec14e6c9854261..f911ae8c270a8e45fcabdb6527291ffb0d486b9d 100644 --- a/configs/rgmp/x86/helloxx/defconfig +++ b/configs/rgmp/x86/helloxx/defconfig @@ -75,7 +75,7 @@ CONFIG_DEBUG_NOOPT=y # CONFIG_ARCH_HC is not set # CONFIG_ARCH_MIPS is not set CONFIG_ARCH_RGMP=y -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/rgmp/x86/nsh/defconfig b/configs/rgmp/x86/nsh/defconfig index d0d25971201bcee0206a26001ab0ecc9b3ac3757..73534eae29d5bf5466a66ad90678a435a56cb165 100644 --- a/configs/rgmp/x86/nsh/defconfig +++ b/configs/rgmp/x86/nsh/defconfig @@ -75,7 +75,7 @@ CONFIG_DEBUG_NOOPT=y # CONFIG_ARCH_HC is not set # CONFIG_ARCH_MIPS is not set CONFIG_ARCH_RGMP=y -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sabre-6quad/nsh/Make.defs b/configs/sabre-6quad/nsh/Make.defs index cba549a9fb4eaa882ba80e5ed1d845fbe75a693d..887064d0e117741245ec1d352e32b6ba399260a3 100644 --- a/configs/sabre-6quad/nsh/Make.defs +++ b/configs/sabre-6quad/nsh/Make.defs @@ -70,7 +70,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a9 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sabre-6quad/nsh/defconfig b/configs/sabre-6quad/nsh/defconfig index 1ab7f2c4c5475fe4f45c86bb40ae9907c0534432..ee0f283912707a18f633228a4ed9e60ed604bb75 100644 --- a/configs/sabre-6quad/nsh/defconfig +++ b/configs/sabre-6quad/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sabre-6quad/smp/Make.defs b/configs/sabre-6quad/smp/Make.defs index b5ba0e4111d7e43e4655f32a1ba248d2bdfffd0e..11082623c45b52b5e8e769926161e9fb010dfa60 100644 --- a/configs/sabre-6quad/smp/Make.defs +++ b/configs/sabre-6quad/smp/Make.defs @@ -70,7 +70,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a9 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sabre-6quad/smp/defconfig b/configs/sabre-6quad/smp/defconfig index 5ca09504dcaa70f18e5039c3cf5300e73b1c11dc..4205d00781042c2a92cbac52e589042e786b2a0d 100644 --- a/configs/sabre-6quad/smp/defconfig +++ b/configs/sabre-6quad/smp/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sam3u-ek/README.txt b/configs/sam3u-ek/README.txt index c4dadfe8097b10066e60853a9c66705732e50e9c..4c7f5137575a439ff0865c2e02bc58782cef4b21 100644 --- a/configs/sam3u-ek/README.txt +++ b/configs/sam3u-ek/README.txt @@ -24,24 +24,16 @@ Development Environment ^^^^^^^^^^^^^^^^^^^^^^^ Either Linux or Cygwin on Windows can be used for the development environment. - The source has been built only using the GNU toolchain (see below). Other - toolchains will likely cause problems. Testing was performed using the Cygwin - environment. + The source has been built only using the GNU toolchain. Testing was performed + using the Cygwin environment. GNU Toolchain Options ^^^^^^^^^^^^^^^^^^^^^ - The NuttX make system has been modified to support the following different - toolchain options. - - 1. The CodeSourcery GNU toolchain, - 2. The devkitARM GNU toolchain, ok - 4. The NuttX buildroot Toolchain (see below). - All testing has been conducted using the NuttX buildroot toolchain. To use - the CodeSourcery, devkitARM, Atollic, or AtmelStudio GNU toolchain, you simply - need to add one of the following configuration options to your .config (or - defconfig) file: + other toolchains, such as the CodeSourcery, devkitARM, Atollic, or AtmelStudio + GNU toolchain, you simply need to add one of the following configuration options + to your .config (or defconfig) file: CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery under Windows CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y : CodeSourcery under Linux @@ -51,8 +43,8 @@ GNU Toolchain Options CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y : Generic GCC ARM EABI toolchain for Linux CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW=y : Generic GCC ARM EABI toolchain for Windows - If you are not using CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT, then you may also have to modify - the PATH in the setenv.h file if your make cannot find the tools. + You may also have to modify the PATH in the setenv.h file if your make cannot + find the tools. NOTE about Windows native toolchains ------------------------------------ @@ -157,11 +149,11 @@ NuttX EABI "buildroot" Toolchain details PLUS some special instructions that you will need to follow if you are building a Cortex-M3 toolchain for Cygwin under Windows. - NOTE: Unfortunately, the 4.6.3 EABI toolchain is not compatible with the - the NXFLAT tools. See the top-level TODO file (under "Binary loaders") for - more information about this problem. If you plan to use NXFLAT, please do not - use the GCC 4.6.3 EABI toochain; instead use the GCC 4.3.3 OABI toolchain. - See instructions below. + NOTE: Unfortunately, the 4.6.3 (and later) GCC toolchain is not compatible + with the the NXFLAT tools. See the top-level TODO file (under "Binary loaders") + for more information about this problem. If you plan to use NXFLAT, please do + not use the GCC 4.6.3 toochain; instead use an older toolchain (such as the GCC + 4.3.3 OABI toolchain discussed below). NuttX OABI "buildroot" Toolchain ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/configs/sam3u-ek/knsh/Make.defs b/configs/sam3u-ek/knsh/Make.defs index 7475431366b852d115a126dcfe4240211e983de6..1842df8708ea98fa0fe0a57a9110c96305d965ed 100644 --- a/configs/sam3u-ek/knsh/Make.defs +++ b/configs/sam3u-ek/knsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sam3u-ek/knsh/defconfig b/configs/sam3u-ek/knsh/defconfig index fdd4d7852b6de7449b22a89ada5099953c5291b8..a28be4c76b1246eb92b6c962acfcf966a35fe604 100644 --- a/configs/sam3u-ek/knsh/defconfig +++ b/configs/sam3u-ek/knsh/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sam3u-ek/nsh/Make.defs b/configs/sam3u-ek/nsh/Make.defs index f54ceca5849eb00f858d1d95a861eb2d36a27899..17678fdb9dab95cc0cd0b2826786f9a3aeac198e 100644 --- a/configs/sam3u-ek/nsh/Make.defs +++ b/configs/sam3u-ek/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sam3u-ek/nsh/defconfig b/configs/sam3u-ek/nsh/defconfig index e2a4ed5993ee630d5f4c79eacd9d154d3b742abd..293d0a2ad1f5bb689cf4015b2bdaf36e301b1fbe 100644 --- a/configs/sam3u-ek/nsh/defconfig +++ b/configs/sam3u-ek/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sam3u-ek/nx/Make.defs b/configs/sam3u-ek/nx/Make.defs index 07ec51c05397e10c9a11473d0213953f57e61d2a..5aa5e69611f98fe1a84006a1cd1cb24f4f712e7d 100644 --- a/configs/sam3u-ek/nx/Make.defs +++ b/configs/sam3u-ek/nx/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sam3u-ek/nx/defconfig b/configs/sam3u-ek/nx/defconfig index 499368e1533b86238e5f316844f122ab7968b649..14c3f405f4a8b83fa950c1e78593a851052868ad 100644 --- a/configs/sam3u-ek/nx/defconfig +++ b/configs/sam3u-ek/nx/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sam3u-ek/nxwm/Make.defs b/configs/sam3u-ek/nxwm/Make.defs index dbd49e2239e05433c7df017b8bda074b8a4d949f..549c3eba8fcfba1563e6b2b9e26c8c356344a29a 100644 --- a/configs/sam3u-ek/nxwm/Make.defs +++ b/configs/sam3u-ek/nxwm/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sam3u-ek/nxwm/defconfig b/configs/sam3u-ek/nxwm/defconfig index 713b5e2f36e0a85007e29a85d0432fa19f411487..1aa256be23914adbd1ef92b25f2a993b07c5d32d 100644 --- a/configs/sam3u-ek/nxwm/defconfig +++ b/configs/sam3u-ek/nxwm/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sam4e-ek/nsh/Make.defs b/configs/sam4e-ek/nsh/Make.defs index 7efd66cf1d8e1fc4a0c088738e0d5c54bf740044..1b6f323395e2603951adbb3d4945f0bf45173fed 100644 --- a/configs/sam4e-ek/nsh/Make.defs +++ b/configs/sam4e-ek/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sam4e-ek/nsh/defconfig b/configs/sam4e-ek/nsh/defconfig index 1104c510bfa7cb264c7c2566d1532d1da74739a1..2ca0505f8393da11921fb2a046e28bbaede9f31e 100644 --- a/configs/sam4e-ek/nsh/defconfig +++ b/configs/sam4e-ek/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sam4e-ek/nxwm/Make.defs b/configs/sam4e-ek/nxwm/Make.defs index b267c099165453e0fef2d7c6aee6d59ec435bcd7..f4e26daac067c8739d5bd1603a3baa617341ccdd 100644 --- a/configs/sam4e-ek/nxwm/Make.defs +++ b/configs/sam4e-ek/nxwm/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sam4e-ek/nxwm/defconfig b/configs/sam4e-ek/nxwm/defconfig index 378d28ba1126809a67fa6d69bac7c4f735dd1cad..c80b0d03545f12b1645aad0c78c3aa6285460b27 100644 --- a/configs/sam4e-ek/nxwm/defconfig +++ b/configs/sam4e-ek/nxwm/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sam4e-ek/usbnsh/Make.defs b/configs/sam4e-ek/usbnsh/Make.defs index 80e229163e17b3aa1838c18e2580b29f79565c54..55cc417608793980903684f3d546f3f890683ce5 100644 --- a/configs/sam4e-ek/usbnsh/Make.defs +++ b/configs/sam4e-ek/usbnsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sam4e-ek/usbnsh/defconfig b/configs/sam4e-ek/usbnsh/defconfig index a422f34571e2822187852fbf54b0ba168d68cf20..2eb66473b9d7a75755ec48b26051207f8d1f3bc1 100644 --- a/configs/sam4e-ek/usbnsh/defconfig +++ b/configs/sam4e-ek/usbnsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sam4l-xplained/nsh/Make.defs b/configs/sam4l-xplained/nsh/Make.defs index 3459a329b7e2471e4509cc4fd253fe8602202048..fc6a71ace8900be4b900f817153b89aafcf62386 100644 --- a/configs/sam4l-xplained/nsh/Make.defs +++ b/configs/sam4l-xplained/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sam4l-xplained/nsh/defconfig b/configs/sam4l-xplained/nsh/defconfig index 34dd699cd7e0fb3eacf374a8ee74bce2f02bc9a9..ad60bc8a5f1b244fb7ad03e0ce5908b1b730d025 100644 --- a/configs/sam4l-xplained/nsh/defconfig +++ b/configs/sam4l-xplained/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sam4s-xplained-pro/nsh/Make.defs b/configs/sam4s-xplained-pro/nsh/Make.defs index 6755b3e21eb45c4630e8e3eea4b2667cdac954e3..2dc8e2add391a97068016c56e5ac249c34504528 100644 --- a/configs/sam4s-xplained-pro/nsh/Make.defs +++ b/configs/sam4s-xplained-pro/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sam4s-xplained-pro/nsh/defconfig b/configs/sam4s-xplained-pro/nsh/defconfig index f46df931273dc5bbecd3c918a8593c998548390d..45fbddf1c5617e883b130e4e783d6edf666910f6 100644 --- a/configs/sam4s-xplained-pro/nsh/defconfig +++ b/configs/sam4s-xplained-pro/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sam4s-xplained/nsh/Make.defs b/configs/sam4s-xplained/nsh/Make.defs index 8bd815700e6db4c572297c8e4954c22f6797c3f8..795c90796e291430788823d203987445be7d2964 100644 --- a/configs/sam4s-xplained/nsh/Make.defs +++ b/configs/sam4s-xplained/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sam4s-xplained/nsh/defconfig b/configs/sam4s-xplained/nsh/defconfig index 6d4512f72c3500a72c1daaadcaec31b363b8fd24..d997c7c35285bb5d7d6f29ee257b57c70cbaad4a 100644 --- a/configs/sam4s-xplained/nsh/defconfig +++ b/configs/sam4s-xplained/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d2-xult/nsh/Make.defs b/configs/sama5d2-xult/nsh/Make.defs index 50f6cf8d4a588b7f79bc2db479648b983087c234..a8f408163790edc3d2061819656c9b2db2e8c9a7 100644 --- a/configs/sama5d2-xult/nsh/Make.defs +++ b/configs/sama5d2-xult/nsh/Make.defs @@ -80,7 +80,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d2-xult/nsh/defconfig b/configs/sama5d2-xult/nsh/defconfig index 86220f7ed3ab84ce28c0f30dde738fde4e752d3a..43d37d1d979410a8de22a1aee35a2ddca10d6905 100644 --- a/configs/sama5d2-xult/nsh/defconfig +++ b/configs/sama5d2-xult/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d3-xplained/bridge/Make.defs b/configs/sama5d3-xplained/bridge/Make.defs index 7ce0dad5266e8f25af3e87248ff6e4c137f45938..430e2db50cc322f1753dad750d54ae3430c4150a 100644 --- a/configs/sama5d3-xplained/bridge/Make.defs +++ b/configs/sama5d3-xplained/bridge/Make.defs @@ -76,7 +76,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d3-xplained/bridge/defconfig b/configs/sama5d3-xplained/bridge/defconfig index f1fb1d55783eab832c41d9250a0b27b57ed23a30..638a12e58e7f1abf95e23cecb078abb3233fddd6 100644 --- a/configs/sama5d3-xplained/bridge/defconfig +++ b/configs/sama5d3-xplained/bridge/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d3-xplained/nsh/Make.defs b/configs/sama5d3-xplained/nsh/Make.defs index e53e9803ae43a6ca664d4b04ad9bb3d158d14cee..6b735d7a68900de4250087fdf075e6913b55f05e 100644 --- a/configs/sama5d3-xplained/nsh/Make.defs +++ b/configs/sama5d3-xplained/nsh/Make.defs @@ -76,7 +76,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d3-xplained/nsh/defconfig b/configs/sama5d3-xplained/nsh/defconfig index 8a42f500de326bdc4af1b3ca2b178ff93ce0a91e..8e7517c7c9f03a33b0d087a29bafb40be3440db2 100644 --- a/configs/sama5d3-xplained/nsh/defconfig +++ b/configs/sama5d3-xplained/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d3x-ek/demo/Make.defs b/configs/sama5d3x-ek/demo/Make.defs index 30196f10fdd19f48406b684bc6a13a701e91efed..5f73055eded438f2e40b9862f8a3c3518fcb4d59 100644 --- a/configs/sama5d3x-ek/demo/Make.defs +++ b/configs/sama5d3x-ek/demo/Make.defs @@ -96,7 +96,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d3x-ek/demo/defconfig b/configs/sama5d3x-ek/demo/defconfig index c142bb83eb71e463ef0ba90a17be43ac7e3bec18..e31ab7c06870fd68f22e5e49005bc23308471b45 100644 --- a/configs/sama5d3x-ek/demo/defconfig +++ b/configs/sama5d3x-ek/demo/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d3x-ek/hello/Make.defs b/configs/sama5d3x-ek/hello/Make.defs index 534cbd06bc15ad0eb1fc1b85bfe03efda2d348b1..cdc2a9468fed41a21f124fc836ceb43157b9bda0 100644 --- a/configs/sama5d3x-ek/hello/Make.defs +++ b/configs/sama5d3x-ek/hello/Make.defs @@ -96,7 +96,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d3x-ek/hello/defconfig b/configs/sama5d3x-ek/hello/defconfig index bd18ec13931b01e743213b76d78e00d1f36c8bc4..e6685267cfc7eb0fed026be3cde9b4edbaa90a61 100644 --- a/configs/sama5d3x-ek/hello/defconfig +++ b/configs/sama5d3x-ek/hello/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d3x-ek/norboot/Make.defs b/configs/sama5d3x-ek/norboot/Make.defs index a1685440e9362ff7753a6f42548488d746ea89f4..369190f32a0c1453dae5287a76509ad2135cad90 100644 --- a/configs/sama5d3x-ek/norboot/Make.defs +++ b/configs/sama5d3x-ek/norboot/Make.defs @@ -96,7 +96,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d3x-ek/norboot/defconfig b/configs/sama5d3x-ek/norboot/defconfig index 0eae073a7b3d117d25f57aa9a4d9da9671cb7208..f2549c68024a8ddbc24378e6042bc69123789405 100644 --- a/configs/sama5d3x-ek/norboot/defconfig +++ b/configs/sama5d3x-ek/norboot/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d3x-ek/nsh/Make.defs b/configs/sama5d3x-ek/nsh/Make.defs index 8c63acfd6c05a29f324eb2d2dbb579baf1a90035..2c369c9dcd730140ea846962214d58577677b781 100644 --- a/configs/sama5d3x-ek/nsh/Make.defs +++ b/configs/sama5d3x-ek/nsh/Make.defs @@ -96,7 +96,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d3x-ek/nsh/defconfig b/configs/sama5d3x-ek/nsh/defconfig index 28ddf8a8202ad83aed417f2b1960d2ef8c75ee82..9ed0736276fe936cb71fc6065b1be3478fdb5af8 100644 --- a/configs/sama5d3x-ek/nsh/defconfig +++ b/configs/sama5d3x-ek/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d3x-ek/nx/Make.defs b/configs/sama5d3x-ek/nx/Make.defs index 4e0b8da8a904f59997d73c1d3f61fc87cd1a1f18..fa74d1e559d338967d55b7c88a56561133788932 100644 --- a/configs/sama5d3x-ek/nx/Make.defs +++ b/configs/sama5d3x-ek/nx/Make.defs @@ -96,7 +96,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d3x-ek/nx/defconfig b/configs/sama5d3x-ek/nx/defconfig index 204384004ccfb8af0242fb58962efe3cdfd2cfd6..54bf3ccefa11a9f6dece81258c22938ed46b8205 100644 --- a/configs/sama5d3x-ek/nx/defconfig +++ b/configs/sama5d3x-ek/nx/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d3x-ek/nxplayer/Make.defs b/configs/sama5d3x-ek/nxplayer/Make.defs index 813d3a1460eadf01f52b639ef8505ac82fd583cd..7dd1906749f016a9893f48889ee4fdd97843585f 100644 --- a/configs/sama5d3x-ek/nxplayer/Make.defs +++ b/configs/sama5d3x-ek/nxplayer/Make.defs @@ -96,7 +96,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d3x-ek/nxplayer/defconfig b/configs/sama5d3x-ek/nxplayer/defconfig index 421064ada2986f9400f7161bfe751b875bdd17a4..02ceea85b992c437619ccd0bbcaf12a8dd09dca9 100644 --- a/configs/sama5d3x-ek/nxplayer/defconfig +++ b/configs/sama5d3x-ek/nxplayer/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d3x-ek/nxwm/Make.defs b/configs/sama5d3x-ek/nxwm/Make.defs index 089d2b4500ecb831328a9b8f956b390502339b05..3d4884fc340f6ce59cb43f094beb1168c6a5b777 100644 --- a/configs/sama5d3x-ek/nxwm/Make.defs +++ b/configs/sama5d3x-ek/nxwm/Make.defs @@ -96,7 +96,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d3x-ek/nxwm/defconfig b/configs/sama5d3x-ek/nxwm/defconfig index aa75930aca3bd3c2df714f89b2320e61ce73cda3..d041a397079fa638b1bdf41c92e0863ee64d779e 100644 --- a/configs/sama5d3x-ek/nxwm/defconfig +++ b/configs/sama5d3x-ek/nxwm/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d3x-ek/ov2640/Make.defs b/configs/sama5d3x-ek/ov2640/Make.defs index b5090629e750a09b23a2a1489f1fb857437837cf..063a4799b2157b39c0411aba15488c41b391e945 100644 --- a/configs/sama5d3x-ek/ov2640/Make.defs +++ b/configs/sama5d3x-ek/ov2640/Make.defs @@ -96,7 +96,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d3x-ek/ov2640/defconfig b/configs/sama5d3x-ek/ov2640/defconfig index e117995124f6456b065ed9aba890a9d6cd98911e..b0fa78067861645408b8c40885c0b294f6eae66b 100644 --- a/configs/sama5d3x-ek/ov2640/defconfig +++ b/configs/sama5d3x-ek/ov2640/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d4-ek/at25boot/Make.defs b/configs/sama5d4-ek/at25boot/Make.defs index 4bad9e5074af59259ecda4170732e0edf0ea8f18..a8019045b6659adec0e56f5cd99bce6e433f6176 100644 --- a/configs/sama5d4-ek/at25boot/Make.defs +++ b/configs/sama5d4-ek/at25boot/Make.defs @@ -80,7 +80,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d4-ek/at25boot/defconfig b/configs/sama5d4-ek/at25boot/defconfig index 542da7876ccab786022b8c5bb21e042f3050124f..c42d478750211efb64013836c709aa9209a44273 100644 --- a/configs/sama5d4-ek/at25boot/defconfig +++ b/configs/sama5d4-ek/at25boot/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d4-ek/bridge/Make.defs b/configs/sama5d4-ek/bridge/Make.defs index 254381fd843df38713aa5343be8b635fa10adcc8..c2bdf0c8944761bf73752b276a0bd28742afe682 100644 --- a/configs/sama5d4-ek/bridge/Make.defs +++ b/configs/sama5d4-ek/bridge/Make.defs @@ -80,7 +80,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d4-ek/bridge/defconfig b/configs/sama5d4-ek/bridge/defconfig index dc6c38984f238e302a713b0520026f34c0338314..3df740b877385b248232859e08ae1f4d545e1174 100644 --- a/configs/sama5d4-ek/bridge/defconfig +++ b/configs/sama5d4-ek/bridge/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d4-ek/dramboot/Make.defs b/configs/sama5d4-ek/dramboot/Make.defs index f142b56bb93bbafe26fe11ae6c28d26d5615933b..2b02d60d63af41238dce71c8e2ba41ac53180ad0 100644 --- a/configs/sama5d4-ek/dramboot/Make.defs +++ b/configs/sama5d4-ek/dramboot/Make.defs @@ -80,7 +80,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d4-ek/dramboot/defconfig b/configs/sama5d4-ek/dramboot/defconfig index 973422845685017bd861edf9d93b0d38d287fc7d..4b0fa6cebb439467848c75d60c9342291c73f4c2 100644 --- a/configs/sama5d4-ek/dramboot/defconfig +++ b/configs/sama5d4-ek/dramboot/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d4-ek/elf/Make.defs b/configs/sama5d4-ek/elf/Make.defs index 9708ba3786a67e43f92d121a99073a323b3f660b..689cb2060e5b11745af84961ed4870f3816a85c3 100644 --- a/configs/sama5d4-ek/elf/Make.defs +++ b/configs/sama5d4-ek/elf/Make.defs @@ -80,7 +80,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d4-ek/elf/defconfig b/configs/sama5d4-ek/elf/defconfig index 0fc618424689c52fbfefb0a4d70120e3304eff40..09ac89d5c76a8eecce50f2e9ae720d5d0157526b 100644 --- a/configs/sama5d4-ek/elf/defconfig +++ b/configs/sama5d4-ek/elf/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d4-ek/ipv6/Make.defs b/configs/sama5d4-ek/ipv6/Make.defs index 17e78d57bde746402c0f24d0f88497003e1c2181..757635691c316ac4a270069cab82468574e1cd0f 100644 --- a/configs/sama5d4-ek/ipv6/Make.defs +++ b/configs/sama5d4-ek/ipv6/Make.defs @@ -80,7 +80,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d4-ek/ipv6/defconfig b/configs/sama5d4-ek/ipv6/defconfig index d25afb5066760480a8ce0f6c57855ba865de5ca3..a6af39fe39d759ffdbd6175381e785e8c69dea41 100644 --- a/configs/sama5d4-ek/ipv6/defconfig +++ b/configs/sama5d4-ek/ipv6/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d4-ek/knsh/Make.defs b/configs/sama5d4-ek/knsh/Make.defs index ece275b771152a2f1d764e56234a04256b98a2ee..b5a28fb3b82549e434b1d2905b2461fe0406d7e6 100644 --- a/configs/sama5d4-ek/knsh/Make.defs +++ b/configs/sama5d4-ek/knsh/Make.defs @@ -80,7 +80,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d4-ek/knsh/defconfig b/configs/sama5d4-ek/knsh/defconfig index 64f29e3e0592df6d9a7c6253355c0c9b2f088324..e1acee79ecc2cc13d5b1ed9463eeb4b8f1b2a7cf 100644 --- a/configs/sama5d4-ek/knsh/defconfig +++ b/configs/sama5d4-ek/knsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d4-ek/knsh/defconfig.ROMFS b/configs/sama5d4-ek/knsh/defconfig.ROMFS index 38e1643c966e0dce7b308ff80fd0824e08424eee..47724cd6dc9e9a306212f27bdd1f28c88657b043 100644 --- a/configs/sama5d4-ek/knsh/defconfig.ROMFS +++ b/configs/sama5d4-ek/knsh/defconfig.ROMFS @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d4-ek/nsh/Make.defs b/configs/sama5d4-ek/nsh/Make.defs index c94054d06e673412aee39c063ad55e5c331a10a9..5edb2dd191be9b82cb2518e5012e51c2586f1214 100644 --- a/configs/sama5d4-ek/nsh/Make.defs +++ b/configs/sama5d4-ek/nsh/Make.defs @@ -80,7 +80,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d4-ek/nsh/defconfig b/configs/sama5d4-ek/nsh/defconfig index 7758f5bd93925a675c12b5ed6f19eac2309933df..83137414267048eb018044d53324eb054e50fe77 100644 --- a/configs/sama5d4-ek/nsh/defconfig +++ b/configs/sama5d4-ek/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d4-ek/nxwm/Make.defs b/configs/sama5d4-ek/nxwm/Make.defs index d839e3ded4fbd471379efac8e128dc2a0dc57fe0..d005e269db43c3350e1f37c880e4130d0ab420f9 100644 --- a/configs/sama5d4-ek/nxwm/Make.defs +++ b/configs/sama5d4-ek/nxwm/Make.defs @@ -80,7 +80,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d4-ek/nxwm/defconfig b/configs/sama5d4-ek/nxwm/defconfig index 3bf40dbcadc3c26e9effdd95bffa94350dc3542f..2693a12fb3d7b8fb6f32c9a8ac7fd196676e1a9f 100644 --- a/configs/sama5d4-ek/nxwm/defconfig +++ b/configs/sama5d4-ek/nxwm/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sama5d4-ek/ramtest/Make.defs b/configs/sama5d4-ek/ramtest/Make.defs index bc78ca4a8f3943c0bf45c5ba52f3ad4bfea0ccbe..84c2493261524a7911af815521f8c112d8621991 100644 --- a/configs/sama5d4-ek/ramtest/Make.defs +++ b/configs/sama5d4-ek/ramtest/Make.defs @@ -80,7 +80,7 @@ endif ARCHCPUFLAGS = -mcpu=cortex-a5 -mfpu=vfpv4-d16 ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sama5d4-ek/ramtest/defconfig b/configs/sama5d4-ek/ramtest/defconfig index 3c618b63650381fe28c19d3ffd1722c32b45884a..dd96d28c1ff40c3c5eff73b63ecb9ff2b0dce4aa 100644 --- a/configs/sama5d4-ek/ramtest/defconfig +++ b/configs/sama5d4-ek/ramtest/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/samd20-xplained/nsh/Make.defs b/configs/samd20-xplained/nsh/Make.defs index 22caeba81182e11117b96c812026b2e12edb9345..4ae003c79ba836c607ed0cca9b77c2ecbf1c60e1 100644 --- a/configs/samd20-xplained/nsh/Make.defs +++ b/configs/samd20-xplained/nsh/Make.defs @@ -72,7 +72,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/samd20-xplained/nsh/defconfig b/configs/samd20-xplained/nsh/defconfig index e6477997172d6442cff9c390cf8617d15aadf01f..66cdfec15759121b84cf1e0d1bee0b9767a9f399 100644 --- a/configs/samd20-xplained/nsh/defconfig +++ b/configs/samd20-xplained/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/samd21-xplained/nsh/Make.defs b/configs/samd21-xplained/nsh/Make.defs index 6f5255b34302352614da1ac65d5995d1cb3269f5..75f1af4a00a9fa1435df33e3a01e97c81c3b82d9 100644 --- a/configs/samd21-xplained/nsh/Make.defs +++ b/configs/samd21-xplained/nsh/Make.defs @@ -72,7 +72,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/samd21-xplained/nsh/defconfig b/configs/samd21-xplained/nsh/defconfig index c11eec68ebb5fb717d94961171ce87a141106877..aff0c4e55960ee5c1042fe5a3d8fcc05cae41c4b 100644 --- a/configs/samd21-xplained/nsh/defconfig +++ b/configs/samd21-xplained/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/same70-xplained/netnsh/Make.defs b/configs/same70-xplained/netnsh/Make.defs index f3e42f9a7aa324e4dab9eced2d49d52831039db4..8650e3f22e0bef8e2bd353775c3703f6a2c7ce49 100644 --- a/configs/same70-xplained/netnsh/Make.defs +++ b/configs/same70-xplained/netnsh/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/same70-xplained/netnsh/defconfig b/configs/same70-xplained/netnsh/defconfig index a60a2a7aff6540894512bde2d69e0876bd534471..1eaf1f773d829b0e258d437213b083d0eb488ba9 100644 --- a/configs/same70-xplained/netnsh/defconfig +++ b/configs/same70-xplained/netnsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -419,6 +419,7 @@ CONFIG_ARCH_HAVE_TICKLESS=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2014 CONFIG_START_MONTH=3 @@ -516,6 +517,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -540,11 +542,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +CONFIG_ARCH_HAVE_SPI_CS_CONTROL=y # CONFIG_SPI_CS_CONTROL is not set +# CONFIG_ARCH_HAVE_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -732,8 +737,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -748,6 +755,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1039,7 +1047,6 @@ CONFIG_EXAMPLES_BUTTONS_NAME6="Button 6" CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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 @@ -1068,9 +1075,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1196,7 +1203,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 diff --git a/configs/same70-xplained/nsh/Make.defs b/configs/same70-xplained/nsh/Make.defs index e607c4ace3cd3f7a10b9cfb626dc1851aa24733d..e2079af0e50eaa3f36a3699e0e092bf110885b37 100644 --- a/configs/same70-xplained/nsh/Make.defs +++ b/configs/same70-xplained/nsh/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/same70-xplained/nsh/defconfig b/configs/same70-xplained/nsh/defconfig index 5e3c9e924bad6f898891d4617259a09e144ccca8..65be44eafb133d8d5845de05851d878d18cee1d6 100644 --- a/configs/same70-xplained/nsh/defconfig +++ b/configs/same70-xplained/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -404,6 +404,7 @@ CONFIG_ARCH_HAVE_TICKLESS=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2014 CONFIG_START_MONTH=3 @@ -501,6 +502,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -525,11 +527,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +CONFIG_ARCH_HAVE_SPI_CS_CONTROL=y # CONFIG_SPI_CS_CONTROL is not set +# CONFIG_ARCH_HAVE_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -674,8 +679,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -690,6 +697,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -860,7 +868,6 @@ CONFIG_EXAMPLES_BUTTONS_NAME6="Button 6" CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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 @@ -887,9 +894,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -999,7 +1006,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 diff --git a/configs/same70-xplained/src/Makefile b/configs/same70-xplained/src/Makefile index 4d883fccb75a6108e0fa8887769ee0b2de74303c..1f2eafb849a4ca7ba23d94b717a1ca2a0824c11c 100644 --- a/configs/same70-xplained/src/Makefile +++ b/configs/same70-xplained/src/Makefile @@ -90,4 +90,8 @@ endif endif endif +ifneq (,$(findstring y,$(CONFIG_SAMV7_DAC0) $(CONFIG_SAMV7_DAC1))) +CSRCS += sam_dac.c +endif + include $(TOPDIR)/configs/Board.mk diff --git a/configs/same70-xplained/src/sam_bringup.c b/configs/same70-xplained/src/sam_bringup.c index 7cc5fed0c004f87369f0dac0dd0db00b38263214..9a84f3228ea0c32c261c3bacfbfc0ce1322c7591 100644 --- a/configs/same70-xplained/src/sam_bringup.c +++ b/configs/same70-xplained/src/sam_bringup.c @@ -329,6 +329,14 @@ int sam_bringup(void) } #endif +#if defined(CONFIG_SAMV7_DAC0) || defined(CONFIG_SAMV7_DAC1) + ret = sam_dacdev_initialize(); + if (ret < 0) + { + _err("ERROR: Initialization of the DAC module failed: %d\n", ret); + } +#endif + /* If we got here then perhaps not all initialization was successful, but * at least enough succeeded to bring-up NSH with perhaps reduced * capabilities. diff --git a/configs/same70-xplained/src/sam_dac.c b/configs/same70-xplained/src/sam_dac.c new file mode 100644 index 0000000000000000000000000000000000000000..884de6e27cac7821d07379202ab195377ae9a589 --- /dev/null +++ b/configs/same70-xplained/src/sam_dac.c @@ -0,0 +1,123 @@ +/************************************************************************************ + * configs/same70-xplained/src/sam_dac.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 "up_arch.h" +#include "chip.h" +#include "sam_dac.h" +#include "same70-xplained.h" + +#if defined(CONFIG_SAMV7_DAC0) || defined(CONFIG_SAMV7_DAC1) + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: sam_dacdev_initialize + * + * Description: + * Called to configure DAC peripheral module and register DAC device driver + ************************************************************************************/ + +int sam_dacdev_initialize(void) +{ + static bool initialized = false; + struct dac_dev_s *dac; + int ret; + + /* Check if we have already initialized */ + + if (!initialized) + { +#ifdef CONFIG_SAMV7_DAC0 + /* Get an instance of the DAC0 interface */ + + dac = sam_dac_initialize(0); + if (dac == NULL) + { + aerr("ERROR: Failed to get DAC0 interface\n"); + return -ENODEV; + } + + /* Register the DAC driver at "/dev/dac0" */ + + ret = dac_register("/dev/dac0", dac); + if (ret < 0) + { + aerr("ERROR: dac_register failed: %d\n", ret); + return ret; + } +#endif + +#ifdef CONFIG_SAMV7_DAC1 + /* Get an instance of the DAC1 interface */ + + dac = sam_dac_initialize(1); + if (dac == NULL) + { + aerr("ERROR: Failed to get DAC1 interface\n"); + return -ENODEV; + } + + /* Register the DAC driver at "/dev/dac1" */ + + ret = dac_register("/dev/dac1", dac); + if (ret < 0) + { + aerr("ERROR: dac_register failed: %d\n", ret); + return ret; + } +#endif + /* Now we are initialized */ + + initialized = true; + } + return OK; +} + +#endif /* CONFIG_SAMV7_DAC0 || CONFIG_SAMV7_DAC1 */ diff --git a/configs/same70-xplained/src/same70-xplained.h b/configs/same70-xplained/src/same70-xplained.h index 0859c0f450b7fe07a138c2180ee9056384b5113d..117c6a68933f9a39361836846664275c87a1d846 100644 --- a/configs/same70-xplained/src/same70-xplained.h +++ b/configs/same70-xplained/src/same70-xplained.h @@ -349,6 +349,18 @@ void sam_sdram_config(void); int sam_bringup(void); #endif +/************************************************************************************ + * Name: sam_dacdev_initialize + * + * Description: + * Called to configure DAC peripheral module + * + ************************************************************************************/ + +#if defined(CONFIG_SAMV7_DAC0) || defined(CONFIG_SAMV7_DAC1) +int sam_dacdev_initialize(void); +#endif + /************************************************************************************ * Name: sam_spidev_initialize * diff --git a/configs/saml21-xplained/nsh/Make.defs b/configs/saml21-xplained/nsh/Make.defs index 25498abe9be188743948084b6904967b043092b7..86e3dc31d7a1b002fc660c1df80650b3c5bba28f 100644 --- a/configs/saml21-xplained/nsh/Make.defs +++ b/configs/saml21-xplained/nsh/Make.defs @@ -72,7 +72,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/saml21-xplained/nsh/defconfig b/configs/saml21-xplained/nsh/defconfig index 6aa541a803511d7b650df72a65c7278ae255dba0..6fab4a5a01658295b9cbfce272562c64403c9d83 100644 --- a/configs/saml21-xplained/nsh/defconfig +++ b/configs/saml21-xplained/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/samv71-xult/knsh/Make.defs b/configs/samv71-xult/knsh/Make.defs index c5bbfe8f3367e7dc1971d8bf1a4e7ae82f46653d..2a49ef7f598488b6de40f9c14c8f8fb3a968d35d 100644 --- a/configs/samv71-xult/knsh/Make.defs +++ b/configs/samv71-xult/knsh/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/samv71-xult/knsh/defconfig b/configs/samv71-xult/knsh/defconfig index 1a95add801270ed14e684430247bb1f2aeba1195..7d66836b5a92b8ba3ed75c62c5b91b9af90cdca0 100644 --- a/configs/samv71-xult/knsh/defconfig +++ b/configs/samv71-xult/knsh/defconfig @@ -70,7 +70,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -412,6 +412,7 @@ CONFIG_ARCH_HAVE_TICKLESS=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2015 CONFIG_START_MONTH=11 @@ -510,6 +511,7 @@ CONFIG_SYS_NNEST=2 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -534,11 +536,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +CONFIG_ARCH_HAVE_SPI_CS_CONTROL=y # CONFIG_SPI_CS_CONTROL is not set +# CONFIG_ARCH_HAVE_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -683,8 +688,10 @@ CONFIG_UART3_2STOP=0 # CONFIG_UART3_IFLOWCONTROL is not set # CONFIG_UART3_OFLOWCONTROL is not set # CONFIG_UART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -699,6 +706,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -853,7 +861,6 @@ CONFIG_ARCH_HAVE_TLS=y # # 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 @@ -879,10 +886,9 @@ CONFIG_EXAMPLES_NSH=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -990,7 +996,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set 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 is not set diff --git a/configs/samv71-xult/module/Make.defs b/configs/samv71-xult/module/Make.defs index 2900024e899d622cc29c53f1e3c70262dde9ebc0..2c560c69cb36c2f7991206b4b30691a458150baf 100644 --- a/configs/samv71-xult/module/Make.defs +++ b/configs/samv71-xult/module/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/samv71-xult/module/defconfig b/configs/samv71-xult/module/defconfig index 77748a6517e89e76631fb164c48e0e0b56a667d1..98dd0cf6bf14345ae29dafc06a0601b6e693adfb 100644 --- a/configs/samv71-xult/module/defconfig +++ b/configs/samv71-xult/module/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -386,6 +386,7 @@ CONFIG_ARCH_HAVE_TICKLESS=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2014 CONFIG_START_MONTH=3 @@ -487,6 +488,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -502,6 +504,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_CS_CONTROL=y # CONFIG_I2S is not set # @@ -593,8 +596,10 @@ CONFIG_UART3_2STOP=0 # CONFIG_UART3_IFLOWCONTROL is not set # CONFIG_UART3_OFLOWCONTROL is not set # CONFIG_UART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -609,6 +614,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -768,7 +774,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_ELF is not set # CONFIG_EXAMPLES_FSTEST is not set @@ -800,9 +805,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set @@ -914,7 +919,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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_MODCMDS is not set diff --git a/configs/samv71-xult/mxtxplnd/Make.defs b/configs/samv71-xult/mxtxplnd/Make.defs index e5463a1c116a8c91b0e0a96a2beb410af0627a05..0262a966f46c9122867a5e0b801e4e83ac8fa647 100644 --- a/configs/samv71-xult/mxtxplnd/Make.defs +++ b/configs/samv71-xult/mxtxplnd/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/samv71-xult/mxtxplnd/defconfig b/configs/samv71-xult/mxtxplnd/defconfig index a7e6d9f2bc4f127d3db0259a50854c2cd8812f31..4dc8dac69d451b1673638cd2e994ced9df5559ea 100644 --- a/configs/samv71-xult/mxtxplnd/defconfig +++ b/configs/samv71-xult/mxtxplnd/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -405,6 +405,7 @@ CONFIG_ARCH_HAVE_TICKLESS=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2014 CONFIG_START_MONTH=3 @@ -502,6 +503,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -526,11 +528,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +CONFIG_ARCH_HAVE_SPI_CS_CONTROL=y # CONFIG_SPI_CS_CONTROL is not set +# CONFIG_ARCH_HAVE_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -717,8 +722,10 @@ CONFIG_USART0_2STOP=0 # CONFIG_USART0_IFLOWCONTROL is not set # CONFIG_USART0_OFLOWCONTROL is not set # CONFIG_USART0_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -733,6 +740,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -989,7 +997,6 @@ CONFIG_EXAMPLES_BUTTONS_NAME6="Button 6" CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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 @@ -1024,9 +1031,9 @@ CONFIG_EXAMPLES_NXLINES_BPP=16 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1140,7 +1147,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 diff --git a/configs/samv71-xult/netnsh/Make.defs b/configs/samv71-xult/netnsh/Make.defs index 4a0f316c078de8dc7682c71a3f8e7ff88260dc08..f8467aad326ce04257b1d16cc79a511e09547b9c 100644 --- a/configs/samv71-xult/netnsh/Make.defs +++ b/configs/samv71-xult/netnsh/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/samv71-xult/netnsh/defconfig b/configs/samv71-xult/netnsh/defconfig index 72d049526b0ad7d368e23231842baf50b73ae86c..d557fa1098cf91bfe5e79d850c55796d3bc26455 100644 --- a/configs/samv71-xult/netnsh/defconfig +++ b/configs/samv71-xult/netnsh/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -422,6 +422,7 @@ CONFIG_ARCH_HAVE_TICKLESS=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2014 CONFIG_START_MONTH=3 @@ -519,6 +520,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -543,11 +545,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +CONFIG_ARCH_HAVE_SPI_CS_CONTROL=y # CONFIG_SPI_CS_CONTROL is not set +# CONFIG_ARCH_HAVE_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -735,8 +740,10 @@ CONFIG_UART3_2STOP=0 # CONFIG_UART3_IFLOWCONTROL is not set # CONFIG_UART3_OFLOWCONTROL is not set # CONFIG_UART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -751,6 +758,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1043,7 +1051,6 @@ CONFIG_EXAMPLES_BUTTONS_NAME6="Button 6" CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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 @@ -1072,9 +1079,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1200,7 +1207,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 diff --git a/configs/samv71-xult/nsh/Make.defs b/configs/samv71-xult/nsh/Make.defs index 27f54d8e3f2194670b697ba0ded74fc02f09d2a7..0db76fae98b3de49ae1fd9848f82e952a578e3ba 100644 --- a/configs/samv71-xult/nsh/Make.defs +++ b/configs/samv71-xult/nsh/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/samv71-xult/nsh/defconfig b/configs/samv71-xult/nsh/defconfig index 7ad935aa3222798aa6ff43742838b8c356a050e6..d7d04be39ce2383e226501a664ab899373591757 100644 --- a/configs/samv71-xult/nsh/defconfig +++ b/configs/samv71-xult/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -407,6 +407,7 @@ CONFIG_ARCH_HAVE_TICKLESS=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2014 CONFIG_START_MONTH=3 @@ -504,6 +505,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -528,11 +530,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +CONFIG_ARCH_HAVE_SPI_CS_CONTROL=y # CONFIG_SPI_CS_CONTROL is not set +# CONFIG_ARCH_HAVE_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -677,8 +682,10 @@ CONFIG_UART3_2STOP=0 # CONFIG_UART3_IFLOWCONTROL is not set # CONFIG_UART3_OFLOWCONTROL is not set # CONFIG_UART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -693,6 +700,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -863,7 +871,6 @@ CONFIG_EXAMPLES_BUTTONS_NAME6="Button 6" CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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 @@ -890,9 +897,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1002,7 +1009,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 diff --git a/configs/samv71-xult/nxwm/Make.defs b/configs/samv71-xult/nxwm/Make.defs index d4b883d507dd295a360dd4e2db5cd27ac33e71c6..dd07413a79cac58ab36e6790906dc19db1b05b46 100644 --- a/configs/samv71-xult/nxwm/Make.defs +++ b/configs/samv71-xult/nxwm/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/samv71-xult/nxwm/defconfig b/configs/samv71-xult/nxwm/defconfig index 006b3160fa9b438089943583e5508e6e37d7f8be..033561fc581796825ef843b8f3c35c0c4eeed6e3 100644 --- a/configs/samv71-xult/nxwm/defconfig +++ b/configs/samv71-xult/nxwm/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -405,6 +405,7 @@ CONFIG_ARCH_HAVE_TICKLESS=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2014 CONFIG_START_MONTH=3 @@ -505,6 +506,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -529,11 +531,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +CONFIG_ARCH_HAVE_SPI_CS_CONTROL=y # CONFIG_SPI_CS_CONTROL is not set +# CONFIG_ARCH_HAVE_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -720,8 +725,10 @@ CONFIG_USART0_2STOP=0 # CONFIG_USART0_IFLOWCONTROL is not set # CONFIG_USART0_OFLOWCONTROL is not set # CONFIG_USART0_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -736,6 +743,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -999,7 +1007,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -1029,9 +1036,9 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1141,7 +1148,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 diff --git a/configs/samv71-xult/vnc/Make.defs b/configs/samv71-xult/vnc/Make.defs index 5185c94a9fb15afff6913bd71e0e2dfb2e4a7eba..3781b6f4dcfd3ae54d4c299f51ba972ca63ad2ed 100644 --- a/configs/samv71-xult/vnc/Make.defs +++ b/configs/samv71-xult/vnc/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/samv71-xult/vnc/defconfig b/configs/samv71-xult/vnc/defconfig index 61869888460bcef8578f21cf2d6afe4450a59338..3c964dfae6c5624daee712b2c80604ca4c09b71f 100644 --- a/configs/samv71-xult/vnc/defconfig +++ b/configs/samv71-xult/vnc/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -421,6 +421,7 @@ CONFIG_ARCH_HAVE_TICKLESS=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2014 CONFIG_START_MONTH=3 @@ -519,6 +520,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -543,11 +545,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +CONFIG_ARCH_HAVE_SPI_CS_CONTROL=y # CONFIG_SPI_CS_CONTROL is not set +# CONFIG_ARCH_HAVE_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -736,8 +741,10 @@ CONFIG_UART3_2STOP=0 # CONFIG_UART3_IFLOWCONTROL is not set # CONFIG_UART3_OFLOWCONTROL is not set # CONFIG_UART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -752,6 +759,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1123,7 +1131,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_ELF is not set # CONFIG_EXAMPLES_FSTEST is not set @@ -1163,9 +1170,9 @@ CONFIG_EXAMPLES_NXIMAGE_YSCALE1p0=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1285,7 +1292,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 diff --git a/configs/samv71-xult/vnxwm/Make.defs b/configs/samv71-xult/vnxwm/Make.defs index fe4fd97aeb32564ae171f0518424ac6552553d2c..740426e9da7f3ba57d3cba4153eedc040073a18e 100644 --- a/configs/samv71-xult/vnxwm/Make.defs +++ b/configs/samv71-xult/vnxwm/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/samv71-xult/vnxwm/defconfig b/configs/samv71-xult/vnxwm/defconfig index 9823caf7900e6025ce94ee4d42bd2d82beb16d2f..8873901199d400b86a4f35d51f37cc642e16a851 100644 --- a/configs/samv71-xult/vnxwm/defconfig +++ b/configs/samv71-xult/vnxwm/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -421,6 +421,7 @@ CONFIG_ARCH_HAVE_TICKLESS=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2014 CONFIG_START_MONTH=3 @@ -522,6 +523,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -546,11 +548,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +CONFIG_ARCH_HAVE_SPI_CS_CONTROL=y # CONFIG_SPI_CS_CONTROL is not set +# CONFIG_ARCH_HAVE_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -739,8 +744,10 @@ CONFIG_UART3_2STOP=0 # CONFIG_UART3_IFLOWCONTROL is not set # CONFIG_UART3_OFLOWCONTROL is not set # CONFIG_UART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -755,6 +762,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1154,7 +1162,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -1184,9 +1191,9 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1306,7 +1313,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 diff --git a/configs/shenzhou/nsh/Make.defs b/configs/shenzhou/nsh/Make.defs index c97f815e94b3359ca027fa790529bdf5c1badd6e..b795435bbc842ce92953efff4bfc3254cc6edd33 100644 --- a/configs/shenzhou/nsh/Make.defs +++ b/configs/shenzhou/nsh/Make.defs @@ -82,7 +82,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/shenzhou/nsh/defconfig b/configs/shenzhou/nsh/defconfig index 2ef672ff6971b52cc4affab6cae0f5118b8d6c36..4bd50cd1cd08344a28f7def1c8ad6bf375dc3c18 100644 --- a/configs/shenzhou/nsh/defconfig +++ b/configs/shenzhou/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -332,7 +332,7 @@ 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_TIM8 is not set # CONFIG_STM32_HAVE_TIM9 is not set # CONFIG_STM32_HAVE_TIM10 is not set # CONFIG_STM32_HAVE_TIM11 is not set @@ -388,7 +388,6 @@ CONFIG_STM32_SPI1=y # 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 is not set CONFIG_STM32_USART2=y # CONFIG_STM32_USART3 is not set @@ -416,11 +415,12 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set # CONFIG_STM32_TIM5_CAP is not set -# CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y CONFIG_STM32_SERIALDRIVER=y @@ -565,13 +565,11 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 -CONFIG_NSH_MMCSDSPIPORTNO=1 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -594,9 +592,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 @@ -686,6 +687,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -705,11 +707,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -728,7 +733,12 @@ CONFIG_RTC=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -853,8 +863,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -869,6 +881,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1108,6 +1121,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1140,7 +1154,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1171,9 +1184,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1297,7 +1310,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1321,6 +1333,9 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 +CONFIG_NSH_MMCSDSPIPORTNO=1 # # Configure Command Options @@ -1394,7 +1409,7 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/shenzhou/nxwm/Make.defs b/configs/shenzhou/nxwm/Make.defs index 4419270766935e4a715262587790e9bcb2f7e1b9..cf1fcc1dd3aafc291ea161c7e4dea23f919b094d 100644 --- a/configs/shenzhou/nxwm/Make.defs +++ b/configs/shenzhou/nxwm/Make.defs @@ -82,7 +82,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/shenzhou/nxwm/defconfig b/configs/shenzhou/nxwm/defconfig index 944936912a5be46c9683396452fd834d7bd3baa5..27534c56c08bf36c85b8bb3cda3936adf5e5ba39 100644 --- a/configs/shenzhou/nxwm/defconfig +++ b/configs/shenzhou/nxwm/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -340,7 +340,7 @@ 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_TIM8 is not set # CONFIG_STM32_HAVE_TIM9 is not set # CONFIG_STM32_HAVE_TIM10 is not set # CONFIG_STM32_HAVE_TIM11 is not set @@ -396,7 +396,6 @@ CONFIG_STM32_SPI3=y # 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 is not set CONFIG_STM32_USART2=y # CONFIG_STM32_USART3 is not set @@ -424,11 +423,12 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set # CONFIG_STM32_TIM5_CAP is not set -# CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y CONFIG_STM32_SERIALDRIVER=y @@ -570,7 +570,6 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options @@ -591,6 +590,7 @@ CONFIG_NSH_MMCSDMINOR=0 # CONFIG_STM32_ILI9328_DISABLE is not set # CONFIG_STM32_ILI9331_DISABLE is not set # CONFIG_STM32_ILI9919_DISABLE is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -613,9 +613,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2012 CONFIG_START_MONTH=9 @@ -714,6 +717,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=1024 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -733,11 +737,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -768,7 +775,12 @@ CONFIG_ADS7843E_THRESHY=51 # CONFIG_BUTTONS is not set # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -917,8 +929,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -933,6 +947,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1270,6 +1285,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1297,7 +1313,6 @@ CONFIG_HAVE_CXXINITIALIZE=y # # 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 @@ -1328,10 +1343,9 @@ CONFIG_HAVE_CXXINITIALIZE=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1451,7 +1465,6 @@ 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 @@ -1475,6 +1488,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1721,7 +1735,7 @@ CONFIG_NXWM_HEXCALCULATOR_FONTID=5 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/shenzhou/thttpd/Make.defs b/configs/shenzhou/thttpd/Make.defs index 85999c8278293358388f8cb67ee44501b5e901af..38560adc332df50449756b6a68c9438435db0e18 100644 --- a/configs/shenzhou/thttpd/Make.defs +++ b/configs/shenzhou/thttpd/Make.defs @@ -85,7 +85,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/shenzhou/thttpd/defconfig b/configs/shenzhou/thttpd/defconfig index 7bfc514586dd3191b8610d99fd22a8ee0e3dc1b0..d3e6aa60041b17aa7a091a8e1da85994d9196f7b 100644 --- a/configs/shenzhou/thttpd/defconfig +++ b/configs/shenzhou/thttpd/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -598,6 +598,7 @@ CONFIG_ARCH_HAVE_TICKLESS=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 @@ -707,11 +708,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -1214,6 +1218,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_PIPE is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set diff --git a/configs/sim/README.txt b/configs/sim/README.txt index 759b75647f1bf9c686a58fa2c26dd689bbcc04b9..df8a231553dc6156e47a309aec66a6850a3d18c7 100644 --- a/configs/sim/README.txt +++ b/configs/sim/README.txt @@ -490,6 +490,11 @@ cxxtest postpone running C++ static initializers until NuttX has been initialized. +minibasic + + This configuration was used to test the Mini Basic port at + apps/interpreters/minibasic. + mount Configures to use apps/examples/mount. diff --git a/configs/sim/bas/Make.defs b/configs/sim/bas/Make.defs index 984c46f9d70a34deac82cdee06cbddfd0f4d0762..5687f0150f236675d40a8bd837e394f8161e1f43 100644 --- a/configs/sim/bas/Make.defs +++ b/configs/sim/bas/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/bas/defconfig b/configs/sim/bas/defconfig index 28b919a3eec021bdb1920c0cdae624da7cc02040..ef4da76d6b97410265ebe3e9cb9c24234eea1ead 100644 --- a/configs/sim/bas/defconfig +++ b/configs/sim/bas/defconfig @@ -57,7 +57,7 @@ CONFIG_DEBUG_NOOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/configdata/Make.defs b/configs/sim/configdata/Make.defs index d516d172e6c6734582ce95f6552b7fe5589b088f..e614279eb4bb2d94ad8d9d1f51ee73825924fa3f 100644 --- a/configs/sim/configdata/Make.defs +++ b/configs/sim/configdata/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/configdata/defconfig b/configs/sim/configdata/defconfig index be8693b48e213a1b6d8edfb67249e75b50ac23a3..ac5eeef6fe44557271af3c1b227de699ae95ed64 100644 --- a/configs/sim/configdata/defconfig +++ b/configs/sim/configdata/defconfig @@ -59,7 +59,7 @@ CONFIG_DEBUG_NOOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/cxxtest/Make.defs b/configs/sim/cxxtest/Make.defs index 93eed54eb59b3c7b3e2a60057a271a0d847d0c1e..11437e2780666a21883ac4a78d93d8fc82886171 100644 --- a/configs/sim/cxxtest/Make.defs +++ b/configs/sim/cxxtest/Make.defs @@ -50,7 +50,7 @@ ARCHCPUFLAGS = -fno-builtin ifeq ($(CONFIG_UCLIBCXX_EXCEPTION),y) ARCHCPUFLAGSXX = -fno-builtin else - ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions + ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new endif ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef diff --git a/configs/sim/cxxtest/defconfig b/configs/sim/cxxtest/defconfig index aadd8c7966fdcdef0874b2c31681af48402da254..06d8f83aa6226ff8bafda7bbb474dd96a764236e 100644 --- a/configs/sim/cxxtest/defconfig +++ b/configs/sim/cxxtest/defconfig @@ -59,7 +59,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/minibasic/Make.defs b/configs/sim/minibasic/Make.defs new file mode 100644 index 0000000000000000000000000000000000000000..602126df11345e47af8e851f43d78c666f9533d1 --- /dev/null +++ b/configs/sim/minibasic/Make.defs @@ -0,0 +1,128 @@ +############################################################################ +# configs/sim/minibasic/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 + +HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + ARCHOPTIMIZATION = -g +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O2 +endif + +ARCHCPUFLAGS = -fno-builtin +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti +ARCHPICFLAGS = -fpic +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef +ARCHWARNINGSXX = -Wall -Wshadow -Wundef +ARCHDEFINES = +ARCHINCLUDES = -I. -isystem $(TOPDIR)/include +ARCHINCLUDESXX = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx +ARCHSCRIPT = + +ifeq ($(CONFIG_SIM_M32),y) + ARCHCPUFLAGS += -m32 + ARCHCPUFLAGSXX += -m32 +endif + +CROSSDEV = +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 + +CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ + $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CXXFLAGS = $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \ + $(ARCHCPUFLAGSXX) $(ARCHINCLUDESXX) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) +AFLAGS = $(CFLAGS) -D__ASSEMBLY__ + + +# ELF module definitions + +CELFFLAGS = $(CFLAGS) +CXXELFFLAGS = $(CXXFLAGS) + +LDELFFLAGS = -r -e main +ifeq ($(WINTOOL),y) + LDELFFLAGS += -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/gnu-elf.ld}" +else + LDELFFLAGS += -T $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/gnu-elf.ld +endif + + +ASMEXT = .S +OBJEXT = .o +LIBEXT = .a + +ifeq ($(HOSTOS),Cygwin) + EXEEXT = .exe +else + EXEEXT = +endif + +LDLINKFLAGS = $(ARCHSCRIPT) # Link flags used with $(LD) +CCLINKFLAGS = $(ARCHSCRIPT) # Link flags used with $(CC) +LDFLAGS = $(ARCHSCRIPT) # For backward compatibility, same as CCLINKFLAGS + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + LDLINKFLAGS += -g + CCLINKFLAGS += -g + LDFLAGS += -g +endif + +ifeq ($(CONFIG_SIM_M32),y) + LDLINKFLAGS += -melf_i386 + CCLINKFLAGS += -m32 + LDFLAGS += -m32 +endif + + +MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) + +HOSTCC = gcc +HOSTINCLUDES = -I. +HOSTCFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ + $(ARCHCPUFLAGS) $(HOSTINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +HOSTLDFLAGS = diff --git a/configs/sim/minibasic/defconfig b/configs/sim/minibasic/defconfig new file mode 100644 index 0000000000000000000000000000000000000000..0e1519ffc0e8bd48ce7a85d9a9814f9811995f68 --- /dev/null +++ b/configs/sim/minibasic/defconfig @@ -0,0 +1,820 @@ +# +# 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 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_ALERT=y +CONFIG_DEBUG_FEATURES=y + +# +# Debug SYSLOG Output Controls +# +# CONFIG_DEBUG_ERROR is not set +CONFIG_DEBUG_ASSERTIONS=y + +# +# Subsystem Debug Options +# +# CONFIG_DEBUG_BINFMT is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_DEBUG_GRAPHICS is not set +# CONFIG_DEBUG_LIB is not set +# CONFIG_DEBUG_MM is not set +# CONFIG_DEBUG_SCHED is not set + +# +# OS Function Debug Options +# +# CONFIG_DEBUG_IRQ is not set + +# +# Driver Debug Options +# +# CONFIG_DEBUG_GPIO is not set +# CONFIG_ARCH_HAVE_STACKCHECK is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_DEBUG_SYMBOLS=y +# CONFIG_ARCH_HAVE_CUSTOMOPT is not set +CONFIG_DEBUG_NOOPT=y +# CONFIG_DEBUG_FULLOPT is not set + +# +# System Type +# +# CONFIG_ARCH_ARM is not set +# 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_RENESAS is not set +CONFIG_ARCH_SIM=y +# CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_Z16 is not set +# CONFIG_ARCH_Z80 is not set +CONFIG_ARCH="sim" + +# +# Simulation Configuration Options +# +CONFIG_HOST_X86_64=y +# CONFIG_HOST_X86 is not set +# CONFIG_SIM_M32 is not set +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 +# CONFIG_SIM_QSPIFLASH is not set + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_VECNOTIRQ is not set +# CONFIG_ARCH_DMA is not set +# CONFIG_ARCH_HAVE_IRQPRIO is not set +# CONFIG_ARCH_L2CACHE is not set +# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set +# CONFIG_ARCH_HAVE_ADDRENV 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 +# 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 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 is not set + +# +# Board Settings +# +CONFIG_BOARD_LOOPSPERMSEC=0 +# CONFIG_ARCH_CALIBRATION is not set + +# +# Interrupt options +# +# CONFIG_ARCH_HAVE_INTERRUPTSTACK is not set +# CONFIG_ARCH_HAVE_HIPRI_INTERRUPT is not set + +# +# Boot options +# +CONFIG_BOOT_RUNFROMEXTSRAM=y +# CONFIG_BOOT_RUNFROMFLASH is not set +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x0 +CONFIG_RAM_SIZE=0 +# CONFIG_ARCH_HAVE_SDRAM is not set + +# +# Board Selection +# +CONFIG_ARCH_BOARD_SIM=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="sim" + +# +# Common Board Options +# + +# +# Board-Specific Options +# +# CONFIG_BOARD_CRASHDUMP is not set +CONFIG_LIB_BOARDCTL=y +CONFIG_BOARDCTL_POWEROFF=y +# CONFIG_BOARDCTL_UNIQUEID is not set +# CONFIG_BOARDCTL_APP_SYMTAB 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_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set +CONFIG_USEC_PER_TICK=10000 +# CONFIG_SYSTEM_TIME64 is not set +# CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2008 +CONFIG_START_MONTH=6 +CONFIG_START_DAY=1 +CONFIG_MAX_WDOGPARMS=4 +CONFIG_PREALLOC_WDOGS=32 +CONFIG_WDOG_INTRESERVE=4 +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="nsh_main" +CONFIG_RR_INTERVAL=0 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=31 +CONFIG_MAX_TASKS=64 +CONFIG_SCHED_HAVE_PARENT=y +# CONFIG_SCHED_CHILD_STATUS 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=32 +CONFIG_NFILE_STREAMS=16 +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=y +CONFIG_SCHED_ONEXIT_MAX=1 + +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCHLD=4 +CONFIG_SIG_SIGCONDTIMEDOUT=16 + +# +# POSIX Message Queue Options +# +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 +# +CONFIG_IDLETHREAD_STACKSIZE=4096 +CONFIG_USERMAIN_STACKSIZE=4096 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=8192 +# CONFIG_LIB_SYSCALL is not set + +# +# Device Drivers +# +CONFIG_DISABLE_POLL=y +CONFIG_DEV_NULL=y +CONFIG_DEV_ZERO=y +# CONFIG_DEV_URANDOM 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 is not set +# CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# +# CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO 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 +# 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 is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set +# CONFIG_MCU_SERIAL is not set +# CONFIG_STANDARD_SERIAL is not set +# CONFIG_SERIAL_IFLOWCONTROL is not set +# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set +# CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set +# CONFIG_PSEUDOTERM is not set +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE 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 +# CONFIG_SYSLOG_CHARDEV is not set + +# +# Networking Support +# +# CONFIG_ARCH_HAVE_NET is not set +# CONFIG_ARCH_HAVE_PHY is not set +# CONFIG_NET is not set + +# +# Crypto API +# +# CONFIG_CRYPTO is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set +CONFIG_FS_READABLE=y +CONFIG_FS_WRITABLE=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 +CONFIG_FS_PROCFS=y +# CONFIG_FS_PROCFS_REGISTER is not set + +# +# Exclude individual procfs entries +# +# CONFIG_FS_PROCFS_EXCLUDE_PROCESS is not set +# CONFIG_FS_PROCFS_EXCLUDE_UPTIME is not set +# CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set +# CONFIG_FS_UNIONFS is not set +# CONFIG_FS_HOSTFS is not set + +# +# Graphics Support +# +# CONFIG_NX is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=1 +# CONFIG_ARCH_HAVE_HEAP2 is not set +# CONFIG_GRAN is not set + +# +# Audio Support +# +# CONFIG_AUDIO is not set + +# +# Wireless Support +# + +# +# Binary Loader +# +# CONFIG_BINFMT_DISABLE is not set +CONFIG_BINFMT_EXEPATH=y +CONFIG_PATH_INITIAL="/bin" +# 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=y +# CONFIG_NOPRINTF_FIELDWIDTH is not set +CONFIG_LIBC_FLOATINGPOINT=y +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=y +CONFIG_EXECFUNCS_HAVE_SYMTAB=y +CONFIG_EXECFUNCS_SYMTAB="g_symtab" +CONFIG_EXECFUNCS_NSYMBOLS=0 +CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=2048 +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=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 +# CONFIG_LIB_HEX2BIN 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_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=y +CONFIG_EXAMPLES_HELLO_PRIORITY=100 +CONFIG_EXAMPLES_HELLO_STACKSIZE=8192 +# 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_POSIXSPAWN is not set +# CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID 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_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_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=y +CONFIG_FSUTILS_PASSWD_PATH="/etc/passwd" +CONFIG_FSUTILS_PASSWD_READONLY=y +CONFIG_FSUTILS_PASSWD_IOBUFFER_SIZE=512 +CONFIG_FSUTILS_PASSWD_KEY1=0x12345678 +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 +# +# 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_MINIBASIC=y +CONFIG_INTERPRETER_MINIBASIC_PRIORITY=100 +CONFIG_INTERPRETER_MINIBASIC_STACKSIZE=4096 +CONFIG_INTERPRETER_MINIBASIC_IOBUFSIZE=1024 +CONFIG_INTERPRETER_MINIBASIC_TESTSCRIPT=y +# 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 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 +CONFIG_NSH_FILE_APPS=y + +# +# Disable Individual commands +# +# CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_BASENAME is not set +# CONFIG_NSH_DISABLE_CAT is not set +# CONFIG_NSH_DISABLE_CD is not set +# CONFIG_NSH_DISABLE_CP is not set +# CONFIG_NSH_DISABLE_CMP is not set +# CONFIG_NSH_DISABLE_DATE is not set +# CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_DF is not set +# CONFIG_NSH_DISABLE_DELROUTE is not set +# CONFIG_NSH_DISABLE_DIRNAME is not set +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +# CONFIG_NSH_DISABLE_IFCONFIG is not set +# CONFIG_NSH_DISABLE_IFUPDOWN is not set +# CONFIG_NSH_DISABLE_KILL is not set +# CONFIG_NSH_DISABLE_LOSETUP is not set +CONFIG_NSH_DISABLE_LOSMART=y +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKFATFS 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_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 +# 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_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 +# CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 + +# +# Configure Command Options +# +# CONFIG_NSH_CMDOPT_DF_H is not set +CONFIG_NSH_CODECS_BUFSIZE=128 +# CONFIG_NSH_CMDOPT_HEXDUMP is not set +CONFIG_NSH_PROC_MOUNTPOINT="/proc" +CONFIG_NSH_FILEIOSIZE=1024 + +# +# Scripting Support +# +# CONFIG_NSH_DISABLESCRIPT is not set +# CONFIG_NSH_DISABLE_ITEF is not set +# CONFIG_NSH_DISABLE_LOOPS is not set +CONFIG_NSH_ROMFSETC=y +# CONFIG_NSH_ROMFSRC is not set +CONFIG_NSH_ROMFSMOUNTPT="/etc" +CONFIG_NSH_INITSCRIPT="init.d/rcS" +CONFIG_NSH_ROMFSDEVNO=1 +CONFIG_NSH_ROMFSSECTSIZE=64 +# CONFIG_NSH_DEFAULTROMFS is not set +CONFIG_NSH_ARCHROMFS=y +# CONFIG_NSH_CUSTOMROMFS is not set +CONFIG_NSH_FATDEVNO=2 +CONFIG_NSH_FATSECTSIZE=512 +CONFIG_NSH_FATNSECTORS=1024 +CONFIG_NSH_FATMOUNTPT="/tmp" + +# +# 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 is not set +# CONFIG_SYSTEM_SUDOKU 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/minibasic/setenv.sh b/configs/sim/minibasic/setenv.sh new file mode 100644 index 0000000000000000000000000000000000000000..bc88903e6385460a9c157be5d26c84073385f1ca --- /dev/null +++ b/configs/sim/minibasic/setenv.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# sim/minibasic/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 [ "$(basename $0)" = "setenv.sh" ] ; then + echo "You must source this script, not run it!" 1>&2 + exit 1 +fi + +if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi + +#export NUTTX_BIN= +#export PATH=${NUTTX_BIN}:/sbin:/usr/sbin:${PATH_ORIG} + +echo "PATH : ${PATH}" diff --git a/configs/sim/mount/Make.defs b/configs/sim/mount/Make.defs index 59561182693e3776535d7f9c8a96f521a1297517..9c2a28013318459c31c2e11d694f0e5315af04a1 100644 --- a/configs/sim/mount/Make.defs +++ b/configs/sim/mount/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/mount/defconfig b/configs/sim/mount/defconfig index 0b32395be589e7e40773cf153aee1526fca49343..a205f783f5653c15adee9d50d232bb31130ca1eb 100644 --- a/configs/sim/mount/defconfig +++ b/configs/sim/mount/defconfig @@ -59,7 +59,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/mtdpart/Make.defs b/configs/sim/mtdpart/Make.defs index c5dd5f30d3802dcf6f0eac8607c20feda206116e..ab88231abdeffd23488cfdbd1f695f0877eac251 100644 --- a/configs/sim/mtdpart/Make.defs +++ b/configs/sim/mtdpart/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/mtdpart/defconfig b/configs/sim/mtdpart/defconfig index c18f3d9a5489490b1a9b08ce8a8ec42d9c2c5da8..04568d5ca1af7fa212aa6cd640da8aa3261f3f95 100644 --- a/configs/sim/mtdpart/defconfig +++ b/configs/sim/mtdpart/defconfig @@ -59,7 +59,7 @@ CONFIG_DEBUG_NOOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/mtdrwb/Make.defs b/configs/sim/mtdrwb/Make.defs index f06e62656c0bb153fcf80539f71955d7509b8be3..e3830bd4aa8b3aec5c5b73a3a74b9b0fe23d6db4 100644 --- a/configs/sim/mtdrwb/Make.defs +++ b/configs/sim/mtdrwb/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/mtdrwb/defconfig b/configs/sim/mtdrwb/defconfig index e6eed37e746f3fb7cccf1e94ebf376cbfd61d506..c14345962ef7849025214e9d0d9a802e18af894e 100644 --- a/configs/sim/mtdrwb/defconfig +++ b/configs/sim/mtdrwb/defconfig @@ -59,7 +59,7 @@ CONFIG_DEBUG_NOOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/nettest/Make.defs b/configs/sim/nettest/Make.defs index 8632791cacfc9bb8e9644f50340bdfc5b0f69751..2dfff9a0998bc0efa993f55dcaa08e99062e4e31 100644 --- a/configs/sim/nettest/Make.defs +++ b/configs/sim/nettest/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/nettest/defconfig b/configs/sim/nettest/defconfig index f16f365741d701d6c5f6c321c7f9bc72404dd548..4494a8a0466495155bd764f14d5b0a6f07dee622 100644 --- a/configs/sim/nettest/defconfig +++ b/configs/sim/nettest/defconfig @@ -58,7 +58,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/nsh/Make.defs b/configs/sim/nsh/Make.defs index 78ac4ec40167d3c02fee9d44073d2c4e8a2aed9f..1103d89dcd4d5205eb0f930c76b0c365d80e557c 100644 --- a/configs/sim/nsh/Make.defs +++ b/configs/sim/nsh/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/nsh/defconfig b/configs/sim/nsh/defconfig index 1cd2e2842ca34bcb641b71a70aae51ad7a013e18..5cfed7a9695f92d79eef268e19754609eca62c81 100644 --- a/configs/sim/nsh/defconfig +++ b/configs/sim/nsh/defconfig @@ -58,7 +58,7 @@ CONFIG_DEBUG_NOOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/nsh2/Make.defs b/configs/sim/nsh2/Make.defs index 9f3da86f0b817afc0a2cf1157ce0071f3e439bfb..aef35af6c3e83db0d9d1e009cfa53e3537294af0 100644 --- a/configs/sim/nsh2/Make.defs +++ b/configs/sim/nsh2/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/nsh2/defconfig b/configs/sim/nsh2/defconfig index baefa6fdcecdaf4b0d49cf7167968e531d6dc874..c4f2dd0060dd40d5dea980083fba3a56badc26b6 100644 --- a/configs/sim/nsh2/defconfig +++ b/configs/sim/nsh2/defconfig @@ -57,7 +57,7 @@ CONFIG_DEBUG_NOOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/nx/Make.defs b/configs/sim/nx/Make.defs index bb509e3b1534a649bd9741fc8e008708a045845a..31ebb6364dd9b1813a6588b90c104273df1b06a3 100644 --- a/configs/sim/nx/Make.defs +++ b/configs/sim/nx/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/nx/defconfig b/configs/sim/nx/defconfig index 864c8f4a363809db9b7786f9473adb79be5cc687..24a778de8c405ef141cb53a9edbdfaba5588fa05 100644 --- a/configs/sim/nx/defconfig +++ b/configs/sim/nx/defconfig @@ -59,7 +59,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/nx11/Make.defs b/configs/sim/nx11/Make.defs index dc93fc14ced51645a53c8dae8d99aaf60e05c40a..2d65818eecd3b1ef968ebe01b8913ba51523369f 100644 --- a/configs/sim/nx11/Make.defs +++ b/configs/sim/nx11/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/nx11/defconfig b/configs/sim/nx11/defconfig index dc84431de87710cfefa791721fd48e850fe3ebeb..92ffa0a4ac6168d7d1c6deb327656e752034ea63 100644 --- a/configs/sim/nx11/defconfig +++ b/configs/sim/nx11/defconfig @@ -59,7 +59,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/nxffs/Make.defs b/configs/sim/nxffs/Make.defs index 6ce3fda3651ebc3b56a478f75fd63ac0417ec0a9..1e7f8782d338c319d12c71064429c45e0914c2d0 100644 --- a/configs/sim/nxffs/Make.defs +++ b/configs/sim/nxffs/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/nxffs/defconfig b/configs/sim/nxffs/defconfig index 49f9a76e56448eaf6a4affaa835c02f7f6eb5612..97f2b992ae4b00d1cd915d2eb2f1eb6ee24cb906 100644 --- a/configs/sim/nxffs/defconfig +++ b/configs/sim/nxffs/defconfig @@ -57,7 +57,7 @@ CONFIG_DEBUG_NOOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/nxlines/Make.defs b/configs/sim/nxlines/Make.defs index f164762ec520233e310ba5866a7fe48508d6773b..4e9f1ce01369f52200d3095e9e091fc38667a472 100644 --- a/configs/sim/nxlines/Make.defs +++ b/configs/sim/nxlines/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/nxlines/defconfig b/configs/sim/nxlines/defconfig index 4bb0377e58612d2fc6b9b4a268ecd023a6943959..70431cb06d51795b55ee9f5dcdd11dc841303bc7 100644 --- a/configs/sim/nxlines/defconfig +++ b/configs/sim/nxlines/defconfig @@ -61,7 +61,7 @@ CONFIG_DEBUG_NOOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/nxwm/Make.defs b/configs/sim/nxwm/Make.defs index 7aa008b27f0eeb55ccec0d4b8e88169d8a84a965..dd7ea36daef38f11d81e4d5b4e69dd0970ab5c59 100644 --- a/configs/sim/nxwm/Make.defs +++ b/configs/sim/nxwm/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/nxwm/defconfig b/configs/sim/nxwm/defconfig index 9413d2dbe6bf03e7b4f905e1ef51767eec1e5a5b..68ad7121475fc7e3cf5bfda513b60f8688c565b9 100644 --- a/configs/sim/nxwm/defconfig +++ b/configs/sim/nxwm/defconfig @@ -57,7 +57,7 @@ CONFIG_DEBUG_NOOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/ostest/Make.defs b/configs/sim/ostest/Make.defs index a49679c244aea85eb505049394ffcd54f57b8bd7..34004f0f494faf0d819a5b5c08c08b4db5987067 100644 --- a/configs/sim/ostest/Make.defs +++ b/configs/sim/ostest/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/ostest/defconfig b/configs/sim/ostest/defconfig index 5bae44782f05601e79e9a339bd0b7af30dbd1f69..e48035058dc87d033ca4692f1f415366177c2f9b 100644 --- a/configs/sim/ostest/defconfig +++ b/configs/sim/ostest/defconfig @@ -59,7 +59,7 @@ CONFIG_DEBUG_NOOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/pashello/Make.defs b/configs/sim/pashello/Make.defs index b1ef6cd990bdb3e8926435a4b6870aeb997ecc9c..ed195c6cc3932b5092174d356a6ec888ee90270e 100644 --- a/configs/sim/pashello/Make.defs +++ b/configs/sim/pashello/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/pashello/defconfig b/configs/sim/pashello/defconfig index 0b9ea16bb07cbe6136789b627af9a714bcb5fc8f..8ffba0da3511b6121e75543e76020dc92765cc4e 100644 --- a/configs/sim/pashello/defconfig +++ b/configs/sim/pashello/defconfig @@ -57,7 +57,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/src/Makefile b/configs/sim/src/Makefile index 1ab3f04975fc243fc565a5408ed5c183d309cdfd..16ceb489e9b0ae391dc790af37689ee74c7bdf52 100644 --- a/configs/sim/src/Makefile +++ b/configs/sim/src/Makefile @@ -64,4 +64,12 @@ ifeq ($(CONFIG_SIM_TOUCHSCREEN),y) endif endif +ifeq ($(CONFIG_EXAMPLES_GPIO),y) +ifeq ($(CONFIG_GPIO_LOWER_HALF),y) + CSRCS += sim_ioexpander.c +else + CSRCS += sim_gpio.c +endif +endif + include $(TOPDIR)/configs/Board.mk diff --git a/configs/sim/src/sim.h b/configs/sim/src/sim.h index 97d34040d55fbdee038479a295f2a513c1dc1945..f851b339ccaff306d8c6a47194a2ff9de0e50941 100644 --- a/configs/sim/src/sim.h +++ b/configs/sim/src/sim.h @@ -1,7 +1,7 @@ /**************************************************************************** * config/sim/src/sim.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 @@ -111,4 +111,16 @@ int sim_bringup(void); int sim_zoneinfo(int minor); #endif +/**************************************************************************** + * Name: sim_gpio_initialize + * + * Description: + * Initialize GPIO drivers for use with /apps/examples/gpio + * + ****************************************************************************/ + +#ifdef CONFIG_EXAMPLES_GPIO +int sim_gpio_initialize(void); +#endif + #endif /* __CONFIGS_SIM_SRC_SIM_H */ \ No newline at end of file diff --git a/configs/sim/src/sim_bringup.c b/configs/sim/src/sim_bringup.c index 86790206dd3a2b94b4b2e4b3a9e8fc15afe0db09..8f0d85c078e0f165a760eeacbf71d1512af26f9c 100644 --- a/configs/sim/src/sim_bringup.c +++ b/configs/sim/src/sim_bringup.c @@ -45,6 +45,8 @@ #include #include +#include +#include #include "up_internal.h" #include "sim.h" @@ -67,7 +69,10 @@ int trv_mount_world(int minor, FAR const char *mountpoint); int sim_bringup(void) { -#ifdef CONFIG_FS_PROCFS +#ifdef CONFIG_ONESHOT + FAR struct oneshot_lowerhalf_s *oneshot; +#endif +#if defined(CONFIG_FS_PROCFS) || defined(CONFIG_ONESHOT) int ret; #endif @@ -77,6 +82,40 @@ int sim_bringup(void) (void)sim_zoneinfo(3); #endif +#ifdef CONFIG_EXAMPLES_GPIO + /* Initialize simulated GPIO drivers */ + + (void)sim_gpio_initialize(); +#endif + +#ifdef CONFIG_ONESHOT + /* Get an instance of the simulated oneshot timer */ + + oneshot = oneshot_initialize(0, 0); + if (oneshot == NULL) + { + _err("ERROR: oneshot_initialize faile\n"); + } + else + { +#ifdef CONFIG_CPULOAD_ONESHOT + /* Configure the oneshot timer to support CPU load measurement */ + + sched_oneshot_extclk(oneshot); + +#else + /* Initialize the simulated oneshot driver */ + + ret = oneshot_register("/dev/oneshot", oneshot); + if (ret < 0) + { + _err("ERROR: Failed to register oneshot at /dev/oneshot: %d\n", + ret); + } +#endif + } +#endif + #ifdef CONFIG_AJOYSTICK /* Initialize the simulated analog joystick input device */ diff --git a/configs/sim/src/sim_gpio.c b/configs/sim/src/sim_gpio.c new file mode 100644 index 0000000000000000000000000000000000000000..bd9c499457537f9f33cf959ae3eca44248fe37cf --- /dev/null +++ b/configs/sim/src/sim_gpio.c @@ -0,0 +1,234 @@ +/**************************************************************************** + * configs/sim/src/sim_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 + +#include "sim.h" + +#if defined(CONFIG_EXAMPLES_GPIO) && !defined(CONFIG_GPIO_LOWER_HALF) + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +struct simgpio_dev_s +{ + struct gpio_dev_s gpio; + bool value; +}; + +struct simgpint_dev_s +{ + struct simgpio_dev_s simgpio; + WDOG_ID wdog; + pin_interrupt_t callback; +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static int gpin_read(FAR struct gpio_dev_s *dev, FAR bool *value); +static int gpout_write(FAR struct gpio_dev_s *dev, bool value); +static int gpint_attach(FAR struct gpio_dev_s *dev, + pin_interrupt_t callback); +static int gpint_enable(FAR struct gpio_dev_s *dev, bool enable); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const struct gpio_operations_s gpin_ops = +{ + .go_read = gpin_read, + .go_write = NULL, + .go_attach = NULL, + .go_enable = NULL, +}; + +static const struct gpio_operations_s gpout_ops = +{ + .go_read = gpin_read, + .go_write = gpout_write, + .go_attach = NULL, + .go_enable = NULL, +}; + +static const struct gpio_operations_s gpint_ops = +{ + .go_read = gpin_read, + .go_write = NULL, + .go_attach = gpint_attach, + .go_enable = gpint_enable, +}; + +static struct simgpio_dev_s g_gpin = +{ + .gpio = + { + .gp_pintype = GPIO_INPUT_PIN, + .gp_ops = &gpin_ops, + }, +}; + +static struct simgpio_dev_s g_gpout = +{ + .gpio = + { + .gp_pintype = GPIO_OUTPUT_PIN, + .gp_ops = &gpout_ops, + }, +}; + +static struct simgpint_dev_s g_gpint = +{ + .simgpio = + { + .gpio = + { + .gp_pintype = GPIO_INTERRUPT_PIN, + .gp_ops = &gpint_ops, + }, + }, +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +static int sim_interrupt(int argc, wdparm_t arg1, ...) +{ + FAR struct simgpint_dev_s *simgpint = (FAR struct simgpint_dev_s *)arg1; + + DEBUGASSERT(simgpint != NULL && simgpint->callback != NULL); + gpioinfo("Interrupt! callback=%p\n", simgpint->callback); + + simgpint->callback(&simgpint->simgpio.gpio); + return OK; +} + +static int gpin_read(FAR struct gpio_dev_s *dev, FAR bool *value) +{ + FAR struct simgpio_dev_s *simgpio = (FAR struct simgpio_dev_s *)dev; + + DEBUGASSERT(simgpio != NULL && value != NULL); + gpioinfo("Reading %d (next=%d)\n", (int)simgpio->value, (int)!simgpio->value); + + *value = simgpio->value; + simgpio->value = !simgpio->value; + return OK; +} + +static int gpout_write(FAR struct gpio_dev_s *dev, bool value) +{ + FAR struct simgpio_dev_s *simgpio = (FAR struct simgpio_dev_s *)dev; + + DEBUGASSERT(simgpio != NULL); + gpioinfo("Writing %d\n", (int)value); + + simgpio->value = value; + return OK; +} + +static int gpint_attach(FAR struct gpio_dev_s *dev, + pin_interrupt_t callback) +{ + FAR struct simgpint_dev_s *simgpint = (FAR struct simgpint_dev_s *)dev; + + gpioinfo("Cancel 1 second timer\n"); + wd_cancel(simgpint->wdog); + + gpioinfo("Attach %p\n", callback); + simgpint->callback = callback; + return OK; +} + +static int gpint_enable(FAR struct gpio_dev_s *dev, bool enable) +{ + FAR struct simgpint_dev_s *simgpint = (FAR struct simgpint_dev_s *)dev; + + if (enable) + { + if (simgpint->callback != NULL) + { + gpioinfo("Start 1 second timer\n"); + (void)wd_start(simgpint->wdog, SEC2TICK(1), + (wdentry_t)sim_interrupt, 1, (wdparm_t)dev); + } + } + else + { + gpioinfo("Cancel 1 second timer\n"); + (void)wd_cancel(simgpint->wdog); + } + + return OK; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: sim_gpio_initialize + * + * Description: + * Initialize GPIO drivers for use with /apps/examples/gpio + * + ****************************************************************************/ + +int sim_gpio_initialize(void) +{ + g_gpint.wdog = wd_create(); + DEBUGASSERT(g_gpint.wdog != NULL); + + (void)gpio_pin_register(&g_gpin.gpio, 0); + (void)gpio_pin_register(&g_gpout.gpio, 1); + (void)gpio_pin_register(&g_gpint.simgpio.gpio, 2); + return 0; +} +#endif /* CONFIG_EXAMPLES_GPIO && !CONFIG_GPIO_LOWER_HALF */ diff --git a/configs/sim/src/sim_ioexpander.c b/configs/sim/src/sim_ioexpander.c new file mode 100644 index 0000000000000000000000000000000000000000..c369c69af3c9a00f6b4490666e99d698d60ca62a --- /dev/null +++ b/configs/sim/src/sim_ioexpander.c @@ -0,0 +1,116 @@ +/**************************************************************************** + * configs/sim/src/sim_ioexpander.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 "up_internal.h" +#include "sim.h" + +#if defined(CONFIG_EXAMPLES_GPIO) && defined(CONFIG_GPIO_LOWER_HALF) + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: sim_gpio_initialize + * + * Description: + * Initialize simulated GPIO expander for use with /apps/examples/gpio + * + ****************************************************************************/ + +int sim_gpio_initialize(void) +{ + /* Get an instance of the simulated I/O expander */ + + FAR struct ioexpander_dev_s *ioe = sim_ioexpander_initialize(); + if (ioe == NULL) + { + gpioerr("ERROR: sim_ioexpander_initialize failed\n"); + return -ENOMEM; + } + + /* Register four pin drivers */ + + /* Pin 0: an non-inverted, input pin */ + + (void)IOEXP_SETDIRECTION(ioe, 0, IOEXPANDER_DIRECTION_IN); + (void)IOEXP_SETOPTION(ioe, 0, IOEXPANDER_OPTION_INVERT, + (FAR void *)IOEXPANDER_VAL_NORMAL); + (void)IOEXP_SETOPTION(ioe, 0, IOEXPANDER_OPTION_INTCFG, + (FAR void *)IOEXPANDER_VAL_DISABLE); + (void)gpio_lower_half(ioe, 0, GPIO_INPUT_PIN, 0); + + /* Pin 1: an non-inverted, output pin */ + + (void)IOEXP_SETDIRECTION(ioe, 1, IOEXPANDER_DIRECTION_OUT); + (void)IOEXP_SETOPTION(ioe, 1, IOEXPANDER_OPTION_INVERT, + (FAR void *)IOEXPANDER_VAL_NORMAL); + (void)IOEXP_SETOPTION(ioe, 2, IOEXPANDER_OPTION_INTCFG, + (FAR void *)IOEXPANDER_VAL_DISABLE); + (void)gpio_lower_half(ioe, 1, GPIO_OUTPUT_PIN, 1); + + /* Pin 2: an non-inverted, edge interrupting pin */ + + (void)IOEXP_SETDIRECTION(ioe, 2, IOEXPANDER_DIRECTION_IN); + (void)IOEXP_SETOPTION(ioe, 2, IOEXPANDER_OPTION_INVERT, + (FAR void *)IOEXPANDER_VAL_NORMAL); + (void)IOEXP_SETOPTION(ioe, 2, IOEXPANDER_OPTION_INTCFG, + (FAR void *)IOEXPANDER_VAL_BOTH); + (void)gpio_lower_half(ioe, 2, GPIO_INTERRUPT_PIN, 2); + + /* Pin 3: a non-inverted, level interrupting pin */ + + (void)IOEXP_SETDIRECTION(ioe, 3, IOEXPANDER_DIRECTION_IN); + (void)IOEXP_SETOPTION(ioe, 3, IOEXPANDER_OPTION_INVERT, + (FAR void *)IOEXPANDER_VAL_NORMAL); + (void)IOEXP_SETOPTION(ioe, 3, IOEXPANDER_OPTION_INTCFG, + (FAR void *)IOEXPANDER_VAL_HIGH); + (void)gpio_lower_half(ioe, 3, GPIO_INTERRUPT_PIN, 3); + + return 0; +} +#endif /* CONFIG_EXAMPLES_GPIO && CONFIG_GPIO_LOWER_HALF */ diff --git a/configs/sim/touchscreen/Make.defs b/configs/sim/touchscreen/Make.defs index dcbfb0137710614a8fb8df13a0c07b0f7e9358c1..baac532bfd8bc560eb68f88efeff257ee3090921 100644 --- a/configs/sim/touchscreen/Make.defs +++ b/configs/sim/touchscreen/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/touchscreen/defconfig b/configs/sim/touchscreen/defconfig index bba44976d69eac236d244a579c792b9fa71c103b..5795b1c649a29288ac24611406f4bbb228ebad48 100644 --- a/configs/sim/touchscreen/defconfig +++ b/configs/sim/touchscreen/defconfig @@ -59,7 +59,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/traveler/Make.defs b/configs/sim/traveler/Make.defs index df548aee9e7303bed69b51f12b29a28653bed95a..c07870fc694c44ac34da36353d8006096966169f 100644 --- a/configs/sim/traveler/Make.defs +++ b/configs/sim/traveler/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/traveler/defconfig b/configs/sim/traveler/defconfig index 8e930e22fe4cc54c7534c096d6ec96cf60a8d02b..7ed85fbdbcde5f21c0366604ef521da44301cc94 100644 --- a/configs/sim/traveler/defconfig +++ b/configs/sim/traveler/defconfig @@ -59,7 +59,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/udgram/Make.defs b/configs/sim/udgram/Make.defs index d538b9b3efae9c2f2439ade1c19e19cf30e1bb36..ccb4f92567d82a162fe4d96a18420d8bafc1cd6a 100644 --- a/configs/sim/udgram/Make.defs +++ b/configs/sim/udgram/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/udgram/defconfig b/configs/sim/udgram/defconfig index 51558d5c523782436d98d44bccdfca01b74561bb..96d342f272ac5f7b231035b849190cf550119c9b 100644 --- a/configs/sim/udgram/defconfig +++ b/configs/sim/udgram/defconfig @@ -59,7 +59,7 @@ CONFIG_DEBUG_NOOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/unionfs/Make.defs b/configs/sim/unionfs/Make.defs index 42334c65cf4f3a664dbf9c9efef5659cc8269dec..43838bb367907d719e1d4220e3ee48e0a5c727a6 100644 --- a/configs/sim/unionfs/Make.defs +++ b/configs/sim/unionfs/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/unionfs/defconfig b/configs/sim/unionfs/defconfig index 077ef2661c4ca67dd65e185b7f1101621057efeb..1ccf413c9549ae38c1370d5bec4c33c8d26cc1ce 100644 --- a/configs/sim/unionfs/defconfig +++ b/configs/sim/unionfs/defconfig @@ -57,7 +57,7 @@ CONFIG_DEBUG_NOOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sim/ustream/Make.defs b/configs/sim/ustream/Make.defs index cf9073789484ccdbc61d4ada564f84dccc730324..679e4c0ae80147ce47c2c0f017e3df5952834c42 100644 --- a/configs/sim/ustream/Make.defs +++ b/configs/sim/ustream/Make.defs @@ -47,7 +47,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti +ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/sim/ustream/defconfig b/configs/sim/ustream/defconfig index 1e339f236e2c3b09143197202c0bd0a697d87dfd..8c9a92db5f576dd6c0b80c7c0e92313f769c6d58 100644 --- a/configs/sim/ustream/defconfig +++ b/configs/sim/ustream/defconfig @@ -59,7 +59,7 @@ CONFIG_DEBUG_NOOPT=y # 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_RENESAS is not set CONFIG_ARCH_SIM=y # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/skp16c26/ostest/defconfig b/configs/skp16c26/ostest/defconfig index cf950449245c53e296d9e2999ad63d2ef5004758..0efb93d2a2c343c8346f1c85666e5bdd647ed727 100644 --- a/configs/skp16c26/ostest/defconfig +++ b/configs/skp16c26/ostest/defconfig @@ -54,12 +54,12 @@ CONFIG_DEBUG_FULLOPT=y # CONFIG_ARCH_HC is not set # CONFIG_ARCH_MIPS is not set # CONFIG_ARCH_RGMP is not set -CONFIG_ARCH_SH=y +CONFIG_ARCH_RENESAS=y # 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="sh" +CONFIG_ARCH="renesas" CONFIG_ARCH_CHIP="m16c" # CONFIG_ARCH_CHIP_SH7032 is not set CONFIG_ARCH_CHIP_M30262F8=y diff --git a/configs/spark/composite/Make.defs b/configs/spark/composite/Make.defs index 5fd6bfd19e823835fa05dd7c46d8c50666f1c3f9..b1d7614f8bb73fa3f91f6a578461dea3427c7d65 100644 --- a/configs/spark/composite/Make.defs +++ b/configs/spark/composite/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/spark/composite/defconfig b/configs/spark/composite/defconfig index ebae43436a4c74041678bfcc494d1387a94f554f..96c044fab9156d19084c665a2e6d343cbc23ce53 100644 --- a/configs/spark/composite/defconfig +++ b/configs/spark/composite/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -414,6 +414,8 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -542,7 +544,6 @@ CONFIG_ARCH_HAVE_BUTTONS=y CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_HAVE_IRQBUTTONS=y CONFIG_ARCH_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options @@ -551,6 +552,7 @@ CONFIG_SPARK_FLASH=y CONFIG_SPARK_FLASH_SPI=2 CONFIG_SPARK_FLASH_MINOR=0 # CONFIG_SPARK_FLASH_PART is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -569,9 +571,12 @@ CONFIG_BOARDCTL_USBDEVCTRL=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=11 @@ -665,6 +670,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=340 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -684,11 +690,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -704,7 +713,12 @@ CONFIG_ANALOG=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -813,6 +827,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -887,6 +902,8 @@ CONFIG_USBMSC_VERSIONNO=0x399 CONFIG_USBMSC_SCSI_PRIO=128 CONFIG_USBMSC_SCSI_STACKSIZE=340 # CONFIG_USBHOST is not set +CONFIG_HAVE_USBTRACE=y +# CONFIG_USBMONITOR is not set CONFIG_DRIVERS_WIRELESS=y # CONFIG_WL_CC1101 is not set CONFIG_WL_CC3000=y @@ -900,6 +917,7 @@ CONFIG_CC3000_SELECT_STACKSIZE=390 CONFIG_CC3000_UNSOLICED_STACKSIZE=264 # CONFIG_CC3000_PROBES is not set # CONFIG_WL_NRF24L01 is not set +# CONFIG_WL_MFRC522 is not set # CONFIG_WL_PN532 is not set # @@ -914,6 +932,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1041,6 +1060,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1070,7 +1090,6 @@ CONFIG_EXAMPLES_CC3000BASIC=y # CONFIG_EXAMPLES_CC3000_STACK_CHECK 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 @@ -1098,9 +1117,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1210,7 +1229,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1232,6 +1250,7 @@ CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1294,7 +1313,7 @@ CONFIG_SYSTEM_COMPOSITE_BUFSIZE=256 # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FLASH_ERASEALL is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 @@ -1305,7 +1324,6 @@ CONFIG_READLINE_ECHO=y # CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_UBLOXMODEM is not set -# CONFIG_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/nsh/Make.defs b/configs/spark/nsh/Make.defs index ba4d14904b043eb37c045c0aa8e5af57378c6a9e..9600e7d11a97690bc6a5bc0d948d82600727791b 100644 --- a/configs/spark/nsh/Make.defs +++ b/configs/spark/nsh/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/spark/nsh/defconfig b/configs/spark/nsh/defconfig index d9a47e30fe4706e7b6a14eb2c667bd619d68c948..93ace169f0c0df19e821fbfffe5034b73543627a 100644 --- a/configs/spark/nsh/defconfig +++ b/configs/spark/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -414,6 +414,8 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -542,7 +544,6 @@ CONFIG_ARCH_HAVE_BUTTONS=y CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_HAVE_IRQBUTTONS=y CONFIG_ARCH_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options @@ -551,6 +552,7 @@ CONFIG_SPARK_FLASH=y CONFIG_SPARK_FLASH_SPI=2 CONFIG_SPARK_FLASH_MINOR=0 # CONFIG_SPARK_FLASH_PART is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -569,9 +571,12 @@ CONFIG_LIB_BOARDCTL=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=11 @@ -665,6 +670,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=464 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -684,11 +690,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -704,7 +713,12 @@ CONFIG_ANALOG=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -813,6 +827,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -887,6 +902,8 @@ CONFIG_USBMSC_VERSIONNO=0x399 CONFIG_USBMSC_SCSI_PRIO=128 CONFIG_USBMSC_SCSI_STACKSIZE=464 # CONFIG_USBHOST is not set +CONFIG_HAVE_USBTRACE=y +# CONFIG_USBMONITOR is not set CONFIG_DRIVERS_WIRELESS=y # CONFIG_WL_CC1101 is not set CONFIG_WL_CC3000=y @@ -900,6 +917,7 @@ CONFIG_CC3000_SELECT_STACKSIZE=368 CONFIG_CC3000_UNSOLICED_STACKSIZE=264 # CONFIG_CC3000_PROBES is not set # CONFIG_WL_NRF24L01 is not set +# CONFIG_WL_MFRC522 is not set # CONFIG_WL_PN532 is not set # @@ -914,6 +932,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1041,6 +1060,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1070,7 +1090,6 @@ CONFIG_EXAMPLES_CC3000BASIC=y # CONFIG_EXAMPLES_CC3000_STACK_CHECK 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 @@ -1098,9 +1117,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1210,7 +1229,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1232,6 +1250,7 @@ CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1280,7 +1299,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FLASH_ERASEALL is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 @@ -1291,7 +1310,6 @@ CONFIG_READLINE_ECHO=y # CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_UBLOXMODEM is not set -# CONFIG_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/usbmsc/Make.defs b/configs/spark/usbmsc/Make.defs index 423f70ada7139885d506489b338f42859da997e0..64e116c29f3986949c8f58c46c8f34dc46d00856 100644 --- a/configs/spark/usbmsc/Make.defs +++ b/configs/spark/usbmsc/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/spark/usbmsc/defconfig b/configs/spark/usbmsc/defconfig index 4f991586f5e65267ca4cf06cd4e160703e8f5b8b..0ab4fcd241b96f0e336c47035a290ff372d139eb 100644 --- a/configs/spark/usbmsc/defconfig +++ b/configs/spark/usbmsc/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -414,6 +414,8 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -542,7 +544,6 @@ CONFIG_ARCH_HAVE_BUTTONS=y CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_HAVE_IRQBUTTONS=y CONFIG_ARCH_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options @@ -551,6 +552,7 @@ CONFIG_SPARK_FLASH=y CONFIG_SPARK_FLASH_SPI=2 CONFIG_SPARK_FLASH_MINOR=0 # CONFIG_SPARK_FLASH_PART is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -569,9 +571,12 @@ CONFIG_BOARDCTL_USBDEVCTRL=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=11 @@ -665,6 +670,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=340 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -684,11 +690,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -704,7 +713,12 @@ CONFIG_ANALOG=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -813,6 +827,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -852,6 +867,8 @@ CONFIG_USBMSC_VERSIONNO=0x399 CONFIG_USBMSC_SCSI_PRIO=128 CONFIG_USBMSC_SCSI_STACKSIZE=340 # CONFIG_USBHOST is not set +CONFIG_HAVE_USBTRACE=y +# CONFIG_USBMONITOR is not set CONFIG_DRIVERS_WIRELESS=y # CONFIG_WL_CC1101 is not set CONFIG_WL_CC3000=y @@ -865,6 +882,7 @@ CONFIG_CC3000_SELECT_STACKSIZE=390 CONFIG_CC3000_UNSOLICED_STACKSIZE=264 # CONFIG_CC3000_PROBES is not set # CONFIG_WL_NRF24L01 is not set +# CONFIG_WL_MFRC522 is not set # CONFIG_WL_PN532 is not set # @@ -879,6 +897,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1006,6 +1025,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1035,7 +1055,6 @@ CONFIG_EXAMPLES_CC3000BASIC=y # CONFIG_EXAMPLES_CC3000_STACK_CHECK 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 @@ -1063,9 +1082,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1175,7 +1194,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1197,6 +1215,7 @@ CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1242,7 +1261,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FLASH_ERASEALL is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 @@ -1253,7 +1272,6 @@ CONFIG_READLINE_ECHO=y # CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_UBLOXMODEM is not set -# CONFIG_USBMONITOR is not set CONFIG_SYSTEM_USBMSC=y CONFIG_SYSTEM_USBMSC_NLUNS=1 CONFIG_SYSTEM_USBMSC_DEVMINOR1=0 diff --git a/configs/spark/usbnsh/Make.defs b/configs/spark/usbnsh/Make.defs index 8820947ef8f3f037a12cccad2b637aef02e0eb92..a52241bf0c36b270c0358f6a4a7662413bbcbb13 100644 --- a/configs/spark/usbnsh/Make.defs +++ b/configs/spark/usbnsh/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/spark/usbnsh/defconfig b/configs/spark/usbnsh/defconfig index 5a07b8ca541384b7bc752658497c2c3b47522bca..328bf6670dff31527f75c52a386a2710749ca93d 100644 --- a/configs/spark/usbnsh/defconfig +++ b/configs/spark/usbnsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -414,6 +414,8 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -541,7 +543,6 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options @@ -550,6 +551,7 @@ CONFIG_SPARK_FLASH=y CONFIG_SPARK_FLASH_SPI=2 CONFIG_SPARK_FLASH_MINOR=0 # CONFIG_SPARK_FLASH_PART is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -568,9 +570,12 @@ CONFIG_BOARDCTL_USBDEVCTRL=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=10 @@ -668,6 +673,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=1024 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -687,11 +693,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -705,7 +714,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -813,6 +827,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -857,6 +872,8 @@ CONFIG_CDCACM_VENDORSTR="NuttX" CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +CONFIG_HAVE_USBTRACE=y +# CONFIG_USBMONITOR is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -870,6 +887,7 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_SYSLOG_CHAR is not set CONFIG_SYSLOG_NONE=y # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -991,6 +1009,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1016,7 +1035,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1043,9 +1061,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1155,7 +1173,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1177,6 +1194,7 @@ CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1225,7 +1243,7 @@ CONFIG_USBDEV_MINOR=0 # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FLASH_ERASEALL is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 @@ -1236,6 +1254,5 @@ CONFIG_READLINE_ECHO=y # CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_UBLOXMODEM is not set -# CONFIG_USBMONITOR is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/spark/usbserial/Make.defs b/configs/spark/usbserial/Make.defs index 317945bc3a0719e29e81d1fe58af6ce40e498323..9cfb9024e5a073a8e83c722e03fe03c08ad5649f 100644 --- a/configs/spark/usbserial/Make.defs +++ b/configs/spark/usbserial/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/spark/usbserial/defconfig b/configs/spark/usbserial/defconfig index 4f8ad4de4b6c4832fad853e9820778bf0e4af8e3..a2bee31d24ced6c42b1445ddfacf5518174162da 100644 --- a/configs/spark/usbserial/defconfig +++ b/configs/spark/usbserial/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -414,6 +414,8 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -550,6 +552,7 @@ CONFIG_SPARK_FLASH=y CONFIG_SPARK_FLASH_SPI=2 CONFIG_SPARK_FLASH_MINOR=0 # CONFIG_SPARK_FLASH_PART is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -573,9 +576,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=11 @@ -669,6 +675,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=340 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -688,11 +695,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -708,7 +718,12 @@ CONFIG_ANALOG=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -817,6 +832,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -861,6 +877,8 @@ CONFIG_CDCACM_VENDORSTR="NuttX" CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +CONFIG_HAVE_USBTRACE=y +# CONFIG_USBMONITOR is not set CONFIG_DRIVERS_WIRELESS=y # CONFIG_WL_CC1101 is not set CONFIG_WL_CC3000=y @@ -874,6 +892,7 @@ CONFIG_CC3000_SELECT_STACKSIZE=390 CONFIG_CC3000_UNSOLICED_STACKSIZE=264 CONFIG_CC3000_PROBES=y # CONFIG_WL_NRF24L01 is not set +# CONFIG_WL_MFRC522 is not set # CONFIG_WL_PN532 is not set # @@ -888,6 +907,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1015,6 +1035,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1044,7 +1065,6 @@ CONFIG_EXAMPLES_CC3000BASIC=y # CONFIG_EXAMPLES_CC3000_STACK_CHECK 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 @@ -1072,10 +1092,9 @@ CONFIG_EXAMPLES_CC3000BASIC=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1161,7 +1180,7 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 @@ -1169,6 +1188,5 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=y # CONFIG_SYSTEM_READLINE is not set # CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_UBLOXMODEM is not set -# CONFIG_USBMONITOR is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm3210e-eval/buttons/Make.defs b/configs/stm3210e-eval/buttons/Make.defs index e460dc236ea54cff003b0759b7cb90af42de9263..a0f63802978a2e38481918063882e5fbe574892b 100644 --- a/configs/stm3210e-eval/buttons/Make.defs +++ b/configs/stm3210e-eval/buttons/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3210e-eval/buttons/defconfig b/configs/stm3210e-eval/buttons/defconfig index 15ea4b73960fc7f2764b728e377d55c6004b9f01..7fd348de1ad12487adbdaf79c47185db88f6334a 100644 --- a/configs/stm3210e-eval/buttons/defconfig +++ b/configs/stm3210e-eval/buttons/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -425,6 +425,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -556,6 +558,7 @@ CONFIG_ARCH_IRQBUTTONS=y # STM3210E-EVAL LCD Hardware Configuration # # CONFIG_STM3210E_LCD is not set +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -571,9 +574,12 @@ CONFIG_DISABLE_ENVIRON=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=7 @@ -653,6 +659,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -668,6 +675,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -681,7 +689,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -767,8 +780,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -783,6 +798,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -884,6 +900,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -917,7 +934,6 @@ CONFIG_EXAMPLES_BUTTONS_NAME6="RIGHT" CONFIG_EXAMPLES_BUTTONS_NAME7="UP" # 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 @@ -943,10 +959,9 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="UP" # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1021,7 +1036,7 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="UP" # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm3210e-eval/composite/Make.defs b/configs/stm3210e-eval/composite/Make.defs index 599b5d021a8afe0de7d3d26a1dd10b532d328322..17c4fec622db499fc4d8fc913876d2b7a17531f5 100644 --- a/configs/stm3210e-eval/composite/Make.defs +++ b/configs/stm3210e-eval/composite/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3210e-eval/composite/defconfig b/configs/stm3210e-eval/composite/defconfig index ac8c38d7e32bdde99f50901e97e941ed0689e389..44e2d6e39d057840791daa952f6ed72f0ba7a48f 100644 --- a/configs/stm3210e-eval/composite/defconfig +++ b/configs/stm3210e-eval/composite/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -428,6 +428,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -563,6 +565,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # STM3210E-EVAL LCD Hardware Configuration # # CONFIG_STM3210E_LCD is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -586,9 +589,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2009 CONFIG_START_MONTH=11 @@ -686,6 +692,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -701,6 +708,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -714,7 +722,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -843,6 +856,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -915,6 +929,7 @@ CONFIG_USBMSC_REMOVABLE=y CONFIG_USBMSC_SCSI_PRIO=128 CONFIG_USBMSC_SCSI_STACKSIZE=2048 # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -929,6 +944,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1043,6 +1059,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1063,7 +1080,6 @@ CONFIG_ARCH_HAVE_TLS=y # # 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 @@ -1090,10 +1106,9 @@ CONFIG_ARCH_HAVE_TLS=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1185,7 +1200,7 @@ 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_LIB_HEX2BIN 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 diff --git a/configs/stm3210e-eval/nsh/Make.defs b/configs/stm3210e-eval/nsh/Make.defs index 34750c07481a23a1aca2c77e025fff626841a7d4..b94472a6e66688b554e029a75dba8cb12c53872c 100644 --- a/configs/stm3210e-eval/nsh/Make.defs +++ b/configs/stm3210e-eval/nsh/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3210e-eval/nsh/defconfig b/configs/stm3210e-eval/nsh/defconfig index 0f9a0ad3e8a6e50cf8bae15a27edd1b731217680..0621482063bf833ce077465f98222ab05eefcd60 100644 --- a/configs/stm3210e-eval/nsh/defconfig +++ b/configs/stm3210e-eval/nsh/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -429,6 +429,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -555,8 +557,6 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 # # Board-Specific Options @@ -566,6 +566,7 @@ CONFIG_NSH_MMCSDSLOTNO=0 # STM3210E-EVAL LCD Hardware Configuration # # CONFIG_STM3210E_LCD is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -589,9 +590,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2009 CONFIG_START_MONTH=9 @@ -689,6 +693,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -704,6 +709,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -717,7 +723,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -846,6 +857,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -868,6 +880,7 @@ CONFIG_USBDEV_MAXPOWER=100 # CONFIG_CDCACM is not set # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -882,6 +895,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1002,6 +1016,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1022,7 +1037,6 @@ CONFIG_ARCH_HAVE_TLS=y # # 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 @@ -1049,10 +1063,9 @@ CONFIG_EXAMPLES_NSH=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1160,7 +1173,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1182,6 +1194,8 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 # # Configure Command Options @@ -1222,7 +1236,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm3210e-eval/nsh2/Make.defs b/configs/stm3210e-eval/nsh2/Make.defs index 7ee439bba42fad3ee2c9658a2c5bd70561139048..abbcfdfb1fc2a9c3e58e069fd641a7c12ac4c2d3 100644 --- a/configs/stm3210e-eval/nsh2/Make.defs +++ b/configs/stm3210e-eval/nsh2/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3210e-eval/nsh2/defconfig b/configs/stm3210e-eval/nsh2/defconfig index 1497a49383399388de25b320595e9a4ee248a0a8..b0e7ea89b89271cdb30232ae96db65458c31d75a 100644 --- a/configs/stm3210e-eval/nsh2/defconfig +++ b/configs/stm3210e-eval/nsh2/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -430,6 +430,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -566,8 +568,6 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 # # Board-Specific Options @@ -582,6 +582,7 @@ CONFIG_STM3210E_LCD_RDSHIFT=5 # CONFIG_STM3210E_AM240320_DISABLE is not set # CONFIG_STM3210E_SPFD5408B_DISABLE is not set CONFIG_STM3210E_R61580_DISABLE=y +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -605,9 +606,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=7 @@ -705,6 +709,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -725,6 +730,7 @@ CONFIG_I2C_POLLED=y # CONFIG_I2C_TRACE is not set CONFIG_I2C_DRIVER=y # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -739,7 +745,12 @@ CONFIG_I2C_DRIVER=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -898,6 +909,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -935,6 +947,7 @@ CONFIG_USBMSC_REMOVABLE=y CONFIG_USBMSC_SCSI_PRIO=128 CONFIG_USBMSC_SCSI_STACKSIZE=2048 # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -949,6 +962,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1160,6 +1174,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1185,7 +1200,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1244,9 +1258,9 @@ CONFIG_EXAMPLES_NXHELLO_FONTID=6 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1356,7 +1370,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1378,6 +1391,8 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 # # Configure Command Options @@ -1419,7 +1434,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FLASH_ERASEALL is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN is not set +# CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=1 diff --git a/configs/stm3210e-eval/nx/Make.defs b/configs/stm3210e-eval/nx/Make.defs index 2cea907920bde922968adc7474394244c3906869..acf41aac4c93c1e9a31ead0896b7deb512b62fde 100644 --- a/configs/stm3210e-eval/nx/Make.defs +++ b/configs/stm3210e-eval/nx/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3210e-eval/nx/defconfig b/configs/stm3210e-eval/nx/defconfig index 655e709976711bd117063b3c5309c9a26711459a..65752da1c0262d63936939c648e09f092c95cc71 100644 --- a/configs/stm3210e-eval/nx/defconfig +++ b/configs/stm3210e-eval/nx/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -428,6 +428,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -573,6 +575,7 @@ CONFIG_STM3210E_LCD_RDSHIFT=5 # CONFIG_STM3210E_AM240320_DISABLE is not set # CONFIG_STM3210E_SPFD5408B_DISABLE is not set CONFIG_STM3210E_R61580_DISABLE=y +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -588,9 +591,12 @@ CONFIG_DISABLE_ENVIRON=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=7 @@ -688,6 +694,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -703,6 +710,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -716,7 +724,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -832,6 +845,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -854,6 +868,7 @@ CONFIG_USBDEV_MAXPOWER=100 # CONFIG_CDCACM is not set # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -868,6 +883,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1059,6 +1075,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1079,7 +1096,6 @@ CONFIG_ARCH_HAVE_TLS=y # # 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 @@ -1119,10 +1135,9 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1197,7 +1212,7 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm3210e-eval/nxterm/Make.defs b/configs/stm3210e-eval/nxterm/Make.defs index ef8c9bc3802080cb9f26676d464a4ad990752f07..7d3044aa5638797d1cbe289d7d5d8a59125a5e7f 100644 --- a/configs/stm3210e-eval/nxterm/Make.defs +++ b/configs/stm3210e-eval/nxterm/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3210e-eval/nxterm/defconfig b/configs/stm3210e-eval/nxterm/defconfig index 50f19608b6b792a6a9d059847f17b98c8a58a930..fc61e8932b4e6042ba018a692617790ddb8c56c3 100644 --- a/configs/stm3210e-eval/nxterm/defconfig +++ b/configs/stm3210e-eval/nxterm/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -426,6 +426,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -547,7 +549,6 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options @@ -562,6 +563,7 @@ CONFIG_STM3210E_LCD_RDSHIFT=5 # CONFIG_STM3210E_AM240320_DISABLE is not set # CONFIG_STM3210E_SPFD5408B_DISABLE is not set CONFIG_STM3210E_R61580_DISABLE=y +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -584,9 +586,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2012 CONFIG_START_MONTH=3 @@ -684,6 +689,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -699,6 +705,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -712,7 +719,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -829,8 +841,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -845,6 +859,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1067,6 +1082,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1092,7 +1108,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1119,9 +1134,9 @@ 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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1227,7 +1242,6 @@ 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 @@ -1249,6 +1263,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1289,7 +1304,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm3210e-eval/pm/Make.defs b/configs/stm3210e-eval/pm/Make.defs index a4da9f3a8a761286dafb1785d6e2bcf64664663c..76a1e828f5938ca74d754c7adbdedda447a786e5 100644 --- a/configs/stm3210e-eval/pm/Make.defs +++ b/configs/stm3210e-eval/pm/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3210e-eval/pm/defconfig b/configs/stm3210e-eval/pm/defconfig index 59f7f4a72c363413a193446aed3127295fb4ca70..2ebcc7d696781e96e34a8db0cb4b2162f9507ee6 100644 --- a/configs/stm3210e-eval/pm/defconfig +++ b/configs/stm3210e-eval/pm/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -428,6 +428,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -555,7 +557,6 @@ CONFIG_ARCH_HAVE_BUTTONS=y CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_HAVE_IRQBUTTONS=y CONFIG_ARCH_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options @@ -582,6 +583,7 @@ CONFIG_PM_BUTTONS_MAX=7 CONFIG_PM_IRQBUTTONS_MIN=0 CONFIG_PM_IRQBUTTONS_MAX=7 CONFIG_PM_BUTTON_ACTIVITY=10 +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -604,9 +606,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=4 @@ -701,6 +706,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -716,6 +722,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -736,7 +743,12 @@ CONFIG_RTC_NALARMS=1 # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -871,8 +883,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -887,6 +901,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1088,6 +1103,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1114,7 +1130,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_ELF is not set # CONFIG_EXAMPLES_FTPC is not set @@ -1172,9 +1187,9 @@ CONFIG_EXAMPLES_NXHELLO_FONTID=6 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1280,7 +1295,6 @@ 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 @@ -1302,6 +1316,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1342,7 +1357,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm3210e-eval/usbmsc/Make.defs b/configs/stm3210e-eval/usbmsc/Make.defs index 2f4e87a1988775db8331d4320dcb795fa0db6317..b7b9f13c4721e5259173eab1895fb034eaa3c204 100644 --- a/configs/stm3210e-eval/usbmsc/Make.defs +++ b/configs/stm3210e-eval/usbmsc/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3210e-eval/usbmsc/defconfig b/configs/stm3210e-eval/usbmsc/defconfig index 8f3417861854e6c516f13d28b39b31a65eafa2bf..9695318a73c4963112b7a3a23d859e54194745d1 100644 --- a/configs/stm3210e-eval/usbmsc/defconfig +++ b/configs/stm3210e-eval/usbmsc/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -421,6 +421,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -556,6 +558,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # STM3210E-EVAL LCD Hardware Configuration # # CONFIG_STM3210E_LCD is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -579,9 +582,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2009 CONFIG_START_MONTH=11 @@ -679,6 +685,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -694,6 +701,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -707,7 +715,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -806,6 +819,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -843,6 +857,7 @@ CONFIG_USBMSC_REMOVABLE=y CONFIG_USBMSC_SCSI_PRIO=128 CONFIG_USBMSC_SCSI_STACKSIZE=2048 # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -857,6 +872,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -971,6 +987,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -991,7 +1008,6 @@ CONFIG_ARCH_HAVE_TLS=y # # 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 @@ -1018,10 +1034,9 @@ CONFIG_ARCH_HAVE_TLS=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1099,7 +1114,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm3210e-eval/usbserial/Make.defs b/configs/stm3210e-eval/usbserial/Make.defs index 5c49c1a196760636bfc7f95794a17354829f0cff..2ba8d703f155a7a1cfa93ccc0571c2034257af94 100644 --- a/configs/stm3210e-eval/usbserial/Make.defs +++ b/configs/stm3210e-eval/usbserial/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3210e-eval/usbserial/defconfig b/configs/stm3210e-eval/usbserial/defconfig index e28ddba956753655b4c8cd8fc9c35489395a94a7..f90c876dd3b60709023d16293ef8b86f5a03a156 100644 --- a/configs/stm3210e-eval/usbserial/defconfig +++ b/configs/stm3210e-eval/usbserial/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -418,6 +418,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -548,6 +550,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # STM3210E-EVAL LCD Hardware Configuration # # CONFIG_STM3210E_LCD is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -571,9 +574,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2009 CONFIG_START_MONTH=10 @@ -666,6 +672,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -681,6 +688,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -694,7 +702,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -781,6 +794,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -817,6 +831,7 @@ CONFIG_PL2303_PRODUCTSTR="USBdev Serial" # CONFIG_CDCACM is not set # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -831,6 +846,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -936,6 +952,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -956,7 +973,6 @@ CONFIG_ARCH_HAVE_TLS=y # # 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 @@ -982,10 +998,9 @@ CONFIG_ARCH_HAVE_TLS=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1062,7 +1077,7 @@ CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm3220g-eval/dhcpd/Make.defs b/configs/stm3220g-eval/dhcpd/Make.defs index 6f84793960f3e6b5911d5969f50d4a058ae15615..64f7bf9de741fd2d1ff1551858a6d0aef8aa4aff 100644 --- a/configs/stm3220g-eval/dhcpd/Make.defs +++ b/configs/stm3220g-eval/dhcpd/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3220g-eval/dhcpd/defconfig b/configs/stm3220g-eval/dhcpd/defconfig index 5bd2028bcfc6cd84d82c1ad50486a3bcb465c5fc..9d59eadc09624f4f06d1c20c8114d2f2f70d9342 100644 --- a/configs/stm3220g-eval/dhcpd/defconfig +++ b/configs/stm3220g-eval/dhcpd/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -439,6 +439,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -585,6 +587,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -600,9 +603,12 @@ CONFIG_DISABLE_ENVIRON=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2012 CONFIG_START_MONTH=12 @@ -682,6 +688,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -697,6 +704,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -710,7 +718,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -822,8 +835,10 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -838,6 +853,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1038,6 +1054,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1065,7 +1082,6 @@ CONFIG_HAVE_CXXINITIALIZE=y # # 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=y CONFIG_EXAMPLES_DHCPD_NOMAC=y @@ -1098,10 +1114,9 @@ CONFIG_EXAMPLES_DHCPD_NETMASK=0xffffff00 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1197,7 +1212,7 @@ CONFIG_NETUTILS_NETLIB=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm3220g-eval/nettest/Make.defs b/configs/stm3220g-eval/nettest/Make.defs index 525d5e47738968cc5c1b607202498f5a2e4613a1..e1f71e4a39d6883de48a6730f8d2fe2cf000f383 100644 --- a/configs/stm3220g-eval/nettest/Make.defs +++ b/configs/stm3220g-eval/nettest/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3220g-eval/nettest/defconfig b/configs/stm3220g-eval/nettest/defconfig index a2f0466d3b9bf35ab180cdc8c818de84280c99ef..2d92070865e42ba3a24f6f6c8f2634ad7ecd33da 100644 --- a/configs/stm3220g-eval/nettest/defconfig +++ b/configs/stm3220g-eval/nettest/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -439,6 +439,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -585,6 +587,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -600,9 +603,12 @@ CONFIG_DISABLE_ENVIRON=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2012 CONFIG_START_MONTH=12 @@ -682,6 +688,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -697,6 +704,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -710,7 +718,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -822,8 +835,10 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -838,6 +853,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1042,6 +1058,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1069,7 +1086,6 @@ CONFIG_HAVE_CXXINITIALIZE=y # # 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 @@ -1111,10 +1127,9 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1195,7 +1210,7 @@ CONFIG_NETUTILS_NETLIB=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm3220g-eval/nsh/Make.defs b/configs/stm3220g-eval/nsh/Make.defs index a55be90f7bc6f336013469001f9ec6be55582d27..cd1dd159e6dd22ee25d393aa275f0fbc427c3b9c 100644 --- a/configs/stm3220g-eval/nsh/Make.defs +++ b/configs/stm3220g-eval/nsh/Make.defs @@ -72,7 +72,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3220g-eval/nsh/defconfig b/configs/stm3220g-eval/nsh/defconfig index d7743130a194debcebed079e79d8090a45e101b2..59c90232361210438c451bd03b890346b27970b3 100644 --- a/configs/stm3220g-eval/nsh/defconfig +++ b/configs/stm3220g-eval/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -432,6 +432,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -589,12 +591,11 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -610,9 +611,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 @@ -702,6 +706,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -722,6 +727,7 @@ CONFIG_I2C_POLLED=y # CONFIG_I2C_TRACE is not set # CONFIG_I2C_DRIVER is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -740,7 +746,12 @@ CONFIG_RTC_DATETIME=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -890,8 +901,10 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -906,6 +919,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1146,6 +1160,7 @@ CONFIG_NETDB_DNSSERVER_IPv4ADDR=0x0a000001 # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1178,7 +1193,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1210,9 +1224,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1337,7 +1351,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1361,6 +1374,8 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 # # Configure Command Options @@ -1422,7 +1437,7 @@ CONFIG_NSH_MAX_ROUNDTRIP=20 # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FLASH_ERASEALL is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN is not set +# CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_INSTALL is not set diff --git a/configs/stm3220g-eval/nsh2/Make.defs b/configs/stm3220g-eval/nsh2/Make.defs index 1872665fcf4cdcd5ab28f48c5f95024d2cd5bf34..518cacac287c7f96e0a13fbe14309a6f31b6b71e 100644 --- a/configs/stm3220g-eval/nsh2/Make.defs +++ b/configs/stm3220g-eval/nsh2/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3220g-eval/nsh2/defconfig b/configs/stm3220g-eval/nsh2/defconfig index 5565d734b72807e9e7fbfeae5276f6c6f1dd09e0..94d37565c56e17d675f5918515ebe7041f981f37 100644 --- a/configs/stm3220g-eval/nsh2/defconfig +++ b/configs/stm3220g-eval/nsh2/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -442,6 +442,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -583,12 +585,11 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -611,9 +612,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=16 @@ -708,6 +712,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -728,6 +733,7 @@ CONFIG_I2C_POLLED=y # CONFIG_I2C_TRACE is not set CONFIG_I2C_DRIVER=y # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -746,7 +752,12 @@ CONFIG_RTC_DATETIME=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -886,8 +897,10 @@ CONFIG_SERIAL=y # CONFIG_SERIAL_OFLOWCONTROL is not set # CONFIG_SERIAL_DMA is not set # CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -906,6 +919,7 @@ CONFIG_RAMLOG_NPOLLWAITERS=4 CONFIG_RAMLOG_SYSLOG=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1145,6 +1159,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1177,7 +1192,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1209,9 +1223,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1340,7 +1354,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1364,6 +1377,8 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 # # Configure Command Options @@ -1438,7 +1453,7 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FLASH_ERASEALL is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN is not set +# CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=1 diff --git a/configs/stm3220g-eval/nxwm/Make.defs b/configs/stm3220g-eval/nxwm/Make.defs index 0a94be44478a4bcb3c0ee3b4d14954400d53d653..49eda2b97db4cd7a31110075f3b5714a3d4fa68e 100644 --- a/configs/stm3220g-eval/nxwm/Make.defs +++ b/configs/stm3220g-eval/nxwm/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3220g-eval/nxwm/defconfig b/configs/stm3220g-eval/nxwm/defconfig index 30457480d52a2326b84bc01a194b3b327e874358..95db35d5315aa27b237460d6e709ef3971849cd2 100644 --- a/configs/stm3220g-eval/nxwm/defconfig +++ b/configs/stm3220g-eval/nxwm/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -441,6 +441,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -598,8 +600,6 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 # # Board-Specific Options @@ -608,6 +608,7 @@ CONFIG_NSH_MMCSDSLOTNO=0 # CONFIG_STM32_ILI9325_DISABLE is not set CONFIG_STM3220G_LCD=y CONFIG_LCD_RDSHIFT=5 +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -630,9 +631,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 @@ -728,6 +732,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -748,6 +753,7 @@ CONFIG_I2C_POLLED=y # CONFIG_I2C_TRACE is not set # CONFIG_I2C_DRIVER is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -787,7 +793,12 @@ CONFIG_STMPE811_TEMP_DISABLE=y # CONFIG_BUTTONS is not set # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -939,8 +950,10 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -955,6 +968,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1296,6 +1310,7 @@ CONFIG_LIBC_NETDB=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1323,7 +1338,6 @@ CONFIG_HAVE_CXXINITIALIZE=y # # 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 @@ -1355,10 +1369,9 @@ CONFIG_HAVE_CXXINITIALIZE=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1481,7 +1494,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1504,6 +1516,8 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 # # Configure Command Options @@ -1754,7 +1768,7 @@ CONFIG_NXWM_HEXCALCULATOR_FONTID=5 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN is not set +# CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_INSTALL is not set diff --git a/configs/stm3220g-eval/telnetd/Make.defs b/configs/stm3220g-eval/telnetd/Make.defs index 34b07b3accab6ff73da81e19fc9f0c0b22da7db7..8d6f5d5f137aa525266cd25e2ac4334171118156 100644 --- a/configs/stm3220g-eval/telnetd/Make.defs +++ b/configs/stm3220g-eval/telnetd/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3220g-eval/telnetd/defconfig b/configs/stm3220g-eval/telnetd/defconfig index 9e0ac7839fe5902153ed8ff62d32321918759800..d1989d4107cef1a565e5e8833f78a5b9675cb9e0 100644 --- a/configs/stm3220g-eval/telnetd/defconfig +++ b/configs/stm3220g-eval/telnetd/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -439,6 +439,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -585,6 +587,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -600,9 +603,12 @@ CONFIG_DISABLE_ENVIRON=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2012 CONFIG_START_MONTH=12 @@ -682,6 +688,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -697,6 +704,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -710,7 +718,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -824,8 +837,10 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -840,6 +855,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1044,6 +1060,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1071,7 +1088,6 @@ CONFIG_HAVE_CXXINITIALIZE=y # # 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 @@ -1100,10 +1116,9 @@ CONFIG_HAVE_CXXINITIALIZE=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1192,7 +1207,7 @@ CONFIG_NETUTILS_TELNETD=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm3240g-eval/dhcpd/Make.defs b/configs/stm3240g-eval/dhcpd/Make.defs index df5aa899ba15eadfd2cffdd1e5d063ef994ee4bb..dccf4e50947730c06fb52416f47456f97ad55f57 100644 --- a/configs/stm3240g-eval/dhcpd/Make.defs +++ b/configs/stm3240g-eval/dhcpd/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3240g-eval/dhcpd/defconfig b/configs/stm3240g-eval/dhcpd/defconfig index d83dbbbcc5bf5c2687f8bc5e861cba4c49bc56d9..975da224f537890e176695aef79107731b175753 100644 --- a/configs/stm3240g-eval/dhcpd/defconfig +++ b/configs/stm3240g-eval/dhcpd/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -442,6 +442,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -589,6 +591,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -604,9 +607,12 @@ CONFIG_DISABLE_ENVIRON=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -686,6 +692,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -701,6 +708,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -714,7 +722,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -826,8 +839,10 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -842,6 +857,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1042,6 +1058,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1069,7 +1086,6 @@ CONFIG_HAVE_CXXINITIALIZE=y # # 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=y CONFIG_EXAMPLES_DHCPD_NOMAC=y @@ -1102,10 +1118,9 @@ CONFIG_EXAMPLES_DHCPD_NETMASK=0xffffff00 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1201,7 +1216,7 @@ CONFIG_NETUTILS_NETLIB=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm3240g-eval/discover/Make.defs b/configs/stm3240g-eval/discover/Make.defs index 7265cae8abb32d505f3476f281f2a3f17b5630e5..78d1d036defe53862c326b8c7f4ef466b98edd03 100644 --- a/configs/stm3240g-eval/discover/Make.defs +++ b/configs/stm3240g-eval/discover/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3240g-eval/discover/defconfig b/configs/stm3240g-eval/discover/defconfig index 126b6e8cc119558a7ae605d6bb560dc7436ea15d..2acba7767a75a887b9826ac548000d9dd3b80d94 100644 --- a/configs/stm3240g-eval/discover/defconfig +++ b/configs/stm3240g-eval/discover/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -435,6 +435,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -592,6 +594,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -607,9 +610,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -702,6 +708,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -722,6 +729,7 @@ CONFIG_I2C_POLLED=y # CONFIG_I2C_TRACE is not set # CONFIG_I2C_DRIVER is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -736,7 +744,12 @@ CONFIG_I2C_POLLED=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -849,8 +862,10 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -865,6 +880,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1104,6 +1120,7 @@ CONFIG_NETDB_DNSSERVER_IPv4ADDR=0x0a000001 # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1131,7 +1148,6 @@ CONFIG_HAVE_CXXINITIALIZE=y # # 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=y @@ -1166,10 +1182,9 @@ CONFIG_EXAMPLES_DISCOVER_NETMASK=0xffffff00 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1266,7 +1281,7 @@ CONFIG_NETUTILS_NETLIB=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN is not set +# CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_INSTALL is not set diff --git a/configs/stm3240g-eval/knxwm/Make.defs b/configs/stm3240g-eval/knxwm/Make.defs index c138b17cf740023c1d52281c26d74ad6de164691..7fdc7b275d5ab66d4ba280978eeebc544bde6b33 100644 --- a/configs/stm3240g-eval/knxwm/Make.defs +++ b/configs/stm3240g-eval/knxwm/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3240g-eval/knxwm/defconfig b/configs/stm3240g-eval/knxwm/defconfig index 68cd61dc901dbb0fc450ac39fa6835dd8a109655..a8f21ca59373068080cc8a749fd2d1825eb52bb6 100644 --- a/configs/stm3240g-eval/knxwm/defconfig +++ b/configs/stm3240g-eval/knxwm/defconfig @@ -71,7 +71,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -451,6 +451,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -601,6 +603,7 @@ CONFIG_STM3240G_LCD_RDSHIFT=5 # CONFIG_STM3240G_ILI9325_DISABLE is not set CONFIG_STM3240G_BOARDINIT_PRIO=196 CONFIG_STM3240G_BOARDINIT_STACK=2048 +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -623,9 +626,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 @@ -723,6 +729,7 @@ CONFIG_SYS_NNEST=2 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -743,6 +750,7 @@ CONFIG_I2C_POLLED=y # CONFIG_I2C_TRACE is not set # CONFIG_I2C_DRIVER is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -782,7 +790,12 @@ CONFIG_STMPE811_TEMP_DISABLE=y # CONFIG_BUTTONS is not set # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -885,8 +898,10 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -901,6 +916,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1124,6 +1140,7 @@ CONFIG_LIB_USRWORKPERIOD=100000 CONFIG_LIB_USRWORKSTACKSIZE=2048 # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1151,7 +1168,6 @@ CONFIG_CXX_NEWLONG=y # # 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 @@ -1180,10 +1196,9 @@ CONFIG_CXX_NEWLONG=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1430,7 +1445,7 @@ CONFIG_NXWM_HEXCALCULATOR_FONTID=5 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN is not set +# CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_INSTALL is not set diff --git a/configs/stm3240g-eval/nettest/Make.defs b/configs/stm3240g-eval/nettest/Make.defs index 3f2604c8b9d6c2478c340dca7066d8cf89bd77dc..ce352cf3d258b0431e648f92c70de35b04e19582 100644 --- a/configs/stm3240g-eval/nettest/Make.defs +++ b/configs/stm3240g-eval/nettest/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3240g-eval/nettest/defconfig b/configs/stm3240g-eval/nettest/defconfig index 76c0f2e2e30bdf5db1a5dfea26088951c02fc580..216bc7e7de700541d9096170512e6276b84861ae 100644 --- a/configs/stm3240g-eval/nettest/defconfig +++ b/configs/stm3240g-eval/nettest/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -442,6 +442,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -589,6 +591,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -604,9 +607,12 @@ CONFIG_DISABLE_ENVIRON=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -686,6 +692,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -701,6 +708,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -714,7 +722,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -826,8 +839,10 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -842,6 +857,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1046,6 +1062,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1073,7 +1090,6 @@ CONFIG_HAVE_CXXINITIALIZE=y # # 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 @@ -1115,10 +1131,9 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1199,7 +1214,7 @@ CONFIG_NETUTILS_NETLIB=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm3240g-eval/nsh/Make.defs b/configs/stm3240g-eval/nsh/Make.defs index 3d371f1764dfdb86ddbba6e6dbe3351778d03e55..36f5cf7875b363ec182ae155f6b3b947bf82d9db 100644 --- a/configs/stm3240g-eval/nsh/Make.defs +++ b/configs/stm3240g-eval/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3240g-eval/nsh/defconfig b/configs/stm3240g-eval/nsh/defconfig index 159479c01ce45974d75d08d1ab14a17f27e7bbc4..764b9786288e2183b40271cd766a74e81d392492 100644 --- a/configs/stm3240g-eval/nsh/defconfig +++ b/configs/stm3240g-eval/nsh/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -443,6 +443,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -601,11 +603,11 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -621,9 +623,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 @@ -715,6 +720,7 @@ CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set CONFIG_ARCH_HAVE_RNG=y CONFIG_DEV_RANDOM=y +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -735,6 +741,7 @@ CONFIG_I2C_POLLED=y # CONFIG_I2C_TRACE is not set CONFIG_I2C_DRIVER=y # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -753,7 +760,12 @@ CONFIG_RTC_DATETIME=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -868,8 +880,10 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -884,6 +898,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1123,6 +1138,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1155,7 +1171,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1187,10 +1202,10 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1314,7 +1329,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1338,6 +1352,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1411,7 +1426,7 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN is not set +# CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=1 diff --git a/configs/stm3240g-eval/nsh2/Make.defs b/configs/stm3240g-eval/nsh2/Make.defs index 01fd1a369df0c2638ea6aed6b41682bbd45131ab..fb47d90477b4aeb823da98c9abe1bf6f5fe89515 100644 --- a/configs/stm3240g-eval/nsh2/Make.defs +++ b/configs/stm3240g-eval/nsh2/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3240g-eval/nsh2/defconfig b/configs/stm3240g-eval/nsh2/defconfig index 195f485d54e9c6701f4b38de8e371108b0a81da7..ac0676ccc7519038a1759a67d2c62b7c65cf21f1 100644 --- a/configs/stm3240g-eval/nsh2/defconfig +++ b/configs/stm3240g-eval/nsh2/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -445,6 +445,8 @@ CONFIG_STM32_CCMEXCLUDE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -587,12 +589,11 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -615,9 +616,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=16 @@ -712,6 +716,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -732,6 +737,7 @@ CONFIG_I2C_POLLED=y # CONFIG_I2C_TRACE is not set CONFIG_I2C_DRIVER=y # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -750,7 +756,12 @@ CONFIG_RTC_DATETIME=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -890,8 +901,10 @@ CONFIG_SERIAL=y # CONFIG_SERIAL_OFLOWCONTROL is not set # CONFIG_SERIAL_DMA is not set # CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -910,6 +923,7 @@ CONFIG_RAMLOG_NPOLLWAITERS=4 CONFIG_RAMLOG_SYSLOG=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1149,6 +1163,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1181,7 +1196,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1213,9 +1227,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1344,7 +1358,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1368,6 +1381,8 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 # # Configure Command Options @@ -1442,7 +1457,7 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FLASH_ERASEALL is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN is not set +# CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=1 diff --git a/configs/stm3240g-eval/nxterm/Make.defs b/configs/stm3240g-eval/nxterm/Make.defs index 6c7e72d33c34d5422e12669cd06e9fde55229d04..c38ffc8c404b0d6ea9dd7be2479e8a8327768b11 100644 --- a/configs/stm3240g-eval/nxterm/Make.defs +++ b/configs/stm3240g-eval/nxterm/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3240g-eval/nxterm/defconfig b/configs/stm3240g-eval/nxterm/defconfig index c432e138410e874730da1f789f446df974723b68..000a72380bf952c55b27f72bc881ed9454aab0d3 100644 --- a/configs/stm3240g-eval/nxterm/defconfig +++ b/configs/stm3240g-eval/nxterm/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -444,6 +444,8 @@ CONFIG_STM32_FSMC_SRAM=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -602,7 +604,6 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options @@ -611,6 +612,7 @@ CONFIG_STM3240G_LCD=y CONFIG_STM3240G_LCD_RDSHIFT=5 # CONFIG_STM3240G_ILI9320_DISABLE is not set # CONFIG_STM3240G_ILI9325_DISABLE is not set +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -626,9 +628,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 @@ -718,6 +723,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -738,6 +744,7 @@ CONFIG_I2C_POLLED=y # CONFIG_I2C_TRACE is not set CONFIG_I2C_DRIVER=y # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -756,7 +763,12 @@ CONFIG_RTC_DATETIME=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -901,8 +913,10 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -917,6 +931,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1257,6 +1272,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1289,7 +1305,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1320,9 +1335,9 @@ 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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1443,7 +1458,6 @@ 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 @@ -1467,6 +1481,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1541,7 +1556,7 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN is not set +# CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=1 diff --git a/configs/stm3240g-eval/nxwm/Make.defs b/configs/stm3240g-eval/nxwm/Make.defs index adc137c72ff04db87c3e2043b358d3d542fba60d..14741aaf72dd4a030f17f4e239ab96ad1613138c 100644 --- a/configs/stm3240g-eval/nxwm/Make.defs +++ b/configs/stm3240g-eval/nxwm/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3240g-eval/nxwm/defconfig b/configs/stm3240g-eval/nxwm/defconfig index fdcaf161defd2fc782a4cb5a49ddce5b90f5beba..2f697b4b484a596e3ce4daf2943c66f79ce68402 100644 --- a/configs/stm3240g-eval/nxwm/defconfig +++ b/configs/stm3240g-eval/nxwm/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -444,6 +444,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -602,7 +604,6 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options @@ -611,6 +612,7 @@ CONFIG_STM3240G_LCD=y CONFIG_STM3240G_LCD_RDSHIFT=5 # CONFIG_STM3240G_ILI9320_DISABLE is not set # CONFIG_STM3240G_ILI9325_DISABLE is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -633,9 +635,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 @@ -731,6 +736,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -751,6 +757,7 @@ CONFIG_I2C_POLLED=y # CONFIG_I2C_TRACE is not set # CONFIG_I2C_DRIVER is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -790,7 +797,12 @@ CONFIG_STMPE811_TEMP_DISABLE=y # CONFIG_BUTTONS is not set # CONFIG_DJOYSTICK is not set # CONFIG_AJOYSTICK is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -935,8 +947,10 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -951,6 +965,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1299,6 +1314,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1326,7 +1342,6 @@ CONFIG_HAVE_CXXINITIALIZE=y # # 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 @@ -1358,10 +1373,9 @@ CONFIG_HAVE_CXXINITIALIZE=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1484,7 +1498,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1508,6 +1521,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1759,7 +1773,7 @@ CONFIG_NXWM_HEXCALCULATOR_FONTID=5 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN is not set +# CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_INSTALL is not set diff --git a/configs/stm3240g-eval/telnetd/Make.defs b/configs/stm3240g-eval/telnetd/Make.defs index 34a6989ef177b84bb812f8ca2de6bbe386175532..4e1bd7ee9d8a6952e56a81795b968a9501b4dd75 100644 --- a/configs/stm3240g-eval/telnetd/Make.defs +++ b/configs/stm3240g-eval/telnetd/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3240g-eval/telnetd/defconfig b/configs/stm3240g-eval/telnetd/defconfig index 8ab255c4e84a7c8f419a3ff12a958b0e3161fb73..f18adcf52f59ae347810e46581ea6709be1d9b02 100644 --- a/configs/stm3240g-eval/telnetd/defconfig +++ b/configs/stm3240g-eval/telnetd/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -442,6 +442,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -589,6 +591,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -604,9 +607,12 @@ CONFIG_DISABLE_ENVIRON=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -686,6 +692,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -701,6 +708,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -714,7 +722,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -828,8 +841,10 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -844,6 +859,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1048,6 +1064,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1075,7 +1092,6 @@ CONFIG_HAVE_CXXINITIALIZE=y # # 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 @@ -1104,10 +1120,9 @@ CONFIG_HAVE_CXXINITIALIZE=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1196,7 +1211,7 @@ CONFIG_NETUTILS_TELNETD=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm3240g-eval/webserver/Make.defs b/configs/stm3240g-eval/webserver/Make.defs index bf77efb4e8bd406b1a30441cd87ccf9cce284500..84bb35cc266aed993d83a2b8841d47a15c08d299 100644 --- a/configs/stm3240g-eval/webserver/Make.defs +++ b/configs/stm3240g-eval/webserver/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3240g-eval/webserver/defconfig b/configs/stm3240g-eval/webserver/defconfig index de6911b78588b741fb7c045cadb5cc748fcee629..d7ff5a58a134d8e47d774460594ee3132b6d9193 100644 --- a/configs/stm3240g-eval/webserver/defconfig +++ b/configs/stm3240g-eval/webserver/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -435,6 +435,8 @@ CONFIG_STM32_CCMEXCLUDE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -593,11 +595,11 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -613,9 +615,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 @@ -705,6 +710,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -725,6 +731,7 @@ CONFIG_I2C_POLLED=y # CONFIG_I2C_TRACE is not set # CONFIG_I2C_DRIVER is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -743,7 +750,12 @@ CONFIG_RTC_DATETIME=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -888,8 +900,10 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -904,6 +918,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1135,6 +1150,7 @@ CONFIG_LIBC_NETDB=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1162,7 +1178,6 @@ CONFIG_HAVE_CXXINITIALIZE=y # # 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 @@ -1206,10 +1221,9 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1345,7 +1359,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1368,6 +1381,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1440,7 +1454,7 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN is not set +# CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_INSTALL is not set diff --git a/configs/stm3240g-eval/xmlrpc/Make.defs b/configs/stm3240g-eval/xmlrpc/Make.defs index f196d3b4f3a8c065abe250dd986640fc33e54c77..2f5cd93509d279eacf6cc0f68dbe6981865dd4ac 100644 --- a/configs/stm3240g-eval/xmlrpc/Make.defs +++ b/configs/stm3240g-eval/xmlrpc/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm3240g-eval/xmlrpc/defconfig b/configs/stm3240g-eval/xmlrpc/defconfig index 558a3803eae467cbeef2d8f7f3bfe7ce14b62609..f351cb4ee45b200b243674755a4eeca077098437 100644 --- a/configs/stm3240g-eval/xmlrpc/defconfig +++ b/configs/stm3240g-eval/xmlrpc/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -435,6 +435,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -592,6 +594,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -602,9 +605,12 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -697,6 +703,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -717,6 +724,7 @@ CONFIG_I2C_POLLED=y # CONFIG_I2C_TRACE is not set # CONFIG_I2C_DRIVER is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -731,7 +739,12 @@ CONFIG_I2C_POLLED=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -845,8 +858,10 @@ CONFIG_USART3_2STOP=0 # CONFIG_USART3_IFLOWCONTROL is not set # CONFIG_USART3_OFLOWCONTROL is not set # CONFIG_USART3_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -861,6 +876,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1100,6 +1116,7 @@ CONFIG_NETDB_DNSSERVER_IPv4ADDR=0x0a000001 # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1127,7 +1144,6 @@ CONFIG_HAVE_CXXINITIALIZE=y # # 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 @@ -1158,10 +1174,9 @@ CONFIG_HAVE_CXXINITIALIZE=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1261,7 +1276,7 @@ CONFIG_XMLRPC_STRINGSIZE=64 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN is not set +# CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_I2CTOOL is not set # CONFIG_SYSTEM_INSTALL is not set diff --git a/configs/stm32_tiny/nsh/Make.defs b/configs/stm32_tiny/nsh/Make.defs index 61f1d54b581a594da77d1a700ad86ee13599253a..34619c299d840e5dc6675e858152a20820db39b4 100644 --- a/configs/stm32_tiny/nsh/Make.defs +++ b/configs/stm32_tiny/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32_tiny/nsh/defconfig b/configs/stm32_tiny/nsh/defconfig index 33ccfb5562697a68f8b3acc318464bc4074458cf..c796e5e93da9d5b3a631d3619bd3fd8d870cb0e6 100644 --- a/configs/stm32_tiny/nsh/defconfig +++ b/configs/stm32_tiny/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -414,6 +414,8 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -536,11 +538,11 @@ CONFIG_ARCH_BOARD="stm32_tiny" # CONFIG_ARCH_HAVE_LEDS=y CONFIG_ARCH_LEDS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -558,9 +560,12 @@ CONFIG_LIB_BOARDCTL=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=7 @@ -658,6 +663,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -677,11 +683,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -695,7 +704,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -769,8 +783,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set CONFIG_DRIVERS_WIRELESS=y # CONFIG_WL_CC1101 is not set # CONFIG_WL_CC3000 is not set @@ -779,6 +795,7 @@ CONFIG_WL_NRF24L01_DFLT_ADDR_WIDTH=5 CONFIG_WL_NRF24L01_CHECK_PARAMS=y CONFIG_WL_NRF24L01_RXSUPPORT=y CONFIG_WL_NRF24L01_RXFIFO_LEN=128 +# CONFIG_WL_MFRC522 is not set # CONFIG_WL_PN532 is not set # @@ -793,6 +810,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -905,6 +923,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -930,7 +949,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -956,9 +974,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1065,7 +1083,6 @@ 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 @@ -1087,6 +1104,7 @@ CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1126,7 +1144,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32_tiny/usbnsh/Make.defs b/configs/stm32_tiny/usbnsh/Make.defs index 0c87213a5972c41fe32cd63d693760c3e9633f4d..c15224fc72b7a20e7e50279f86726e82a3e98a4e 100644 --- a/configs/stm32_tiny/usbnsh/Make.defs +++ b/configs/stm32_tiny/usbnsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32_tiny/usbnsh/defconfig b/configs/stm32_tiny/usbnsh/defconfig index d5d2102a02c75b55f6105caa090895dfe3dbbe45..03de8a4dd1e76c55fda46c5f8553e09a58e8c446 100644 --- a/configs/stm32_tiny/usbnsh/defconfig +++ b/configs/stm32_tiny/usbnsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -412,6 +412,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -529,11 +531,11 @@ CONFIG_ARCH_BOARD="stm32_tiny" # CONFIG_ARCH_HAVE_LEDS=y CONFIG_ARCH_LEDS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -552,9 +554,12 @@ CONFIG_BOARDCTL_USBDEVCTRL=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=7 @@ -647,6 +652,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -662,6 +668,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -675,7 +682,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -747,6 +759,7 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -791,6 +804,8 @@ CONFIG_CDCACM_VENDORSTR="NuttX" CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +CONFIG_HAVE_USBTRACE=y +# CONFIG_USBMONITOR is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -804,6 +819,7 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_SYSLOG_CHAR is not set CONFIG_SYSLOG_NONE=y # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -916,6 +932,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -941,7 +958,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -967,9 +983,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1075,7 +1091,6 @@ 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 @@ -1097,6 +1112,7 @@ CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1143,7 +1159,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 @@ -1154,6 +1170,5 @@ CONFIG_READLINE_ECHO=y # CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_UBLOXMODEM is not set -# CONFIG_USBMONITOR is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32butterfly2/Kconfig b/configs/stm32butterfly2/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..9f26f5f3d273498f7431dba22273316eaf6a3aaa --- /dev/null +++ b/configs/stm32butterfly2/Kconfig @@ -0,0 +1,7 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +if ARCH_BOARD_STM32_BUTTERFLY2 +endif diff --git a/configs/stm32butterfly2/include/board.h b/configs/stm32butterfly2/include/board.h new file mode 100644 index 0000000000000000000000000000000000000000..05a28cb94b8051c5fe1508f355b8b8c7cd148d2d --- /dev/null +++ b/configs/stm32butterfly2/include/board.h @@ -0,0 +1,204 @@ +/******************************************************************************* + * configs/stm32butterfly2/include/board.h + * + * Copyright (C) 2016 Michał Łyszczek. All rights reserved. + * Author: Michał Łyszczek + * + * 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_STM32_BUTTERFLY2_INCLUDE_BOARD_H +#define __CONFIGS_STM32_BUTTERFLY2_INCLUDE_BOARD_H 1 + +/******************************************************************************* + * Included Files + ******************************************************************************/ + +#include + +#ifndef __ASSEMBLY__ +# include +#endif + +#include "stm32_rcc.h" + +/******************************************************************************* + * Pre-processor Definitions + ******************************************************************************/ + +/* Clocking *******************************************************************/ + +/* HSI - 8 MHz RC factory-trimmed + * LSI - 40 KHz RC (30-60KHz, uncalibrated) + * HSE - On-board crystal frequency is 14.7456MHz + * LSE - LSE is not connected + */ + +#define STM32_BOARD_XTAL 14745600ul + +#define STM32_HSI_FREQUENCY 8000000ul +#define STM32_LSI_FREQUENCY 40000u +#define STM32_HSE_FREQUENCY STM32_BOARD_XTAL +#define STM32_LSE_FREQUENCY 0 + +/* PLL output is 71.8848MHz */ + +#define STM32_PLL_PREDIV2 RCC_CFGR2_PREDIV2d4 +#define STM32_PLL_PLL2MUL RCC_CFGR2_PLL2MULx12 +#define STM32_PLL_PREDIV1 RCC_CFGR2_PREDIV1d4 +#define STM32_PLL_PLLMUL RCC_CFGR_PLLMUL_CLKx65 +#define STM32_PLL_FREQUENCY 71884800ul + +/* SYSCLK and HCLK adre the PLL frequency */ + +#define STM32_SYSCLK_FREQUENCY STM32_PLL_FREQUENCY +#define STM32_HCLK_FREQUENCY STM32_PLL_FREQUENCY +#define STM32_BOARD_HCLK STM32_HCLK_FREQUENCY + +/* USB clock output is 47.9232MHz */ + +#define STM32_CFGR_OTGFSPRE RCC_CFGR_OTGFSPREd3 + +/* APB2 clock (PCLK2) is HCLK */ + +#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLK +#define STM32_PCLK2_FREQUENCY STM32_HCLK_FREQUENCY +#define STM32_APB2_CLKIN STM32_PCLK2_FREQUENCY + +#define STM32APB_TIM1_CLKIN STM32_PCLK2_FREQUENCY + +/* APB1 clock (PCLK1) is HCLK/2 (35.9424MHz) */ + +#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLKd2 +#define STM32_PCLK1_FREQUENCY (STM32_HCLK_FREQUENCY/2) + +#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) + +/* LED definitions ************************************************************/ +/* There are four LEDs on stm32butterfly2 board that can be controlled by + * software. All pulled high and van be illuminated by driving the output low. + * + * LED1 PB0 + * LED2 PB1 + * LED3 PC4 + * LED4 PC5 + */ + +/* LED index values for use with board_userled() */ + +#define BOARD_LED1 0 +#define BOARD_LED2 1 +#define BOARD_LED3 2 +#define BOARD_LED4 3 +#define BOARD_NLEDS 4 + +/* LED bits for use with board_userled_all() */ + +#define BOARD_LED1_BIT (1 << BOARD_LED1) +#define BOARD_LED2_BIT (1 << BOARD_LED2) +#define BOARD_LED3_BIT (1 << BOARD_LED3) +#define BOARD_LED4_BIT (1 << BOARD_LED4) + +/* These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is defined. + * In thath case, the usage by the board port is defined in include/board.h and + * src/stm32_leds.c. The LEDs are used to encode OS-related events as follows: + * + * SYMBOL Val Meaning LED state + * LED1 LED2 LED3 LED4 + * ----------------- --- ----------------------- ---- ---- ---- ---- */ +#define LED_STARTED 0 /* NuttX has been started ON OFF OFF OFF */ +#define LED_HEAPALLOCATE 1 /* Heap has been allocated OFF ON OFF OFF */ +#define LED_IRQSENABLED 2 /* Interrupts enabled OFF OFF ON OFF */ +#define LED_STACKCREATED 3 /* Idle stack created OFF OFF OFF ON */ +#define LED_INIRQ 5 /* In an interrupt N/C N/C N/C GLOW */ +#define LED_SIGNAL 6 /* In a signal handler N/C N/C N/C GLOW */ +#define LED_ASSERTION 7 /* An assertion failed N/C N/C N/C GLOW */ +#define LED_PANIC 8 /* The system has crashed N/C N/C N/C FLASH */ +#undef LED_IDLE /* MCU is is sleep mode Not used */ + +/* After booting, LED1-3 are not longer used by the system and can be used for + * other purposes by the application (Of course, all LEDs are available to the + * application if CONFIG_ARCH_LEDS is not defined. + */ + +/* ADC configuration. Right now only ADC12_IN10 is supported (potentiometer) */ + +#ifdef CONFIG_STM32_ADC2 +# error "CONFIG_STM32_ADC2 is not supported" +#endif + +/* SPI configuration. Only SPI1 is supported */ + +#ifdef CONFIG_STM32_SPI2 +# error "CONFIG_STM32_SPI2 is not supported" +#endif + +/******************************************************************************* + * Public Data + ******************************************************************************/ + +#ifndef __ASSEMBLY__ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/******************************************************************************* + * Public Function Prototypes + ******************************************************************************/ + +/******************************************************************************* + * Name: stm32_boardinitialize + * + * Description: + * All STM32 architectures must provide the following entry point. This + * entry point is called early in the initialization -- after all memory + * has been configured and mapped but before any devices have been + * initialized. + ******************************************************************************/ + +void stm32_boardinitialize(void); + +#undef EXTERN +#if defined(__cplusplus) +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __CONFIGS_STM32_BUTTERFLY2_INCLUDE_BOARD_H */ diff --git a/configs/stm32butterfly2/nsh/Make.defs b/configs/stm32butterfly2/nsh/Make.defs new file mode 100644 index 0000000000000000000000000000000000000000..fdb1fc9867c7bfc0ce765bc7ee651f284055478c --- /dev/null +++ b/configs/stm32butterfly2/nsh/Make.defs @@ -0,0 +1,117 @@ +############################################################################ +# configs/stm32butterfly2/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 + +ifeq ($(CONFIG_STM32_DFU),y) + LDSCRIPT = dfu.ld +else + LDSCRIPT = flash.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 = $(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 -fcheck-new -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-gotoff.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/stm32butterfly2/nsh/defconfig b/configs/stm32butterfly2/nsh/defconfig new file mode 100644 index 0000000000000000000000000000000000000000..c45cf46a3cbe04c5434670f6c730c3c395598d95 --- /dev/null +++ b/configs/stm32butterfly2/nsh/defconfig @@ -0,0 +1,1271 @@ +# +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# + +# +# Build Setup +# +# CONFIG_EXPERIMENTAL is not set +# CONFIG_DEFAULT_SMALL is not set +CONFIG_HOST_LINUX=y +# CONFIG_HOST_OSX is not set +# CONFIG_HOST_WINDOWS is not set +# CONFIG_HOST_OTHER is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +CONFIG_INTELHEX_BINARY=y +# CONFIG_MOTOROLA_SREC is not set +CONFIG_RAW_BINARY=y +# CONFIG_UBOOT_UIMAGE is not set + +# +# Customize Header Files +# +# CONFIG_ARCH_STDINT_H is not set +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_FLOAT_H is not set +# CONFIG_ARCH_STDARG_H is not set +# CONFIG_ARCH_DEBUG_H is not set + +# +# Debug Options +# +CONFIG_DEBUG_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 +# 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=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=y +# CONFIG_ARMV7M_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set +# CONFIG_SERIAL_TERMIOS is not set +# CONFIG_USBHOST_BULK_DISABLE is not set +# CONFIG_USBHOST_INT_DISABLE is not set +# CONFIG_USBHOST_ISOC_DISABLE is not set + +# +# STM32 Configuration Options +# +# CONFIG_ARCH_CHIP_STM32L151C6 is not set +# CONFIG_ARCH_CHIP_STM32L151C8 is not set +# CONFIG_ARCH_CHIP_STM32L151CB is not set +# CONFIG_ARCH_CHIP_STM32L151R6 is not set +# CONFIG_ARCH_CHIP_STM32L151R8 is not set +# CONFIG_ARCH_CHIP_STM32L151RB is not set +# CONFIG_ARCH_CHIP_STM32L151V6 is not set +# CONFIG_ARCH_CHIP_STM32L151V8 is not set +# CONFIG_ARCH_CHIP_STM32L151VB is not set +# CONFIG_ARCH_CHIP_STM32L152C6 is not set +# CONFIG_ARCH_CHIP_STM32L152C8 is not set +# CONFIG_ARCH_CHIP_STM32L152CB is not set +# CONFIG_ARCH_CHIP_STM32L152R6 is not set +# CONFIG_ARCH_CHIP_STM32L152R8 is not set +# CONFIG_ARCH_CHIP_STM32L152RB is not set +# CONFIG_ARCH_CHIP_STM32L152V6 is not set +# CONFIG_ARCH_CHIP_STM32L152V8 is not set +# CONFIG_ARCH_CHIP_STM32L152VB is not set +# CONFIG_ARCH_CHIP_STM32L162ZD is not set +# CONFIG_ARCH_CHIP_STM32L162VE is not set +# CONFIG_ARCH_CHIP_STM32F100C8 is not set +# CONFIG_ARCH_CHIP_STM32F100CB is not set +# CONFIG_ARCH_CHIP_STM32F100R8 is not set +# CONFIG_ARCH_CHIP_STM32F100RB is not set +# CONFIG_ARCH_CHIP_STM32F100RC is not set +# CONFIG_ARCH_CHIP_STM32F100RD is not set +# CONFIG_ARCH_CHIP_STM32F100RE is not set +# CONFIG_ARCH_CHIP_STM32F100V8 is not set +# CONFIG_ARCH_CHIP_STM32F100VB is not set +# CONFIG_ARCH_CHIP_STM32F100VC is not set +# CONFIG_ARCH_CHIP_STM32F100VD is not set +# CONFIG_ARCH_CHIP_STM32F100VE is not set +# CONFIG_ARCH_CHIP_STM32F102CB is not set +# CONFIG_ARCH_CHIP_STM32F103T8 is not set +# CONFIG_ARCH_CHIP_STM32F103TB is not set +# CONFIG_ARCH_CHIP_STM32F103C4 is not set +# CONFIG_ARCH_CHIP_STM32F103C8 is not set +# CONFIG_ARCH_CHIP_STM32F103CB is not set +# CONFIG_ARCH_CHIP_STM32F103R8 is not set +# CONFIG_ARCH_CHIP_STM32F103RB is not set +# CONFIG_ARCH_CHIP_STM32F103RC is not set +# CONFIG_ARCH_CHIP_STM32F103RD is not set +# CONFIG_ARCH_CHIP_STM32F103RE is not set +# CONFIG_ARCH_CHIP_STM32F103RG is not set +# CONFIG_ARCH_CHIP_STM32F103V8 is not set +# CONFIG_ARCH_CHIP_STM32F103VB is not set +# CONFIG_ARCH_CHIP_STM32F103VC is not set +# CONFIG_ARCH_CHIP_STM32F103VE is not set +# CONFIG_ARCH_CHIP_STM32F103ZE is not set +# CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set +CONFIG_ARCH_CHIP_STM32F107VC=y +# 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=y +# CONFIG_STM32_PERFORMANCELINE is not set +# CONFIG_STM32_USBACCESSLINE is not set +# CONFIG_STM32_HIGHDENSITY is not set +# CONFIG_STM32_MEDIUMDENSITY is not set +# CONFIG_STM32_LOWDENSITY is not set +# CONFIG_STM32_STM32F20XX is not set +# CONFIG_STM32_STM32F205 is not set +# CONFIG_STM32_STM32F207 is not set +# CONFIG_STM32_STM32F30XX is not set +# CONFIG_STM32_STM32F302 is not set +# CONFIG_STM32_STM32F303 is not set +# CONFIG_STM32_STM32F37XX is not set +# CONFIG_STM32_STM32F40XX 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 is not set +CONFIG_STM32_HAVE_OTGFS=y +# CONFIG_STM32_HAVE_FSMC is not set +# CONFIG_STM32_HAVE_LTDC is not set +CONFIG_STM32_HAVE_USART3=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 is not set +# 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 is not set +# CONFIG_STM32_HAVE_ADC4 is not set +# CONFIG_STM32_HAVE_ADC1_DMA is not set +# CONFIG_STM32_HAVE_ADC2_DMA is not set +# CONFIG_STM32_HAVE_ADC3_DMA is not set +# CONFIG_STM32_HAVE_ADC4_DMA is not set +CONFIG_STM32_HAVE_CAN1=y +CONFIG_STM32_HAVE_CAN2=y +CONFIG_STM32_HAVE_DAC1=y +CONFIG_STM32_HAVE_DAC2=y +# CONFIG_STM32_HAVE_RNG is not set +CONFIG_STM32_HAVE_ETHMAC=y +# CONFIG_STM32_HAVE_I2C2 is not set +# 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=y +# CONFIG_STM32_ADC2 is not set +# CONFIG_STM32_BKP is not set +# CONFIG_STM32_CAN1 is not set +# CONFIG_STM32_CAN2 is not set +# CONFIG_STM32_CRC is not set +# CONFIG_STM32_DMA1 is not set +# CONFIG_STM32_DMA2 is not set +# CONFIG_STM32_DAC1 is not set +# CONFIG_STM32_DAC2 is not set +# CONFIG_STM32_ETHMAC is not set +# CONFIG_STM32_I2C1 is not set +CONFIG_STM32_OTGFS=y +CONFIG_STM32_PWR=y +CONFIG_STM32_SPI1=y +# CONFIG_STM32_SPI2 is not set +# CONFIG_STM32_SPI3 is not set +CONFIG_STM32_SYSCFG=y +# 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_USART1 is not set +CONFIG_STM32_USART2=y +# CONFIG_STM32_USART3 is not set +# CONFIG_STM32_UART4 is not set +# CONFIG_STM32_UART5 is not set +# CONFIG_STM32_IWDG is not set +# CONFIG_STM32_WWDG is not set +CONFIG_STM32_ADC=y +CONFIG_STM32_SPI=y +# CONFIG_STM32_NOEXT_VECTORS is not set + +# +# Alternate Pin Mapping +# +# CONFIG_STM32_SPI1_REMAP is not set +CONFIG_STM32_USART2_REMAP=y +# CONFIG_STM32_JTAG_DISABLE is not set +CONFIG_STM32_JTAG_FULL_ENABLE=y +# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set +# CONFIG_STM32_JTAG_SW_ENABLE is not set +# CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG is not set +# CONFIG_STM32_FORCEPOWER is not set +# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set +# CONFIG_STM32_CCM_PROCFS is not set + +# +# Timer Configuration +# +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set +# CONFIG_STM32_TIM1_CAP is not set +# CONFIG_STM32_TIM3_CAP is not set +# CONFIG_STM32_TIM4_CAP is not set +# CONFIG_STM32_TIM5_CAP is not set + +# +# ADC Configuration +# +CONFIG_STM32_USART=y +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 +# CONFIG_STM32_USART_SINGLEWIRE is not set + +# +# SPI Configuration +# +# CONFIG_STM32_SPI_INTERRUPTS is not set +# CONFIG_STM32_SPI_DMA is not set +CONFIG_STM32_HAVE_RTC_COUNTER=y +# CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set +# CONFIG_STM32_MII_MCO is not set +# CONFIG_STM32_MII_EXTCLK is not set + +# +# USB FS Host Configuration +# +CONFIG_STM32_OTGFS_RXFIFO_SIZE=128 +CONFIG_STM32_OTGFS_NPTXFIFO_SIZE=96 +CONFIG_STM32_OTGFS_PTXFIFO_SIZE=128 +CONFIG_STM32_OTGFS_DESCSIZE=128 +# CONFIG_STM32_OTGFS_SOFINTR is not set + +# +# USB HS Host Configuration +# + +# +# USB Host Debug Configuration +# + +# +# USB Device Configuration +# + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_VECNOTIRQ is not set +# CONFIG_ARCH_DMA is not set +CONFIG_ARCH_HAVE_IRQPRIO=y +# CONFIG_ARCH_L2CACHE is not set +# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set +# CONFIG_ARCH_HAVE_ADDRENV is not set +# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set +# CONFIG_ARCH_HAVE_MULTICPU is not set +CONFIG_ARCH_HAVE_VFORK=y +# CONFIG_ARCH_HAVE_MMU is not set +CONFIG_ARCH_HAVE_MPU=y +# CONFIG_ARCH_NAND_HWECC is not set +# CONFIG_ARCH_HAVE_EXTCLK is not set +# CONFIG_ARCH_HAVE_POWEROFF is not set +CONFIG_ARCH_HAVE_RESET=y +# CONFIG_ARCH_USE_MPU is not set +# CONFIG_ARCH_IRQPRIO is not set +CONFIG_ARCH_STACKDUMP=y +# CONFIG_ENDIAN_BIG is not set +# CONFIG_ARCH_IDLE_CUSTOM is not set +# CONFIG_ARCH_HAVE_RAMFUNCS is not set +CONFIG_ARCH_HAVE_RAMVECTORS=y +# CONFIG_ARCH_RAMVECTORS is not set + +# +# Board Settings +# +CONFIG_BOARD_LOOPSPERMSEC=5483 +# CONFIG_ARCH_CALIBRATION is not set + +# +# Interrupt options +# +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +CONFIG_ARCH_INTERRUPTSTACK=0 +CONFIG_ARCH_HAVE_HIPRI_INTERRUPT=y +# CONFIG_ARCH_HIPRI_INTERRUPT is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x20000000 +CONFIG_RAM_SIZE=65536 +# CONFIG_ARCH_HAVE_SDRAM is not set + +# +# Board Selection +# +# CONFIG_ARCH_BOARD_CLOUDCTRL is not set +# CONFIG_ARCH_BOARD_OLIMEX_STM32P107 is not set +# CONFIG_ARCH_BOARD_SHENZHOU is not set +CONFIG_ARCH_BOARD_STM32_BUTTERFLY2=y +# CONFIG_ARCH_BOARD_VIEWTOOL_STM32F107 is not set +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="stm32butterfly2" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y +CONFIG_ARCH_HAVE_BUTTONS=y +CONFIG_ARCH_BUTTONS=y + +# +# Board-Specific Options +# +# CONFIG_BOARD_CRASHDUMP is not set +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=y +# 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_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set +CONFIG_USEC_PER_TICK=10000 +# CONFIG_SYSTEM_TIME64 is not set +CONFIG_CLOCK_MONOTONIC=y +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=1970 +CONFIG_START_MONTH=0 +CONFIG_START_DAY=1 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=8 +CONFIG_WDOG_INTRESERVE=1 +CONFIG_PREALLOC_TIMERS=4 + +# +# Tasks and Scheduling +# +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_RR_INTERVAL=100 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=31 +CONFIG_MAX_TASKS=16 +# CONFIG_SCHED_HAVE_PARENT is not set +# CONFIG_SCHED_WAITPID is not set + +# +# Pthread Options +# +# CONFIG_MUTEX_TYPES is not set +CONFIG_NPTHREAD_KEYS=4 + +# +# Performance Monitoring +# +CONFIG_SCHED_CPULOAD=y +# CONFIG_SCHED_CPULOAD_EXTCLK is not set +CONFIG_SCHED_CPULOAD_TIMECONSTANT=2 +# CONFIG_SCHED_INSTRUMENTATION is not set + +# +# Files and I/O +# +CONFIG_DEV_CONSOLE=y +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +# CONFIG_PRIORITY_INHERITANCE is not set + +# +# RTOS hooks +# +# CONFIG_BOARD_INITIALIZE is not set +# CONFIG_SCHED_STARTHOOK is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +# CONFIG_SIG_EVTHREAD is not set + +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCONDTIMEDOUT=16 +CONFIG_SIG_SIGWORK=17 + +# +# POSIX Message Queue Options +# +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set + +# +# Work queue support +# +CONFIG_SCHED_WORKQUEUE=y +CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_HPWORKPRIORITY=192 +CONFIG_SCHED_HPWORKPERIOD=50000 +CONFIG_SCHED_HPWORKSTACKSIZE=1024 +# CONFIG_SCHED_LPWORK is not set + +# +# Stack and heap information +# +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=2048 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 +# CONFIG_LIB_SYSCALL is not set + +# +# Device Drivers +# +# CONFIG_DISABLE_POLL is not set +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set +# CONFIG_DEV_LOOP is not set + +# +# Buffering +# +# CONFIG_DRVR_WRITEBUFFER is not set +# CONFIG_DRVR_READAHEAD is not set +CONFIG_RAMDISK=y +# 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=y +# CONFIG_SPI_BITBANG is not set +CONFIG_SPI_HWFEATURES=y +# CONFIG_SPI_CRCGENERATION is not set +CONFIG_SPI_CS_CONTROL=y +# 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=y +CONFIG_ADC=y +CONFIG_ADC_FIFOSIZE=8 +# CONFIG_ADC_NO_STARTUP_CONV is not set +# 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 + +# +# IO Expander/GPIO Support +# +# CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO 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 is not set +CONFIG_MMCSD_HAVECARDDETECT=y +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_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 +# CONFIG_ETH0_PHY_KSZ90x1 is not set +# CONFIG_ETH0_PHY_DP83848C is not set +# 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 +# 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=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +CONFIG_SERIAL_NPOLLWAITERS=2 +# CONFIG_SERIAL_IFLOWCONTROL is not set +# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set +CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y +CONFIG_USART2_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# USART2 Configuration +# +CONFIG_USART2_RXBUFSIZE=256 +CONFIG_USART2_TXBUFSIZE=256 +CONFIG_USART2_BAUD=115200 +CONFIG_USART2_BITS=8 +CONFIG_USART2_PARITY=0 +CONFIG_USART2_2STOP=0 +# CONFIG_USART2_IFLOWCONTROL is not set +# CONFIG_USART2_OFLOWCONTROL is not set +# CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set +# CONFIG_USBDEV is not set +CONFIG_USBHOST=y +CONFIG_USBHOST_NPREALLOC=4 +CONFIG_USBHOST_HAVE_ASYNCH=y +# CONFIG_USBHOST_ASYNCH is not set +# CONFIG_USBHOST_HUB is not set +CONFIG_USBHOST_MSC=y +# CONFIG_USBHOST_CDCACM is not set +CONFIG_USBHOST_HIDKBD=y +CONFIG_HIDKBD_POLLUSEC=100000 +CONFIG_HIDKBD_DEFPRIO=50 +CONFIG_HIDKBD_STACKSIZE=1024 +CONFIG_HIDKBD_BUFSIZE=64 +CONFIG_HIDKBD_NPOLLWAITERS=2 +# CONFIG_HIDKBD_RAWSCANCODES is not set +# CONFIG_HIDKBD_ALLSCANCODES is not set +# CONFIG_HIDKBD_NODEBOUNCE is not set +# CONFIG_USBHOST_HIDMOUSE is not set +# CONFIG_USBHOST_TRACE is not set +# CONFIG_HAVE_USBTRACE 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=y +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 +# CONFIG_SYSLOG_CHARDEV is not set + +# +# Networking Support +# +# CONFIG_ARCH_HAVE_NET is not set +# CONFIG_ARCH_HAVE_PHY is not set +# CONFIG_NET is not set + +# +# Crypto API +# +# CONFIG_CRYPTO is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set +CONFIG_FS_READABLE=y +CONFIG_FS_WRITABLE=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=y +CONFIG_FS_PROCFS_REGISTER=y + +# +# Exclude individual procfs entries +# +# CONFIG_FS_PROCFS_EXCLUDE_PROCESS is not set +# CONFIG_FS_PROCFS_EXCLUDE_UPTIME is not set +# CONFIG_FS_PROCFS_EXCLUDE_CPULOAD is not set +# CONFIG_FS_PROCFS_EXCLUDE_MOUNTS 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 +# + +# +# 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=y +# 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_LIB_CRC64_FAST is not set +# CONFIG_LIB_KBDCODEC is not set +# CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set + +# +# Basic CXX Support +# +# CONFIG_C99_BOOL8 is not set +# CONFIG_HAVE_CXX is not set + +# +# Application Configuration +# + +# +# NxWidgets/NxWM +# + +# +# Built-In Applications +# +CONFIG_BUILTIN_PROXY_STACKSIZE=1024 + +# +# CAN Utilities +# + +# +# Examples +# +CONFIG_EXAMPLES_ADC=y +CONFIG_EXAMPLES_ADC_DEVPATH="/dev/adc0" +CONFIG_EXAMPLES_ADC_GROUPSIZE=4 +CONFIG_EXAMPLES_ADC_SWTRIG=y +CONFIG_EXAMPLES_BUTTONS=y +CONFIG_EXAMPLES_BUTTONS_MIN=0 +CONFIG_EXAMPLES_BUTTONS_MAX=4 +# CONFIG_EXAMPLES_CHAT is not set +# CONFIG_EXAMPLES_CONFIGDATA 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_HIDKBD=y +CONFIG_EXAMPLES_HIDKBD_DEFPRIO=50 +CONFIG_EXAMPLES_HIDKBD_STACKSIZE=1024 +CONFIG_EXAMPLES_HIDKBD_DEVNAME="/dev/kbda" +# 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=y +# CONFIG_EXAMPLES_MOUNT_BLOCKDEVICE is not set +CONFIG_EXAMPLES_MOUNT_NSECTORS=2048 +CONFIG_EXAMPLES_MOUNT_SECTORSIZE=512 +CONFIG_EXAMPLES_MOUNT_RAMDEVNO=0 +# 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_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 +# 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 + +# +# 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=y +# CONFIG_NSH_PLATFORM_MOTD is not set +CONFIG_NSH_MOTD_STRING="stm32butterfly2 welcoms you" + +# +# Command Line Configuration +# +CONFIG_NSH_READLINE=y +# CONFIG_NSH_CLE is not set +CONFIG_NSH_LINELEN=80 +# CONFIG_NSH_DISABLE_SEMICOLON is not set +# CONFIG_NSH_CMDPARMS 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 is not set +# CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_DF is not set +# CONFIG_NSH_DISABLE_DELROUTE is not set +# CONFIG_NSH_DISABLE_DIRNAME is not set +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +# CONFIG_NSH_DISABLE_IFCONFIG is not set +# CONFIG_NSH_DISABLE_IFUPDOWN is not set +# CONFIG_NSH_DISABLE_KILL is not set +# CONFIG_NSH_DISABLE_LOSETUP is not set +# CONFIG_NSH_DISABLE_LOSMART is not set +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKFATFS 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 +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 +CONFIG_NSH_MMCSDSPIPORTNO=0 + +# +# Configure Command Options +# +CONFIG_NSH_CMDOPT_DF_H=y +CONFIG_NSH_CODECS_BUFSIZE=128 +CONFIG_NSH_CMDOPT_HEXDUMP=y +CONFIG_NSH_PROC_MOUNTPOINT="/proc" +CONFIG_NSH_FILEIOSIZE=1024 +CONFIG_NSH_STRERROR=y + +# +# 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_USBKBD is not set +CONFIG_NSH_ARCHINIT=y +# CONFIG_NSH_SWMAC is not set +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set + +# +# Platform-specific Support +# +# CONFIG_PLATFORM_CONFIGDATA is not set + +# +# System Libraries and NSH Add-Ons +# +# CONFIG_SYSTEM_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=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 is not set +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set +CONFIG_SYSTEM_VI=y +CONFIG_SYSTEM_VI_COLS=64 +CONFIG_SYSTEM_VI_ROWS=16 +CONFIG_SYSTEM_VI_DEBUGLEVEL=0 +CONFIG_SYSTEM_VI_STACKSIZE=2048 +CONFIG_SYSTEM_VI_PRIORITY=100 +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32butterfly2/nsh/setenv.sh b/configs/stm32butterfly2/nsh/setenv.sh new file mode 100755 index 0000000000000000000000000000000000000000..da893d41e6a1702e6a7cc4450d41a284b3d1eddc --- /dev/null +++ b/configs/stm32butterfly2/nsh/setenv.sh @@ -0,0 +1,78 @@ +#!/bin/bash +# configs/stm32butterfly2/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 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/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/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" + +# These are the Cygwin paths to the locations where I installed the Atollic +# toolchain under windows. You will also have to edit this if you install +# the Atollic toolchain in any other location. /usr/bin is added before +# the Atollic bin path because there is are binaries named gcc.exe and g++.exe +# at those locations as well. +#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin" +#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/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/stm32butterfly2/nshnet/Make.defs b/configs/stm32butterfly2/nshnet/Make.defs new file mode 100644 index 0000000000000000000000000000000000000000..fdb1fc9867c7bfc0ce765bc7ee651f284055478c --- /dev/null +++ b/configs/stm32butterfly2/nshnet/Make.defs @@ -0,0 +1,117 @@ +############################################################################ +# configs/stm32butterfly2/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 + +ifeq ($(CONFIG_STM32_DFU),y) + LDSCRIPT = dfu.ld +else + LDSCRIPT = flash.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 = $(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 -fcheck-new -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-gotoff.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/stm32butterfly2/nshnet/defconfig b/configs/stm32butterfly2/nshnet/defconfig new file mode 100644 index 0000000000000000000000000000000000000000..9bd2ad699a1222b42bb457bd137e51c955b69fae --- /dev/null +++ b/configs/stm32butterfly2/nshnet/defconfig @@ -0,0 +1,1485 @@ +# +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# + +# +# Build Setup +# +# CONFIG_EXPERIMENTAL is not set +# CONFIG_DEFAULT_SMALL is not set +CONFIG_HOST_LINUX=y +# CONFIG_HOST_OSX is not set +# CONFIG_HOST_WINDOWS is not set +# CONFIG_HOST_OTHER is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +CONFIG_INTELHEX_BINARY=y +# CONFIG_MOTOROLA_SREC is not set +CONFIG_RAW_BINARY=y +# CONFIG_UBOOT_UIMAGE is not set + +# +# Customize Header Files +# +# CONFIG_ARCH_STDINT_H is not set +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_FLOAT_H is not set +# CONFIG_ARCH_STDARG_H is not set +# CONFIG_ARCH_DEBUG_H is not set + +# +# Debug Options +# +CONFIG_DEBUG_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 +# 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_RENESAS 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=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=y +# CONFIG_ARMV7M_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set +# CONFIG_SERIAL_TERMIOS is not set + +# +# STM32 Configuration Options +# +# CONFIG_ARCH_CHIP_STM32L151C6 is not set +# CONFIG_ARCH_CHIP_STM32L151C8 is not set +# CONFIG_ARCH_CHIP_STM32L151CB is not set +# CONFIG_ARCH_CHIP_STM32L151R6 is not set +# CONFIG_ARCH_CHIP_STM32L151R8 is not set +# CONFIG_ARCH_CHIP_STM32L151RB is not set +# CONFIG_ARCH_CHIP_STM32L151V6 is not set +# CONFIG_ARCH_CHIP_STM32L151V8 is not set +# CONFIG_ARCH_CHIP_STM32L151VB is not set +# CONFIG_ARCH_CHIP_STM32L152C6 is not set +# CONFIG_ARCH_CHIP_STM32L152C8 is not set +# CONFIG_ARCH_CHIP_STM32L152CB is not set +# CONFIG_ARCH_CHIP_STM32L152R6 is not set +# CONFIG_ARCH_CHIP_STM32L152R8 is not set +# CONFIG_ARCH_CHIP_STM32L152RB is not set +# CONFIG_ARCH_CHIP_STM32L152V6 is not set +# CONFIG_ARCH_CHIP_STM32L152V8 is not set +# CONFIG_ARCH_CHIP_STM32L152VB is not set +# CONFIG_ARCH_CHIP_STM32L162ZD is not set +# CONFIG_ARCH_CHIP_STM32L162VE is not set +# CONFIG_ARCH_CHIP_STM32F100C8 is not set +# CONFIG_ARCH_CHIP_STM32F100CB is not set +# CONFIG_ARCH_CHIP_STM32F100R8 is not set +# CONFIG_ARCH_CHIP_STM32F100RB is not set +# CONFIG_ARCH_CHIP_STM32F100RC is not set +# CONFIG_ARCH_CHIP_STM32F100RD is not set +# CONFIG_ARCH_CHIP_STM32F100RE is not set +# CONFIG_ARCH_CHIP_STM32F100V8 is not set +# CONFIG_ARCH_CHIP_STM32F100VB is not set +# CONFIG_ARCH_CHIP_STM32F100VC is not set +# CONFIG_ARCH_CHIP_STM32F100VD is not set +# CONFIG_ARCH_CHIP_STM32F100VE is not set +# CONFIG_ARCH_CHIP_STM32F102CB is not set +# CONFIG_ARCH_CHIP_STM32F103T8 is not set +# CONFIG_ARCH_CHIP_STM32F103TB is not set +# CONFIG_ARCH_CHIP_STM32F103C4 is not set +# CONFIG_ARCH_CHIP_STM32F103C8 is not set +# CONFIG_ARCH_CHIP_STM32F103CB is not set +# CONFIG_ARCH_CHIP_STM32F103R8 is not set +# CONFIG_ARCH_CHIP_STM32F103RB is not set +# CONFIG_ARCH_CHIP_STM32F103RC is not set +# CONFIG_ARCH_CHIP_STM32F103RD is not set +# CONFIG_ARCH_CHIP_STM32F103RE is not set +# CONFIG_ARCH_CHIP_STM32F103RG is not set +# CONFIG_ARCH_CHIP_STM32F103V8 is not set +# CONFIG_ARCH_CHIP_STM32F103VB is not set +# CONFIG_ARCH_CHIP_STM32F103VC is not set +# CONFIG_ARCH_CHIP_STM32F103VE is not set +# CONFIG_ARCH_CHIP_STM32F103ZE is not set +# CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set +CONFIG_ARCH_CHIP_STM32F107VC=y +# 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=y +# CONFIG_STM32_PERFORMANCELINE is not set +# CONFIG_STM32_USBACCESSLINE is not set +# CONFIG_STM32_HIGHDENSITY is not set +# CONFIG_STM32_MEDIUMDENSITY is not set +# CONFIG_STM32_LOWDENSITY is not set +# CONFIG_STM32_STM32F20XX is not set +# CONFIG_STM32_STM32F205 is not set +# CONFIG_STM32_STM32F207 is not set +# CONFIG_STM32_STM32F30XX is not set +# CONFIG_STM32_STM32F302 is not set +# CONFIG_STM32_STM32F303 is not set +# CONFIG_STM32_STM32F37XX is not set +# CONFIG_STM32_STM32F40XX 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 is not set +CONFIG_STM32_HAVE_OTGFS=y +# CONFIG_STM32_HAVE_FSMC is not set +# CONFIG_STM32_HAVE_LTDC is not set +CONFIG_STM32_HAVE_USART3=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 is not set +# 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 is not set +# CONFIG_STM32_HAVE_ADC4 is not set +# CONFIG_STM32_HAVE_ADC1_DMA is not set +# CONFIG_STM32_HAVE_ADC2_DMA is not set +# CONFIG_STM32_HAVE_ADC3_DMA is not set +# CONFIG_STM32_HAVE_ADC4_DMA is not set +CONFIG_STM32_HAVE_CAN1=y +CONFIG_STM32_HAVE_CAN2=y +CONFIG_STM32_HAVE_DAC1=y +CONFIG_STM32_HAVE_DAC2=y +# CONFIG_STM32_HAVE_RNG is not set +CONFIG_STM32_HAVE_ETHMAC=y +# CONFIG_STM32_HAVE_I2C2 is not set +# 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=y +# CONFIG_STM32_ADC2 is not set +# CONFIG_STM32_BKP is not set +# CONFIG_STM32_CAN1 is not set +# CONFIG_STM32_CAN2 is not set +# CONFIG_STM32_CRC is not set +# CONFIG_STM32_DMA1 is not set +# CONFIG_STM32_DMA2 is not set +# CONFIG_STM32_DAC1 is not set +# CONFIG_STM32_DAC2 is not set +CONFIG_STM32_ETHMAC=y +# CONFIG_STM32_I2C1 is not set +CONFIG_STM32_OTGFS=y +CONFIG_STM32_PWR=y +CONFIG_STM32_SPI1=y +# CONFIG_STM32_SPI2 is not set +# CONFIG_STM32_SPI3 is not set +CONFIG_STM32_SYSCFG=y +# 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_USART1 is not set +CONFIG_STM32_USART2=y +# CONFIG_STM32_USART3 is not set +# CONFIG_STM32_UART4 is not set +# CONFIG_STM32_UART5 is not set +# CONFIG_STM32_IWDG is not set +# CONFIG_STM32_WWDG is not set +CONFIG_STM32_ADC=y +CONFIG_STM32_SPI=y +# CONFIG_STM32_NOEXT_VECTORS is not set + +# +# Alternate Pin Mapping +# +CONFIG_STM32_ETH_REMAP=y +# CONFIG_STM32_SPI1_REMAP is not set +CONFIG_STM32_USART2_REMAP=y +# CONFIG_STM32_JTAG_DISABLE is not set +CONFIG_STM32_JTAG_FULL_ENABLE=y +# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set +# CONFIG_STM32_JTAG_SW_ENABLE is not set +# CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG is not set +# CONFIG_STM32_FORCEPOWER is not set +# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set +# CONFIG_STM32_CCM_PROCFS is not set + +# +# Timer Configuration +# +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set +# CONFIG_STM32_TIM1_CAP is not set +# CONFIG_STM32_TIM3_CAP is not set +# CONFIG_STM32_TIM4_CAP is not set +# CONFIG_STM32_TIM5_CAP is not set + +# +# ADC Configuration +# +CONFIG_STM32_USART=y +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 +# CONFIG_STM32_USART_SINGLEWIRE is not set + +# +# SPI Configuration +# +# CONFIG_STM32_SPI_INTERRUPTS is not set +# CONFIG_STM32_SPI_DMA is not set +CONFIG_STM32_HAVE_RTC_COUNTER=y +# CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set + +# +# Ethernet MAC configuration +# +CONFIG_STM32_PHYADDR=1 +# CONFIG_STM32_PHYINIT is not set +CONFIG_STM32_MII=y +# CONFIG_STM32_MII_MCO is not set +CONFIG_STM32_MII_EXTCLK=y +# CONFIG_STM32_AUTONEG is not set +CONFIG_STM32_ETHFD=y +CONFIG_STM32_ETH100MBPS=y +# CONFIG_STM32_ETH_PTP is not set + +# +# USB FS Host Configuration +# + +# +# USB HS Host Configuration +# + +# +# USB Host Debug Configuration +# + +# +# USB Device Configuration +# + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_VECNOTIRQ is not set +# CONFIG_ARCH_DMA is not set +CONFIG_ARCH_HAVE_IRQPRIO=y +# CONFIG_ARCH_L2CACHE is not set +# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set +# CONFIG_ARCH_HAVE_ADDRENV is not set +# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set +# CONFIG_ARCH_HAVE_MULTICPU is not set +CONFIG_ARCH_HAVE_VFORK=y +# CONFIG_ARCH_HAVE_MMU is not set +CONFIG_ARCH_HAVE_MPU=y +# CONFIG_ARCH_NAND_HWECC is not set +# CONFIG_ARCH_HAVE_EXTCLK is not set +# CONFIG_ARCH_HAVE_POWEROFF is not set +CONFIG_ARCH_HAVE_RESET=y +# CONFIG_ARCH_USE_MPU is not set +# CONFIG_ARCH_IRQPRIO is not set +CONFIG_ARCH_STACKDUMP=y +# CONFIG_ENDIAN_BIG is not set +# CONFIG_ARCH_IDLE_CUSTOM is not set +# CONFIG_ARCH_HAVE_RAMFUNCS is not set +CONFIG_ARCH_HAVE_RAMVECTORS=y +# CONFIG_ARCH_RAMVECTORS is not set + +# +# Board Settings +# +CONFIG_BOARD_LOOPSPERMSEC=5483 +# CONFIG_ARCH_CALIBRATION is not set + +# +# Interrupt options +# +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +CONFIG_ARCH_INTERRUPTSTACK=0 +CONFIG_ARCH_HAVE_HIPRI_INTERRUPT=y +# CONFIG_ARCH_HIPRI_INTERRUPT is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x20000000 +CONFIG_RAM_SIZE=65536 +# CONFIG_ARCH_HAVE_SDRAM is not set + +# +# Board Selection +# +# CONFIG_ARCH_BOARD_CLOUDCTRL is not set +# CONFIG_ARCH_BOARD_OLIMEX_STM32P107 is not set +# CONFIG_ARCH_BOARD_SHENZHOU is not set +CONFIG_ARCH_BOARD_STM32_BUTTERFLY2=y +# CONFIG_ARCH_BOARD_VIEWTOOL_STM32F107 is not set +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="stm32butterfly2" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y +CONFIG_ARCH_HAVE_BUTTONS=y +CONFIG_ARCH_BUTTONS=y + +# +# Board-Specific Options +# +# CONFIG_BOARD_CRASHDUMP 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=y +# 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_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set +CONFIG_USEC_PER_TICK=10000 +# CONFIG_SYSTEM_TIME64 is not set +CONFIG_CLOCK_MONOTONIC=y +CONFIG_ARCH_HAVE_TIMEKEEPING=y +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=1970 +CONFIG_START_MONTH=0 +CONFIG_START_DAY=1 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=8 +CONFIG_WDOG_INTRESERVE=1 +CONFIG_PREALLOC_TIMERS=4 + +# +# Tasks and Scheduling +# +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_RR_INTERVAL=100 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=31 +CONFIG_MAX_TASKS=16 +# CONFIG_SCHED_HAVE_PARENT is not set +# CONFIG_SCHED_WAITPID is not set + +# +# Pthread Options +# +# CONFIG_MUTEX_TYPES is not set +CONFIG_NPTHREAD_KEYS=4 + +# +# Performance Monitoring +# +CONFIG_SCHED_CPULOAD=y +# CONFIG_SCHED_CPULOAD_EXTCLK is not set +CONFIG_SCHED_CPULOAD_TIMECONSTANT=2 +# CONFIG_SCHED_INSTRUMENTATION is not set + +# +# Files and I/O +# +CONFIG_DEV_CONSOLE=y +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +# CONFIG_PRIORITY_INHERITANCE is not set + +# +# RTOS hooks +# +# CONFIG_BOARD_INITIALIZE is not set +# CONFIG_SCHED_STARTHOOK is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +# CONFIG_SIG_EVTHREAD is not set + +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCONDTIMEDOUT=16 +CONFIG_SIG_SIGWORK=17 + +# +# POSIX Message Queue Options +# +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set + +# +# Work queue support +# +CONFIG_SCHED_WORKQUEUE=y +CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_HPWORKPRIORITY=192 +CONFIG_SCHED_HPWORKPERIOD=50000 +CONFIG_SCHED_HPWORKSTACKSIZE=1024 +# CONFIG_SCHED_LPWORK is not set + +# +# Stack and heap information +# +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=2048 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 +# CONFIG_LIB_SYSCALL is not set + +# +# Device Drivers +# +# CONFIG_DISABLE_POLL is not set +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set +# CONFIG_DEV_LOOP is not set + +# +# Buffering +# +# CONFIG_DRVR_WRITEBUFFER is not set +# CONFIG_DRVR_READAHEAD is not set +CONFIG_RAMDISK=y +# 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=y +# CONFIG_SPI_HWFEATURES is not set +# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set +# CONFIG_I2S is not set + +# +# Timer Driver Support +# +# CONFIG_TIMER is not set +# CONFIG_ONESHOT is not set +# CONFIG_RTC is not set +# CONFIG_WATCHDOG is not set +CONFIG_ANALOG=y +CONFIG_ADC=y +CONFIG_ADC_FIFOSIZE=8 +# CONFIG_ADC_NO_STARTUP_CONV is not set +# 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 + +# +# IO Expander/GPIO Support +# +# CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO 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 is not set +CONFIG_MMCSD_HAVECARDDETECT=y +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_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 +# +# CONFIG_NET_DM90x0 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 + +# +# External Ethernet PHY Device Support +# +# CONFIG_ARCH_PHY_INTERRUPT is not set +# 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 +# CONFIG_ETH0_PHY_KSZ90x1 is not set +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=y +CONFIG_DEV_PIPE_MAXSIZE=1024 +CONFIG_DEV_PIPE_SIZE=1024 +CONFIG_DEV_FIFO_SIZE=1024 +# 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 is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +CONFIG_SERIAL_NPOLLWAITERS=2 +# CONFIG_SERIAL_IFLOWCONTROL is not set +# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set +CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y +CONFIG_USART2_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# USART2 Configuration +# +CONFIG_USART2_RXBUFSIZE=256 +CONFIG_USART2_TXBUFSIZE=256 +CONFIG_USART2_BAUD=115200 +CONFIG_USART2_BITS=8 +CONFIG_USART2_PARITY=0 +CONFIG_USART2_2STOP=0 +# CONFIG_USART2_IFLOWCONTROL is not set +# CONFIG_USART2_OFLOWCONTROL is not set +# CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set +CONFIG_USBDEV=y + +# +# USB Device Controller Driver Options +# +# CONFIG_USBDEV_ISOCHRONOUS is not set +# CONFIG_USBDEV_DUALSPEED is not set +# CONFIG_USBDEV_SELFPOWERED is not set +CONFIG_USBDEV_BUSPOWERED=y +CONFIG_USBDEV_MAXPOWER=500 +# CONFIG_USBDEV_DMA is not set +# CONFIG_ARCH_USBDEV_STALLQUEUE is not set +# CONFIG_USBDEV_TRACE is not set + +# +# USB Device Class Driver Options +# +# CONFIG_USBDEV_COMPOSITE is not set +CONFIG_PL2303=y +# CONFIG_PL2303_CONSOLE is not set +CONFIG_PL2303_EPINTIN=1 +CONFIG_PL2303_EPBULKOUT=2 +CONFIG_PL2303_EPBULKIN=3 +CONFIG_PL2303_EP0MAXPACKET=64 +CONFIG_PL2303_NWRREQS=4 +CONFIG_PL2303_NRDREQS=4 +CONFIG_PL2303_BULKIN_REQLEN=96 +CONFIG_PL2303_RXBUFSIZE=257 +CONFIG_PL2303_TXBUFSIZE=193 +CONFIG_PL2303_VENDORID=0x067b +CONFIG_PL2303_PRODUCTID=0x2303 +CONFIG_PL2303_VENDORSTR="NuttX" +CONFIG_PL2303_PRODUCTSTR="PL2303 Emulation" +# CONFIG_CDCACM is not set +# CONFIG_USBMSC is not set +# CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE 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=y +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 +# CONFIG_SYSLOG_CHARDEV is not set + +# +# Networking Support +# +CONFIG_ARCH_HAVE_NET=y +CONFIG_ARCH_HAVE_PHY=y +CONFIG_NET=y +# CONFIG_NET_NOINTS is not set +# CONFIG_NET_PROMISCUOUS is not set + +# +# Driver buffer configuration +# +CONFIG_NET_MULTIBUFFER=y +CONFIG_NET_ETH_MTU=1500 +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=8 +CONFIG_NET_NACTIVESOCKETS=16 +# CONFIG_NET_SOCKOPTS is not set + +# +# Raw Socket Support +# +# CONFIG_NET_PKT is not set + +# +# Unix Domain Socket Support +# +CONFIG_NET_LOCAL=y +CONFIG_NET_LOCAL_STREAM=y +CONFIG_NET_LOCAL_DGRAM=y + +# +# TCP/IP Networking +# +CONFIG_NET_TCP=y +# CONFIG_NET_TCPURGDATA is not set +CONFIG_NET_TCP_CONNS=8 +CONFIG_NET_MAX_LISTENPORTS=20 +CONFIG_NET_TCP_READAHEAD=y +# CONFIG_NET_TCP_WRITE_BUFFERS is not set +CONFIG_NET_TCP_RECVDELAY=0 +# CONFIG_NET_TCPBACKLOG is not set +CONFIG_NET_TCP_SPLIT=y +CONFIG_NET_TCP_SPLIT_SIZE=40 +# CONFIG_NET_SENDFILE is not set + +# +# UDP Networking +# +CONFIG_NET_UDP=y +# CONFIG_NET_UDP_CHECKSUMS is not set +CONFIG_NET_UDP_CONNS=8 +# CONFIG_NET_BROADCAST is not set +# CONFIG_NET_RXAVAIL is not set +CONFIG_NET_UDP_READAHEAD=y + +# +# ICMP Networking Support +# +CONFIG_NET_ICMP=y +CONFIG_NET_ICMP_PING=y + +# +# IGMPv2 Client Support +# +# CONFIG_NET_IGMP is not set + +# +# ARP Configuration +# +CONFIG_NET_ARP=y +CONFIG_NET_ARPTAB_SIZE=16 +CONFIG_NET_ARP_MAXAGE=120 +CONFIG_NET_ARP_IPIN=y +# 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_NET_ARCH_INCR32 is not set +# CONFIG_NET_ARCH_CHKSUM is not set +# CONFIG_NET_STATISTICS is not set + +# +# Routing Table Configuration +# +# CONFIG_NET_ROUTE is not set +CONFIG_NET_HOSTNAME="butterfly2" + +# +# Crypto API +# +# CONFIG_CRYPTO is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set +CONFIG_FS_READABLE=y +CONFIG_FS_WRITABLE=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_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=y +CONFIG_FS_PROCFS_REGISTER=y + +# +# Exclude individual procfs entries +# +# CONFIG_FS_PROCFS_EXCLUDE_PROCESS is not set +# CONFIG_FS_PROCFS_EXCLUDE_UPTIME is not set +# CONFIG_FS_PROCFS_EXCLUDE_CPULOAD is not set +# CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set +# CONFIG_FS_PROCFS_EXCLUDE_NET 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 +# + +# +# 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=y +# 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=y +# CONFIG_NETDB_HOSTFILE 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 +# CONFIG_LIB_HEX2BIN is not set + +# +# Basic CXX Support +# +# CONFIG_C99_BOOL8 is not set +# CONFIG_HAVE_CXX is not set + +# +# Application Configuration +# + +# +# NxWidgets/NxWM +# + +# +# Built-In Applications +# +CONFIG_BUILTIN_PROXY_STACKSIZE=1024 + +# +# CAN Utilities +# + +# +# Examples +# +CONFIG_EXAMPLES_ADC=y +CONFIG_EXAMPLES_ADC_DEVPATH="/dev/adc0" +CONFIG_EXAMPLES_ADC_GROUPSIZE=4 +CONFIG_EXAMPLES_ADC_SWTRIG=y +CONFIG_EXAMPLES_BUTTONS=y +CONFIG_EXAMPLES_BUTTONS_MIN=0 +CONFIG_EXAMPLES_BUTTONS_MAX=4 +# 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_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=y +# CONFIG_EXAMPLES_MOUNT_BLOCKDEVICE is not set +CONFIG_EXAMPLES_MOUNT_NSECTORS=2048 +CONFIG_EXAMPLES_MOUNT_SECTORSIZE=512 +CONFIG_EXAMPLES_MOUNT_RAMDEVNO=0 +# CONFIG_EXAMPLES_NETTEST 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_RFID_READUID 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_UDGRAM is not set +# CONFIG_EXAMPLES_UDP is not set +# CONFIG_EXAMPLES_UDPBLASTER is not set +CONFIG_EXAMPLES_USBSERIAL=y +CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 +CONFIG_EXAMPLES_USBTERM=y +# CONFIG_EXAMPLES_USTREAM 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 +# +# 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_MINIBASIC 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_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_WEBCLIENT is not set +# CONFIG_NETUTILS_WEBSERVER is not set +# CONFIG_NETUTILS_XMLRPC is not set + +# +# NSH Library +# +CONFIG_NSH_LIBRARY=y +CONFIG_NSH_MOTD=y +# CONFIG_NSH_PLATFORM_MOTD is not set +CONFIG_NSH_MOTD_STRING="stm32butterfly2 welcoms you" + +# +# Command Line Configuration +# +CONFIG_NSH_READLINE=y +# CONFIG_NSH_CLE is not set +CONFIG_NSH_LINELEN=80 +# CONFIG_NSH_DISABLE_SEMICOLON is not set +# CONFIG_NSH_CMDPARMS 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_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 +# CONFIG_NSH_DISABLE_CMP is not set +# CONFIG_NSH_DISABLE_DATE is not set +# CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_DF is not set +# CONFIG_NSH_DISABLE_DELROUTE is not set +# CONFIG_NSH_DISABLE_DIRNAME is not set +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +# CONFIG_NSH_DISABLE_IFCONFIG is not set +# CONFIG_NSH_DISABLE_IFUPDOWN is not set +# CONFIG_NSH_DISABLE_KILL is not set +# CONFIG_NSH_DISABLE_LOSETUP is not set +# CONFIG_NSH_DISABLE_LOSMART is not set +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKFATFS 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_PING 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 +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 +CONFIG_NSH_MMCSDSPIPORTNO=0 + +# +# Configure Command Options +# +CONFIG_NSH_CMDOPT_DF_H=y +CONFIG_NSH_CODECS_BUFSIZE=128 +CONFIG_NSH_CMDOPT_HEXDUMP=y +CONFIG_NSH_PROC_MOUNTPOINT="/proc" +CONFIG_NSH_FILEIOSIZE=1024 +CONFIG_NSH_STRERROR=y + +# +# 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 is not set +# CONFIG_NSH_ALTCONDEV is not set +CONFIG_NSH_ARCHINIT=y + +# +# Networking Configuration +# +CONFIG_NSH_NETINIT=y +# CONFIG_NSH_NETINIT_THREAD is not set + +# +# IP Address Configuration +# + +# +# IPv4 Addresses +# +CONFIG_NSH_IPADDR=0x0a010163 +CONFIG_NSH_DRIPADDR=0x0a010101 +CONFIG_NSH_NETMASK=0xffffff00 +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 + +# +# 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_NETDB 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 is not set +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_TEE is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set +CONFIG_SYSTEM_VI=y +CONFIG_SYSTEM_VI_COLS=64 +CONFIG_SYSTEM_VI_ROWS=16 +CONFIG_SYSTEM_VI_DEBUGLEVEL=0 +CONFIG_SYSTEM_VI_STACKSIZE=2048 +CONFIG_SYSTEM_VI_PRIORITY=100 +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32butterfly2/nshnet/setenv.sh b/configs/stm32butterfly2/nshnet/setenv.sh new file mode 100755 index 0000000000000000000000000000000000000000..da893d41e6a1702e6a7cc4450d41a284b3d1eddc --- /dev/null +++ b/configs/stm32butterfly2/nshnet/setenv.sh @@ -0,0 +1,78 @@ +#!/bin/bash +# configs/stm32butterfly2/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 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/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/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" + +# These are the Cygwin paths to the locations where I installed the Atollic +# toolchain under windows. You will also have to edit this if you install +# the Atollic toolchain in any other location. /usr/bin is added before +# the Atollic bin path because there is are binaries named gcc.exe and g++.exe +# at those locations as well. +#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin" +#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/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/stm32butterfly2/nshusbdev/Make.defs b/configs/stm32butterfly2/nshusbdev/Make.defs new file mode 100644 index 0000000000000000000000000000000000000000..fdb1fc9867c7bfc0ce765bc7ee651f284055478c --- /dev/null +++ b/configs/stm32butterfly2/nshusbdev/Make.defs @@ -0,0 +1,117 @@ +############################################################################ +# configs/stm32butterfly2/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 + +ifeq ($(CONFIG_STM32_DFU),y) + LDSCRIPT = dfu.ld +else + LDSCRIPT = flash.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 = $(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 -fcheck-new -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-gotoff.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/stm32butterfly2/nshusbdev/defconfig b/configs/stm32butterfly2/nshusbdev/defconfig new file mode 100644 index 0000000000000000000000000000000000000000..c9353da661e703ec7dc133a5fe2b376a453adc50 --- /dev/null +++ b/configs/stm32butterfly2/nshusbdev/defconfig @@ -0,0 +1,1262 @@ +# +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# + +# +# Build Setup +# +# CONFIG_EXPERIMENTAL is not set +# CONFIG_DEFAULT_SMALL is not set +CONFIG_HOST_LINUX=y +# CONFIG_HOST_OSX is not set +# CONFIG_HOST_WINDOWS is not set +# CONFIG_HOST_OTHER is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +CONFIG_INTELHEX_BINARY=y +# CONFIG_MOTOROLA_SREC is not set +CONFIG_RAW_BINARY=y +# CONFIG_UBOOT_UIMAGE is not set + +# +# Customize Header Files +# +# CONFIG_ARCH_STDINT_H is not set +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_FLOAT_H is not set +# CONFIG_ARCH_STDARG_H is not set +# CONFIG_ARCH_DEBUG_H is not set + +# +# Debug Options +# +CONFIG_DEBUG_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 +# 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=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=y +# CONFIG_ARMV7M_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set +# CONFIG_SERIAL_TERMIOS is not set + +# +# STM32 Configuration Options +# +# CONFIG_ARCH_CHIP_STM32L151C6 is not set +# CONFIG_ARCH_CHIP_STM32L151C8 is not set +# CONFIG_ARCH_CHIP_STM32L151CB is not set +# CONFIG_ARCH_CHIP_STM32L151R6 is not set +# CONFIG_ARCH_CHIP_STM32L151R8 is not set +# CONFIG_ARCH_CHIP_STM32L151RB is not set +# CONFIG_ARCH_CHIP_STM32L151V6 is not set +# CONFIG_ARCH_CHIP_STM32L151V8 is not set +# CONFIG_ARCH_CHIP_STM32L151VB is not set +# CONFIG_ARCH_CHIP_STM32L152C6 is not set +# CONFIG_ARCH_CHIP_STM32L152C8 is not set +# CONFIG_ARCH_CHIP_STM32L152CB is not set +# CONFIG_ARCH_CHIP_STM32L152R6 is not set +# CONFIG_ARCH_CHIP_STM32L152R8 is not set +# CONFIG_ARCH_CHIP_STM32L152RB is not set +# CONFIG_ARCH_CHIP_STM32L152V6 is not set +# CONFIG_ARCH_CHIP_STM32L152V8 is not set +# CONFIG_ARCH_CHIP_STM32L152VB is not set +# CONFIG_ARCH_CHIP_STM32L162ZD is not set +# CONFIG_ARCH_CHIP_STM32L162VE is not set +# CONFIG_ARCH_CHIP_STM32F100C8 is not set +# CONFIG_ARCH_CHIP_STM32F100CB is not set +# CONFIG_ARCH_CHIP_STM32F100R8 is not set +# CONFIG_ARCH_CHIP_STM32F100RB is not set +# CONFIG_ARCH_CHIP_STM32F100RC is not set +# CONFIG_ARCH_CHIP_STM32F100RD is not set +# CONFIG_ARCH_CHIP_STM32F100RE is not set +# CONFIG_ARCH_CHIP_STM32F100V8 is not set +# CONFIG_ARCH_CHIP_STM32F100VB is not set +# CONFIG_ARCH_CHIP_STM32F100VC is not set +# CONFIG_ARCH_CHIP_STM32F100VD is not set +# CONFIG_ARCH_CHIP_STM32F100VE is not set +# CONFIG_ARCH_CHIP_STM32F102CB is not set +# CONFIG_ARCH_CHIP_STM32F103T8 is not set +# CONFIG_ARCH_CHIP_STM32F103TB is not set +# CONFIG_ARCH_CHIP_STM32F103C4 is not set +# CONFIG_ARCH_CHIP_STM32F103C8 is not set +# CONFIG_ARCH_CHIP_STM32F103CB is not set +# CONFIG_ARCH_CHIP_STM32F103R8 is not set +# CONFIG_ARCH_CHIP_STM32F103RB is not set +# CONFIG_ARCH_CHIP_STM32F103RC is not set +# CONFIG_ARCH_CHIP_STM32F103RD is not set +# CONFIG_ARCH_CHIP_STM32F103RE is not set +# CONFIG_ARCH_CHIP_STM32F103RG is not set +# CONFIG_ARCH_CHIP_STM32F103V8 is not set +# CONFIG_ARCH_CHIP_STM32F103VB is not set +# CONFIG_ARCH_CHIP_STM32F103VC is not set +# CONFIG_ARCH_CHIP_STM32F103VE is not set +# CONFIG_ARCH_CHIP_STM32F103ZE is not set +# CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set +CONFIG_ARCH_CHIP_STM32F107VC=y +# 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=y +# CONFIG_STM32_PERFORMANCELINE is not set +# CONFIG_STM32_USBACCESSLINE is not set +# CONFIG_STM32_HIGHDENSITY is not set +# CONFIG_STM32_MEDIUMDENSITY is not set +# CONFIG_STM32_LOWDENSITY is not set +# CONFIG_STM32_STM32F20XX is not set +# CONFIG_STM32_STM32F205 is not set +# CONFIG_STM32_STM32F207 is not set +# CONFIG_STM32_STM32F30XX is not set +# CONFIG_STM32_STM32F302 is not set +# CONFIG_STM32_STM32F303 is not set +# CONFIG_STM32_STM32F37XX is not set +# CONFIG_STM32_STM32F40XX 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 is not set +CONFIG_STM32_HAVE_OTGFS=y +# CONFIG_STM32_HAVE_FSMC is not set +# CONFIG_STM32_HAVE_LTDC is not set +CONFIG_STM32_HAVE_USART3=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 is not set +# 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 is not set +# CONFIG_STM32_HAVE_ADC4 is not set +# CONFIG_STM32_HAVE_ADC1_DMA is not set +# CONFIG_STM32_HAVE_ADC2_DMA is not set +# CONFIG_STM32_HAVE_ADC3_DMA is not set +# CONFIG_STM32_HAVE_ADC4_DMA is not set +CONFIG_STM32_HAVE_CAN1=y +CONFIG_STM32_HAVE_CAN2=y +CONFIG_STM32_HAVE_DAC1=y +CONFIG_STM32_HAVE_DAC2=y +# CONFIG_STM32_HAVE_RNG is not set +CONFIG_STM32_HAVE_ETHMAC=y +# CONFIG_STM32_HAVE_I2C2 is not set +# 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=y +# CONFIG_STM32_ADC2 is not set +# CONFIG_STM32_BKP is not set +# CONFIG_STM32_CAN1 is not set +# CONFIG_STM32_CAN2 is not set +# CONFIG_STM32_CRC is not set +# CONFIG_STM32_DMA1 is not set +# CONFIG_STM32_DMA2 is not set +# CONFIG_STM32_DAC1 is not set +# CONFIG_STM32_DAC2 is not set +# CONFIG_STM32_ETHMAC is not set +# CONFIG_STM32_I2C1 is not set +CONFIG_STM32_OTGFS=y +CONFIG_STM32_PWR=y +CONFIG_STM32_SPI1=y +# CONFIG_STM32_SPI2 is not set +# CONFIG_STM32_SPI3 is not set +CONFIG_STM32_SYSCFG=y +# 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_USART1 is not set +CONFIG_STM32_USART2=y +# CONFIG_STM32_USART3 is not set +# CONFIG_STM32_UART4 is not set +# CONFIG_STM32_UART5 is not set +# CONFIG_STM32_IWDG is not set +# CONFIG_STM32_WWDG is not set +CONFIG_STM32_ADC=y +CONFIG_STM32_SPI=y +# CONFIG_STM32_NOEXT_VECTORS is not set + +# +# Alternate Pin Mapping +# +# CONFIG_STM32_SPI1_REMAP is not set +CONFIG_STM32_USART2_REMAP=y +# CONFIG_STM32_JTAG_DISABLE is not set +CONFIG_STM32_JTAG_FULL_ENABLE=y +# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set +# CONFIG_STM32_JTAG_SW_ENABLE is not set +# CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG is not set +# CONFIG_STM32_FORCEPOWER is not set +# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set +# CONFIG_STM32_CCM_PROCFS is not set + +# +# Timer Configuration +# +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set +# CONFIG_STM32_TIM1_CAP is not set +# CONFIG_STM32_TIM3_CAP is not set +# CONFIG_STM32_TIM4_CAP is not set +# CONFIG_STM32_TIM5_CAP is not set + +# +# ADC Configuration +# +CONFIG_STM32_USART=y +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 +# CONFIG_STM32_USART_SINGLEWIRE is not set + +# +# SPI Configuration +# +# CONFIG_STM32_SPI_INTERRUPTS is not set +# CONFIG_STM32_SPI_DMA is not set +CONFIG_STM32_HAVE_RTC_COUNTER=y +# CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set + +# +# USB FS Host Configuration +# + +# +# USB HS Host Configuration +# + +# +# USB Host Debug Configuration +# + +# +# USB Device Configuration +# + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_VECNOTIRQ is not set +# CONFIG_ARCH_DMA is not set +CONFIG_ARCH_HAVE_IRQPRIO=y +# CONFIG_ARCH_L2CACHE is not set +# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set +# CONFIG_ARCH_HAVE_ADDRENV is not set +# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set +# CONFIG_ARCH_HAVE_MULTICPU is not set +CONFIG_ARCH_HAVE_VFORK=y +# CONFIG_ARCH_HAVE_MMU is not set +CONFIG_ARCH_HAVE_MPU=y +# CONFIG_ARCH_NAND_HWECC is not set +# CONFIG_ARCH_HAVE_EXTCLK is not set +# CONFIG_ARCH_HAVE_POWEROFF is not set +CONFIG_ARCH_HAVE_RESET=y +# CONFIG_ARCH_USE_MPU is not set +# CONFIG_ARCH_IRQPRIO is not set +CONFIG_ARCH_STACKDUMP=y +# CONFIG_ENDIAN_BIG is not set +# CONFIG_ARCH_IDLE_CUSTOM is not set +# CONFIG_ARCH_HAVE_RAMFUNCS is not set +CONFIG_ARCH_HAVE_RAMVECTORS=y +# CONFIG_ARCH_RAMVECTORS is not set + +# +# Board Settings +# +CONFIG_BOARD_LOOPSPERMSEC=5483 +# CONFIG_ARCH_CALIBRATION is not set + +# +# Interrupt options +# +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +CONFIG_ARCH_INTERRUPTSTACK=0 +CONFIG_ARCH_HAVE_HIPRI_INTERRUPT=y +# CONFIG_ARCH_HIPRI_INTERRUPT is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x20000000 +CONFIG_RAM_SIZE=65536 +# CONFIG_ARCH_HAVE_SDRAM is not set + +# +# Board Selection +# +# CONFIG_ARCH_BOARD_CLOUDCTRL is not set +# CONFIG_ARCH_BOARD_OLIMEX_STM32P107 is not set +# CONFIG_ARCH_BOARD_SHENZHOU is not set +CONFIG_ARCH_BOARD_STM32_BUTTERFLY2=y +# CONFIG_ARCH_BOARD_VIEWTOOL_STM32F107 is not set +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="stm32butterfly2" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y +CONFIG_ARCH_HAVE_BUTTONS=y +CONFIG_ARCH_BUTTONS=y + +# +# Board-Specific Options +# +# CONFIG_BOARD_CRASHDUMP 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=y +# 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_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set +CONFIG_USEC_PER_TICK=10000 +# CONFIG_SYSTEM_TIME64 is not set +CONFIG_CLOCK_MONOTONIC=y +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=1970 +CONFIG_START_MONTH=0 +CONFIG_START_DAY=1 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=8 +CONFIG_WDOG_INTRESERVE=1 +CONFIG_PREALLOC_TIMERS=4 + +# +# Tasks and Scheduling +# +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_RR_INTERVAL=100 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=31 +CONFIG_MAX_TASKS=16 +# CONFIG_SCHED_HAVE_PARENT is not set +# CONFIG_SCHED_WAITPID is not set + +# +# Pthread Options +# +# CONFIG_MUTEX_TYPES is not set +CONFIG_NPTHREAD_KEYS=4 + +# +# Performance Monitoring +# +CONFIG_SCHED_CPULOAD=y +# CONFIG_SCHED_CPULOAD_EXTCLK is not set +CONFIG_SCHED_CPULOAD_TIMECONSTANT=2 +# CONFIG_SCHED_INSTRUMENTATION is not set + +# +# Files and I/O +# +CONFIG_DEV_CONSOLE=y +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +# CONFIG_PRIORITY_INHERITANCE is not set + +# +# RTOS hooks +# +# CONFIG_BOARD_INITIALIZE is not set +# CONFIG_SCHED_STARTHOOK is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +# CONFIG_SIG_EVTHREAD is not set + +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCONDTIMEDOUT=16 +CONFIG_SIG_SIGWORK=17 + +# +# POSIX Message Queue Options +# +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set + +# +# Work queue support +# +CONFIG_SCHED_WORKQUEUE=y +CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_HPWORKPRIORITY=192 +CONFIG_SCHED_HPWORKPERIOD=50000 +CONFIG_SCHED_HPWORKSTACKSIZE=1024 +# CONFIG_SCHED_LPWORK is not set + +# +# Stack and heap information +# +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=2048 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 +# CONFIG_LIB_SYSCALL is not set + +# +# Device Drivers +# +# CONFIG_DISABLE_POLL is not set +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set +# CONFIG_DEV_LOOP is not set + +# +# Buffering +# +# CONFIG_DRVR_WRITEBUFFER is not set +# CONFIG_DRVR_READAHEAD is not set +CONFIG_RAMDISK=y +# 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=y +# CONFIG_SPI_BITBANG is not set +CONFIG_SPI_HWFEATURES=y +# CONFIG_SPI_CRCGENERATION is not set +CONFIG_SPI_CS_CONTROL=y +# 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=y +CONFIG_ADC=y +CONFIG_ADC_FIFOSIZE=8 +# CONFIG_ADC_NO_STARTUP_CONV is not set +# 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 + +# +# IO Expander/GPIO Support +# +# CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO 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 is not set +CONFIG_MMCSD_HAVECARDDETECT=y +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 +# 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 is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +CONFIG_SERIAL_NPOLLWAITERS=2 +# CONFIG_SERIAL_IFLOWCONTROL is not set +# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set +CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y +CONFIG_USART2_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# USART2 Configuration +# +CONFIG_USART2_RXBUFSIZE=256 +CONFIG_USART2_TXBUFSIZE=256 +CONFIG_USART2_BAUD=115200 +CONFIG_USART2_BITS=8 +CONFIG_USART2_PARITY=0 +CONFIG_USART2_2STOP=0 +# CONFIG_USART2_IFLOWCONTROL is not set +# CONFIG_USART2_OFLOWCONTROL is not set +# CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set +CONFIG_USBDEV=y + +# +# USB Device Controller Driver Options +# +# CONFIG_USBDEV_ISOCHRONOUS is not set +# CONFIG_USBDEV_DUALSPEED is not set +# CONFIG_USBDEV_SELFPOWERED is not set +CONFIG_USBDEV_BUSPOWERED=y +CONFIG_USBDEV_MAXPOWER=500 +# CONFIG_USBDEV_DMA is not set +# CONFIG_ARCH_USBDEV_STALLQUEUE is not set +# CONFIG_USBDEV_TRACE is not set + +# +# USB Device Class Driver Options +# +# CONFIG_USBDEV_COMPOSITE is not set +CONFIG_PL2303=y +# CONFIG_PL2303_CONSOLE is not set +CONFIG_PL2303_EPINTIN=1 +CONFIG_PL2303_EPBULKOUT=2 +CONFIG_PL2303_EPBULKIN=3 +CONFIG_PL2303_EP0MAXPACKET=64 +CONFIG_PL2303_NWRREQS=4 +CONFIG_PL2303_NRDREQS=4 +CONFIG_PL2303_BULKIN_REQLEN=96 +CONFIG_PL2303_RXBUFSIZE=257 +CONFIG_PL2303_TXBUFSIZE=193 +CONFIG_PL2303_VENDORID=0x067b +CONFIG_PL2303_PRODUCTID=0x2303 +CONFIG_PL2303_VENDORSTR="NuttX" +CONFIG_PL2303_PRODUCTSTR="PL2303 Emulation" +# CONFIG_CDCACM is not set +# CONFIG_USBMSC is not set +# CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE 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=y +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 +# CONFIG_SYSLOG_CHARDEV is not set + +# +# Networking Support +# +# CONFIG_ARCH_HAVE_NET is not set +# CONFIG_ARCH_HAVE_PHY is not set +# CONFIG_NET is not set + +# +# Crypto API +# +# CONFIG_CRYPTO is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set +CONFIG_FS_READABLE=y +CONFIG_FS_WRITABLE=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=y +CONFIG_FS_PROCFS_REGISTER=y + +# +# Exclude individual procfs entries +# +# CONFIG_FS_PROCFS_EXCLUDE_PROCESS is not set +# CONFIG_FS_PROCFS_EXCLUDE_UPTIME is not set +# CONFIG_FS_PROCFS_EXCLUDE_CPULOAD is not set +# CONFIG_FS_PROCFS_EXCLUDE_MOUNTS 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 +# + +# +# 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=y +# 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_LIB_CRC64_FAST is not set +# CONFIG_LIB_KBDCODEC is not set +# CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set + +# +# Basic CXX Support +# +# CONFIG_C99_BOOL8 is not set +# CONFIG_HAVE_CXX is not set + +# +# Application Configuration +# + +# +# NxWidgets/NxWM +# + +# +# Built-In Applications +# +CONFIG_BUILTIN_PROXY_STACKSIZE=1024 + +# +# CAN Utilities +# + +# +# Examples +# +CONFIG_EXAMPLES_ADC=y +CONFIG_EXAMPLES_ADC_DEVPATH="/dev/adc0" +CONFIG_EXAMPLES_ADC_GROUPSIZE=4 +CONFIG_EXAMPLES_ADC_SWTRIG=y +CONFIG_EXAMPLES_BUTTONS=y +CONFIG_EXAMPLES_BUTTONS_MIN=0 +CONFIG_EXAMPLES_BUTTONS_MAX=4 +# CONFIG_EXAMPLES_CHAT is not set +# CONFIG_EXAMPLES_CONFIGDATA 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_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=y +# CONFIG_EXAMPLES_MOUNT_BLOCKDEVICE is not set +CONFIG_EXAMPLES_MOUNT_NSECTORS=2048 +CONFIG_EXAMPLES_MOUNT_SECTORSIZE=512 +CONFIG_EXAMPLES_MOUNT_RAMDEVNO=0 +# 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_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=y +CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 +CONFIG_EXAMPLES_USBTERM=y +# 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 + +# +# 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=y +# CONFIG_NSH_PLATFORM_MOTD is not set +CONFIG_NSH_MOTD_STRING="stm32butterfly2 welcoms you" + +# +# Command Line Configuration +# +CONFIG_NSH_READLINE=y +# CONFIG_NSH_CLE is not set +CONFIG_NSH_LINELEN=80 +# CONFIG_NSH_DISABLE_SEMICOLON is not set +# CONFIG_NSH_CMDPARMS 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 is not set +# CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_DF is not set +# CONFIG_NSH_DISABLE_DELROUTE is not set +# CONFIG_NSH_DISABLE_DIRNAME is not set +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +# CONFIG_NSH_DISABLE_IFCONFIG is not set +# CONFIG_NSH_DISABLE_IFUPDOWN is not set +# CONFIG_NSH_DISABLE_KILL is not set +# CONFIG_NSH_DISABLE_LOSETUP is not set +# CONFIG_NSH_DISABLE_LOSMART is not set +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKFATFS 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 +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 +CONFIG_NSH_MMCSDSPIPORTNO=0 + +# +# Configure Command Options +# +CONFIG_NSH_CMDOPT_DF_H=y +CONFIG_NSH_CODECS_BUFSIZE=128 +CONFIG_NSH_CMDOPT_HEXDUMP=y +CONFIG_NSH_PROC_MOUNTPOINT="/proc" +CONFIG_NSH_FILEIOSIZE=1024 +CONFIG_NSH_STRERROR=y + +# +# 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 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 + +# +# 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=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 is not set +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set +CONFIG_SYSTEM_VI=y +CONFIG_SYSTEM_VI_COLS=64 +CONFIG_SYSTEM_VI_ROWS=16 +CONFIG_SYSTEM_VI_DEBUGLEVEL=0 +CONFIG_SYSTEM_VI_STACKSIZE=2048 +CONFIG_SYSTEM_VI_PRIORITY=100 +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32butterfly2/nshusbdev/setenv.sh b/configs/stm32butterfly2/nshusbdev/setenv.sh new file mode 100755 index 0000000000000000000000000000000000000000..da893d41e6a1702e6a7cc4450d41a284b3d1eddc --- /dev/null +++ b/configs/stm32butterfly2/nshusbdev/setenv.sh @@ -0,0 +1,78 @@ +#!/bin/bash +# configs/stm32butterfly2/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 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/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/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" + +# These are the Cygwin paths to the locations where I installed the Atollic +# toolchain under windows. You will also have to edit this if you install +# the Atollic toolchain in any other location. /usr/bin is added before +# the Atollic bin path because there is are binaries named gcc.exe and g++.exe +# at those locations as well. +#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin" +#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/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/stm32butterfly2/nshusbhost/Make.defs b/configs/stm32butterfly2/nshusbhost/Make.defs new file mode 100644 index 0000000000000000000000000000000000000000..fdb1fc9867c7bfc0ce765bc7ee651f284055478c --- /dev/null +++ b/configs/stm32butterfly2/nshusbhost/Make.defs @@ -0,0 +1,117 @@ +############################################################################ +# configs/stm32butterfly2/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 + +ifeq ($(CONFIG_STM32_DFU),y) + LDSCRIPT = dfu.ld +else + LDSCRIPT = flash.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 = $(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 -fcheck-new -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-gotoff.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/stm32butterfly2/nshusbhost/defconfig b/configs/stm32butterfly2/nshusbhost/defconfig new file mode 100644 index 0000000000000000000000000000000000000000..bbaf4d92bdeb61d542d25e08fbc60698472d2286 --- /dev/null +++ b/configs/stm32butterfly2/nshusbhost/defconfig @@ -0,0 +1,1254 @@ +# +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# + +# +# Build Setup +# +# CONFIG_EXPERIMENTAL is not set +# CONFIG_DEFAULT_SMALL is not set +CONFIG_HOST_LINUX=y +# CONFIG_HOST_OSX is not set +# CONFIG_HOST_WINDOWS is not set +# CONFIG_HOST_OTHER is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +CONFIG_INTELHEX_BINARY=y +# CONFIG_MOTOROLA_SREC is not set +CONFIG_RAW_BINARY=y +# CONFIG_UBOOT_UIMAGE is not set + +# +# Customize Header Files +# +# CONFIG_ARCH_STDINT_H is not set +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_FLOAT_H is not set +# CONFIG_ARCH_STDARG_H is not set +# CONFIG_ARCH_DEBUG_H is not set + +# +# Debug Options +# +CONFIG_DEBUG_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 +# 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=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=y +# CONFIG_ARMV7M_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set +# CONFIG_SERIAL_TERMIOS is not set +# CONFIG_USBHOST_BULK_DISABLE is not set +# CONFIG_USBHOST_INT_DISABLE is not set +# CONFIG_USBHOST_ISOC_DISABLE is not set + +# +# STM32 Configuration Options +# +# CONFIG_ARCH_CHIP_STM32L151C6 is not set +# CONFIG_ARCH_CHIP_STM32L151C8 is not set +# CONFIG_ARCH_CHIP_STM32L151CB is not set +# CONFIG_ARCH_CHIP_STM32L151R6 is not set +# CONFIG_ARCH_CHIP_STM32L151R8 is not set +# CONFIG_ARCH_CHIP_STM32L151RB is not set +# CONFIG_ARCH_CHIP_STM32L151V6 is not set +# CONFIG_ARCH_CHIP_STM32L151V8 is not set +# CONFIG_ARCH_CHIP_STM32L151VB is not set +# CONFIG_ARCH_CHIP_STM32L152C6 is not set +# CONFIG_ARCH_CHIP_STM32L152C8 is not set +# CONFIG_ARCH_CHIP_STM32L152CB is not set +# CONFIG_ARCH_CHIP_STM32L152R6 is not set +# CONFIG_ARCH_CHIP_STM32L152R8 is not set +# CONFIG_ARCH_CHIP_STM32L152RB is not set +# CONFIG_ARCH_CHIP_STM32L152V6 is not set +# CONFIG_ARCH_CHIP_STM32L152V8 is not set +# CONFIG_ARCH_CHIP_STM32L152VB is not set +# CONFIG_ARCH_CHIP_STM32L162ZD is not set +# CONFIG_ARCH_CHIP_STM32L162VE is not set +# CONFIG_ARCH_CHIP_STM32F100C8 is not set +# CONFIG_ARCH_CHIP_STM32F100CB is not set +# CONFIG_ARCH_CHIP_STM32F100R8 is not set +# CONFIG_ARCH_CHIP_STM32F100RB is not set +# CONFIG_ARCH_CHIP_STM32F100RC is not set +# CONFIG_ARCH_CHIP_STM32F100RD is not set +# CONFIG_ARCH_CHIP_STM32F100RE is not set +# CONFIG_ARCH_CHIP_STM32F100V8 is not set +# CONFIG_ARCH_CHIP_STM32F100VB is not set +# CONFIG_ARCH_CHIP_STM32F100VC is not set +# CONFIG_ARCH_CHIP_STM32F100VD is not set +# CONFIG_ARCH_CHIP_STM32F100VE is not set +# CONFIG_ARCH_CHIP_STM32F102CB is not set +# CONFIG_ARCH_CHIP_STM32F103T8 is not set +# CONFIG_ARCH_CHIP_STM32F103TB is not set +# CONFIG_ARCH_CHIP_STM32F103C4 is not set +# CONFIG_ARCH_CHIP_STM32F103C8 is not set +# CONFIG_ARCH_CHIP_STM32F103CB is not set +# CONFIG_ARCH_CHIP_STM32F103R8 is not set +# CONFIG_ARCH_CHIP_STM32F103RB is not set +# CONFIG_ARCH_CHIP_STM32F103RC is not set +# CONFIG_ARCH_CHIP_STM32F103RD is not set +# CONFIG_ARCH_CHIP_STM32F103RE is not set +# CONFIG_ARCH_CHIP_STM32F103RG is not set +# CONFIG_ARCH_CHIP_STM32F103V8 is not set +# CONFIG_ARCH_CHIP_STM32F103VB is not set +# CONFIG_ARCH_CHIP_STM32F103VC is not set +# CONFIG_ARCH_CHIP_STM32F103VE is not set +# CONFIG_ARCH_CHIP_STM32F103ZE is not set +# CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F105RB is not set +CONFIG_ARCH_CHIP_STM32F107VC=y +# 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=y +# CONFIG_STM32_PERFORMANCELINE is not set +# CONFIG_STM32_USBACCESSLINE is not set +# CONFIG_STM32_HIGHDENSITY is not set +# CONFIG_STM32_MEDIUMDENSITY is not set +# CONFIG_STM32_LOWDENSITY is not set +# CONFIG_STM32_STM32F20XX is not set +# CONFIG_STM32_STM32F205 is not set +# CONFIG_STM32_STM32F207 is not set +# CONFIG_STM32_STM32F30XX is not set +# CONFIG_STM32_STM32F302 is not set +# CONFIG_STM32_STM32F303 is not set +# CONFIG_STM32_STM32F37XX is not set +# CONFIG_STM32_STM32F40XX 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 is not set +CONFIG_STM32_HAVE_OTGFS=y +# CONFIG_STM32_HAVE_FSMC is not set +# CONFIG_STM32_HAVE_LTDC is not set +CONFIG_STM32_HAVE_USART3=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 is not set +# 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 is not set +# CONFIG_STM32_HAVE_ADC4 is not set +# CONFIG_STM32_HAVE_ADC1_DMA is not set +# CONFIG_STM32_HAVE_ADC2_DMA is not set +# CONFIG_STM32_HAVE_ADC3_DMA is not set +# CONFIG_STM32_HAVE_ADC4_DMA is not set +CONFIG_STM32_HAVE_CAN1=y +CONFIG_STM32_HAVE_CAN2=y +CONFIG_STM32_HAVE_DAC1=y +CONFIG_STM32_HAVE_DAC2=y +# CONFIG_STM32_HAVE_RNG is not set +CONFIG_STM32_HAVE_ETHMAC=y +# CONFIG_STM32_HAVE_I2C2 is not set +# 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=y +# CONFIG_STM32_ADC2 is not set +# CONFIG_STM32_BKP is not set +# CONFIG_STM32_CAN1 is not set +# CONFIG_STM32_CAN2 is not set +# CONFIG_STM32_CRC is not set +# CONFIG_STM32_DMA1 is not set +# CONFIG_STM32_DMA2 is not set +# CONFIG_STM32_DAC1 is not set +# CONFIG_STM32_DAC2 is not set +# CONFIG_STM32_ETHMAC is not set +# CONFIG_STM32_I2C1 is not set +CONFIG_STM32_OTGFS=y +CONFIG_STM32_PWR=y +CONFIG_STM32_SPI1=y +# CONFIG_STM32_SPI2 is not set +# CONFIG_STM32_SPI3 is not set +CONFIG_STM32_SYSCFG=y +# 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_USART1 is not set +CONFIG_STM32_USART2=y +# CONFIG_STM32_USART3 is not set +# CONFIG_STM32_UART4 is not set +# CONFIG_STM32_UART5 is not set +# CONFIG_STM32_IWDG is not set +# CONFIG_STM32_WWDG is not set +CONFIG_STM32_ADC=y +CONFIG_STM32_SPI=y +# CONFIG_STM32_NOEXT_VECTORS is not set + +# +# Alternate Pin Mapping +# +# CONFIG_STM32_SPI1_REMAP is not set +CONFIG_STM32_USART2_REMAP=y +# CONFIG_STM32_JTAG_DISABLE is not set +CONFIG_STM32_JTAG_FULL_ENABLE=y +# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set +# CONFIG_STM32_JTAG_SW_ENABLE is not set +# CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG is not set +# CONFIG_STM32_FORCEPOWER is not set +# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set +# CONFIG_STM32_CCM_PROCFS is not set + +# +# Timer Configuration +# +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set +# CONFIG_STM32_TIM1_CAP is not set +# CONFIG_STM32_TIM3_CAP is not set +# CONFIG_STM32_TIM4_CAP is not set +# CONFIG_STM32_TIM5_CAP is not set + +# +# ADC Configuration +# +CONFIG_STM32_USART=y +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 +# CONFIG_STM32_USART_SINGLEWIRE is not set + +# +# SPI Configuration +# +# CONFIG_STM32_SPI_INTERRUPTS is not set +# CONFIG_STM32_SPI_DMA is not set +CONFIG_STM32_HAVE_RTC_COUNTER=y +# CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set + +# +# USB FS Host Configuration +# +CONFIG_STM32_OTGFS_RXFIFO_SIZE=128 +CONFIG_STM32_OTGFS_NPTXFIFO_SIZE=96 +CONFIG_STM32_OTGFS_PTXFIFO_SIZE=128 +CONFIG_STM32_OTGFS_DESCSIZE=128 +# CONFIG_STM32_OTGFS_SOFINTR is not set + +# +# USB HS Host Configuration +# + +# +# USB Host Debug Configuration +# + +# +# USB Device Configuration +# + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_VECNOTIRQ is not set +# CONFIG_ARCH_DMA is not set +CONFIG_ARCH_HAVE_IRQPRIO=y +# CONFIG_ARCH_L2CACHE is not set +# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set +# CONFIG_ARCH_HAVE_ADDRENV is not set +# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set +# CONFIG_ARCH_HAVE_MULTICPU is not set +CONFIG_ARCH_HAVE_VFORK=y +# CONFIG_ARCH_HAVE_MMU is not set +CONFIG_ARCH_HAVE_MPU=y +# CONFIG_ARCH_NAND_HWECC is not set +# CONFIG_ARCH_HAVE_EXTCLK is not set +# CONFIG_ARCH_HAVE_POWEROFF is not set +CONFIG_ARCH_HAVE_RESET=y +# CONFIG_ARCH_USE_MPU is not set +# CONFIG_ARCH_IRQPRIO is not set +CONFIG_ARCH_STACKDUMP=y +# CONFIG_ENDIAN_BIG is not set +# CONFIG_ARCH_IDLE_CUSTOM is not set +# CONFIG_ARCH_HAVE_RAMFUNCS is not set +CONFIG_ARCH_HAVE_RAMVECTORS=y +# CONFIG_ARCH_RAMVECTORS is not set + +# +# Board Settings +# +CONFIG_BOARD_LOOPSPERMSEC=5483 +# CONFIG_ARCH_CALIBRATION is not set + +# +# Interrupt options +# +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +CONFIG_ARCH_INTERRUPTSTACK=0 +CONFIG_ARCH_HAVE_HIPRI_INTERRUPT=y +# CONFIG_ARCH_HIPRI_INTERRUPT is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x20000000 +CONFIG_RAM_SIZE=65536 +# CONFIG_ARCH_HAVE_SDRAM is not set + +# +# Board Selection +# +# CONFIG_ARCH_BOARD_CLOUDCTRL is not set +# CONFIG_ARCH_BOARD_OLIMEX_STM32P107 is not set +# CONFIG_ARCH_BOARD_SHENZHOU is not set +CONFIG_ARCH_BOARD_STM32_BUTTERFLY2=y +# CONFIG_ARCH_BOARD_VIEWTOOL_STM32F107 is not set +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="stm32butterfly2" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y +CONFIG_ARCH_HAVE_BUTTONS=y +CONFIG_ARCH_BUTTONS=y + +# +# Board-Specific Options +# +# CONFIG_BOARD_CRASHDUMP is not set +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=y +# 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_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set +CONFIG_USEC_PER_TICK=10000 +# CONFIG_SYSTEM_TIME64 is not set +CONFIG_CLOCK_MONOTONIC=y +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=1970 +CONFIG_START_MONTH=0 +CONFIG_START_DAY=1 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=8 +CONFIG_WDOG_INTRESERVE=1 +CONFIG_PREALLOC_TIMERS=4 + +# +# Tasks and Scheduling +# +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_RR_INTERVAL=100 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=31 +CONFIG_MAX_TASKS=16 +# CONFIG_SCHED_HAVE_PARENT is not set +# CONFIG_SCHED_WAITPID is not set + +# +# Pthread Options +# +# CONFIG_MUTEX_TYPES is not set +CONFIG_NPTHREAD_KEYS=4 + +# +# Performance Monitoring +# +CONFIG_SCHED_CPULOAD=y +# CONFIG_SCHED_CPULOAD_EXTCLK is not set +CONFIG_SCHED_CPULOAD_TIMECONSTANT=2 +# CONFIG_SCHED_INSTRUMENTATION is not set + +# +# Files and I/O +# +CONFIG_DEV_CONSOLE=y +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +# CONFIG_PRIORITY_INHERITANCE is not set + +# +# RTOS hooks +# +# CONFIG_BOARD_INITIALIZE is not set +# CONFIG_SCHED_STARTHOOK is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +# CONFIG_SIG_EVTHREAD is not set + +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCONDTIMEDOUT=16 +CONFIG_SIG_SIGWORK=17 + +# +# POSIX Message Queue Options +# +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set + +# +# Work queue support +# +CONFIG_SCHED_WORKQUEUE=y +CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_HPWORKPRIORITY=192 +CONFIG_SCHED_HPWORKPERIOD=50000 +CONFIG_SCHED_HPWORKSTACKSIZE=1024 +# CONFIG_SCHED_LPWORK is not set + +# +# Stack and heap information +# +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=2048 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 +# CONFIG_LIB_SYSCALL is not set + +# +# Device Drivers +# +# CONFIG_DISABLE_POLL is not set +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set +# CONFIG_DEV_LOOP is not set + +# +# Buffering +# +# CONFIG_DRVR_WRITEBUFFER is not set +# CONFIG_DRVR_READAHEAD is not set +CONFIG_RAMDISK=y +# 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=y +# CONFIG_SPI_BITBANG is not set +CONFIG_SPI_HWFEATURES=y +# CONFIG_SPI_CRCGENERATION is not set +CONFIG_SPI_CS_CONTROL=y +# 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=y +CONFIG_ADC=y +CONFIG_ADC_FIFOSIZE=8 +# CONFIG_ADC_NO_STARTUP_CONV is not set +# 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 + +# +# IO Expander/GPIO Support +# +# CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO 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 is not set +CONFIG_MMCSD_HAVECARDDETECT=y +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 +# 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=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +CONFIG_SERIAL_NPOLLWAITERS=2 +# CONFIG_SERIAL_IFLOWCONTROL is not set +# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set +CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y +CONFIG_USART2_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# USART2 Configuration +# +CONFIG_USART2_RXBUFSIZE=256 +CONFIG_USART2_TXBUFSIZE=256 +CONFIG_USART2_BAUD=115200 +CONFIG_USART2_BITS=8 +CONFIG_USART2_PARITY=0 +CONFIG_USART2_2STOP=0 +# CONFIG_USART2_IFLOWCONTROL is not set +# CONFIG_USART2_OFLOWCONTROL is not set +# CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set +# CONFIG_USBDEV is not set +CONFIG_USBHOST=y +CONFIG_USBHOST_NPREALLOC=4 +CONFIG_USBHOST_HAVE_ASYNCH=y +# CONFIG_USBHOST_ASYNCH is not set +# CONFIG_USBHOST_HUB is not set +CONFIG_USBHOST_MSC=y +# CONFIG_USBHOST_CDCACM is not set +CONFIG_USBHOST_HIDKBD=y +CONFIG_HIDKBD_POLLUSEC=100000 +CONFIG_HIDKBD_DEFPRIO=50 +CONFIG_HIDKBD_STACKSIZE=1024 +CONFIG_HIDKBD_BUFSIZE=64 +CONFIG_HIDKBD_NPOLLWAITERS=2 +# CONFIG_HIDKBD_RAWSCANCODES is not set +# CONFIG_HIDKBD_ALLSCANCODES is not set +# CONFIG_HIDKBD_NODEBOUNCE is not set +# CONFIG_USBHOST_HIDMOUSE is not set +# CONFIG_USBHOST_TRACE is not set +# CONFIG_HAVE_USBTRACE 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=y +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 +# CONFIG_SYSLOG_CHARDEV is not set + +# +# Networking Support +# +# CONFIG_ARCH_HAVE_NET is not set +# CONFIG_ARCH_HAVE_PHY is not set +# CONFIG_NET is not set + +# +# Crypto API +# +# CONFIG_CRYPTO is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set +CONFIG_FS_READABLE=y +CONFIG_FS_WRITABLE=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=y +CONFIG_FS_PROCFS_REGISTER=y + +# +# Exclude individual procfs entries +# +# CONFIG_FS_PROCFS_EXCLUDE_PROCESS is not set +# CONFIG_FS_PROCFS_EXCLUDE_UPTIME is not set +# CONFIG_FS_PROCFS_EXCLUDE_CPULOAD is not set +# CONFIG_FS_PROCFS_EXCLUDE_MOUNTS 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 +# + +# +# 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=y +# 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_LIB_CRC64_FAST is not set +# CONFIG_LIB_KBDCODEC is not set +# CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set + +# +# Basic CXX Support +# +# CONFIG_C99_BOOL8 is not set +# CONFIG_HAVE_CXX is not set + +# +# Application Configuration +# + +# +# NxWidgets/NxWM +# + +# +# Built-In Applications +# +CONFIG_BUILTIN_PROXY_STACKSIZE=1024 + +# +# CAN Utilities +# + +# +# Examples +# +CONFIG_EXAMPLES_ADC=y +CONFIG_EXAMPLES_ADC_DEVPATH="/dev/adc0" +CONFIG_EXAMPLES_ADC_GROUPSIZE=4 +CONFIG_EXAMPLES_ADC_SWTRIG=y +CONFIG_EXAMPLES_BUTTONS=y +CONFIG_EXAMPLES_BUTTONS_MIN=0 +CONFIG_EXAMPLES_BUTTONS_MAX=4 +# CONFIG_EXAMPLES_CHAT is not set +# CONFIG_EXAMPLES_CONFIGDATA 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_HIDKBD=y +CONFIG_EXAMPLES_HIDKBD_DEFPRIO=50 +CONFIG_EXAMPLES_HIDKBD_STACKSIZE=1024 +CONFIG_EXAMPLES_HIDKBD_DEVNAME="/dev/kbda" +# 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=y +# CONFIG_EXAMPLES_MOUNT_BLOCKDEVICE is not set +CONFIG_EXAMPLES_MOUNT_NSECTORS=2048 +CONFIG_EXAMPLES_MOUNT_SECTORSIZE=512 +CONFIG_EXAMPLES_MOUNT_RAMDEVNO=0 +# 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_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 +# 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 + +# +# 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=y +# CONFIG_NSH_PLATFORM_MOTD is not set +CONFIG_NSH_MOTD_STRING="stm32butterfly2 welcoms you" + +# +# Command Line Configuration +# +CONFIG_NSH_READLINE=y +# CONFIG_NSH_CLE is not set +CONFIG_NSH_LINELEN=80 +# CONFIG_NSH_DISABLE_SEMICOLON is not set +# CONFIG_NSH_CMDPARMS 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 is not set +# CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_DF is not set +# CONFIG_NSH_DISABLE_DELROUTE is not set +# CONFIG_NSH_DISABLE_DIRNAME is not set +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +# CONFIG_NSH_DISABLE_IFCONFIG is not set +# CONFIG_NSH_DISABLE_IFUPDOWN is not set +# CONFIG_NSH_DISABLE_KILL is not set +# CONFIG_NSH_DISABLE_LOSETUP is not set +# CONFIG_NSH_DISABLE_LOSMART is not set +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKFATFS 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 +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 +CONFIG_NSH_MMCSDSPIPORTNO=0 + +# +# Configure Command Options +# +CONFIG_NSH_CMDOPT_DF_H=y +CONFIG_NSH_CODECS_BUFSIZE=128 +CONFIG_NSH_CMDOPT_HEXDUMP=y +CONFIG_NSH_PROC_MOUNTPOINT="/proc" +CONFIG_NSH_FILEIOSIZE=1024 +CONFIG_NSH_STRERROR=y + +# +# 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_USBKBD is not set +CONFIG_NSH_ARCHINIT=y +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set + +# +# Platform-specific Support +# +# CONFIG_PLATFORM_CONFIGDATA is not set + +# +# System Libraries and NSH Add-Ons +# +# CONFIG_SYSTEM_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=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 is not set +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set +CONFIG_SYSTEM_VI=y +CONFIG_SYSTEM_VI_COLS=64 +CONFIG_SYSTEM_VI_ROWS=16 +CONFIG_SYSTEM_VI_DEBUGLEVEL=0 +CONFIG_SYSTEM_VI_STACKSIZE=2048 +CONFIG_SYSTEM_VI_PRIORITY=100 +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32butterfly2/nshusbhost/setenv.sh b/configs/stm32butterfly2/nshusbhost/setenv.sh new file mode 100755 index 0000000000000000000000000000000000000000..da893d41e6a1702e6a7cc4450d41a284b3d1eddc --- /dev/null +++ b/configs/stm32butterfly2/nshusbhost/setenv.sh @@ -0,0 +1,78 @@ +#!/bin/bash +# configs/stm32butterfly2/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 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/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/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" + +# These are the Cygwin paths to the locations where I installed the Atollic +# toolchain under windows. You will also have to edit this if you install +# the Atollic toolchain in any other location. /usr/bin is added before +# the Atollic bin path because there is are binaries named gcc.exe and g++.exe +# at those locations as well. +#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin" +#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/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/stm32butterfly2/scripts/dfu.ld b/configs/stm32butterfly2/scripts/dfu.ld new file mode 100644 index 0000000000000000000000000000000000000000..b4a2d8331834341d7e17e9b211a41f6b859714be --- /dev/null +++ b/configs/stm32butterfly2/scripts/dfu.ld @@ -0,0 +1,116 @@ +/**************************************************************************** + * configs/stm32butterfly2/scripts/dfu.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. + * + ****************************************************************************/ + +MEMORY +{ + flash (rx) : ORIGIN = 0x08003000, LENGTH = 208K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K +} + +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(.); + + /* The RAM vector table (if present) should lie at the beginning of SRAM */ + + .ram_vectors : { + *(.ram_vectors) + } > sram + + .data : { + _sdata = ABSOLUTE(.); + *(.data .data.*) + *(.gnu.linkonce.d.*) + CONSTRUCTORS + _edata = ABSOLUTE(.); + } > sram AT > flash + + .bss : { + _sbss = ABSOLUTE(.); + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + _ebss = ABSOLUTE(.); + } > sram + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_info 0 : { *(.debug_info) } + .debug_line 0 : { *(.debug_line) } + .debug_pubnames 0 : { *(.debug_pubnames) } + .debug_aranges 0 : { *(.debug_aranges) } +} diff --git a/configs/stm32butterfly2/scripts/flash.ld b/configs/stm32butterfly2/scripts/flash.ld new file mode 100644 index 0000000000000000000000000000000000000000..1050b3501f9a8d83251ad71da87bfea2ae845b07 --- /dev/null +++ b/configs/stm32butterfly2/scripts/flash.ld @@ -0,0 +1,116 @@ +/**************************************************************************** + * configs/stm32butterfly2/scripts/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. + * + ****************************************************************************/ + +MEMORY +{ + flash (rx) : ORIGIN = 0x08000000, LENGTH = 256K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K +} + +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(.); + + /* The RAM vector table (if present) should lie at the beginning of SRAM */ + + .ram_vectors : { + *(.ram_vectors) + } > sram + + .data : { + _sdata = ABSOLUTE(.); + *(.data .data.*) + *(.gnu.linkonce.d.*) + CONSTRUCTORS + _edata = ABSOLUTE(.); + } > sram AT > flash + + .bss : { + _sbss = ABSOLUTE(.); + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + _ebss = ABSOLUTE(.); + } > sram + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_info 0 : { *(.debug_info) } + .debug_line 0 : { *(.debug_line) } + .debug_pubnames 0 : { *(.debug_pubnames) } + .debug_aranges 0 : { *(.debug_aranges) } +} diff --git a/configs/stm32butterfly2/src/Makefile b/configs/stm32butterfly2/src/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..480c84a8a47029cbe4589f2c51a3b7350acb6a36 --- /dev/null +++ b/configs/stm32butterfly2/src/Makefile @@ -0,0 +1,68 @@ +############################################################################ +# configs/stm32butterfly2/src/Makefile +# +# Copyright (C) 2016 Michał Łyszczek. All rights reserved. +# Author: Michał Łyszczek +# +# 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_leds.c + +ifeq ($(CONFIG_STM32_ADC),y) +CSRCS += stm32_adc.c +endif + +ifeq ($(CONFIG_STM32_SPI1),y) +CSRCS += stm32_spi.c +endif + +ifeq ($(CONFIG_STM32_OTGFS),y) +CSRCS += stm32_usb.c +endif + +ifeq ($(CONFIG_USBHOST),y) +CSRCS += stm32_usbhost.c +endif + +ifeq ($(CONFIG_USBDEV),y) +CSRCS += stm32_usbdev.c +endif + +ifeq ($(CONFIG_MMCSD),y) +CSRCS += stm32_mmcsd.c +endif + +ifeq ($(CONFIG_ARCH_BUTTONS),y) +CSRCS += stm32_buttons.c +endif + +include $(TOPDIR)/configs/Board.mk diff --git a/configs/stm32butterfly2/src/stm32_adc.c b/configs/stm32butterfly2/src/stm32_adc.c new file mode 100644 index 0000000000000000000000000000000000000000..b75a4f01f275b726ee78a5740d010d0e5dc18d9e --- /dev/null +++ b/configs/stm32butterfly2/src/stm32_adc.c @@ -0,0 +1,85 @@ +/***************************************************************************** + * configs/stm32butterfly2/src/stm32_adc.c + * + * Copyright (C) 2016 Michał Łyszczek. All rights reserved. + * Author: Michał Łyszczek + * + * 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 "stm32_adc.h" + +/***************************************************************************** + * Public Functions + ****************************************************************************/ + +/***************************************************************************** + * Name: board_adc_setup + * + * Description: + * Function initializes channel 1 of adc1 and registers device as /dev/adc0 + ****************************************************************************/ + +int board_adc_setup(void) +{ + static bool initialized = false; + uint8_t channel[1] = {10}; + struct adc_dev_s *adc; + int rv; + + if (initialized) + { + return OK; + } + + ainfo("INFO: Initializing ADC12_IN10\n"); + stm32_configgpio(GPIO_ADC12_IN10); + if ((adc = stm32_adcinitialize(1, channel, 1)) == NULL) + { + aerr("ERROR: Failed to get adc interface\n"); + return -ENODEV; + } + + if ((rv = adc_register("/dev/adc0", adc)) < 0) + { + aerr("ERROR: adc_register failed: %d\n", rv); + return rv; + } + + initialized = true; + ainfo("INFO: ADC12_IN10 initialized succesfully\n"); + return OK; +} diff --git a/configs/stm32butterfly2/src/stm32_boot.c b/configs/stm32butterfly2/src/stm32_boot.c new file mode 100644 index 0000000000000000000000000000000000000000..e77a6edffc719c723d6f744fb1a91e8743dd48b3 --- /dev/null +++ b/configs/stm32butterfly2/src/stm32_boot.c @@ -0,0 +1,94 @@ +/***************************************************************************** + * configs/stm32butterfly2/src/boot.c + * + * Copyright (C) 2016 Michał Łyszczek. All rights reserved. + * Author: Michał Łyszczek + * + * 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 "stm32_butterfly2.h" + +/***************************************************************************** + * Public Functions + ****************************************************************************/ + +/***************************************************************************** + * Name: stm32_boardinitialize + * + * Description: + * Initializes low level pins for the drivers. + ****************************************************************************/ + +void stm32_boardinitialize(void) +{ + stm32_led_initialize(); + stm32_spidev_initialize(); + stm32_usb_initialize(); +} + +/***************************************************************************** + * Name: board_app_initialize + * + * Description: + * Initializes upper half drivers with board specific settings + * + * Returned value: + * 0 on sucess or errno value of failed init function. + ****************************************************************************/ + +int board_app_initialize(uintptr_t arg) +{ + int rv = 0; + +#ifdef CONFIG_MMCSD + if ((rv = stm32_mmcsd_initialize(CONFIG_NSH_MMCSDMINOR)) < 0) + { + syslog(LOG_ERR, "Failed to initialize SD slot %d: %d\n"); + return rv; + } +#endif + +#ifdef CONFIG_USBHOST + if ((rv = stm32_usbhost_initialize()) < 0) + { + syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", rv); + return rv; + } +#endif + + return rv; +} diff --git a/configs/stm32butterfly2/src/stm32_butterfly2.h b/configs/stm32butterfly2/src/stm32_butterfly2.h new file mode 100644 index 0000000000000000000000000000000000000000..d291a426a39fedd259f432bbe85af791e048d028 --- /dev/null +++ b/configs/stm32butterfly2/src/stm32_butterfly2.h @@ -0,0 +1,131 @@ +/***************************************************************************** + * configs/stm32butterfly2/src/stm32_butterfly2.h + * + * Copyright (C) 2016 Michał Łyszczek. All rights reserved. + * Author: Michał Łyszczek + * + * 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_STM32_BUTTERFLY2_SRC_STM32_BUTTERFLY2_H +#define __CONFIGS_STM32_BUTTERFLY2_SRC_STM32_BUTTERFLY2_H 1 + +/***************************************************************************** + * Included Files + ****************************************************************************/ + +#include "stm32_gpio.h" + +/***************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* SD Card pins */ + +#define GPIO_SD_CS (GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz |\ + GPIO_OUTPUT_SET | GPIO_PORTA | GPIO_PIN4) +#define GPIO_SD_CD (GPIO_INPUT | GPIO_CNF_INFLOAT | GPIO_EXTI |\ + GPIO_PORTB | GPIO_PIN9) + +/* USB pins */ + +#define GPIO_OTGFS_PWRON (GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz |\ + GPIO_OUTPUT_SET | GPIO_PORTD | GPIO_PIN15) + +/***************************************************************************** + * Public Functions + ****************************************************************************/ + +/***************************************************************************** + * Name: stm32_led_initialize + * + * Description: + * Initializes low level gpio pins for board LEDS + ****************************************************************************/ + +void stm32_led_initialize(void); + +/***************************************************************************** + * Name: stm32_spidev_initialize + * + * Description: + * Called to configure SPI chip select GPIO pins. + * + * Note: + * Here only CS pins are configured as SPI pins are configured by driver + * itself. + ****************************************************************************/ + +#ifdef CONFIG_STM32_SPI1 +void stm32_spidev_initialize(void); +#else +static inline void stm32_spidev_initialize(void) {} +#endif + +/***************************************************************************** + * Name: stm32_mmcsd_initialize + * + * Description: + * Initializes SPI-based SD card + * + ****************************************************************************/ + +#ifdef CONFIG_MMCSD +int stm32_mmcsd_initialize(int minor); +#else +static inline int stm32_mmcsd_initialize(int minor) { (void)minor; return 0; } +#endif + +/***************************************************************************** + * Name: stm32_usb_initialize + * + * Description: + * Initializes USB pins + ****************************************************************************/ + +#ifdef CONFIG_STM32_OTGFS +void stm32_usb_initialize(void); +#else +static inline void stm32_usb_initialize(void) {} +#endif + +/***************************************************************************** + * Name: stm32_usbhost_initialize + * + * Description: + * Initializes USB host functionality. + ****************************************************************************/ + +#ifdef CONFIG_USBHOST +int stm32_usbhost_initialize(void); +#else +static inline int stm32_usbhost_initialize(void) { return 0; } +#endif + +#endif /* __CONFIGS_STM32_BUTTERFLY2_SRC_STM32_BUTTERFLY2_H */ + diff --git a/configs/stm32butterfly2/src/stm32_buttons.c b/configs/stm32butterfly2/src/stm32_buttons.c new file mode 100644 index 0000000000000000000000000000000000000000..85e7a0751c4f15bd1c0458ec1971a7a592e7493a --- /dev/null +++ b/configs/stm32butterfly2/src/stm32_buttons.c @@ -0,0 +1,109 @@ +/***************************************************************************** + * configs/stm32butterfly2/src/stm32_buttons.c + * + * Copyright (C) 2016 Michał Łyszczek. All rights reserved. + * Author: Michał Łyszczek + * + * 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. + ****************************************************************************/ + +/***************************************************************************** + * Public Includes + ****************************************************************************/ + +#include "stm32_gpio.h" + +/***************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define NUM_BUTTONS 5 + +#define GPIO_JOY_O (GPIO_INPUT | GPIO_CNF_INFLOAT | GPIO_MODE_INPUT |\ + GPIO_PORTC | GPIO_PIN7) +#define GPIO_JOY_U (GPIO_INPUT | GPIO_CNF_INFLOAT | GPIO_MODE_INPUT |\ + GPIO_PORTC | GPIO_PIN8) +#define GPIO_JOY_D (GPIO_INPUT | GPIO_CNF_INFLOAT | GPIO_MODE_INPUT |\ + GPIO_PORTC | GPIO_PIN9) +#define GPIO_JOY_R (GPIO_INPUT | GPIO_CNF_INFLOAT | GPIO_MODE_INPUT |\ + GPIO_PORTC | GPIO_PIN10) +#define GPIO_JOY_L (GPIO_INPUT | GPIO_CNF_INFLOAT | GPIO_MODE_INPUT |\ + GPIO_PORTC | GPIO_PIN11) + +/***************************************************************************** + * Private Declarations + ****************************************************************************/ + +static const uint32_t buttons[NUM_BUTTONS] = +{ + GPIO_JOY_O, GPIO_JOY_U, GPIO_JOY_D, GPIO_JOY_R, GPIO_JOY_L +}; + +/***************************************************************************** + * Public Functions + ****************************************************************************/ + +/***************************************************************************** + * Name: board_button_initialize + * + * Description: + * Initializes gpio pins for joystick buttons + ****************************************************************************/ + +void board_button_initialize(void) +{ + int i; + + for (i = 0; i != NUM_BUTTONS; ++i) + { + stm32_configgpio(buttons[i]); + } +} + +/***************************************************************************** + * Name: board_buttons + * + * Description: + * Reads keys + ****************************************************************************/ + +uint8_t board_buttons(void) +{ + uint8_t rv = 0; + int i; + + for (i = 0; i != NUM_BUTTONS; ++i) + { + if (stm32_gpioread(buttons[i]) == 0) + { + rv |= 1 << i; + } + } + + return rv; +} diff --git a/configs/stm32butterfly2/src/stm32_leds.c b/configs/stm32butterfly2/src/stm32_leds.c new file mode 100644 index 0000000000000000000000000000000000000000..dae6352fa7b7d79e0f641082e3bc84a473bd9e36 --- /dev/null +++ b/configs/stm32butterfly2/src/stm32_leds.c @@ -0,0 +1,267 @@ +/***************************************************************************** + * configs/stm32butterfly2/src/stm32_leds.c + * + * Copyright (C) 2016 Michał Łyszczek. All rights reserved. + * Author: Michał Łyszczek + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************/ + +/***************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include +#include +#include +#include + +#include "stm32_gpio.h" + +/***************************************************************************** + * Pre-processor definitions + ****************************************************************************/ + +#define GPIO_LED1 (GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz |\ + GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN0) +#define GPIO_LED2 (GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz |\ + GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN1) +#define GPIO_LED3 (GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz |\ + GPIO_OUTPUT_SET | GPIO_PORTC | GPIO_PIN4) +#define GPIO_LED4 (GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz |\ + GPIO_OUTPUT_SET | GPIO_PORTC | GPIO_PIN5) + +/***************************************************************************** + * Private Types + ****************************************************************************/ + +/* Identifies led state */ + +enum led_state +{ + LED_ON = false, + LED_OFF = true +}; + +/***************************************************************************** + * Private Functions + ****************************************************************************/ + +/***************************************************************************** + * Name: led_state + * + * Description: + * Sets pack of leds to given state + ****************************************************************************/ + +static void led_state(enum led_state state, unsigned int leds) +{ + if (leds & BOARD_LED1_BIT) + { + stm32_gpiowrite(GPIO_LED1, state); + } + + if (leds & BOARD_LED2_BIT) + { + stm32_gpiowrite(GPIO_LED2, state); + } + + if (leds & BOARD_LED3_BIT) + { + stm32_gpiowrite(GPIO_LED3, state); + } + + if (leds & BOARD_LED4_BIT) + { + stm32_gpiowrite(GPIO_LED4, state); + } +} + +/***************************************************************************** + * Public Functions + ****************************************************************************/ + +/***************************************************************************** + * Name: stm32_led_initialize + * + * Description: + * Initializes low level gpio pins for board LEDS + ****************************************************************************/ + +void stm32_led_initialize(void) +{ + stm32_configgpio(GPIO_LED1); + stm32_configgpio(GPIO_LED2); + stm32_configgpio(GPIO_LED3); + stm32_configgpio(GPIO_LED4); +} + +#ifdef CONFIG_ARCH_LEDS + +/***************************************************************************** + * Name: board_autoled_on + * + * Description: + * Drives board leds when specific RTOS state led occurs. + * + * Input parameters: + * led - This is actually an RTOS state not led number of anything like that + ****************************************************************************/ + +void board_autoled_on(int led) +{ + switch (led) + { + case LED_STARTED: + led_state(LED_OFF, BOARD_LED2_BIT | BOARD_LED3_BIT | BOARD_LED4_BIT); + led_state(LED_ON, BOARD_LED1_BIT); + break; + + case LED_HEAPALLOCATE: + led_state(LED_OFF, BOARD_LED1_BIT | BOARD_LED3_BIT | BOARD_LED4_BIT); + led_state(LED_ON, BOARD_LED2_BIT); + break; + + case LED_IRQSENABLED: + led_state(LED_OFF, BOARD_LED1_BIT | BOARD_LED2_BIT | BOARD_LED4_BIT); + led_state(LED_ON, BOARD_LED3_BIT); + break; + + case LED_STACKCREATED: + led_state(LED_OFF, BOARD_LED1_BIT | BOARD_LED2_BIT | BOARD_LED3_BIT); + led_state(LED_ON, BOARD_LED4_BIT); + break; + + case LED_INIRQ: + case LED_SIGNAL: + case LED_ASSERTION: + case LED_PANIC: + led_state(LED_ON, BOARD_LED4_BIT); + break; + } +} + +/***************************************************************************** + * Name: board_autoled_off + * + * Description: + * Drives board leds when specific RTOS state led ends + * + * Input parameters: + * led - This is actually an RTOS state not led number of anything like that + ****************************************************************************/ + +void board_autoled_off(int led) +{ + switch (led) + { + case LED_STARTED: + led_state(LED_OFF, BOARD_LED1_BIT); + break; + + case LED_HEAPALLOCATE: + led_state(LED_OFF, BOARD_LED2_BIT); + break; + + case LED_IRQSENABLED: + led_state(LED_OFF, BOARD_LED3_BIT); + break; + + case LED_STACKCREATED: + case LED_INIRQ: + case LED_SIGNAL: + case LED_ASSERTION: + case LED_PANIC: + led_state(LED_OFF, BOARD_LED4_BIT); + break; + } +} +#endif + +/***************************************************************************** + * Name: board_userled_initialize + * + * Description: + * This function should initialize leds for user use, but on RTOS start we + * initialize every led for use by RTOS and at end, when RTOS is fully + * booted up, we give control of these specific leds for user. So that's why + * this function is empty. + ****************************************************************************/ + +void board_userled_initialize(void) +{ + /* Already initialized by stm32_led_initialize. */ +} + +/***************************************************************************** + * Name: board_userled + * + * Description: + * Sets led to ledon state. + * + * Input parameters: + * led - Led to be set, indexed from 0 + * ledon - new state for the led. + ****************************************************************************/ + +void board_userled(int led, bool ledon) +{ + unsigned int ledbit; + +#ifndef CONFIG_ARCH_LEDS + if (led == BOARD_LED4) + { + return; + } +#endif + + ledbit = 1 << led; + led_state(ledon, ledbit); +} + +/***************************************************************************** + * Name: board_userled_all + * + * Description: + * Sets whole ledset to given state. + * + * Input parameters: + * ledset - Led bits to be set on or off + ****************************************************************************/ + +void board_userled_all(uint8_t ledset) +{ +#ifdef CONFIG_ARCH_LEDS + led_state(LED_ON, ledset & ~BOARD_LED4_BIT); + led_state(LED_OFF, ~(ledset | BOARD_LED4_BIT)); +#else + led_state(LED_ON, ledset); + led_state(led_OFF, ~ledset); +#endif +} diff --git a/configs/stm32butterfly2/src/stm32_mmcsd.c b/configs/stm32butterfly2/src/stm32_mmcsd.c new file mode 100644 index 0000000000000000000000000000000000000000..696ad7d0c56c538edd5cf320e2f22c738fae99c1 --- /dev/null +++ b/configs/stm32butterfly2/src/stm32_mmcsd.c @@ -0,0 +1,216 @@ +/***************************************************************************** + * configs/stm32butterfly2/src/stm32_mmcsd.c + * + * Copyright (C) 2016 Michał Łyszczek. All rights reserved. + * Author: Michał Łyszczek + * + * 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 "stm32.h" +#include "stm32_butterfly2.h" +#include "stm32_spi.h" + +/***************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#ifndef CONFIG_STM32_SPI1 +# error "SD driver requires CONFIG_STM32_SPI1 to be enabled" +#endif + +#ifdef CONFIG_DISABLE_MOUNTPOINT +# error "SD driver requires CONFIG_DISABLE_MOUNTPOINT to be disabled" +#endif + +/***************************************************************************** + * Private Definitions + ****************************************************************************/ + +static const int SD_SPI_PORT = 1; /* SD is connected to SPI1 port */ +static const int SD_SLOT_NO = 0; /* There is only one SD slot */ + +/* Media changed callback */ + +static spi_mediachange_t g_chmediaclbk; + +/* Argument for media changed callback */ + +static void *g_chmediaarg; + +/* Semafor to inform stm32_cd_thread that card was inserted or pulled out */ + +static sem_t g_cdsem; + +/***************************************************************************** + * Private Functions + ****************************************************************************/ + +/***************************************************************************** + * Name: stm32_cd_thread + * + * Description: + * Working thread to call mediachanged function when card is inserted or + * pulled out. + ****************************************************************************/ + +static void *stm32_cd_thread(void *arg) +{ + (void)arg; + + spiinfo("INFO: Runnig card detect thread\n"); + while (1) + { + sem_wait(&g_cdsem); + spiinfo("INFO: Card has been inserted, initializing\n"); + + if (g_chmediaclbk) + { + /* Card doesn't seem to initialize properly without letting it to + * rest for a millsecond or so. + */ + + usleep(1 * 1000); + g_chmediaclbk(g_chmediaarg); + } + } + + return NULL; +} + +/***************************************************************************** + * Name: stm32_cd + * + * Description: + * Card detect interrupt handler. + ****************************************************************************/ + +static int stm32_cd(int irq, void *context) +{ + static const int debounce_time = 100; /* [ms] */ + static uint32_t now = 0; + static uint32_t prev = 0; + struct timespec tp; + + clock_gettime(CLOCK_MONOTONIC, &tp); + now = tp.tv_sec * 1000 + tp.tv_nsec / 1000000; + + /* When inserting card, card detect plate might bounce causing this + * interrupt to be called many time on single card insert/deinsert. Thus + * we are allowing only one interrupt every 100ms. + */ + + if (now - debounce_time > prev) + { + prev = now; + sem_post(&g_cdsem); + } + + return OK; +} + +/***************************************************************************** + * Public Functions + ****************************************************************************/ + +/***************************************************************************** + * Name: stm32_spi1register + * + * Description: + * Registers media change callback + ****************************************************************************/ + +int stm32_spi1register(struct spi_dev_s *dev, spi_mediachange_t callback, + void *arg) +{ + spiinfo("INFO: Registering spi1 device\n"); + g_chmediaclbk = callback; + g_chmediaarg = arg; + return OK; +} + +/***************************************************************************** + * Name: stm32_mmcsd_initialize + * + * Description: + * Initialize SPI-based SD card and card detect thread. + ****************************************************************************/ + +int stm32_mmcsd_initialize(int minor) +{ + struct spi_dev_s *spi; + struct sched_param schparam; + pthread_attr_t pattr; + int rv; + + spiinfo("INFO: Initializing mmcsd card\n"); + if ((spi = stm32_spibus_initialize(SD_SPI_PORT)) == NULL) + { + ferr("failed to initialize SPI port %d\n", SD_SPI_PORT); + return -ENODEV; + } + + if ((rv = mmcsd_spislotinitialize(minor, SD_SLOT_NO, spi)) < 0) + { + ferr("failed to bind SPI port %d to SD slot %d\n", SD_SPI_PORT, + SD_SLOT_NO); + return rv; + } + + stm32_gpiosetevent(GPIO_SD_CD, true, true, true, stm32_cd); + + sem_init(&g_cdsem, 0, 0); + pthread_attr_init(&pattr); + +#ifdef CONFIG_DEBUG_FS + pthread_attr_setstacksize(&pattr, 1024); +#else + pthread_attr_setstacksize(&pattr, 256); +#endif + + schparam.sched_priority = 50; + pthread_attr_setschedparam(&pattr, &schparam); + pthread_create(NULL, &pattr, stm32_cd_thread, NULL); + + spiinfo("INFO: mmcsd card has been initialized successfully\n"); + return OK; +} diff --git a/configs/stm32butterfly2/src/stm32_spi.c b/configs/stm32butterfly2/src/stm32_spi.c new file mode 100644 index 0000000000000000000000000000000000000000..fa2fd2e7628552698d79591297fdcf1a4efe5874 --- /dev/null +++ b/configs/stm32butterfly2/src/stm32_spi.c @@ -0,0 +1,107 @@ +/***************************************************************************** + * configs/stm32butterfly2/src/stm32_spi.c + * + * Copyright (C) 2016 Michał Łyszczek. All rights reserved. + * Author: Michał Łyszczek + * + * 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 "stm32_butterfly2.h" +#include "stm32_gpio.h" +#include "stm32_spi.h" + +/***************************************************************************** + * Public Functions + ****************************************************************************/ + +/***************************************************************************** + * Name: stm32_spidev_initialize + * + * Description: + * Called to configure SPI chip select GPIO pins. + * + * Note: + * Here only CS pins are configured as SPI pins are configured by driver + * itself. + ****************************************************************************/ + +void stm32_spidev_initialize(void) +{ + spiinfo("INFO: Initializing spi gpio pins\n"); + + stm32_configgpio(GPIO_SD_CS); + stm32_configgpio(GPIO_SD_CD); +} + +/***************************************************************************** + * Name: stm32_spi1select + * + * Description: + * Function asserts given devid based on select + ****************************************************************************/ + +void stm32_spi1select(struct spi_dev_s *dev, enum spi_dev_e devid, + bool select) +{ + spiinfo("INFO: Selecting spi dev: %d, state: %d\n", devid, select); + + if (devid == SPIDEV_MMCSD) + { + stm32_gpiowrite(GPIO_SD_CS, !select); + } +} + +/***************************************************************************** + * Name: stm32_spi1status + * + * Description: + * Return status of devid + ****************************************************************************/ + +uint8_t stm32_spi1status(struct spi_dev_s *dev, enum spi_dev_e devid) +{ + spiinfo("INFO: Requesting info from spi dev: %d\n", devid); + + if (devid == SPIDEV_MMCSD) + { + if (stm32_gpioread(GPIO_SD_CD) == 0) + { + return SPI_STATUS_PRESENT; + } + } + + return 0; +} diff --git a/configs/stm32butterfly2/src/stm32_usb.c b/configs/stm32butterfly2/src/stm32_usb.c new file mode 100644 index 0000000000000000000000000000000000000000..fa84e88e32bea85258b6b2a73c6a32b1eb9e6770 --- /dev/null +++ b/configs/stm32butterfly2/src/stm32_usb.c @@ -0,0 +1,62 @@ +/***************************************************************************** + * configs/stm32butterfly2/src/stm32_usb.c + * + * Copyright (C) 2016 Michał Łyszczek. All rights reserved. + * Author: Michał Łyszczek + * + * 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 Files + ****************************************************************************/ + +#include + +#include "stm32_gpio.h" + +#include "stm32_butterfly2.h" + +/***************************************************************************** + * Public Functions + ****************************************************************************/ + +/***************************************************************************** + * Name: stm32_usb_initialize + * + * Description: + * Initializes USB pins + ****************************************************************************/ + +void stm32_usb_initialize(void) +{ + uinfo("INFO: Initializing usb otgfs gpio pins\n"); + + stm32_configgpio(GPIO_OTGFS_VBUS); + stm32_configgpio(GPIO_OTGFS_PWRON); +} diff --git a/configs/stm32butterfly2/src/stm32_usbdev.c b/configs/stm32butterfly2/src/stm32_usbdev.c new file mode 100644 index 0000000000000000000000000000000000000000..a538222ca039a6dea0e5de545dd10ce0334ad2ee --- /dev/null +++ b/configs/stm32butterfly2/src/stm32_usbdev.c @@ -0,0 +1,77 @@ +/***************************************************************************** + * configs/stm32butterfly2/src/stm32_usbdev.c + * + * Copyright (C) 2016 Michał Łyszczek. All rights reserved. + * Author: Michał Łyszczek + * + * 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 "stm32_otgfs.h" + +/***************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#ifndef CONFIG_STM32_OTGFS +# error "CONFIG_USBDEV requires CONFIG_STM32_OTGFS to be enabled" +#endif + +#ifdef CONFIG_USBHOST +# error "CONFIG_USBDEV cannot be set alongside CONFIG_USBHOST" +#endif + +/***************************************************************************** + * Public Functions + ****************************************************************************/ + +/***************************************************************************** + * Name: stm32_usbsuspend + * + * Description: + * Board logic must provide the stm32_usbsuspend logic if the USBDEV driver + * is used. This function is called whenever the USB enters or leaves + * suspend mode. This is an oportunity for the board logic to shutdown + * clocks, power, etc. while the USB is suspended. + * + * TODO: + * - Well... implement those features like clock shutdown. + ****************************************************************************/ + +void stm32_usbsuspend(struct usbdev_s *dev, bool resume) +{ + uinfo("INFO: usb %s", resume ? "resumed" : "suspended"); +} diff --git a/configs/stm32butterfly2/src/stm32_usbhost.c b/configs/stm32butterfly2/src/stm32_usbhost.c new file mode 100644 index 0000000000000000000000000000000000000000..2f44425eead369d55ffc813508531ada7cb03d9d --- /dev/null +++ b/configs/stm32butterfly2/src/stm32_usbhost.c @@ -0,0 +1,200 @@ +/***************************************************************************** + * configs/stm32butterfly2/src/stm32_usbhost.c + * + * Copyright (C) 2016 Michał Łyszczek. All rights reserved. + * Author: Michał Łyszczek + * + * 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 Files + ****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "stm32.h" +#include "stm32_butterfly2.h" +#include "stm32_otgfs.h" + +/***************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#ifndef CONFIG_STM32_OTGFS +# error "CONFIG_USBHOST requires CONFIG_STM32_OTGFS to be enabled" +#endif + +#ifdef CONFIG_USBDEV +# error "CONFIG_USBHOST cannot be set alongside CONFIG_USBDEV" +#endif + +/***************************************************************************** + * Private Data + ****************************************************************************/ + +static struct usbhost_connection_s *g_usbconn; + +/***************************************************************************** + * Private Functions + ****************************************************************************/ + +/***************************************************************************** + * Name: usbhost_detect + * + * Description: + * Wait for USB devices to be connected. + ****************************************************************************/ + +static void* usbhost_detect(void *arg) +{ + (void)arg; + struct usbhost_hubport_s *hport; + + uinfo("INFO: Starting usb detect thread\n"); + + for (;;) + { + CONN_WAIT(g_usbconn, &hport); + + if (hport->connected) + { + CONN_ENUMERATE(g_usbconn, hport); + } + } + + return 0; +} + +/***************************************************************************** + * Public Functions + ****************************************************************************/ + +/***************************************************************************** + * Name: stm32_usbhost_initialize + * + * Description: + * Initializes USB host functionality. + ****************************************************************************/ + +int stm32_usbhost_initialize(void) +{ + int rv; + +#ifdef CONFIG_USBHOST_MSC + uinfo("INFO: Initializing USB MSC class\n"); + + if ((rv = usbhost_msc_initialize()) < 0) + { + uerr("ERROR: Failed to register mass storage class: %d\n", rv); + } +#endif + +#ifdef CONFIG_USBHOST_CDACM + uinfo("INFO: Initializing CDCACM usb class\n"); + + if ((rv = usbhost_cdacm_initialize()) < 0) + { + uerr("ERROR: Failed to register CDC/ACM serial class: %d\n", rv); + } +#endif + +#ifdef CONFIG_USBHOST_HIDKBD + uinfo("INFO: Initializing HID Keyboard usb class\n"); + + if ((rv = usbhost_kbdinit()) < 0) + { + uerr("ERROR: Failed to register the KBD class: %d\n", rv); + } +#endif + +#ifdef CONFIG_USBHOST_HIDMOUSE + uinfo("INFO: Initializing HID Mouse usb class\n"); + + if ((rv = usbhost_mouse_init()) < 0) + { + uerr("ERROR: Failed to register the mouse class: %d\n", rv); + } +#endif + +#ifdef CONFIG_USBHOST_HUB + uinfo("INFO: Initializing USB HUB class\n"); + + if ((rv = usbhost_hub_initialize()) < 0) + { + uerr("ERROR: Failed to register hub class: %d\n", rv); + } +#endif + + if ((g_usbconn = stm32_otgfshost_initialize(0))) + { + pthread_attr_t pattr; + struct sched_param schparam; + + pthread_attr_init(&pattr); + pthread_attr_setstacksize(&pattr, 2048); + + schparam.sched_priority = 50; + pthread_attr_setschedparam(&pattr, &schparam); + + return pthread_create(NULL, &pattr, usbhost_detect, NULL); + } + + return -ENODEV; +} + +/***************************************************************************** + * Name: stm32_usbhost_vbusdrive + * + * Description: + * Enable/disable driving of VBUS 5V output. + * + * The application uses this field to control power to this port, and the + * core clears this bit on an overcurrent condition. + * + * Input Parameters: + * iface - For future growth to handle multiple USB host interface. + * Should be zero. + * enable - true: enable VBUS power; false: disable VBUS power + * + * Returned Value: + * None + ****************************************************************************/ + +void stm32_usbhost_vbusdrive(int iface, bool enable) +{ + stm32_gpiowrite(GPIO_OTGFS_PWRON, enable); +} diff --git a/configs/stm32f103-minimum/README.txt b/configs/stm32f103-minimum/README.txt index 942f0458d600568feb0aab25f770ccfb94aba352..145f6af0e42dd280df2bb7994558bf5e65ca7128 100644 --- a/configs/stm32f103-minimum/README.txt +++ b/configs/stm32f103-minimum/README.txt @@ -562,6 +562,12 @@ Where is one of the following: builtin applications is enabled, but in the base configuration no builtin applications are selected. + jlx12864g: + --------- + This is a config example to use the JLX12864G-086 LCD module. To use this + LCD you need to connect PA5 (SPI1 CLK) to SCK; PA7 (SPI1 MOSI) to SDA; PA4 + to CS; PA3 to RST; PA2 to RS. + usbnsh: ------- diff --git a/configs/stm32f103-minimum/audio_tone/Make.defs b/configs/stm32f103-minimum/audio_tone/Make.defs new file mode 100644 index 0000000000000000000000000000000000000000..3ff4e7eb8253f9d01dcf6ebb26ed0a6fe39b0719 --- /dev/null +++ b/configs/stm32f103-minimum/audio_tone/Make.defs @@ -0,0 +1,113 @@ +############################################################################ +# configs/stm32f103-minimum/audio_tone/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 -fcheck-new +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/audio_tone/defconfig b/configs/stm32f103-minimum/audio_tone/defconfig new file mode 100644 index 0000000000000000000000000000000000000000..4089a1842e2c3ca999db39f6f4f1f997b9b5d566 --- /dev/null +++ b/configs/stm32f103-minimum/audio_tone/defconfig @@ -0,0 +1,1193 @@ +# +# 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=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 +# 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_RENESAS is not set +# CONFIG_ARCH_SIM is not set +# CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_Z16 is not set +# CONFIG_ARCH_Z80 is not set +CONFIG_ARCH="arm" + +# +# ARM Options +# +# CONFIG_ARCH_CHIP_A1X is not set +# CONFIG_ARCH_CHIP_C5471 is not set +# CONFIG_ARCH_CHIP_CALYPSO is not set +# CONFIG_ARCH_CHIP_DM320 is not set +# CONFIG_ARCH_CHIP_EFM32 is not set +# CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set +# CONFIG_ARCH_CHIP_KINETIS is not set +# CONFIG_ARCH_CHIP_KL is not set +# CONFIG_ARCH_CHIP_LM is not set +# CONFIG_ARCH_CHIP_TIVA is not set +# CONFIG_ARCH_CHIP_LPC11XX is not set +# CONFIG_ARCH_CHIP_LPC17XX is not set +# CONFIG_ARCH_CHIP_LPC214X is not set +# CONFIG_ARCH_CHIP_LPC2378 is not set +# CONFIG_ARCH_CHIP_LPC31XX is not set +# CONFIG_ARCH_CHIP_LPC43XX is not set +# CONFIG_ARCH_CHIP_NUC1XX is not set +# CONFIG_ARCH_CHIP_SAMA5 is not set +# CONFIG_ARCH_CHIP_SAMD is not set +# CONFIG_ARCH_CHIP_SAML is not set +# CONFIG_ARCH_CHIP_SAM34 is not set +# CONFIG_ARCH_CHIP_SAMV7 is not set +CONFIG_ARCH_CHIP_STM32=y +# CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set +# CONFIG_ARCH_CHIP_STR71X is not set +# CONFIG_ARCH_CHIP_TMS570 is not set +# CONFIG_ARCH_CHIP_MOXART is not set +# CONFIG_ARCH_ARM7TDMI is not set +# CONFIG_ARCH_ARM926EJS is not set +# CONFIG_ARCH_ARM920T is not set +# CONFIG_ARCH_CORTEXM0 is not set +CONFIG_ARCH_CORTEXM3=y +# CONFIG_ARCH_CORTEXM4 is not set +# CONFIG_ARCH_CORTEXM7 is not set +# CONFIG_ARCH_CORTEXA5 is not set +# CONFIG_ARCH_CORTEXA8 is not set +# CONFIG_ARCH_CORTEXA9 is not set +# CONFIG_ARCH_CORTEXR4 is not set +# CONFIG_ARCH_CORTEXR4F is not set +# CONFIG_ARCH_CORTEXR5 is not set +# CONFIG_ARCH_CORTEX5F is not set +# CONFIG_ARCH_CORTEXR7 is not set +# CONFIG_ARCH_CORTEXR7F is not set +CONFIG_ARCH_FAMILY="armv7-m" +CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +CONFIG_ARM_TOOLCHAIN_GNU=y +# CONFIG_ARMV7M_USEBASEPRI is not set +CONFIG_ARCH_HAVE_CMNVECTOR=y +# CONFIG_ARMV7M_CMNVECTOR is not set +# CONFIG_ARMV7M_LAZYFPU is not set +# CONFIG_ARCH_HAVE_FPU is not set +# CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set +CONFIG_ARM_HAVE_MPU_UNIFIED=y +# CONFIG_ARM_MPU is not set + +# +# ARMV7M Configuration Options +# +# CONFIG_ARMV7M_HAVE_ICACHE is not set +# CONFIG_ARMV7M_HAVE_DCACHE is not set +# CONFIG_ARMV7M_HAVE_ITCM is not set +# CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set +# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set +CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y +CONFIG_ARMV7M_HAVE_STACKCHECK=y +# CONFIG_ARMV7M_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set +CONFIG_SERIAL_TERMIOS=y + +# +# STM32 Configuration Options +# +# CONFIG_ARCH_CHIP_STM32L151C6 is not set +# CONFIG_ARCH_CHIP_STM32L151C8 is not set +# CONFIG_ARCH_CHIP_STM32L151CB is not set +# CONFIG_ARCH_CHIP_STM32L151R6 is not set +# CONFIG_ARCH_CHIP_STM32L151R8 is not set +# CONFIG_ARCH_CHIP_STM32L151RB is not set +# CONFIG_ARCH_CHIP_STM32L151V6 is not set +# CONFIG_ARCH_CHIP_STM32L151V8 is not set +# CONFIG_ARCH_CHIP_STM32L151VB is not set +# CONFIG_ARCH_CHIP_STM32L152C6 is not set +# CONFIG_ARCH_CHIP_STM32L152C8 is not set +# CONFIG_ARCH_CHIP_STM32L152CB is not set +# CONFIG_ARCH_CHIP_STM32L152R6 is not set +# CONFIG_ARCH_CHIP_STM32L152R8 is not set +# CONFIG_ARCH_CHIP_STM32L152RB is not set +# CONFIG_ARCH_CHIP_STM32L152V6 is not set +# CONFIG_ARCH_CHIP_STM32L152V8 is not set +# CONFIG_ARCH_CHIP_STM32L152VB is not set +# CONFIG_ARCH_CHIP_STM32L162ZD is not set +# CONFIG_ARCH_CHIP_STM32L162VE is not set +# CONFIG_ARCH_CHIP_STM32F100C8 is not set +# CONFIG_ARCH_CHIP_STM32F100CB is not set +# CONFIG_ARCH_CHIP_STM32F100R8 is not set +# CONFIG_ARCH_CHIP_STM32F100RB is not set +# CONFIG_ARCH_CHIP_STM32F100RC is not set +# CONFIG_ARCH_CHIP_STM32F100RD is not set +# CONFIG_ARCH_CHIP_STM32F100RE is not set +# CONFIG_ARCH_CHIP_STM32F100V8 is not set +# CONFIG_ARCH_CHIP_STM32F100VB is not set +# CONFIG_ARCH_CHIP_STM32F100VC is not set +# CONFIG_ARCH_CHIP_STM32F100VD is not set +# CONFIG_ARCH_CHIP_STM32F100VE is not set +# CONFIG_ARCH_CHIP_STM32F102CB is not set +# CONFIG_ARCH_CHIP_STM32F103T8 is not set +# CONFIG_ARCH_CHIP_STM32F103TB is not set +# CONFIG_ARCH_CHIP_STM32F103C4 is not set +CONFIG_ARCH_CHIP_STM32F103C8=y +# CONFIG_ARCH_CHIP_STM32F103CB is not set +# CONFIG_ARCH_CHIP_STM32F103R8 is not set +# CONFIG_ARCH_CHIP_STM32F103RB is not set +# CONFIG_ARCH_CHIP_STM32F103RC is not set +# CONFIG_ARCH_CHIP_STM32F103RD is not set +# CONFIG_ARCH_CHIP_STM32F103RE is not set +# CONFIG_ARCH_CHIP_STM32F103RG is not set +# CONFIG_ARCH_CHIP_STM32F103V8 is not set +# CONFIG_ARCH_CHIP_STM32F103VB is not set +# CONFIG_ARCH_CHIP_STM32F103VC is not set +# CONFIG_ARCH_CHIP_STM32F103VE is not set +# CONFIG_ARCH_CHIP_STM32F103ZE is not set +# CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_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=y +CONFIG_STM32_TIM3=y +# 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_TIM2_NO_REMAP=y +# CONFIG_STM32_TIM2_FULL_REMAP is not set +# CONFIG_STM32_TIM2_PARTIAL_REMAP_1 is not set +# CONFIG_STM32_TIM2_PARTIAL_REMAP_2 is not set +CONFIG_STM32_TIM3_NO_REMAP=y +# CONFIG_STM32_TIM3_FULL_REMAP is not set +# CONFIG_STM32_TIM3_PARTIAL_REMAP is not set +# 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_ONESHOT=y +# CONFIG_STM32_FREERUN is not set +CONFIG_STM32_TICKLESS_ONESHOT=3 +CONFIG_STM32_TIM2_PWM=y +CONFIG_STM32_TIM2_MODE=0 +CONFIG_STM32_TIM2_CHANNEL=2 +CONFIG_STM32_TIM2_CHMODE=0 +# CONFIG_STM32_TIM3_PWM is not set +# CONFIG_STM32_PWM_MULTICHAN is not set +# CONFIG_STM32_TIM1_CAP is not set +# CONFIG_STM32_TIM3_CAP is not set +# CONFIG_STM32_TIM4_CAP is not set +# CONFIG_STM32_TIM5_CAP is not set +# CONFIG_STM32_TIM8_CAP is not set +CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y + +# +# U[S]ART Configuration +# + +# +# 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=y +# CONFIG_ENDIAN_BIG is not set +# CONFIG_ARCH_IDLE_CUSTOM is not set +# CONFIG_ARCH_HAVE_RAMFUNCS is not set +CONFIG_ARCH_HAVE_RAMVECTORS=y +# CONFIG_ARCH_RAMVECTORS is not set + +# +# Board Settings +# +CONFIG_BOARD_LOOPSPERMSEC=5483 +# CONFIG_ARCH_CALIBRATION is not set + +# +# Interrupt options +# +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +CONFIG_ARCH_INTERRUPTSTACK=0 +CONFIG_ARCH_HAVE_HIPRI_INTERRUPT=y +# CONFIG_ARCH_HIPRI_INTERRUPT is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x20000000 +CONFIG_RAM_SIZE=20480 +# CONFIG_ARCH_HAVE_SDRAM is not set + +# +# Board Selection +# +# CONFIG_ARCH_BOARD_STM32_TINY is not set +CONFIG_ARCH_BOARD_STM32F103_MINIMUM=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="stm32f103-minimum" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y + +# +# Board-Specific Options +# +# CONFIG_BOARD_CRASHDUMP is not set +CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_RESET is not set +# CONFIG_BOARDCTL_UNIQUEID is not set +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_ADCTEST is not set +# CONFIG_BOARDCTL_PWMTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set + +# +# RTOS Features +# +# CONFIG_DISABLE_OS_API is not set + +# +# Clocks and Timers +# +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set +CONFIG_USEC_PER_TICK=10000 +# CONFIG_SYSTEM_TIME64 is not set +# CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2011 +CONFIG_START_MONTH=7 +CONFIG_START_DAY=5 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=4 +CONFIG_WDOG_INTRESERVE=0 +CONFIG_PREALLOC_TIMERS=4 + +# +# Tasks and Scheduling +# +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=0 +CONFIG_MAX_TASKS=16 +# CONFIG_SCHED_HAVE_PARENT is not set +CONFIG_SCHED_WAITPID=y + +# +# Pthread Options +# +# CONFIG_MUTEX_TYPES is not set +CONFIG_NPTHREAD_KEYS=4 + +# +# Performance Monitoring +# +# CONFIG_SCHED_CPULOAD is not set +# CONFIG_SCHED_INSTRUMENTATION is not set + +# +# Files and I/O +# +CONFIG_DEV_CONSOLE=y +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +# CONFIG_PRIORITY_INHERITANCE is not set + +# +# RTOS hooks +# +# CONFIG_BOARD_INITIALIZE is not set +# CONFIG_SCHED_STARTHOOK is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +# CONFIG_SIG_EVTHREAD is not set + +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCONDTIMEDOUT=16 +CONFIG_SIG_SIGWORK=17 + +# +# POSIX Message Queue Options +# +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set + +# +# Work queue support +# +CONFIG_SCHED_WORKQUEUE=y +CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_HPWORKPRIORITY=192 +CONFIG_SCHED_HPWORKPERIOD=50000 +CONFIG_SCHED_HPWORKSTACKSIZE=2048 +# CONFIG_SCHED_LPWORK is not set + +# +# Stack and heap information +# +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=2048 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 +# CONFIG_LIB_SYSCALL is not set + +# +# Device Drivers +# +# CONFIG_DISABLE_POLL is not set +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM 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=y +# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set +CONFIG_PWM=y +# CONFIG_PWM_PULSECOUNT is not set +CONFIG_ARCH_HAVE_I2CRESET=y +# CONFIG_I2C is not set +# CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_I2S is not set + +# +# Timer Driver Support +# +# CONFIG_TIMER is not set +# CONFIG_ONESHOT is not set +# CONFIG_RTC is not set +# CONFIG_WATCHDOG is not set +# CONFIG_ANALOG is not set +CONFIG_AUDIO_DEVICES=y +CONFIG_AUDIO_TONE=y +# CONFIG_VS1053 is not set +# CONFIG_AUDIO_WM8904 is not set +# CONFIG_AUDIO_NULL is not set +# CONFIG_VIDEO_DEVICES is not set +# CONFIG_BCH is not set +# CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# +# CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO 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 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=y +CONFIG_SERIAL_NPOLLWAITERS=2 +# CONFIG_SERIAL_IFLOWCONTROL is not set +# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set +CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y +CONFIG_USART1_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# USART1 Configuration +# +CONFIG_USART1_RXBUFSIZE=256 +CONFIG_USART1_TXBUFSIZE=256 +CONFIG_USART1_BAUD=115200 +CONFIG_USART1_BITS=8 +CONFIG_USART1_PARITY=0 +CONFIG_USART1_2STOP=0 +# CONFIG_USART1_IFLOWCONTROL is not set +# CONFIG_USART1_OFLOWCONTROL is not set +# CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE 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 +# CONFIG_SYSLOG_CHARDEV is not set + +# +# Networking Support +# +# CONFIG_ARCH_HAVE_NET is not set +# CONFIG_ARCH_HAVE_PHY is not set +# CONFIG_NET is not set + +# +# Crypto API +# +# CONFIG_CRYPTO is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y +# CONFIG_FS_READABLE is not set +# CONFIG_FS_WRITABLE is not set +# CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" +# CONFIG_FS_RAMMAP is not set +# CONFIG_FS_FAT is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set +# CONFIG_FS_TMPFS is not set +# CONFIG_FS_SMARTFS is not set +# CONFIG_FS_BINFS is not set +# CONFIG_FS_PROCFS is not set +# CONFIG_FS_UNIONFS is not set + +# +# 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=y +# CONFIG_AUDIO_MULTI_SESSION is not set + +# +# Audio Buffer Configuration +# +# CONFIG_AUDIO_LARGE_BUFFERS is not set +CONFIG_AUDIO_NUM_BUFFERS=2 +CONFIG_AUDIO_BUFFER_NUMBYTES=8192 +# CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS is not set + +# +# Supported Audio Formats +# +# CONFIG_AUDIO_FORMAT_AC3 is not set +# CONFIG_AUDIO_FORMAT_DTS is not set +CONFIG_AUDIO_FORMAT_PCM=y +CONFIG_AUDIO_FORMAT_MP3=y +# CONFIG_AUDIO_FORMAT_MIDI is not set +# CONFIG_AUDIO_FORMAT_WMA is not set +# CONFIG_AUDIO_FORMAT_OGG_VORBIS is not set + +# +# Exclude Specific Audio Features +# +# CONFIG_AUDIO_EXCLUDE_VOLUME is not set +# CONFIG_AUDIO_EXCLUDE_BALANCE is not set +CONFIG_AUDIO_EXCLUDE_EQUALIZER=y +# CONFIG_AUDIO_EXCLUDE_TONE is not set +# CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME is not set +# CONFIG_AUDIO_EXCLUDE_STOP is not set +# CONFIG_AUDIO_EXCLUDE_FFORWARD is not set +CONFIG_AUDIO_EXCLUDE_REWIND=y +# CONFIG_AUDIO_CUSTOM_DEV_PATH is not set + +# +# Wireless Support +# + +# +# Binary Loader +# +# CONFIG_BINFMT_DISABLE is not set +# CONFIG_BINFMT_EXEPATH is not set +# CONFIG_NXFLAT is not set +# CONFIG_ELF is not set +CONFIG_BUILTIN=y +# CONFIG_PIC is not set +CONFIG_SYMTAB_ORDEREDBYNAME=y + +# +# Library Routines +# + +# +# Standard C Library Options +# +CONFIG_STDIO_BUFFER_SIZE=64 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=2 +CONFIG_LIB_HOMEDIR="/" +# CONFIG_LIBM is not set +# CONFIG_NOPRINTF_FIELDWIDTH is not set +# CONFIG_LIBC_FLOATINGPOINT is not set +# CONFIG_LIBC_LONG_LONG is not set +# CONFIG_LIBC_IOCTL_VARIADIC is not set +CONFIG_LIB_RAND_ORDER=1 +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_EXECFUNCS is not set +CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 +CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_ARCH_LOWPUTC=y +# CONFIG_LIBC_LOCALTIME is not set +# CONFIG_TIME_EXTENDED is not set +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set +# CONFIG_LIBC_NETDB is not set + +# +# Non-standard Library Support +# +# CONFIG_LIB_CRC64_FAST is not set +# CONFIG_LIB_KBDCODEC is not set +# CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN 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_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_NXFFS is not set +# CONFIG_EXAMPLES_NXHELLO is not set +# CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NX 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_POSIXSPAWN is not set +# CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_PWM is not set +# CONFIG_EXAMPLES_RFID_READUID 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_MINIBASIC 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=80 +CONFIG_NSH_DISABLE_SEMICOLON=y +# CONFIG_NSH_CMDPARMS is not set +CONFIG_NSH_MAXARGUMENTS=6 +# CONFIG_NSH_ARGCAT is not set +CONFIG_NSH_NESTDEPTH=3 +CONFIG_NSH_DISABLEBG=y +CONFIG_NSH_BUILTIN_APPS=y + +# +# Disable Individual commands +# +CONFIG_NSH_DISABLE_ADDROUTE=y +CONFIG_NSH_DISABLE_BASENAME=y +# CONFIG_NSH_DISABLE_CAT is not set +# CONFIG_NSH_DISABLE_CD is not set +# CONFIG_NSH_DISABLE_CP is not set +CONFIG_NSH_DISABLE_CMP=y +CONFIG_NSH_DISABLE_DATE=y +# CONFIG_NSH_DISABLE_DD is not set +CONFIG_NSH_DISABLE_DF=y +CONFIG_NSH_DISABLE_DELROUTE=y +CONFIG_NSH_DISABLE_DIRNAME=y +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +CONFIG_NSH_DISABLE_IFCONFIG=y +CONFIG_NSH_DISABLE_IFUPDOWN=y +# CONFIG_NSH_DISABLE_KILL is not set +CONFIG_NSH_DISABLE_LOSETUP=y +CONFIG_NSH_DISABLE_LOSMART=y +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKRD is not set +# CONFIG_NSH_DISABLE_MH is not set +# CONFIG_NSH_DISABLE_MOUNT is not set +# CONFIG_NSH_DISABLE_MV is not set +# CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_PS is not set +# CONFIG_NSH_DISABLE_PUT is not set +# CONFIG_NSH_DISABLE_PWD is not set +# CONFIG_NSH_DISABLE_RM is not set +# CONFIG_NSH_DISABLE_RMDIR is not set +# CONFIG_NSH_DISABLE_SET is not set +# CONFIG_NSH_DISABLE_SH is not set +# CONFIG_NSH_DISABLE_SLEEP is not set +CONFIG_NSH_DISABLE_TIME=y +# CONFIG_NSH_DISABLE_TEST is not set +# CONFIG_NSH_DISABLE_UMOUNT is not set +CONFIG_NSH_DISABLE_UNAME=y +# CONFIG_NSH_DISABLE_UNSET is not set +# CONFIG_NSH_DISABLE_USLEEP is not set +# CONFIG_NSH_DISABLE_WGET is not set +# CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 + +# +# Configure Command Options +# +CONFIG_NSH_CODECS_BUFSIZE=128 +# CONFIG_NSH_CMDOPT_HEXDUMP is not set +CONFIG_NSH_FILEIOSIZE=1024 + +# +# Scripting Support +# +# CONFIG_NSH_DISABLESCRIPT is not set +CONFIG_NSH_DISABLE_ITEF=y +CONFIG_NSH_DISABLE_LOOPS=y + +# +# Console Configuration +# +CONFIG_NSH_CONSOLE=y +# CONFIG_NSH_ALTCONDEV is not set +CONFIG_NSH_ARCHINIT=y +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set + +# +# NxWidgets/NxWM +# + +# +# Platform-specific Support +# +# CONFIG_PLATFORM_CONFIGDATA is not set + +# +# RFID Utilities +# +# CONFIG_RFIDUTILS_PICCTOMXT 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_NXPLAYER 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_TEE 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/audio_tone/setenv.sh b/configs/stm32f103-minimum/audio_tone/setenv.sh new file mode 100644 index 0000000000000000000000000000000000000000..665d744a6ed8f1fa7e8c36048ff06032e0701795 --- /dev/null +++ b/configs/stm32f103-minimum/audio_tone/setenv.sh @@ -0,0 +1,100 @@ +#!/bin/bash +# configs//stm32f103-minimum/audio_tone/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/jlx12864g/Make.defs b/configs/stm32f103-minimum/jlx12864g/Make.defs new file mode 100644 index 0000000000000000000000000000000000000000..06fcf0d63f1ea7251fab593ea60452dfd467cf67 --- /dev/null +++ b/configs/stm32f103-minimum/jlx12864g/Make.defs @@ -0,0 +1,113 @@ +############################################################################ +# configs/stm32f103-minimum/jlx12864g/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 -fcheck-new +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/jlx12864g/defconfig b/configs/stm32f103-minimum/jlx12864g/defconfig new file mode 100644 index 0000000000000000000000000000000000000000..ac1ee07d2bbd4a1d6680669d24d283d6f810f539 --- /dev/null +++ b/configs/stm32f103-minimum/jlx12864g/defconfig @@ -0,0 +1,1357 @@ +# +# 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=y +CONFIG_DEBUG_FEATURES=y + +# +# Debug SYSLOG Output Controls +# +CONFIG_DEBUG_ERROR=y +CONFIG_DEBUG_WARN=y +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_ASSERTIONS is not set + +# +# Subsystem Debug Options +# +# CONFIG_DEBUG_BINFMT is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_DEBUG_GRAPHICS is not set +# CONFIG_DEBUG_LIB is not set +# CONFIG_DEBUG_MM is not set +# CONFIG_DEBUG_SCHED is not set + +# +# OS Function Debug Options +# +# CONFIG_DEBUG_IRQ is not set + +# +# Driver Debug Options +# +CONFIG_DEBUG_LCD=y +CONFIG_DEBUG_LCD_ERROR=y +CONFIG_DEBUG_LCD_WARN=y +CONFIG_DEBUG_LCD_INFO=y +# CONFIG_DEBUG_LEDS is not set +# CONFIG_DEBUG_GPIO is not set +# CONFIG_DEBUG_SPI is not set +# CONFIG_DEBUG_TIMER 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_RENESAS 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 +# CONFIG_DEBUG_HARDFAULT is not set + +# +# ARMV7M Configuration Options +# +# CONFIG_ARMV7M_HAVE_ICACHE is not set +# CONFIG_ARMV7M_HAVE_DCACHE is not set +# CONFIG_ARMV7M_HAVE_ITCM is not set +# CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set +# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set +CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y +CONFIG_ARMV7M_HAVE_STACKCHECK=y +# CONFIG_ARMV7M_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set +CONFIG_SERIAL_TERMIOS=y + +# +# STM32 Configuration Options +# +# CONFIG_ARCH_CHIP_STM32L151C6 is not set +# CONFIG_ARCH_CHIP_STM32L151C8 is not set +# CONFIG_ARCH_CHIP_STM32L151CB is not set +# CONFIG_ARCH_CHIP_STM32L151R6 is not set +# CONFIG_ARCH_CHIP_STM32L151R8 is not set +# CONFIG_ARCH_CHIP_STM32L151RB is not set +# CONFIG_ARCH_CHIP_STM32L151V6 is not set +# CONFIG_ARCH_CHIP_STM32L151V8 is not set +# CONFIG_ARCH_CHIP_STM32L151VB is not set +# CONFIG_ARCH_CHIP_STM32L152C6 is not set +# CONFIG_ARCH_CHIP_STM32L152C8 is not set +# CONFIG_ARCH_CHIP_STM32L152CB is not set +# CONFIG_ARCH_CHIP_STM32L152R6 is not set +# CONFIG_ARCH_CHIP_STM32L152R8 is not set +# CONFIG_ARCH_CHIP_STM32L152RB is not set +# CONFIG_ARCH_CHIP_STM32L152V6 is not set +# CONFIG_ARCH_CHIP_STM32L152V8 is not set +# CONFIG_ARCH_CHIP_STM32L152VB is not set +# CONFIG_ARCH_CHIP_STM32L162ZD is not set +# CONFIG_ARCH_CHIP_STM32L162VE is not set +# CONFIG_ARCH_CHIP_STM32F100C8 is not set +# CONFIG_ARCH_CHIP_STM32F100CB is not set +# CONFIG_ARCH_CHIP_STM32F100R8 is not set +# CONFIG_ARCH_CHIP_STM32F100RB is not set +# CONFIG_ARCH_CHIP_STM32F100RC is not set +# CONFIG_ARCH_CHIP_STM32F100RD is not set +# CONFIG_ARCH_CHIP_STM32F100RE is not set +# CONFIG_ARCH_CHIP_STM32F100V8 is not set +# CONFIG_ARCH_CHIP_STM32F100VB is not set +# CONFIG_ARCH_CHIP_STM32F100VC is not set +# CONFIG_ARCH_CHIP_STM32F100VD is not set +# CONFIG_ARCH_CHIP_STM32F100VE is not set +# CONFIG_ARCH_CHIP_STM32F102CB is not set +# CONFIG_ARCH_CHIP_STM32F103T8 is not set +# CONFIG_ARCH_CHIP_STM32F103TB is not set +# CONFIG_ARCH_CHIP_STM32F103C4 is not set +CONFIG_ARCH_CHIP_STM32F103C8=y +# CONFIG_ARCH_CHIP_STM32F103CB is not set +# CONFIG_ARCH_CHIP_STM32F103R8 is not set +# CONFIG_ARCH_CHIP_STM32F103RB is not set +# CONFIG_ARCH_CHIP_STM32F103RC is not set +# CONFIG_ARCH_CHIP_STM32F103RD is not set +# CONFIG_ARCH_CHIP_STM32F103RE is not set +# CONFIG_ARCH_CHIP_STM32F103RG is not set +# CONFIG_ARCH_CHIP_STM32F103V8 is not set +# CONFIG_ARCH_CHIP_STM32F103VB is not set +# CONFIG_ARCH_CHIP_STM32F103VC is not set +# CONFIG_ARCH_CHIP_STM32F103VE is not set +# CONFIG_ARCH_CHIP_STM32F103ZE is not set +# CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_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=y +# 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_SPI=y +# CONFIG_STM32_NOEXT_VECTORS is not set + +# +# Alternate Pin Mapping +# +# CONFIG_STM32_SPI1_REMAP is not set +# 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_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set +# CONFIG_STM32_TIM1_CAP is not set +# CONFIG_STM32_TIM3_CAP is not set +# CONFIG_STM32_TIM4_CAP is not set +# CONFIG_STM32_TIM5_CAP is not set +# CONFIG_STM32_TIM8_CAP is not set +CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y + +# +# U[S]ART Configuration +# + +# +# 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 + +# +# SPI Configuration +# +# CONFIG_STM32_SPI_INTERRUPTS is not set +# CONFIG_STM32_SPI_DMA is not set +CONFIG_STM32_HAVE_RTC_COUNTER=y +# CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set + +# +# USB FS Host Configuration +# + +# +# USB HS Host Configuration +# + +# +# USB Host Debug Configuration +# + +# +# USB Device Configuration +# + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_VECNOTIRQ is not set +# CONFIG_ARCH_DMA is not set +CONFIG_ARCH_HAVE_IRQPRIO=y +# CONFIG_ARCH_L2CACHE is not set +# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set +# CONFIG_ARCH_HAVE_ADDRENV is not set +# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set +# CONFIG_ARCH_HAVE_MULTICPU is not set +CONFIG_ARCH_HAVE_VFORK=y +# CONFIG_ARCH_HAVE_MMU is not set +CONFIG_ARCH_HAVE_MPU=y +# CONFIG_ARCH_NAND_HWECC is not set +# CONFIG_ARCH_HAVE_EXTCLK is not set +# CONFIG_ARCH_HAVE_POWEROFF is not set +CONFIG_ARCH_HAVE_RESET=y +# CONFIG_ARCH_USE_MPU is not set +# CONFIG_ARCH_IRQPRIO is not set +CONFIG_ARCH_STACKDUMP=y +# CONFIG_ENDIAN_BIG is not set +# CONFIG_ARCH_IDLE_CUSTOM is not set +# CONFIG_ARCH_HAVE_RAMFUNCS is not set +CONFIG_ARCH_HAVE_RAMVECTORS=y +# CONFIG_ARCH_RAMVECTORS is not set + +# +# Board Settings +# +CONFIG_BOARD_LOOPSPERMSEC=5483 +# CONFIG_ARCH_CALIBRATION is not set + +# +# Interrupt options +# +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +CONFIG_ARCH_INTERRUPTSTACK=0 +CONFIG_ARCH_HAVE_HIPRI_INTERRUPT=y +# CONFIG_ARCH_HIPRI_INTERRUPT is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x20000000 +CONFIG_RAM_SIZE=20480 +# CONFIG_ARCH_HAVE_SDRAM is not set + +# +# Board Selection +# +# CONFIG_ARCH_BOARD_STM32_TINY is not set +CONFIG_ARCH_BOARD_STM32F103_MINIMUM=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="stm32f103-minimum" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y + +# +# Board-Specific Options +# +# CONFIG_BOARD_CRASHDUMP is not set +CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_RESET is not set +# CONFIG_BOARDCTL_UNIQUEID is not set +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_ADCTEST is not set +# CONFIG_BOARDCTL_PWMTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set + +# +# RTOS Features +# +# CONFIG_DISABLE_OS_API is not set + +# +# Clocks and Timers +# +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set +CONFIG_USEC_PER_TICK=10000 +# CONFIG_SYSTEM_TIME64 is not set +# CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2011 +CONFIG_START_MONTH=7 +CONFIG_START_DAY=5 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=4 +CONFIG_WDOG_INTRESERVE=0 +CONFIG_PREALLOC_TIMERS=4 + +# +# Tasks and Scheduling +# +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=0 +CONFIG_MAX_TASKS=16 +# CONFIG_SCHED_HAVE_PARENT is not set +CONFIG_SCHED_WAITPID=y + +# +# Pthread Options +# +# CONFIG_MUTEX_TYPES is not set +CONFIG_NPTHREAD_KEYS=4 + +# +# Performance Monitoring +# +# CONFIG_SCHED_CPULOAD is not set +# CONFIG_SCHED_INSTRUMENTATION is not set + +# +# Files and I/O +# +CONFIG_DEV_CONSOLE=y +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +# CONFIG_PRIORITY_INHERITANCE is not set + +# +# RTOS hooks +# +# CONFIG_BOARD_INITIALIZE is not set +# CONFIG_SCHED_STARTHOOK is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +# CONFIG_SIG_EVTHREAD is not set + +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCONDTIMEDOUT=16 +CONFIG_SIG_SIGWORK=17 + +# +# POSIX Message Queue Options +# +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set + +# +# Work queue support +# +CONFIG_SCHED_WORKQUEUE=y +CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_HPWORKPRIORITY=192 +CONFIG_SCHED_HPWORKPERIOD=50000 +CONFIG_SCHED_HPWORKSTACKSIZE=2048 +# CONFIG_SCHED_LPWORK is not set + +# +# Stack and heap information +# +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=2048 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 +# CONFIG_LIB_SYSCALL is not set + +# +# Device Drivers +# +# CONFIG_DISABLE_POLL is not set +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM 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=y +# CONFIG_SPI_CALLBACK is not set +# CONFIG_SPI_HWFEATURES is not set +# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set +# CONFIG_I2S is not set + +# +# Timer Driver Support +# +# CONFIG_TIMER is not set +# CONFIG_ONESHOT 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 + +# +# IO Expander/GPIO Support +# +# CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set + +# +# LCD Driver Support +# +CONFIG_LCD=y + +# +# Common Graphic LCD Settings +# +# CONFIG_LCD_CONSOLE is not set +# CONFIG_LCD_NOGETRUN is not set +CONFIG_LCD_MAXCONTRAST=63 +CONFIG_LCD_MAXPOWER=1 + +# +# Graphic LCD Devices +# +# CONFIG_LCD_P14201 is not set +# CONFIG_LCD_NOKIA6100 is not set +# CONFIG_LCD_MIO283QT2 is not set +# CONFIG_LCD_MIO283QT9A is not set +# CONFIG_LCD_UG9664HSWAG01 is not set +# CONFIG_LCD_SH1106_OLED_132 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=y +CONFIG_ST7567_SPIMODE=0 +CONFIG_ST7567_FREQUENCY=3500000 +CONFIG_ST7567_NINTERFACES=1 +# CONFIG_ST7567_POWER is not set +CONFIG_ST7567_XRES=128 +CONFIG_ST7567_YRES=64 +# CONFIG_LCD_UG2864AMBAG01 is not set +# CONFIG_LCD_SSD1289 is not set +# CONFIG_LCD_SHARP_MEMLCD is not set +CONFIG_LCD_LANDSCAPE=y +# CONFIG_LCD_PORTRAIT is not set +# 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 + +# +# 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 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=y +CONFIG_SERIAL_NPOLLWAITERS=2 +# 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=y +CONFIG_USART1_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# USART1 Configuration +# +CONFIG_USART1_RXBUFSIZE=256 +CONFIG_USART1_TXBUFSIZE=256 +CONFIG_USART1_BAUD=115200 +CONFIG_USART1_BITS=8 +CONFIG_USART1_PARITY=0 +CONFIG_USART1_2STOP=0 +# CONFIG_USART1_IFLOWCONTROL is not set +# CONFIG_USART1_OFLOWCONTROL is not set +# CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE 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 +# CONFIG_SYSLOG_CHARDEV is not set + +# +# Networking Support +# +# CONFIG_ARCH_HAVE_NET is not set +# CONFIG_ARCH_HAVE_PHY is not set +# CONFIG_NET is not set + +# +# Crypto API +# +# CONFIG_CRYPTO is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y +# CONFIG_FS_READABLE is not set +# CONFIG_FS_WRITABLE is not set +# CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" +# CONFIG_FS_RAMMAP is not set +# CONFIG_FS_FAT is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set +# CONFIG_FS_TMPFS is not set +# CONFIG_FS_SMARTFS is not set +# CONFIG_FS_BINFS is not set +# CONFIG_FS_PROCFS is not set +# CONFIG_FS_UNIONFS is not set + +# +# Graphics Support +# +CONFIG_NX=y +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 +# +# CONFIG_NX_DISABLE_1BPP is not set +CONFIG_NX_DISABLE_2BPP=y +CONFIG_NX_DISABLE_4BPP=y +CONFIG_NX_DISABLE_8BPP=y +CONFIG_NX_DISABLE_16BPP=y +CONFIG_NX_DISABLE_24BPP=y +CONFIG_NX_DISABLE_32BPP=y +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=1 +CONFIG_NXTK_DEFAULT_BORDERCOLORS=y +# CONFIG_NXTK_AUTORAISE is not set + +# +# Font Selections +# +CONFIG_NXFONTS_CHARBITS=7 +CONFIG_NXFONT_MONO5X8=y +# CONFIG_NXFONT_SANS17X22 is not set +# CONFIG_NXFONT_SANS20X26 is not set +# CONFIG_NXFONT_SANS23X27 is not set +# CONFIG_NXFONT_SANS22X29 is not set +# CONFIG_NXFONT_SANS28X37 is not set +# CONFIG_NXFONT_SANS39X48 is not set +# CONFIG_NXFONT_SANS17X23B is not set +# CONFIG_NXFONT_SANS20X27B is not set +# CONFIG_NXFONT_SANS22X29B is not set +# CONFIG_NXFONT_SANS28X37B is not set +# CONFIG_NXFONT_SANS40X49B is not set +# CONFIG_NXFONT_SERIF22X29 is not set +# CONFIG_NXFONT_SERIF29X37 is not set +# CONFIG_NXFONT_SERIF38X48 is not set +# 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 + +# +# NX Multi-user only options +# +# CONFIG_NX_MULTIUSER is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=1 +# CONFIG_ARCH_HAVE_HEAP2 is not set +# CONFIG_GRAN is not set + +# +# Audio Support +# +# CONFIG_AUDIO is not set + +# +# Wireless Support +# + +# +# Binary Loader +# +# CONFIG_BINFMT_DISABLE is not set +# CONFIG_BINFMT_EXEPATH is not set +# CONFIG_NXFLAT is not set +# CONFIG_ELF is not set +CONFIG_BUILTIN=y +# CONFIG_PIC is not set +CONFIG_SYMTAB_ORDEREDBYNAME=y + +# +# Library Routines +# + +# +# Standard C Library Options +# +CONFIG_STDIO_BUFFER_SIZE=64 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=2 +CONFIG_LIB_HOMEDIR="/" +# CONFIG_LIBM is not set +# CONFIG_NOPRINTF_FIELDWIDTH is not set +# CONFIG_LIBC_FLOATINGPOINT is not set +# CONFIG_LIBC_LONG_LONG is not set +# CONFIG_LIBC_IOCTL_VARIADIC is not set +CONFIG_LIB_RAND_ORDER=1 +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_EXECFUNCS is not set +CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 +CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_ARCH_LOWPUTC=y +# CONFIG_LIBC_LOCALTIME is not set +# CONFIG_TIME_EXTENDED is not set +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set +# CONFIG_LIBC_NETDB is not set + +# +# Non-standard Library Support +# +# CONFIG_LIB_CRC64_FAST is not set +# CONFIG_LIB_KBDCODEC is not set +# CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN 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_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_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 +# CONFIG_EXAMPLES_NRF24L01TERM is not set +CONFIG_EXAMPLES_NSH=y +# CONFIG_EXAMPLES_NULL is not set +# CONFIG_EXAMPLES_NXFFS is not set +CONFIG_EXAMPLES_NXHELLO=y +CONFIG_EXAMPLES_NXHELLO_VPLANE=0 +CONFIG_EXAMPLES_NXHELLO_DEVNO=0 +CONFIG_EXAMPLES_NXHELLO_BPP=1 + +# +# Example Color Configuration +# +CONFIG_EXAMPLES_NXHELLO_DEFAULT_COLORS=y + +# +# Example Font Configuration +# +CONFIG_EXAMPLES_NXHELLO_DEFAULT_FONT=y +# CONFIG_EXAMPLES_NXHELLO_EXTERNINIT is not set +# CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NX is not set +CONFIG_EXAMPLES_NXLINES=y +CONFIG_EXAMPLES_NXLINES_VPLANE=0 +CONFIG_EXAMPLES_NXLINES_DEVNO=0 +# CONFIG_EXAMPLES_NXLINES_DEFAULT_COLORS is not set +CONFIG_EXAMPLES_NXLINES_LINEWIDTH=2 +CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=2 +CONFIG_EXAMPLES_NXLINES_BPP=1 +# CONFIG_EXAMPLES_NXLINES_EXTERNINIT is not set +# CONFIG_EXAMPLES_NXTERM is not set +CONFIG_EXAMPLES_NXTEXT=y + +# +# Basic Configuration of the example +# +CONFIG_EXAMPLES_NXTEXT_VPLANE=0 +CONFIG_EXAMPLES_NXTEXT_DEVNO=0 +CONFIG_EXAMPLES_NXTEXT_BPP=1 +CONFIG_EXAMPLES_NXTEXT_BMCACHE=128 +CONFIG_EXAMPLES_NXTEXT_GLCACHE=16 + +# +# Example Color Configuration +# +CONFIG_EXAMPLES_NXTEXT_DEFAULT_COLORS=y + +# +# Example Font Configuration +# +CONFIG_EXAMPLES_NXTEXT_DEFAULT_FONT=y +# CONFIG_EXAMPLES_NXTEXT_EXTERNINIT is not set +# CONFIG_EXAMPLES_OSTEST is not set +# CONFIG_EXAMPLES_PCA9635 is not set +# CONFIG_EXAMPLES_POSIXSPAWN is not set +# CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID 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_MINIBASIC 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=80 +CONFIG_NSH_DISABLE_SEMICOLON=y +# CONFIG_NSH_CMDPARMS is not set +CONFIG_NSH_MAXARGUMENTS=6 +# CONFIG_NSH_ARGCAT is not set +CONFIG_NSH_NESTDEPTH=3 +CONFIG_NSH_DISABLEBG=y +CONFIG_NSH_BUILTIN_APPS=y + +# +# Disable Individual commands +# +CONFIG_NSH_DISABLE_ADDROUTE=y +CONFIG_NSH_DISABLE_BASENAME=y +# CONFIG_NSH_DISABLE_CAT is not set +# CONFIG_NSH_DISABLE_CD is not set +# CONFIG_NSH_DISABLE_CP is not set +CONFIG_NSH_DISABLE_CMP=y +CONFIG_NSH_DISABLE_DATE=y +# CONFIG_NSH_DISABLE_DD is not set +CONFIG_NSH_DISABLE_DF=y +CONFIG_NSH_DISABLE_DELROUTE=y +CONFIG_NSH_DISABLE_DIRNAME=y +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +CONFIG_NSH_DISABLE_IFCONFIG=y +CONFIG_NSH_DISABLE_IFUPDOWN=y +# CONFIG_NSH_DISABLE_KILL is not set +CONFIG_NSH_DISABLE_LOSETUP=y +CONFIG_NSH_DISABLE_LOSMART=y +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKRD is not set +# CONFIG_NSH_DISABLE_MH is not set +# CONFIG_NSH_DISABLE_MOUNT is not set +# CONFIG_NSH_DISABLE_MV is not set +# CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_PS is not set +# CONFIG_NSH_DISABLE_PUT is not set +# CONFIG_NSH_DISABLE_PWD is not set +# CONFIG_NSH_DISABLE_RM is not set +# CONFIG_NSH_DISABLE_RMDIR is not set +# CONFIG_NSH_DISABLE_SET is not set +# CONFIG_NSH_DISABLE_SH is not set +# CONFIG_NSH_DISABLE_SLEEP is not set +CONFIG_NSH_DISABLE_TIME=y +# CONFIG_NSH_DISABLE_TEST is not set +# CONFIG_NSH_DISABLE_UMOUNT is not set +CONFIG_NSH_DISABLE_UNAME=y +# CONFIG_NSH_DISABLE_UNSET is not set +# CONFIG_NSH_DISABLE_USLEEP is not set +# CONFIG_NSH_DISABLE_WGET is not set +# CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 + +# +# Configure Command Options +# +CONFIG_NSH_CODECS_BUFSIZE=128 +# CONFIG_NSH_CMDOPT_HEXDUMP is not set +CONFIG_NSH_FILEIOSIZE=1024 + +# +# Scripting Support +# +# CONFIG_NSH_DISABLESCRIPT is not set +CONFIG_NSH_DISABLE_ITEF=y +CONFIG_NSH_DISABLE_LOOPS=y + +# +# Console Configuration +# +CONFIG_NSH_CONSOLE=y +# CONFIG_NSH_ALTCONDEV is not set +CONFIG_NSH_ARCHINIT=y +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set + +# +# NxWidgets/NxWM +# + +# +# Platform-specific Support +# +# CONFIG_PLATFORM_CONFIGDATA is not set + +# +# System Libraries and NSH Add-Ons +# +# CONFIG_SYSTEM_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_SYSTEM is not set +# CONFIG_SYSTEM_TEE 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/jlx12864g/setenv.sh b/configs/stm32f103-minimum/jlx12864g/setenv.sh new file mode 100644 index 0000000000000000000000000000000000000000..4a9a11eff24ff2ba1bb5021f8603a4c358d87d5e --- /dev/null +++ b/configs/stm32f103-minimum/jlx12864g/setenv.sh @@ -0,0 +1,100 @@ +#!/bin/bash +# configs//stm32f103-minimum/jlx12864g/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/minnsh/Make.defs b/configs/stm32f103-minimum/minnsh/Make.defs index b77741df2552a0967fa976703c5a841822f276b4..8d3d47830537e30dac2dbbe27cf1085bfea495df 100644 --- a/configs/stm32f103-minimum/minnsh/Make.defs +++ b/configs/stm32f103-minimum/minnsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f103-minimum/minnsh/defconfig b/configs/stm32f103-minimum/minnsh/defconfig index 09b5db03bf424b9fa99a93922744586e3a019817..06b686c04e241e0198ebd158b0b128c110131b59 100644 --- a/configs/stm32f103-minimum/minnsh/defconfig +++ b/configs/stm32f103-minimum/minnsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -412,6 +412,8 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -528,11 +530,11 @@ CONFIG_ARCH_BOARD="stm32f103-minimum" # CONFIG_ARCH_HAVE_LEDS=y CONFIG_ARCH_LEDS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -548,9 +550,12 @@ CONFIG_DISABLE_ENVIRON=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=2 @@ -620,6 +625,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y # CONFIG_DEV_NULL is not set # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -635,6 +641,7 @@ CONFIG_DISABLE_POLL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -648,7 +655,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -720,8 +732,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -735,6 +749,7 @@ CONFIG_USART1_2STOP=0 # CONFIG_SYSLOG_CHAR is not set CONFIG_SYSLOG_NONE=y # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -836,6 +851,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -856,7 +872,6 @@ CONFIG_ARCH_HAVE_TLS=y # # 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 @@ -882,10 +897,9 @@ CONFIG_EXAMPLES_NSH=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -987,7 +1001,6 @@ 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 @@ -1009,6 +1022,7 @@ CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_USLEEP is not set CONFIG_NSH_DISABLE_WGET=y # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1046,7 +1060,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f103-minimum/nsh/Make.defs b/configs/stm32f103-minimum/nsh/Make.defs index b77741df2552a0967fa976703c5a841822f276b4..8d3d47830537e30dac2dbbe27cf1085bfea495df 100644 --- a/configs/stm32f103-minimum/nsh/Make.defs +++ b/configs/stm32f103-minimum/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f103-minimum/nsh/defconfig b/configs/stm32f103-minimum/nsh/defconfig index 5b5fbf73fa482a334f049f25a797b042251e4fb7..db105a7a7b802379016dc5a581900edcfc3f3def 100644 --- a/configs/stm32f103-minimum/nsh/defconfig +++ b/configs/stm32f103-minimum/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -412,6 +412,8 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -528,11 +530,11 @@ CONFIG_ARCH_BOARD="stm32f103-minimum" # CONFIG_ARCH_HAVE_LEDS=y CONFIG_ARCH_LEDS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -550,9 +552,12 @@ CONFIG_LIB_BOARDCTL=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=7 @@ -650,6 +655,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -665,6 +671,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -678,7 +685,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -752,8 +764,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -768,6 +782,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -880,6 +895,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -905,7 +921,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -931,9 +946,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1040,7 +1055,6 @@ 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 @@ -1062,6 +1076,7 @@ CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1101,7 +1116,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f103-minimum/rfid-rc522/Make.defs b/configs/stm32f103-minimum/rfid-rc522/Make.defs new file mode 100644 index 0000000000000000000000000000000000000000..9fa0444e4551fe30f2896085eb05ad47d7501aa8 --- /dev/null +++ b/configs/stm32f103-minimum/rfid-rc522/Make.defs @@ -0,0 +1,113 @@ +############################################################################ +# configs/stm32f103-minimum/rfid-rc522/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 -fcheck-new +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/rfid-rc522/defconfig b/configs/stm32f103-minimum/rfid-rc522/defconfig new file mode 100644 index 0000000000000000000000000000000000000000..140ef6a66f38135b2c1368585872f5a1d6ed27ef --- /dev/null +++ b/configs/stm32f103-minimum/rfid-rc522/defconfig @@ -0,0 +1,1161 @@ +# +# 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=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 +# 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_RENESAS is not set +# CONFIG_ARCH_SIM is not set +# CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_Z16 is not set +# CONFIG_ARCH_Z80 is not set +CONFIG_ARCH="arm" + +# +# ARM Options +# +# CONFIG_ARCH_CHIP_A1X is not set +# CONFIG_ARCH_CHIP_C5471 is not set +# CONFIG_ARCH_CHIP_CALYPSO is not set +# CONFIG_ARCH_CHIP_DM320 is not set +# CONFIG_ARCH_CHIP_EFM32 is not set +# CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set +# CONFIG_ARCH_CHIP_KINETIS is not set +# CONFIG_ARCH_CHIP_KL is not set +# CONFIG_ARCH_CHIP_LM is not set +# CONFIG_ARCH_CHIP_TIVA is not set +# CONFIG_ARCH_CHIP_LPC11XX is not set +# CONFIG_ARCH_CHIP_LPC17XX is not set +# CONFIG_ARCH_CHIP_LPC214X is not set +# CONFIG_ARCH_CHIP_LPC2378 is not set +# CONFIG_ARCH_CHIP_LPC31XX is not set +# CONFIG_ARCH_CHIP_LPC43XX is not set +# CONFIG_ARCH_CHIP_NUC1XX is not set +# CONFIG_ARCH_CHIP_SAMA5 is not set +# CONFIG_ARCH_CHIP_SAMD is not set +# CONFIG_ARCH_CHIP_SAML is not set +# CONFIG_ARCH_CHIP_SAM34 is not set +# CONFIG_ARCH_CHIP_SAMV7 is not set +CONFIG_ARCH_CHIP_STM32=y +# CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set +# CONFIG_ARCH_CHIP_STR71X is not set +# CONFIG_ARCH_CHIP_TMS570 is not set +# CONFIG_ARCH_CHIP_MOXART is not set +# CONFIG_ARCH_ARM7TDMI is not set +# CONFIG_ARCH_ARM926EJS is not set +# CONFIG_ARCH_ARM920T is not set +# CONFIG_ARCH_CORTEXM0 is not set +CONFIG_ARCH_CORTEXM3=y +# CONFIG_ARCH_CORTEXM4 is not set +# CONFIG_ARCH_CORTEXM7 is not set +# CONFIG_ARCH_CORTEXA5 is not set +# CONFIG_ARCH_CORTEXA8 is not set +# CONFIG_ARCH_CORTEXA9 is not set +# CONFIG_ARCH_CORTEXR4 is not set +# CONFIG_ARCH_CORTEXR4F is not set +# CONFIG_ARCH_CORTEXR5 is not set +# CONFIG_ARCH_CORTEX5F is not set +# CONFIG_ARCH_CORTEXR7 is not set +# CONFIG_ARCH_CORTEXR7F is not set +CONFIG_ARCH_FAMILY="armv7-m" +CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +CONFIG_ARM_TOOLCHAIN_GNU=y +# CONFIG_ARMV7M_USEBASEPRI is not set +CONFIG_ARCH_HAVE_CMNVECTOR=y +# CONFIG_ARMV7M_CMNVECTOR is not set +# CONFIG_ARMV7M_LAZYFPU is not set +# CONFIG_ARCH_HAVE_FPU is not set +# CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set +CONFIG_ARM_HAVE_MPU_UNIFIED=y +# CONFIG_ARM_MPU is not set + +# +# ARMV7M Configuration Options +# +# CONFIG_ARMV7M_HAVE_ICACHE is not set +# CONFIG_ARMV7M_HAVE_DCACHE is not set +# CONFIG_ARMV7M_HAVE_ITCM is not set +# CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set +# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set +CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y +CONFIG_ARMV7M_HAVE_STACKCHECK=y +# CONFIG_ARMV7M_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set +CONFIG_SERIAL_TERMIOS=y + +# +# STM32 Configuration Options +# +# CONFIG_ARCH_CHIP_STM32L151C6 is not set +# CONFIG_ARCH_CHIP_STM32L151C8 is not set +# CONFIG_ARCH_CHIP_STM32L151CB is not set +# CONFIG_ARCH_CHIP_STM32L151R6 is not set +# CONFIG_ARCH_CHIP_STM32L151R8 is not set +# CONFIG_ARCH_CHIP_STM32L151RB is not set +# CONFIG_ARCH_CHIP_STM32L151V6 is not set +# CONFIG_ARCH_CHIP_STM32L151V8 is not set +# CONFIG_ARCH_CHIP_STM32L151VB is not set +# CONFIG_ARCH_CHIP_STM32L152C6 is not set +# CONFIG_ARCH_CHIP_STM32L152C8 is not set +# CONFIG_ARCH_CHIP_STM32L152CB is not set +# CONFIG_ARCH_CHIP_STM32L152R6 is not set +# CONFIG_ARCH_CHIP_STM32L152R8 is not set +# CONFIG_ARCH_CHIP_STM32L152RB is not set +# CONFIG_ARCH_CHIP_STM32L152V6 is not set +# CONFIG_ARCH_CHIP_STM32L152V8 is not set +# CONFIG_ARCH_CHIP_STM32L152VB is not set +# CONFIG_ARCH_CHIP_STM32L162ZD is not set +# CONFIG_ARCH_CHIP_STM32L162VE is not set +# CONFIG_ARCH_CHIP_STM32F100C8 is not set +# CONFIG_ARCH_CHIP_STM32F100CB is not set +# CONFIG_ARCH_CHIP_STM32F100R8 is not set +# CONFIG_ARCH_CHIP_STM32F100RB is not set +# CONFIG_ARCH_CHIP_STM32F100RC is not set +# CONFIG_ARCH_CHIP_STM32F100RD is not set +# CONFIG_ARCH_CHIP_STM32F100RE is not set +# CONFIG_ARCH_CHIP_STM32F100V8 is not set +# CONFIG_ARCH_CHIP_STM32F100VB is not set +# CONFIG_ARCH_CHIP_STM32F100VC is not set +# CONFIG_ARCH_CHIP_STM32F100VD is not set +# CONFIG_ARCH_CHIP_STM32F100VE is not set +# CONFIG_ARCH_CHIP_STM32F102CB is not set +# CONFIG_ARCH_CHIP_STM32F103T8 is not set +# CONFIG_ARCH_CHIP_STM32F103TB is not set +# CONFIG_ARCH_CHIP_STM32F103C4 is not set +CONFIG_ARCH_CHIP_STM32F103C8=y +# CONFIG_ARCH_CHIP_STM32F103CB is not set +# CONFIG_ARCH_CHIP_STM32F103R8 is not set +# CONFIG_ARCH_CHIP_STM32F103RB is not set +# CONFIG_ARCH_CHIP_STM32F103RC is not set +# CONFIG_ARCH_CHIP_STM32F103RD is not set +# CONFIG_ARCH_CHIP_STM32F103RE is not set +# CONFIG_ARCH_CHIP_STM32F103RG is not set +# CONFIG_ARCH_CHIP_STM32F103V8 is not set +# CONFIG_ARCH_CHIP_STM32F103VB is not set +# CONFIG_ARCH_CHIP_STM32F103VC is not set +# CONFIG_ARCH_CHIP_STM32F103VE is not set +# CONFIG_ARCH_CHIP_STM32F103ZE is not set +# CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_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=y +# 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_SPI=y +# CONFIG_STM32_NOEXT_VECTORS is not set + +# +# Alternate Pin Mapping +# +# CONFIG_STM32_SPI1_REMAP is not set +# 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_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set +# CONFIG_STM32_TIM1_CAP is not set +# CONFIG_STM32_TIM3_CAP is not set +# CONFIG_STM32_TIM4_CAP is not set +# CONFIG_STM32_TIM5_CAP is not set +# CONFIG_STM32_TIM8_CAP is not set +CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y + +# +# U[S]ART Configuration +# + +# +# 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 + +# +# SPI Configuration +# +# CONFIG_STM32_SPI_INTERRUPTS is not set +# CONFIG_STM32_SPI_DMA is not set +CONFIG_STM32_HAVE_RTC_COUNTER=y +# CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set + +# +# USB FS Host Configuration +# + +# +# USB HS Host Configuration +# + +# +# USB Host Debug Configuration +# + +# +# USB Device Configuration +# + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_VECNOTIRQ is not set +# CONFIG_ARCH_DMA is not set +CONFIG_ARCH_HAVE_IRQPRIO=y +# CONFIG_ARCH_L2CACHE is not set +# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set +# CONFIG_ARCH_HAVE_ADDRENV is not set +# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set +# CONFIG_ARCH_HAVE_MULTICPU is not set +CONFIG_ARCH_HAVE_VFORK=y +# CONFIG_ARCH_HAVE_MMU is not set +CONFIG_ARCH_HAVE_MPU=y +# CONFIG_ARCH_NAND_HWECC is not set +# CONFIG_ARCH_HAVE_EXTCLK is not set +# CONFIG_ARCH_HAVE_POWEROFF is not set +CONFIG_ARCH_HAVE_RESET=y +# CONFIG_ARCH_USE_MPU is not set +# CONFIG_ARCH_IRQPRIO is not set +CONFIG_ARCH_STACKDUMP=y +# CONFIG_ENDIAN_BIG is not set +# CONFIG_ARCH_IDLE_CUSTOM is not set +# CONFIG_ARCH_HAVE_RAMFUNCS is not set +CONFIG_ARCH_HAVE_RAMVECTORS=y +# CONFIG_ARCH_RAMVECTORS is not set + +# +# Board Settings +# +CONFIG_BOARD_LOOPSPERMSEC=5483 +# CONFIG_ARCH_CALIBRATION is not set + +# +# Interrupt options +# +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +CONFIG_ARCH_INTERRUPTSTACK=0 +CONFIG_ARCH_HAVE_HIPRI_INTERRUPT=y +# CONFIG_ARCH_HIPRI_INTERRUPT is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x20000000 +CONFIG_RAM_SIZE=20480 +# CONFIG_ARCH_HAVE_SDRAM is not set + +# +# Board Selection +# +# CONFIG_ARCH_BOARD_STM32_TINY is not set +CONFIG_ARCH_BOARD_STM32F103_MINIMUM=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="stm32f103-minimum" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y + +# +# Board-Specific Options +# +# CONFIG_BOARD_CRASHDUMP is not set +CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_RESET is not set +# CONFIG_BOARDCTL_UNIQUEID is not set +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_ADCTEST is not set +# CONFIG_BOARDCTL_PWMTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set + +# +# RTOS Features +# +# CONFIG_DISABLE_OS_API is not set + +# +# Clocks and Timers +# +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set +CONFIG_USEC_PER_TICK=10000 +# CONFIG_SYSTEM_TIME64 is not set +# CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2011 +CONFIG_START_MONTH=7 +CONFIG_START_DAY=5 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=4 +CONFIG_WDOG_INTRESERVE=0 +CONFIG_PREALLOC_TIMERS=4 + +# +# Tasks and Scheduling +# +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=0 +CONFIG_MAX_TASKS=16 +# CONFIG_SCHED_HAVE_PARENT is not set +CONFIG_SCHED_WAITPID=y + +# +# Pthread Options +# +# CONFIG_MUTEX_TYPES is not set +CONFIG_NPTHREAD_KEYS=4 + +# +# Performance Monitoring +# +# CONFIG_SCHED_CPULOAD is not set +# CONFIG_SCHED_INSTRUMENTATION is not set + +# +# Files and I/O +# +CONFIG_DEV_CONSOLE=y +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +# CONFIG_PRIORITY_INHERITANCE is not set + +# +# RTOS hooks +# +# CONFIG_BOARD_INITIALIZE is not set +# CONFIG_SCHED_STARTHOOK is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +# CONFIG_SIG_EVTHREAD is not set + +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCONDTIMEDOUT=16 +CONFIG_SIG_SIGWORK=17 + +# +# POSIX Message Queue Options +# +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set + +# +# Work queue support +# +CONFIG_SCHED_WORKQUEUE=y +CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_HPWORKPRIORITY=192 +CONFIG_SCHED_HPWORKPERIOD=50000 +CONFIG_SCHED_HPWORKSTACKSIZE=2048 +# CONFIG_SCHED_LPWORK is not set + +# +# Stack and heap information +# +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=2048 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 +# CONFIG_LIB_SYSCALL is not set + +# +# Device Drivers +# +# CONFIG_DISABLE_POLL is not set +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM 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_HWFEATURES is not set +# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set +# CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG 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 + +# +# IO Expander/GPIO Support +# +# CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO 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 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=y +CONFIG_SERIAL_NPOLLWAITERS=2 +# CONFIG_SERIAL_IFLOWCONTROL is not set +# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set +CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y +CONFIG_USART1_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# USART1 Configuration +# +CONFIG_USART1_RXBUFSIZE=256 +CONFIG_USART1_TXBUFSIZE=256 +CONFIG_USART1_BAUD=115200 +CONFIG_USART1_BITS=8 +CONFIG_USART1_PARITY=0 +CONFIG_USART1_2STOP=0 +# CONFIG_USART1_IFLOWCONTROL is not set +# CONFIG_USART1_OFLOWCONTROL is not set +# CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set +CONFIG_DRIVERS_WIRELESS=y +# CONFIG_WL_CC1101 is not set +# CONFIG_WL_CC3000 is not set +# CONFIG_WL_NRF24L01 is not set +CONFIG_WL_MFRC522=y +CONFIG_MFRC522_SPI_FREQ=1000000 +CONFIG_MFRC522_DEBUG=y +# CONFIG_MFRC522_DEBUG_TX is not set +# CONFIG_MFRC522_DEBUG_RX is not set +# CONFIG_WL_PN532 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 +# CONFIG_SYSLOG_CHARDEV is not set + +# +# Networking Support +# +# CONFIG_ARCH_HAVE_NET is not set +# CONFIG_ARCH_HAVE_PHY is not set +# CONFIG_NET is not set + +# +# Crypto API +# +# CONFIG_CRYPTO is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y +# CONFIG_FS_READABLE is not set +# CONFIG_FS_WRITABLE is not set +# CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" +# CONFIG_FS_RAMMAP is not set +# CONFIG_FS_FAT is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set +# CONFIG_FS_TMPFS is not set +# CONFIG_FS_SMARTFS is not set +# CONFIG_FS_BINFS is not set +# CONFIG_FS_PROCFS is not set +# CONFIG_FS_UNIONFS is not set + +# +# Graphics Support +# +# CONFIG_NX is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=1 +# CONFIG_ARCH_HAVE_HEAP2 is not set +# CONFIG_GRAN is not set + +# +# Audio Support +# +# CONFIG_AUDIO is not set + +# +# Wireless Support +# + +# +# Binary Loader +# +# CONFIG_BINFMT_DISABLE is not set +# CONFIG_BINFMT_EXEPATH is not set +# CONFIG_NXFLAT is not set +# CONFIG_ELF is not set +CONFIG_BUILTIN=y +# CONFIG_PIC is not set +CONFIG_SYMTAB_ORDEREDBYNAME=y + +# +# Library Routines +# + +# +# Standard C Library Options +# +CONFIG_STDIO_BUFFER_SIZE=64 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=2 +CONFIG_LIB_HOMEDIR="/" +# CONFIG_LIBM is not set +# CONFIG_NOPRINTF_FIELDWIDTH is not set +# CONFIG_LIBC_FLOATINGPOINT is not set +# CONFIG_LIBC_LONG_LONG is not set +# CONFIG_LIBC_IOCTL_VARIADIC is not set +CONFIG_LIB_RAND_ORDER=1 +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_EXECFUNCS is not set +CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 +CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_ARCH_LOWPUTC=y +# CONFIG_LIBC_LOCALTIME is not set +# CONFIG_TIME_EXTENDED is not set +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set +# CONFIG_LIBC_NETDB is not set + +# +# Non-standard Library Support +# +# CONFIG_LIB_CRC64_FAST is not set +# CONFIG_LIB_KBDCODEC is not set +# CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN 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_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_POSIXSPAWN is not set +# CONFIG_EXAMPLES_PPPD is not set +CONFIG_EXAMPLES_RFID_READUID=y +CONFIG_EXAMPLES_RFID_READUID_PRIORITY=100 +CONFIG_EXAMPLES_RFID_READUID_STACKSIZE=2048 +# 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=80 +CONFIG_NSH_DISABLE_SEMICOLON=y +# CONFIG_NSH_CMDPARMS is not set +CONFIG_NSH_MAXARGUMENTS=6 +# CONFIG_NSH_ARGCAT is not set +CONFIG_NSH_NESTDEPTH=3 +CONFIG_NSH_DISABLEBG=y +CONFIG_NSH_BUILTIN_APPS=y + +# +# Disable Individual commands +# +CONFIG_NSH_DISABLE_ADDROUTE=y +CONFIG_NSH_DISABLE_BASENAME=y +# CONFIG_NSH_DISABLE_CAT is not set +# CONFIG_NSH_DISABLE_CD is not set +# CONFIG_NSH_DISABLE_CP is not set +CONFIG_NSH_DISABLE_CMP=y +CONFIG_NSH_DISABLE_DATE=y +# CONFIG_NSH_DISABLE_DD is not set +CONFIG_NSH_DISABLE_DF=y +CONFIG_NSH_DISABLE_DELROUTE=y +CONFIG_NSH_DISABLE_DIRNAME=y +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +CONFIG_NSH_DISABLE_IFCONFIG=y +CONFIG_NSH_DISABLE_IFUPDOWN=y +# CONFIG_NSH_DISABLE_KILL is not set +CONFIG_NSH_DISABLE_LOSETUP=y +CONFIG_NSH_DISABLE_LOSMART=y +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKRD is not set +# CONFIG_NSH_DISABLE_MH is not set +# CONFIG_NSH_DISABLE_MOUNT is not set +# CONFIG_NSH_DISABLE_MV is not set +# CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_PS is not set +# CONFIG_NSH_DISABLE_PUT is not set +# CONFIG_NSH_DISABLE_PWD is not set +# CONFIG_NSH_DISABLE_RM is not set +# CONFIG_NSH_DISABLE_RMDIR is not set +# CONFIG_NSH_DISABLE_SET is not set +# CONFIG_NSH_DISABLE_SH is not set +# CONFIG_NSH_DISABLE_SLEEP is not set +CONFIG_NSH_DISABLE_TIME=y +# CONFIG_NSH_DISABLE_TEST is not set +# CONFIG_NSH_DISABLE_UMOUNT is not set +CONFIG_NSH_DISABLE_UNAME=y +# CONFIG_NSH_DISABLE_UNSET is not set +# CONFIG_NSH_DISABLE_USLEEP is not set +# CONFIG_NSH_DISABLE_WGET is not set +# CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 + +# +# Configure Command Options +# +CONFIG_NSH_CODECS_BUFSIZE=128 +# CONFIG_NSH_CMDOPT_HEXDUMP is not set +CONFIG_NSH_FILEIOSIZE=1024 + +# +# Scripting Support +# +# CONFIG_NSH_DISABLESCRIPT is not set +CONFIG_NSH_DISABLE_ITEF=y +CONFIG_NSH_DISABLE_LOOPS=y + +# +# Console Configuration +# +CONFIG_NSH_CONSOLE=y +# CONFIG_NSH_ALTCONDEV is not set +CONFIG_NSH_ARCHINIT=y +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set + +# +# NxWidgets/NxWM +# + +# +# Platform-specific Support +# +# CONFIG_PLATFORM_CONFIGDATA is not set + +# +# System Libraries and NSH Add-Ons +# +# CONFIG_SYSTEM_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/rfid-rc522/setenv.sh b/configs/stm32f103-minimum/rfid-rc522/setenv.sh new file mode 100644 index 0000000000000000000000000000000000000000..a6e56493897566c2905547e77ba7b4f68980c505 --- /dev/null +++ b/configs/stm32f103-minimum/rfid-rc522/setenv.sh @@ -0,0 +1,100 @@ +#!/bin/bash +# configs//stm32f103-minimum/rfid-rc522/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/src/Makefile b/configs/stm32f103-minimum/src/Makefile index b29ce8090830b1c0d4e28dead3d84a20832c1caf..0e070417152b309f86e14b24ed4b6b296e8dc12d 100644 --- a/configs/stm32f103-minimum/src/Makefile +++ b/configs/stm32f103-minimum/src/Makefile @@ -43,4 +43,16 @@ ifeq ($(CONFIG_LIB_BOARDCTL),y) CSRCS += stm32_appinit.c endif +ifeq ($(CONFIG_AUDIO_TONE),y) +CSRCS += stm32_tone.c +endif + +ifeq ($(CONFIG_WL_MFRC522),y) +CSRCS += stm32_mfrc522.c +endif + +ifeq ($(CONFIG_LCD_ST7567),y) +CSRCS += stm32_lcd.c +endif + include $(TOPDIR)/configs/Board.mk diff --git a/configs/stm32f103-minimum/src/stm32_appinit.c b/configs/stm32f103-minimum/src/stm32_appinit.c index d9291f9a16035ed31f7ab72b67955dabf0876528..a5fe60b6164ae7c8e2730be5148447ded36fa310 100644 --- a/configs/stm32f103-minimum/src/stm32_appinit.c +++ b/configs/stm32f103-minimum/src/stm32_appinit.c @@ -45,6 +45,7 @@ #include #include +#include #include "stm32.h" #include "stm32f103_minimum.h" @@ -80,5 +81,28 @@ int board_app_initialize(uintptr_t arg) { - return OK; +#ifdef CONFIG_ONESHOT + struct oneshot_lowerhalf_s *os = NULL; +#endif + int ret = OK; + +#ifdef CONFIG_AUDIO_TONE + /* Configure and initialize the tone generator. */ + + ret = stm32_tone_setup(); +#endif + +#ifdef CONFIG_WL_MFRC522 + ret = stm32_mfrc522initialize("/dev/rfid0"); +#endif + +#ifdef CONFIG_ONESHOT + os = oneshot_initialize(1, 10); + if (os) + { + ret = oneshot_register("/dev/oneshot", os); + } +#endif + + return ret; } diff --git a/configs/stm32f103-minimum/src/stm32_lcd.c b/configs/stm32f103-minimum/src/stm32_lcd.c new file mode 100644 index 0000000000000000000000000000000000000000..22e345b3f0bed8a87bb8545caafb70f64261729a --- /dev/null +++ b/configs/stm32f103-minimum/src/stm32_lcd.c @@ -0,0 +1,153 @@ +/**************************************************************************** + * configs/stm32f103-minimum/src/stm32_lcd.c + * + * Copyright (C) 2016 Uniquix Tecnologia. All rights reserved. + * Author: Alan Carvalho de Assis + * + * I used the JLX12864G-086 LCD module based on ST7567 controller. + * + * Based on configs/zkit-arm-1769/src/lpc17_lcd.c + * + * Copyright (C) 2013 Zilogic Systems. All rights reserved. + * Author: Manikandan + * + * 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_arch.h" +#include "up_internal.h" + +#include "stm32_gpio.h" +#include "stm32_spi.h" +#include "stm32f103_minimum.h" + +#ifdef CONFIG_NX_LCDDRIVER + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define LCD_SPI_PORTNO 1 /* On SPI1 */ + +#ifndef CONFIG_LCD_CONTRAST +# define CONFIG_LCD_CONTRAST 0x1f +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +FAR struct spi_dev_s *g_spidev; +FAR struct lcd_dev_s *g_lcddev; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: board_lcd_initialize + ****************************************************************************/ + +int board_lcd_initialize(void) +{ + stm32_configgpio(STM32_LCD_RST); + stm32_configgpio(STM32_LCD_RS); + stm32_gpiowrite(STM32_LCD_RST, 1); + stm32_gpiowrite(STM32_LCD_RS, 1); + + g_spidev = stm32_spibus_initialize(LCD_SPI_PORTNO); + + if (!g_spidev) + { + lcderr("ERROR: Failed to initialize SPI port %d\n", LCD_SPI_PORTNO); + return 0; + } + + stm32_gpiowrite(STM32_LCD_RST, 0); + up_mdelay(1); + stm32_gpiowrite(STM32_LCD_RST, 1); + return 1; +} + +/**************************************************************************** + * Name: board_lcd_getdev + ****************************************************************************/ + +FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) +{ + g_lcddev = st7567_initialize(g_spidev, lcddev); + if (!g_lcddev) + { + lcderr("ERROR: Failed to bind SPI port 1 to LCD %d: %d\n", lcddev); + } + else + { + lcdinfo("SPI port 1 bound to LCD %d\n", lcddev); + + /* And turn the LCD on (CONFIG_LCD_MAXPOWER should be 1) */ + + (void)g_lcddev->setpower(g_lcddev, CONFIG_LCD_MAXPOWER); + + /* Set contrast to right value, otherwise background too dark */ + + (void)g_lcddev->setcontrast(g_lcddev, CONFIG_LCD_CONTRAST); + + return g_lcddev; + } + + return NULL; +} + +/**************************************************************************** + * Name: board_lcd_uninitialize + ****************************************************************************/ + +void board_lcd_uninitialize(void) +{ + /* TO-FIX */ +} + +#endif /* CONFIG_NX_LCDDRIVER */ diff --git a/configs/stm32f103-minimum/src/stm32_mfrc522.c b/configs/stm32f103-minimum/src/stm32_mfrc522.c new file mode 100644 index 0000000000000000000000000000000000000000..d55842eca7f0e489129806648dd146393e564210 --- /dev/null +++ b/configs/stm32f103-minimum/src/stm32_mfrc522.c @@ -0,0 +1,101 @@ +/************************************************************************************ + * configs/stm32f4discovery/src/stm32_mfrc522.c + * + * Copyright (C) 2015 Alan Carvalho de Assis. All rights reserved. + * Author: 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 "stm32.h" +#include "stm32_spi.h" +#include "stm32f103_minimum.h" + +#if defined(CONFIG_SPI) && defined(CONFIG_STM32_SPI1) && defined(CONFIG_CL_MFRC522) + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +#define MFRC522_SPI_PORTNO 1 /* On SPI1 */ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_mfrc522initialize + * + * Description: + * Initialize and register the MFRC522 RFID driver. + * + * Input parameters: + * devpath - The full path to the driver to register. E.g., "/dev/rfid0" + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ************************************************************************************/ + +int stm32_mfrc522initialize(FAR const char *devpath) +{ + FAR struct spi_dev_s *spi; + int ret; + + spi = stm32_spibus_initialize(MFRC522_SPI_PORTNO); + + if (!spi) + { + return -ENODEV; + } + + /* Then register the MFRC522 */ + + ret = mfrc522_register(devpath, spi); + if (ret < 0) + { + snerr("ERROR: Error registering MFRC522\n"); + } + + return ret; +} + +#endif /* CONFIG_SPI && CONFIG_MFRC522 */ diff --git a/configs/stm32f103-minimum/src/stm32_spi.c b/configs/stm32f103-minimum/src/stm32_spi.c index a1c8dbaadb14d4a98c2039ebac8f9de74d9fb8ba..2095e3e2af3814587080c46e82b08c017b29e884 100644 --- a/configs/stm32f103-minimum/src/stm32_spi.c +++ b/configs/stm32f103-minimum/src/stm32_spi.c @@ -73,6 +73,14 @@ void stm32_spidev_initialize(void) * Here, we only initialize chip select pins unique to the board * architecture. */ + +#ifdef CONFIG_WL_MFRC522 + (void)stm32_configgpio(GPIO_CS_MFRC522); /* MFRC522 chip select */ +#endif + +#ifdef CONFIG_LCD_ST7567 + (void)stm32_configgpio(STM32_LCD_CS); /* ST7567 chip select */ +#endif } /**************************************************************************** @@ -101,8 +109,22 @@ 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) +void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, + bool selected) { +#if defined(CONFIG_WL_MFRC522) + if (devid == SPIDEV_WIRELESS) + { + stm32_gpiowrite(GPIO_CS_MFRC522, !selected); + } +#endif + +#ifdef CONFIG_LCD_ST7567 + if (devid == SPIDEV_DISPLAY) + { + stm32_gpiowrite(GPIO_CS_MFRC522, !selected); + } +#endif } uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) @@ -112,7 +134,8 @@ uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) #endif #ifdef CONFIG_STM32_SPI2 -void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, + bool selected) { } @@ -122,4 +145,51 @@ uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) } #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_STM32_SPI1 +int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, + bool cmd) +{ +#ifdef CONFIG_LCD_ST7567 + if (devid == SPIDEV_DISPLAY) + { + /* This is the Data/Command control pad which determines whether the + * data bits are data or a command. + */ + + (void)stm32_gpiowrite(STM32_LCD_RS, !cmd); + + return OK; + } +#endif + + return -ENODEV; +} +#endif +#endif + #endif /* CONFIG_STM32_SPI1 || CONFIG_STM32_SPI2 */ diff --git a/configs/stm32f103-minimum/src/stm32_tone.c b/configs/stm32f103-minimum/src/stm32_tone.c new file mode 100644 index 0000000000000000000000000000000000000000..d4928fddf6fd70afa42ea1995d1784cbe91dcc10 --- /dev/null +++ b/configs/stm32f103-minimum/src/stm32_tone.c @@ -0,0 +1,154 @@ +/************************************************************************************ + * configs/stm32f103minimum/src/stm32_tone.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: 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 "stm32_pwm.h" +#include "stm32f103_minimum.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ +/* Configuration ********************************************************************/ + +#define HAVE_TONE 1 + +/* TIMx used to generate PWM signal to Buzzer/Speaker */ + +#define TONE_PWM_TIMER 2 + +/* Oneshot timer resolution in microseconds */ + +#define OST_RES 10 + +#ifndef CONFIG_PWM +# undef HAVE_TONE +#endif + +#ifndef CONFIG_STM32_TIM2 +# undef HAVE_TONE +#endif + +#ifndef CONFIG_STM32_TIM2_PWM +# undef HAVE_TONE +#endif + +#ifndef CONFIG_STM32_TICKLESS_ONESHOT +# undef HAVE_TONE +#endif + +#ifdef HAVE_TONE + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_tone_setup + * + * Description: + * Configure and initialize the tone generator. + * + ************************************************************************************/ + +int stm32_tone_setup(void) +{ + static bool initialized = false; + struct pwm_lowerhalf_s *tone; + struct pwm_info_s info; + struct oneshot_lowerhalf_s *oneshot = NULL; + int ret; + + /* Have we already initialized? */ + + if (!initialized) + { + /* Call stm32_pwminitialize() to get an instance of the PWM interface */ + + tone = stm32_pwminitialize(TONE_PWM_TIMER); + if (!tone) + { + auderr("Failed to get the STM32 PWM lower half to AUDIO TONE\n"); + return -ENODEV; + } + + /* Initialize TONE PWM */ + + tone->ops->setup(tone); + tone->ops->start(tone, &info); + + /* Initialize ONESHOT Timer (i.e. STM32_TICKLESS_ONESHOT = TIM3) */ + + oneshot = oneshot_initialize(CONFIG_STM32_TICKLESS_ONESHOT, OST_RES); + if (!oneshot) + { + auderr("Failed to initialize ONESHOT Timer!\n"); + return -ENODEV; + } + + /* Register the Audio Tone driver at "/dev/tone0" */ + + ret = tone_register("/dev/tone0", tone, oneshot); + if (ret < 0) + { + auderr("ERROR: tone_register failed: %d\n", ret); + return ret; + } + + /* Now we are initialized */ + + initialized = true; + } + + return OK; +} + +#else +# error "HAVE_TONE is undefined" +#endif /* HAVE_TONE */ diff --git a/configs/stm32f103-minimum/src/stm32f103_minimum.h b/configs/stm32f103-minimum/src/stm32f103_minimum.h index 47691a195c676e08a49fca6581032446bbff5ebc..c023d22dc959a142dd3d1ab42372787e7ea628bf 100644 --- a/configs/stm32f103-minimum/src/stm32f103_minimum.h +++ b/configs/stm32f103-minimum/src/stm32f103_minimum.h @@ -1,7 +1,7 @@ /************************************************************************************ * configs/stm32f103-minimum/src/stm32f103_minimum.h * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Laurent Latil * * Redistribution and use in source and binary forms, with or without @@ -66,6 +66,20 @@ #define GPIO_LED (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13) +/* SPI chip selects */ + +#define GPIO_CS_MFRC522 (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN4) + +#define STM32_LCD_CS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN4) + +#define STM32_LCD_RST (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN3) + +#define STM32_LCD_RS (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN2) + /* USB Soft Connect Pullup: PC.13 */ #define GPIO_USB_PULLUP (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ @@ -97,6 +111,29 @@ void stm32_spidev_initialize(void); void stm32_usbinitialize(void); +/************************************************************************************ + * Name: stm32_mfrc522initialize + * + * Description: + * Function used to initialize the MFRC522 RFID Transceiver + * + ************************************************************************************/ + +#ifdef CONFIG_WL_MFRC522 +int stm32_mfrc522initialize(FAR const char *devpath); +#endif + +/************************************************************************************ + * Name: stm32_tone_setup + * + * Description: + * Function used to initialize a PWM and Oneshot timers to Audio Tone Generator. + * + ************************************************************************************/ + +#ifdef CONFIG_AUDIO_TONE +int stm32_tone_setup(void); +#endif + #endif /* __ASSEMBLY__ */ #endif /* __CONFIGS_STM32F103_MINIMUM_SRC_STM32F103_MINIMUM_H */ - diff --git a/configs/stm32f103-minimum/usbnsh/Make.defs b/configs/stm32f103-minimum/usbnsh/Make.defs index 9f134fbf1320e4c04dd1cb46bbf18c687b9019e7..79bc3fa28406d4e210f954f64f5d0672644e74ff 100644 --- a/configs/stm32f103-minimum/usbnsh/Make.defs +++ b/configs/stm32f103-minimum/usbnsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f103-minimum/usbnsh/defconfig b/configs/stm32f103-minimum/usbnsh/defconfig index b60882cbdbc6572575f4096f49df2269e98c614f..e09d96e46e0fdd099f85d3e2182ee75c2cdd84ea 100644 --- a/configs/stm32f103-minimum/usbnsh/defconfig +++ b/configs/stm32f103-minimum/usbnsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -412,6 +412,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -529,11 +531,11 @@ CONFIG_ARCH_BOARD="stm32f103-minimum" # CONFIG_ARCH_HAVE_LEDS=y CONFIG_ARCH_LEDS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -552,9 +554,12 @@ CONFIG_BOARDCTL_USBDEVCTRL=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=7 @@ -647,6 +652,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -662,6 +668,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -675,7 +682,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -747,6 +759,7 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -791,6 +804,8 @@ CONFIG_CDCACM_VENDORSTR="NuttX" CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +CONFIG_HAVE_USBTRACE=y +# CONFIG_USBMONITOR is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -804,6 +819,7 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_SYSLOG_CHAR is not set CONFIG_SYSLOG_NONE=y # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -916,6 +932,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -941,7 +958,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -967,9 +983,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1075,7 +1091,6 @@ 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 @@ -1097,6 +1112,7 @@ CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1143,7 +1159,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 @@ -1154,6 +1170,5 @@ CONFIG_READLINE_ECHO=y # CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_UBLOXMODEM is not set -# CONFIG_USBMONITOR is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f3discovery/nsh/Make.defs b/configs/stm32f3discovery/nsh/Make.defs index 02c4d7cfb3e6c7da70fa6d9b0d06e9531e8f9a21..932fa94560f036ba3c0ac256770a269d9fd0a923 100644 --- a/configs/stm32f3discovery/nsh/Make.defs +++ b/configs/stm32f3discovery/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f3discovery/nsh/defconfig b/configs/stm32f3discovery/nsh/defconfig index 09e1c665ff5545c75bb722ae31983ccc77cae1ae..b1a68d9201b59fde2418eb5e43f3b0e26c2e7a22 100644 --- a/configs/stm32f3discovery/nsh/defconfig +++ b/configs/stm32f3discovery/nsh/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -426,6 +426,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -545,11 +547,11 @@ 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_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -573,9 +575,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -668,6 +673,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -683,6 +689,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -696,7 +703,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -769,6 +781,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -811,6 +824,7 @@ CONFIG_CDCACM_VENDORSTR="NuttX" CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -825,6 +839,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -937,6 +952,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -970,7 +986,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -999,9 +1014,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1107,7 +1122,6 @@ 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 @@ -1129,6 +1143,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1172,7 +1187,7 @@ CONFIG_SYSTEM_CDCACM_DEVMINOR=0 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f3discovery/usbnsh/Make.defs b/configs/stm32f3discovery/usbnsh/Make.defs index 2c82f6ebcef8e3ba42e6dc765be70de4596ee463..9ad12ec92d5f4a8ea4d885b5d361313c36b8cc2c 100644 --- a/configs/stm32f3discovery/usbnsh/Make.defs +++ b/configs/stm32f3discovery/usbnsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f3discovery/usbnsh/defconfig b/configs/stm32f3discovery/usbnsh/defconfig index bfc67b744d471958542462d291a2d3b3dd12712a..69d103b1d76afc0e885a798a7e1b11f050e78678 100644 --- a/configs/stm32f3discovery/usbnsh/defconfig +++ b/configs/stm32f3discovery/usbnsh/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -427,6 +427,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -552,11 +554,11 @@ 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_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -580,9 +582,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=1 @@ -675,6 +680,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -694,11 +700,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -712,7 +721,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -784,6 +798,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -826,6 +841,7 @@ CONFIG_CDCACM_VENDORSTR="NuttX" CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -841,6 +857,7 @@ CONFIG_SYSLOG_CHAR=y # CONFIG_SYSLOG_FILE is not set CONFIG_SYSLOG_CHAR_CRLF=y CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -953,6 +970,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -986,7 +1004,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -1015,9 +1032,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1123,7 +1140,6 @@ 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 @@ -1145,6 +1161,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1187,7 +1204,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f411e-disco/nsh/Make.defs b/configs/stm32f411e-disco/nsh/Make.defs index b0f06ba60b3bca4f885ae51c99380e2c65356f1b..1a3cbc6cb3888a54152735988d1691c32d5a3d79 100644 --- a/configs/stm32f411e-disco/nsh/Make.defs +++ b/configs/stm32f411e-disco/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f411e-disco/nsh/defconfig b/configs/stm32f411e-disco/nsh/defconfig index 378f737c2cf5816c8dfb15bde7aece2013d5aee5..c48678fdab26088c15ea149a9c1eaefa72ff9afb 100644 --- a/configs/stm32f411e-disco/nsh/defconfig +++ b/configs/stm32f411e-disco/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -417,6 +417,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -537,11 +539,11 @@ CONFIG_ARCH_HAVE_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -552,9 +554,12 @@ CONFIG_NSH_MMCSDMINOR=0 # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2014 CONFIG_START_MONTH=10 @@ -647,6 +652,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -662,6 +668,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -675,7 +682,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -748,8 +760,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -764,6 +778,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -876,6 +891,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -908,7 +924,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -937,9 +952,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1044,7 +1059,6 @@ 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 @@ -1066,6 +1080,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1106,7 +1121,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f429i-disco/extflash/Make.defs b/configs/stm32f429i-disco/extflash/Make.defs index c8cd4116d694a4115ce7cb32a1015d2111c27460..07fa3b5d009f5c64c35d8d7ddec67fb49926e526 100644 --- a/configs/stm32f429i-disco/extflash/Make.defs +++ b/configs/stm32f429i-disco/extflash/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f429i-disco/extflash/defconfig b/configs/stm32f429i-disco/extflash/defconfig index 72fa8f02fdd48e14917fa59da5d8c8d3ccb95a51..de6d4ae58138c3f0a8b3b8cf1badc606dbaa29c8 100644 --- a/configs/stm32f429i-disco/extflash/defconfig +++ b/configs/stm32f429i-disco/extflash/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -442,6 +442,8 @@ CONFIG_STM32_FSMC_SRAM=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -572,7 +574,6 @@ 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 @@ -588,6 +589,7 @@ CONFIG_STM32F429I_DISCO_RAMMTD=y CONFIG_STM32F429I_DISCO_RAMMTD_MINOR=1 CONFIG_STM32F429I_DISCO_RAMMTD_SIZE=256 # CONFIG_STM32F429I_DISCO_ILI9341 is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -610,9 +612,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -707,6 +712,7 @@ CONFIG_DEV_NULL=y CONFIG_DEV_ZERO=y CONFIG_ARCH_HAVE_RNG=y CONFIG_DEV_RANDOM=y +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -726,11 +732,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -744,7 +753,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -866,8 +880,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -882,6 +898,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1014,6 +1031,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1047,7 +1065,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -1079,10 +1096,10 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set # CONFIG_EXAMPLES_RANDOM is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1192,7 +1209,6 @@ CONFIG_NSH_DISABLE_DATE=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_MKSMARTFS is not set # CONFIG_NSH_DISABLE_MH is not set @@ -1215,6 +1231,7 @@ CONFIG_NSH_DISABLE_DATE=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1257,7 +1274,7 @@ CONFIG_PLATFORM_CONFIGDATA=y # CONFIG_SYSTEM_CUTERM is not set CONFIG_SYSTEM_FLASH_ERASEALL=y # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f429i-disco/ide/ltcd/uvision/libcxx.uvproj b/configs/stm32f429i-disco/ide/ltcd/uvision/libcxx.uvproj index fd3d5edc3ef88a52edd3a03ff4a4469c996f89ed..f4013fcd59dc0ac324baacb5ce865981de5f1bbb 100644 --- a/configs/stm32f429i-disco/ide/ltcd/uvision/libcxx.uvproj +++ b/configs/stm32f429i-disco/ide/ltcd/uvision/libcxx.uvproj @@ -274,7 +274,7 @@ 1 1 - -fno-builtin -fno-exceptions -fno-rtti -Wall -Wshadow -Wundef -g + -fno-builtin -fno-exceptions -fcheck-new -fno-rtti -Wall -Wshadow -Wundef -g CONFIG_WCHAR_BUILTIN ../../../../../libxx;../../../../../include;../../../../../include/cxx diff --git a/configs/stm32f429i-disco/lcd/Make.defs b/configs/stm32f429i-disco/lcd/Make.defs index fc3f4112f1335af8d7008ab161cfbb48d0691c98..6e09dae1b91f1767260649f4244df668c2252c20 100644 --- a/configs/stm32f429i-disco/lcd/Make.defs +++ b/configs/stm32f429i-disco/lcd/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f429i-disco/lcd/defconfig b/configs/stm32f429i-disco/lcd/defconfig index 61403bc2974237e7c4925668115999ff0d00ba05..b3d098ed093156f6272e28753b7ba2671945695b 100644 --- a/configs/stm32f429i-disco/lcd/defconfig +++ b/configs/stm32f429i-disco/lcd/defconfig @@ -63,7 +63,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -442,6 +442,8 @@ CONFIG_STM32_FSMC_SRAM=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -566,7 +568,6 @@ 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 @@ -579,6 +580,7 @@ CONFIG_STM32F429I_DISCO_ILI9341_LCDIFACE=y CONFIG_STM32F429I_DISCO_ILI9341_LCDDEVICE=0 CONFIG_STM32F429I_DISCO_ILI9341_SPIFREQUENCY=20000000 CONFIG_STM32F429I_DISCO_ILI9341_SPIBITS16=y +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -594,9 +596,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -690,6 +695,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -705,6 +711,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -718,7 +725,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -828,8 +840,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -844,6 +858,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1048,6 +1063,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1081,7 +1097,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -1130,9 +1145,9 @@ CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1237,7 +1252,6 @@ 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 @@ -1259,6 +1273,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1300,7 +1315,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f429i-disco/ltdc/Make.defs b/configs/stm32f429i-disco/ltdc/Make.defs index c98f7c48a4f7f68758f865056fc2ca56dc29f850..3f55428d2db964d568dd65b1ae8f89cfd9375529 100644 --- a/configs/stm32f429i-disco/ltdc/Make.defs +++ b/configs/stm32f429i-disco/ltdc/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f429i-disco/ltdc/defconfig b/configs/stm32f429i-disco/ltdc/defconfig index 25fc3c3188ece1016642338ac56c8d75fda2e631..34a9442a1ace7e15ed10e16e46a0102aec9f0d59 100644 --- a/configs/stm32f429i-disco/ltdc/defconfig +++ b/configs/stm32f429i-disco/ltdc/defconfig @@ -44,34 +44,6 @@ CONFIG_RAW_BINARY=y # CONFIG_DEBUG_ALERT=y # CONFIG_DEBUG_FEATURES is not set - -# -# Debug SYSLOG Output Controls -# -# CONFIG_DEBUG_ERROR is not set -# CONFIG_DEBUG_ASSERTIONS is not set - -# -# Subsystem Debug Options -# -# CONFIG_DEBUG_BINFMT is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_GRAPHICS is not set -# CONFIG_DEBUG_LIB is not set -# CONFIG_DEBUG_MM is not set -# CONFIG_DEBUG_SCHED is not set - -# -# OS Function Debug Options -# -# CONFIG_DEBUG_IRQ is not set - -# -# Driver Debug Options -# -# CONFIG_DEBUG_LEDS 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 @@ -91,7 +63,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -160,7 +132,6 @@ CONFIG_ARCH_HAVE_FPU=y # 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 # # ARMV7M Configuration Options @@ -473,6 +444,8 @@ CONFIG_STM32_FSMC_SRAM=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -645,7 +618,6 @@ 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 @@ -659,6 +631,7 @@ CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE=y CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE_PORTRAIT=y # CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE_RLANDSCAPE is not set # CONFIG_STM32F429I_DISCO_ILI9341_FBIFACE_RORTRAIT is not set +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -674,9 +647,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -770,6 +746,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -789,11 +766,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -807,7 +787,12 @@ CONFIG_SPI_CMDDATA=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -863,7 +848,6 @@ 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=y CONFIG_USART1_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -881,8 +865,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -897,6 +883,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1106,6 +1093,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1139,7 +1127,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -1176,9 +1163,9 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1285,7 +1272,6 @@ 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 @@ -1307,6 +1293,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1349,7 +1336,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f429i-disco/nsh/Make.defs b/configs/stm32f429i-disco/nsh/Make.defs index a2b4778579c017623565c36b8a89e0b85f3d362d..53025b6f67bb419c2bb0263365fd83ec7c7591f9 100644 --- a/configs/stm32f429i-disco/nsh/Make.defs +++ b/configs/stm32f429i-disco/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f429i-disco/nsh/defconfig b/configs/stm32f429i-disco/nsh/defconfig index fd8f1dffed90d0c631a55c69a340d35c40c6c374..e170337cae707133b63862ed594c67ffc969e61a 100644 --- a/configs/stm32f429i-disco/nsh/defconfig +++ b/configs/stm32f429i-disco/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -441,6 +441,8 @@ CONFIG_STM32_FSMC_SRAM=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -565,7 +567,6 @@ 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 @@ -573,6 +574,7 @@ CONFIG_NSH_MMCSDMINOR=0 # CONFIG_STM32F429I_DISCO_FLASH is not set # CONFIG_STM32F429I_DISCO_RAMMTD is not set # CONFIG_STM32F429I_DISCO_ILI9341 is not set +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -588,9 +590,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -683,6 +688,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -702,11 +708,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -720,7 +729,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -793,8 +807,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -809,6 +825,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -923,6 +940,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -956,7 +974,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -985,9 +1002,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1092,7 +1109,6 @@ 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 @@ -1114,6 +1130,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1154,7 +1171,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f429i-disco/usbmsc/Make.defs b/configs/stm32f429i-disco/usbmsc/Make.defs index c8cd4116d694a4115ce7cb32a1015d2111c27460..07fa3b5d009f5c64c35d8d7ddec67fb49926e526 100644 --- a/configs/stm32f429i-disco/usbmsc/Make.defs +++ b/configs/stm32f429i-disco/usbmsc/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f429i-disco/usbmsc/defconfig b/configs/stm32f429i-disco/usbmsc/defconfig index a2ef06d9caa7c0e7161b0965bd3f09354c46e1c5..00cdfd52363aa5a6ccd69a542ff8b4b9fe7f1d97 100644 --- a/configs/stm32f429i-disco/usbmsc/defconfig +++ b/configs/stm32f429i-disco/usbmsc/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -444,6 +444,8 @@ CONFIG_STM32_FSMC_SRAM=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -573,7 +575,6 @@ 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 @@ -583,6 +584,7 @@ CONFIG_NSH_MMCSDMINOR=0 CONFIG_STM32F429IDISCO_USBHOST_STACKSIZE=1024 CONFIG_STM32F429IDISCO_USBHOST_PRIO=100 # CONFIG_STM32F429I_DISCO_ILI9341 is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -605,9 +607,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -705,6 +710,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -724,11 +730,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -742,7 +751,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -815,6 +829,7 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set CONFIG_USBHOST=y CONFIG_USBHOST_NPREALLOC=4 @@ -826,6 +841,7 @@ CONFIG_USBHOST_MSC=y # CONFIG_USBHOST_HIDKBD is not set # CONFIG_USBHOST_HIDMOUSE is not set # CONFIG_USBHOST_TRACE is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -840,6 +856,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -963,6 +980,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -996,7 +1014,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -1026,9 +1043,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1137,7 +1154,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1159,6 +1175,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1199,7 +1216,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f429i-disco/usbnsh/Make.defs b/configs/stm32f429i-disco/usbnsh/Make.defs index c8cd4116d694a4115ce7cb32a1015d2111c27460..07fa3b5d009f5c64c35d8d7ddec67fb49926e526 100644 --- a/configs/stm32f429i-disco/usbnsh/Make.defs +++ b/configs/stm32f429i-disco/usbnsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f429i-disco/usbnsh/defconfig b/configs/stm32f429i-disco/usbnsh/defconfig index a25d95b5095b2bda4aea705e6f5727907e8caeca..f350e42aafbc6a985806217b9565e94ccbb5ebbf 100644 --- a/configs/stm32f429i-disco/usbnsh/defconfig +++ b/configs/stm32f429i-disco/usbnsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -441,6 +441,8 @@ CONFIG_STM32_FSMC_SRAM=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -565,7 +567,6 @@ 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 @@ -573,6 +574,7 @@ CONFIG_NSH_MMCSDMINOR=0 # CONFIG_STM32F429I_DISCO_FLASH is not set # CONFIG_STM32F429I_DISCO_RAMMTD is not set # CONFIG_STM32F429I_DISCO_ILI9341 is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -596,9 +598,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -691,6 +696,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y CONFIG_DEV_ZERO=y +# CONFIG_DEV_URANDOM is not set CONFIG_DEV_LOOP=y # @@ -710,11 +716,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -728,7 +737,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -800,6 +814,7 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -842,6 +857,7 @@ CONFIG_CDCACM_VENDORSTR="NuttX" CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -855,6 +871,7 @@ CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_SYSLOG_CHAR is not set CONFIG_SYSLOG_NONE=y # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -979,6 +996,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1012,7 +1030,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -1042,9 +1059,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1153,7 +1170,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1175,6 +1191,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1218,7 +1235,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f4discovery/canard/Make.defs b/configs/stm32f4discovery/canard/Make.defs index 1f8f43ca2827c8e8352977bd5cb2afed9fa0d6c2..081b85aadce1072a5e40d35baaa4862c085a5af9 100644 --- a/configs/stm32f4discovery/canard/Make.defs +++ b/configs/stm32f4discovery/canard/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f4discovery/canard/defconfig b/configs/stm32f4discovery/canard/defconfig index 631e039585efb3e61d10bb9b5e5cd4ec9a550494..327fc9c8188320afaa63e1d9e5c3986c65fd4220 100644 --- a/configs/stm32f4discovery/canard/defconfig +++ b/configs/stm32f4discovery/canard/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -614,6 +614,7 @@ CONFIG_ARCH_HAVE_TICKLESS=y CONFIG_USEC_PER_TICK=10000 CONFIG_SYSTEM_TIME64=y CONFIG_CLOCK_MONOTONIC=y +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -706,6 +707,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -731,11 +733,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -828,6 +833,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set # CONFIG_HAVE_USBTRACE is not set @@ -1013,7 +1019,6 @@ CONFIG_EXAMPLES_LIBCANARD_DAEMON_PRIORITY=100 CONFIG_EXAMPLES_LIBCANARD_STACKSIZE=2048 # 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 @@ -1042,9 +1047,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1153,7 +1158,6 @@ 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 diff --git a/configs/stm32f4discovery/cxxtest/Make.defs b/configs/stm32f4discovery/cxxtest/Make.defs index c31bef20e3563bbf9d1f3fde6aef747f3553c674..30fe1f2d37338aacfa22a1680e56bfca20d0ab02 100644 --- a/configs/stm32f4discovery/cxxtest/Make.defs +++ b/configs/stm32f4discovery/cxxtest/Make.defs @@ -85,7 +85,7 @@ ARCHCFLAGS = -fno-builtin ifeq ($(CONFIG_UCLIBCXX_EXCEPTION),y) ARCHCPUFLAGSXX = -fno-builtin else - ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions + ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fcheck-new endif ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/stm32f4discovery/cxxtest/defconfig b/configs/stm32f4discovery/cxxtest/defconfig index 70f37d0b3293763634693911698bff3e94bbe6c9..55b87040f96a51e39db738ab9557299f53ccb5ee 100644 --- a/configs/stm32f4discovery/cxxtest/defconfig +++ b/configs/stm32f4discovery/cxxtest/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -442,6 +442,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -573,6 +575,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # Board-Specific Options # # CONFIG_STM32F4DISBB is not set +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -588,9 +591,12 @@ CONFIG_DISABLE_ENVIRON=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2012 CONFIG_START_MONTH=11 @@ -684,6 +690,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -699,6 +706,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -712,7 +720,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -785,8 +798,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -801,6 +816,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -903,6 +919,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -933,7 +950,6 @@ CONFIG_UCLIBCXX_HAVE_LIBSUPCXX=y # # CONFIG_EXAMPLES_CHAT is not set # CONFIG_EXAMPLES_CONFIGDATA is not set -# CONFIG_EXAMPLES_CPUHOG is not set CONFIG_EXAMPLES_CXXTEST=y CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE=y # CONFIG_EXAMPLES_DHCPD is not set @@ -962,10 +978,9 @@ CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1040,7 +1055,7 @@ CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f4discovery/elf/Make.defs b/configs/stm32f4discovery/elf/Make.defs index 77d0869652f02faf899b95d964eb375da6bb62bb..aa901675810cf5ab30ebe3ee257bfbfcbfe9cb49 100644 --- a/configs/stm32f4discovery/elf/Make.defs +++ b/configs/stm32f4discovery/elf/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f4discovery/elf/defconfig b/configs/stm32f4discovery/elf/defconfig index 8bdd64b1b25c0a9286cde7eedd6e6cfcb67253e2..a072d09e953244f84a512fe7676e1c842ff10cf0 100644 --- a/configs/stm32f4discovery/elf/defconfig +++ b/configs/stm32f4discovery/elf/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -443,6 +443,8 @@ CONFIG_STM32_CCMEXCLUDE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -574,6 +576,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # Board-Specific Options # # CONFIG_STM32F4DISBB is not set +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -589,9 +592,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2012 CONFIG_START_MONTH=10 @@ -684,6 +690,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -699,6 +706,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -712,7 +720,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -784,8 +797,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -800,6 +815,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -918,6 +934,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -945,7 +962,6 @@ CONFIG_HAVE_CXX=y # # 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=y @@ -976,10 +992,9 @@ CONFIG_EXAMPLES_ELF_DEVPATH="/dev/ram0" # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set @@ -1060,7 +1075,7 @@ CONFIG_EXAMPLES_ELF_DEVPATH="/dev/ram0" # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f4discovery/ipv6/Make.defs b/configs/stm32f4discovery/ipv6/Make.defs index 59e8e4a50aa2b4f4d50669393184503314ceaa0c..bb876684f9fa243112fb91bf55427386b069f0c0 100644 --- a/configs/stm32f4discovery/ipv6/Make.defs +++ b/configs/stm32f4discovery/ipv6/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f4discovery/ipv6/defconfig b/configs/stm32f4discovery/ipv6/defconfig index 397b216393cbcf52a14a9bb45f84040293875cec..6ed6621ed1899500653ac67b5e88983767007086 100644 --- a/configs/stm32f4discovery/ipv6/defconfig +++ b/configs/stm32f4discovery/ipv6/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -446,6 +446,8 @@ CONFIG_STM32_DMACAPABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -605,13 +607,12 @@ CONFIG_ARCH_HAVE_BUTTONS=y CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_HAVE_IRQBUTTONS=y # CONFIG_ARCH_IRQBUTTONS is not set -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 # # Board-Specific Options # CONFIG_STM32F4DISBB=y +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -634,9 +635,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2014 CONFIG_START_MONTH=9 @@ -734,6 +738,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -753,11 +758,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -771,7 +779,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -897,8 +910,10 @@ CONFIG_USART6_2STOP=0 # CONFIG_USART6_IFLOWCONTROL is not set # CONFIG_USART6_OFLOWCONTROL is not set # CONFIG_USART6_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -913,6 +928,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1155,6 +1171,7 @@ CONFIG_LIBC_NETDB=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1188,7 +1205,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -1220,9 +1236,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1342,7 +1358,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1364,6 +1379,8 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 # # Configure Command Options @@ -1455,7 +1472,7 @@ CONFIG_NSH_MAX_ROUNDTRIP=20 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f4discovery/kostest/Make.defs b/configs/stm32f4discovery/kostest/Make.defs index cdc6b370b8e0843cd9166139735e570dc3143367..26abce54857de7d43986a428e76ed134fce31aaf 100644 --- a/configs/stm32f4discovery/kostest/Make.defs +++ b/configs/stm32f4discovery/kostest/Make.defs @@ -72,7 +72,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f4discovery/kostest/defconfig b/configs/stm32f4discovery/kostest/defconfig index 6219fe09a9c7e905589fc3ab0baa61dea5f658ad..c5cdb7b619c851971dbb4a1afad2b016744f59ac 100644 --- a/configs/stm32f4discovery/kostest/defconfig +++ b/configs/stm32f4discovery/kostest/defconfig @@ -71,7 +71,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -448,6 +448,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -579,6 +581,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # Board-Specific Options # # CONFIG_STM32F4DISBB is not set +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -594,9 +597,12 @@ CONFIG_DISABLE_ENVIRON=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=3 @@ -692,6 +698,7 @@ CONFIG_SYS_NNEST=2 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -707,6 +714,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -720,7 +728,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -792,8 +805,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -808,6 +823,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -912,6 +928,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_USRWORK is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -932,7 +949,6 @@ CONFIG_ARCH_HAVE_TLS=y # # 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 @@ -963,10 +979,9 @@ CONFIG_EXAMPLES_OSTEST_RR_RANGE=10000 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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1041,7 +1056,7 @@ CONFIG_EXAMPLES_OSTEST_WAITRESULT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f4discovery/netnsh/Make.defs b/configs/stm32f4discovery/netnsh/Make.defs index d229b8e7603ced04d056c71b60cede70c6c12c36..e8e90334947b347429e78862eb758d13364cf251 100644 --- a/configs/stm32f4discovery/netnsh/Make.defs +++ b/configs/stm32f4discovery/netnsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f4discovery/netnsh/defconfig b/configs/stm32f4discovery/netnsh/defconfig index 2e78007b4bffdaaeb74b01d652fc2923152dfcc6..9d5e5bfb537f321386442bf90a326649cdefdb77 100644 --- a/configs/stm32f4discovery/netnsh/defconfig +++ b/configs/stm32f4discovery/netnsh/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -446,6 +446,8 @@ CONFIG_STM32_DMACAPABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -605,13 +607,12 @@ CONFIG_ARCH_HAVE_BUTTONS=y CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_HAVE_IRQBUTTONS=y # CONFIG_ARCH_IRQBUTTONS is not set -CONFIG_NSH_MMCSDMINOR=0 -CONFIG_NSH_MMCSDSLOTNO=0 # # Board-Specific Options # CONFIG_STM32F4DISBB=y +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y CONFIG_BOARDCTL_RESET=y # CONFIG_BOARDCTL_UNIQUEID is not set @@ -634,9 +635,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2014 CONFIG_START_MONTH=9 @@ -734,6 +738,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -753,11 +758,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -771,7 +779,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -899,8 +912,10 @@ CONFIG_USART6_2STOP=0 # CONFIG_USART6_IFLOWCONTROL is not set # CONFIG_USART6_OFLOWCONTROL is not set # CONFIG_USART6_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -915,6 +930,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1166,6 +1182,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1199,7 +1216,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -1231,9 +1247,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1358,7 +1374,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1384,6 +1399,8 @@ CONFIG_NSH_DISABLE_SHUTDOWN=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 +CONFIG_NSH_MMCSDSLOTNO=0 # # Configure Command Options @@ -1460,7 +1477,7 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f4discovery/nsh/Make.defs b/configs/stm32f4discovery/nsh/Make.defs index bf06630d058d44a91a9c4d678597554eb7afd89f..02251501c88f94099fdc0a453b986add39667bc3 100644 --- a/configs/stm32f4discovery/nsh/Make.defs +++ b/configs/stm32f4discovery/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f4discovery/nsh/defconfig b/configs/stm32f4discovery/nsh/defconfig index 7fa1c99d9e17ecac7979938f39a7f124897e0e5d..e5efd97735075202a0122385a71f1aa577e0fb3f 100644 --- a/configs/stm32f4discovery/nsh/defconfig +++ b/configs/stm32f4discovery/nsh/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -443,6 +443,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -576,12 +578,12 @@ 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_STM32F4DISBB is not set +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -597,9 +599,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -692,6 +697,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -711,11 +717,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -729,7 +738,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -802,8 +816,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -818,6 +834,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -939,6 +956,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -972,7 +990,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -1001,9 +1018,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1110,7 +1127,6 @@ 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 @@ -1132,6 +1148,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1173,7 +1190,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f4discovery/nxlines/Make.defs b/configs/stm32f4discovery/nxlines/Make.defs index 5b6ee054c44cbfc813a09507fb0866048c0a2edc..f1cbc25e729394d5e26c19b3e1bd6c1fd384bb0d 100644 --- a/configs/stm32f4discovery/nxlines/Make.defs +++ b/configs/stm32f4discovery/nxlines/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f4discovery/nxlines/defconfig b/configs/stm32f4discovery/nxlines/defconfig index ede193ec75c4fd64f38e6e685d1ea9e2f26726dc..91cc0a7bfefc336bb34d737f40038392d35e3e08 100644 --- a/configs/stm32f4discovery/nxlines/defconfig +++ b/configs/stm32f4discovery/nxlines/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -444,6 +444,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -577,12 +579,12 @@ 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_STM32F4DISBB is not set +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -598,9 +600,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -693,6 +698,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -712,11 +718,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -730,7 +739,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -837,8 +851,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -853,6 +869,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1062,6 +1079,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1090,7 +1108,6 @@ CONFIG_HAVE_CXXINITIALIZE=y # 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 @@ -1129,10 +1146,9 @@ CONFIG_EXAMPLES_NXLINES_BPP=16 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1237,7 +1253,6 @@ 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 @@ -1259,6 +1274,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1301,7 +1317,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f4discovery/pm/Make.defs b/configs/stm32f4discovery/pm/Make.defs index 61081de08a27b1c7c1d660eda371f9e2ff19173f..52cbca1fa23fcb6ce941962fd08abb1735e0801f 100644 --- a/configs/stm32f4discovery/pm/Make.defs +++ b/configs/stm32f4discovery/pm/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f4discovery/pm/defconfig b/configs/stm32f4discovery/pm/defconfig index b58f62296b6dac791ad3c45ee86848a7c008e835..f4e95b0c0742d78dbc66b99c63de871833c8cbaf 100644 --- a/configs/stm32f4discovery/pm/defconfig +++ b/configs/stm32f4discovery/pm/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -442,6 +442,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_PWM is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set @@ -576,7 +578,6 @@ CONFIG_ARCH_HAVE_BUTTONS=y CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_HAVE_IRQBUTTONS=y CONFIG_ARCH_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options @@ -589,6 +590,7 @@ CONFIG_PM_SLEEP_WAKEUP_NSEC=0 CONFIG_PM_BUTTONS=y CONFIG_PM_BUTTON_ACTIVITY=10 # CONFIG_STM32F4DISBB is not set +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -604,9 +606,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=4 @@ -701,6 +706,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -716,6 +722,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -734,7 +741,12 @@ CONFIG_RTC_NALARMS=1 # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -825,8 +837,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -841,6 +855,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -962,6 +977,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -995,7 +1011,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -1025,9 +1040,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1134,7 +1149,6 @@ 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 @@ -1156,6 +1170,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1197,7 +1212,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f4discovery/posix_spawn/Make.defs b/configs/stm32f4discovery/posix_spawn/Make.defs index 1d45cdd8d94a60cd8016d56f03046f267e8c60f0..40929ec4ddf2321407cec3a59267ae28c9dac42f 100644 --- a/configs/stm32f4discovery/posix_spawn/Make.defs +++ b/configs/stm32f4discovery/posix_spawn/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f4discovery/posix_spawn/defconfig b/configs/stm32f4discovery/posix_spawn/defconfig index a896c3140017d78bbb7b3791bb296652aa33e0a6..bde4e1647c9c31b7b3b08ed43a214985a6645ea0 100644 --- a/configs/stm32f4discovery/posix_spawn/defconfig +++ b/configs/stm32f4discovery/posix_spawn/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -443,6 +443,8 @@ CONFIG_STM32_CCMEXCLUDE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -574,6 +576,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # Board-Specific Options # # CONFIG_STM32F4DISBB is not set +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -589,9 +592,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2012 CONFIG_START_MONTH=10 @@ -684,6 +690,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -699,6 +706,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -712,7 +720,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -784,8 +797,10 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -800,6 +815,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -921,6 +937,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -948,7 +965,6 @@ CONFIG_HAVE_CXX=y # # 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 @@ -976,12 +992,11 @@ CONFIG_HAVE_CXX=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_POLL 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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set @@ -1062,7 +1077,7 @@ CONFIG_EXAMPLES_POSIXSPAWN_DEVPATH="/dev/ram0" # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f4discovery/pseudoterm/Make.defs b/configs/stm32f4discovery/pseudoterm/Make.defs index d1dd82ebf0b662f78a78d45312a7c90b7fd2a523..9ec926c48c6217a32e84f5e135e1d8798b20b706 100644 --- a/configs/stm32f4discovery/pseudoterm/Make.defs +++ b/configs/stm32f4discovery/pseudoterm/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f4discovery/pseudoterm/defconfig b/configs/stm32f4discovery/pseudoterm/defconfig index f599aadadecc73da848ef1fab5fb6a2ac3f1b19c..c129eb8c72795587250a08ee5f25f6956c52d610 100644 --- a/configs/stm32f4discovery/pseudoterm/defconfig +++ b/configs/stm32f4discovery/pseudoterm/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -599,6 +599,8 @@ CONFIG_ARCH_HAVE_TICKLESS=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y +# CONFIG_CLOCK_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -692,6 +694,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -711,11 +714,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -753,7 +759,10 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set -# CONFIG_PIPES is not set +CONFIG_PIPES=y +CONFIG_DEV_PIPE_MAXSIZE=1024 +CONFIG_DEV_PIPE_SIZE=1024 +CONFIG_DEV_FIFO_SIZE=1024 # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set @@ -825,6 +834,8 @@ CONFIG_USART3_2STOP=0 CONFIG_PSEUDOTERM=y # CONFIG_PSEUDOTERM_BSD is not set CONFIG_PSEUDOTERM_SUSV1=y +CONFIG_PSEUDOTERM_RXBUFSIZE=256 +CONFIG_PSEUDOTERM_TXBUFSIZE=256 # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set # CONFIG_HAVE_USBTRACE is not set @@ -1019,10 +1030,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 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_NX is not set # CONFIG_EXAMPLES_NXLINES is not set # CONFIG_EXAMPLES_NXTERM is not set # CONFIG_EXAMPLES_NXTEXT is not set @@ -1037,6 +1048,7 @@ CONFIG_EXAMPLES_PTYTEST_SERIALDEV="/dev/ttyS1" CONFIG_EXAMPLES_PTYTEST_PRIORITY=100 CONFIG_EXAMPLES_PTYTEST_STACKSIZE=2048 CONFIG_EXAMPLES_PTYTEST_DAEMONPRIO=100 +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set diff --git a/configs/stm32f4discovery/rgbled/Make.defs b/configs/stm32f4discovery/rgbled/Make.defs index bf06630d058d44a91a9c4d678597554eb7afd89f..02251501c88f94099fdc0a453b986add39667bc3 100644 --- a/configs/stm32f4discovery/rgbled/Make.defs +++ b/configs/stm32f4discovery/rgbled/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f4discovery/rgbled/defconfig b/configs/stm32f4discovery/rgbled/defconfig index be01e5261ce2d24d9e44f93808ce620387dfaa42..166d2fd1d38f2f21989ffb9896d9dc0c28f64ddb 100644 --- a/configs/stm32f4discovery/rgbled/defconfig +++ b/configs/stm32f4discovery/rgbled/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -609,6 +609,7 @@ CONFIG_ARCH_HAVE_TICKLESS=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -702,6 +703,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -722,11 +724,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -818,6 +823,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set # CONFIG_HAVE_USBTRACE is not set @@ -991,7 +997,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -1020,9 +1025,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set CONFIG_EXAMPLES_RGBLED=y CONFIG_EXAMPLES_RGBLED_DEVNAME="/dev/rgbled0" CONFIG_EXAMPLES_RGBLED_PRIORITY=100 @@ -1132,7 +1137,6 @@ 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 diff --git a/configs/stm32f4discovery/uavcan/Make.defs b/configs/stm32f4discovery/uavcan/Make.defs index e911bdd2d531defbd345df99450ea71926b533ab..3a0c6c6df354d28de9fa8a2f01a3d0ac2e785f08 100644 --- a/configs/stm32f4discovery/uavcan/Make.defs +++ b/configs/stm32f4discovery/uavcan/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f4discovery/uavcan/defconfig b/configs/stm32f4discovery/uavcan/defconfig index 11043832344d1c48b117093a44a55dd7dc621776..d383024729daec0b4497b9965fbfe1394f095fb6 100644 --- a/configs/stm32f4discovery/uavcan/defconfig +++ b/configs/stm32f4discovery/uavcan/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -433,6 +433,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -544,6 +546,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # Board-Specific Options # # CONFIG_STM32F4DISBB is not set +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -559,9 +562,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -654,6 +660,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -669,6 +676,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -682,7 +690,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -709,6 +722,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -727,6 +741,7 @@ CONFIG_RAMLOG_NPOLLWAITERS=4 CONFIG_RAMLOG_SYSLOG=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -838,6 +853,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -897,7 +913,6 @@ CONFIG_LIBUAVCAN_INIT_RETRIES=0 # 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 @@ -925,10 +940,9 @@ CONFIG_LIBUAVCAN_INIT_RETRIES=0 # CONFIG_EXAMPLES_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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1008,7 +1022,7 @@ CONFIG_EXAMPLES_UAVCAN_NODE_NAME="org.nuttx.apps.examples.uavcan" # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f4discovery/usbnsh/Make.defs b/configs/stm32f4discovery/usbnsh/Make.defs index 4ba2909b7a794a72195f3a712ab868d25c1adc4e..69574bbbd7c653c23897eec50fe6ed7299cc73ca 100644 --- a/configs/stm32f4discovery/usbnsh/Make.defs +++ b/configs/stm32f4discovery/usbnsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f4discovery/usbnsh/defconfig b/configs/stm32f4discovery/usbnsh/defconfig index 405bdea939e8956e961eef4a647b05530fe3c485..ee7402e4b7146a0f530e0462536ccb6511315b87 100644 --- a/configs/stm32f4discovery/usbnsh/defconfig +++ b/configs/stm32f4discovery/usbnsh/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -443,6 +443,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM2_CAP is not set # CONFIG_STM32_TIM3_CAP is not set @@ -576,12 +578,12 @@ 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_STM32F4DISBB is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set @@ -605,9 +607,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=1 @@ -700,6 +705,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -719,11 +725,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -737,7 +746,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -809,6 +823,7 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set CONFIG_USBDEV=y # @@ -851,6 +866,7 @@ CONFIG_CDCACM_VENDORSTR="NuttX" CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" # CONFIG_USBMSC is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -866,6 +882,7 @@ CONFIG_SYSLOG_CHAR=y # CONFIG_SYSLOG_FILE is not set CONFIG_SYSLOG_CHAR_CRLF=y CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -987,6 +1004,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1020,7 +1038,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -1049,9 +1066,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1159,7 +1176,6 @@ 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 @@ -1181,6 +1197,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1224,7 +1241,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32f4discovery/winbuild/Make.defs b/configs/stm32f4discovery/winbuild/Make.defs index cfc4261cbf55ce3787632d7e00811b22d193ec5d..ecf9a22b123ddae8c9756fc73f7c7d51467fc878 100644 --- a/configs/stm32f4discovery/winbuild/Make.defs +++ b/configs/stm32f4discovery/winbuild/Make.defs @@ -64,7 +64,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f4discovery/winbuild/defconfig b/configs/stm32f4discovery/winbuild/defconfig index dcdefd1af5c539ebd751403e6db16ee2d047efd7..7de0aa129652496602ce0ddfd486b1120d8441d8 100644 --- a/configs/stm32f4discovery/winbuild/defconfig +++ b/configs/stm32f4discovery/winbuild/defconfig @@ -63,7 +63,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/stm32f746-ws/nsh/Make.defs b/configs/stm32f746-ws/nsh/Make.defs index f2aa3a4d62bddae1dd778c96982e514de6e4e90b..cbf3bbdb2bb10f4768948ad1367bbe87bed14824 100644 --- a/configs/stm32f746-ws/nsh/Make.defs +++ b/configs/stm32f746-ws/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f746-ws/nsh/defconfig b/configs/stm32f746-ws/nsh/defconfig index 8eaa8c035797d14c7073fc1c394598a1e6434e40..617e74bbc051db1ae682111fddd6b637c92d4d28 100644 --- a/configs/stm32f746-ws/nsh/defconfig +++ b/configs/stm32f746-ws/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -302,6 +302,7 @@ CONFIG_STM32F7_I2C1=y # CONFIG_STM32F7_OTGFS is not set # CONFIG_STM32F7_OTGHS is not set # CONFIG_STM32F7_QUADSPI is not set +# CONFIG_STM32F7_PWR is not set # CONFIG_STM32F7_RNG is not set # CONFIG_STM32F7_SAI1 is not set # CONFIG_STM32F7_SAI2 is not set @@ -358,7 +359,10 @@ CONFIG_STM32F7_I2CTIMEOSEC=0 CONFIG_STM32F7_I2CTIMEOMS=500 CONFIG_STM32F7_I2CTIMEOTICKS=500 # CONFIG_STM32F7_I2C_DUTY16_9 is not set +# CONFIG_STM32F7_HAVE_RTC_COUNTER is not set +# CONFIG_STM32F7_HAVE_RTC_SUBSECONDS is not set # CONFIG_STM32F7_CUSTOM_CLOCKCONFIG is not set +# CONFIG_STM32F7_DTCMEXCLUDE is not set # # Timer Configuration @@ -436,11 +440,11 @@ CONFIG_ARCH_BOARD="stm32f746-ws" # # Common Board Options # -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_UNIQUEID is not set # CONFIG_BOARDCTL_TSCTEST is not set @@ -465,6 +469,7 @@ CONFIG_DISABLE_OS_API=y CONFIG_USEC_PER_TICK=1000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -569,6 +574,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -593,11 +599,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -619,7 +628,12 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -638,6 +652,9 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_MTD is not set # CONFIG_EEPROM is not set CONFIG_PIPES=y +CONFIG_DEV_PIPE_MAXSIZE=1024 +CONFIG_DEV_PIPE_SIZE=1024 +CONFIG_DEV_FIFO_SIZE=1024 # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set @@ -692,8 +709,10 @@ CONFIG_USART6_2STOP=0 # CONFIG_USART6_IFLOWCONTROL is not set # CONFIG_USART6_OFLOWCONTROL is not set # CONFIG_USART6_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -709,6 +728,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -825,6 +845,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -890,6 +911,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_PIPE is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1003,6 +1025,7 @@ CONFIG_NSH_DISABLE_LOSMART=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_PSSTACKUSAGE is not set # CONFIG_NSH_DISABLE_PUT is not set # CONFIG_NSH_DISABLE_PWD is not set # CONFIG_NSH_DISABLE_RM is not set @@ -1018,6 +1041,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1059,7 +1083,7 @@ CONFIG_NSH_ARCHINIT=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN is not set +# CONFIG_SYSTEM_HEX2BIN is not set # CONFIG_SYSTEM_HEXED is not set CONFIG_SYSTEM_I2CTOOL=y CONFIG_I2CTOOL_MINBUS=1 diff --git a/configs/stm32f746g-disco/nsh/Make.defs b/configs/stm32f746g-disco/nsh/Make.defs index 608dd2a00bb922675fbc0f67ee995f13df01bbb8..cb8ea0725108964ccccfb85417a81249911d2fdc 100644 --- a/configs/stm32f746g-disco/nsh/Make.defs +++ b/configs/stm32f746g-disco/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32f746g-disco/nsh/defconfig b/configs/stm32f746g-disco/nsh/defconfig index 3f71f4a39e874b75d64a064da0cb16b1f85cb325..330360fdc1f6d7f0a85312a38e679653c3b19270 100644 --- a/configs/stm32f746g-disco/nsh/defconfig +++ b/configs/stm32f746g-disco/nsh/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -310,6 +310,7 @@ CONFIG_STM32F7_USART=y # CONFIG_STM32F7_OTGFS is not set # CONFIG_STM32F7_OTGHS is not set # CONFIG_STM32F7_QUADSPI is not set +# CONFIG_STM32F7_PWR is not set # CONFIG_STM32F7_RNG is not set # CONFIG_STM32F7_SAI1 is not set # CONFIG_STM32F7_SAI2 is not set @@ -351,7 +352,10 @@ CONFIG_STM32F7_USART6=y # # CONFIG_STM32F7_FLOWCONTROL_BROKEN is not set # CONFIG_STM32F7_USART_BREAKS is not set +# CONFIG_STM32F7_HAVE_RTC_COUNTER is not set +# CONFIG_STM32F7_HAVE_RTC_SUBSECONDS is not set # CONFIG_STM32F7_CUSTOM_CLOCKCONFIG is not set +# CONFIG_STM32F7_DTCMEXCLUDE is not set # # Timer Configuration @@ -431,11 +435,11 @@ 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_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -454,6 +458,7 @@ CONFIG_DISABLE_OS_API=y CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 @@ -546,6 +551,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -565,11 +571,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -583,7 +592,12 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -656,8 +670,10 @@ CONFIG_USART6_2STOP=0 # CONFIG_USART6_IFLOWCONTROL is not set # CONFIG_USART6_OFLOWCONTROL is not set # CONFIG_USART6_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -672,6 +688,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -784,6 +801,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -817,7 +835,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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 @@ -846,9 +863,9 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -953,7 +970,6 @@ 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 @@ -975,6 +991,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1015,7 +1032,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32l476vg-disco/nsh/Make.defs b/configs/stm32l476vg-disco/nsh/Make.defs index 0819e438c21190e75109b1a14a6baa830a6c3dd4..836070c0d0d88176f3b2d1c92a64d8b1644cf268 100644 --- a/configs/stm32l476vg-disco/nsh/Make.defs +++ b/configs/stm32l476vg-disco/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32l476vg-disco/nsh/defconfig b/configs/stm32l476vg-disco/nsh/defconfig index 1a01f116f178f13481d1e42ecca96aa6cdb043e1..0e77bb76a62057669107a1ef5d9a92477a9995db 100644 --- a/configs/stm32l476vg-disco/nsh/defconfig +++ b/configs/stm32l476vg-disco/nsh/defconfig @@ -43,6 +43,16 @@ CONFIG_RAW_BINARY=y # 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=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 @@ -52,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -121,7 +131,6 @@ CONFIG_ARCH_HAVE_DPFPU=y # 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 # # ARMV7M Configuration Options @@ -158,11 +167,15 @@ CONFIG_STM32L4_STM32L476XX=y CONFIG_STM32L4_FLASH_1024KB=y # -# SRAM2 Options +# STM32L4 SRAM2 Options # # CONFIG_STM32L4_SRAM2_HEAP is not set # CONFIG_STM32L4_SRAM2_INIT is not set +# +# STM32L4 Peripherals +# + # # STM32L4 Peripheral Support # @@ -188,6 +201,7 @@ CONFIG_STM32L4_DMA2=y # # AHB2 Peripherals # +# CONFIG_STM32L4_OTGFS is not set # CONFIG_STM32L4_ADC1 is not set # CONFIG_STM32L4_ADC2 is not set # CONFIG_STM32L4_ADC3 is not set @@ -274,10 +288,17 @@ CONFIG_STM32L4_RTC_LSECLOCK=y CONFIG_STM32L4_SAI1PLL=y # CONFIG_STM32L4_SAI2PLL is not set +# +# Timer Configuration +# +# CONFIG_STM32L4_ONESHOT is not set +# CONFIG_STM32L4_FREERUN is not set + # # U[S]ART Configuration # # CONFIG_STM32L4_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32L4_USART_BREAKS is not set # # Architecture Options @@ -343,8 +364,6 @@ CONFIG_RAM_SIZE=98304 # CONFIG_ARCH_BOARD_NUCLEO_L476RG is not set CONFIG_ARCH_BOARD_STM32L476VG_DISCO=y # CONFIG_ARCH_BOARD_CUSTOM is not set -CONFIG_ARCH_BOARD_CUSTOM_DIR="configs/dummy" -CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD="stm32l476vg-disco" # @@ -384,9 +403,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_ARCH_HAVE_TIMEKEEPING is not set # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=8 @@ -478,6 +500,7 @@ CONFIG_DEV_NULL=y CONFIG_DEV_ZERO=y CONFIG_ARCH_HAVE_RNG=y CONFIG_DEV_RANDOM=y +# CONFIG_DEV_URANDOM is not set CONFIG_DEV_LOOP=y # @@ -497,11 +520,14 @@ CONFIG_SPI=y 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_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y +# CONFIG_SPI_BITORDER is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_SPI_DRIVER is not set +# CONFIG_SPI_BITBANG is not set # CONFIG_I2S is not set # @@ -586,6 +612,7 @@ 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 @@ -615,7 +642,6 @@ 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=y CONFIG_USART2_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set @@ -633,6 +659,11 @@ CONFIG_USART2_2STOP=0 # CONFIG_USART2_IFLOWCONTROL is not set # CONFIG_USART2_OFLOWCONTROL is not set # CONFIG_USART2_DMA is not set +# CONFIG_PSEUDOTERM is not set +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set +# CONFIG_DRIVERS_WIRELESS is not set # # System Logging @@ -646,6 +677,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -776,6 +808,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -826,7 +859,6 @@ CONFIG_EXAMPLES_BUTTONS_NAME6="Button 6" CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # 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 @@ -835,10 +867,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 @@ -851,18 +883,18 @@ 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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set @@ -871,22 +903,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 @@ -906,8 +940,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 @@ -972,7 +1006,6 @@ 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 @@ -994,6 +1027,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1010,7 +1044,6 @@ CONFIG_NSH_FILEIOSIZE=512 # CONFIG_NSH_DISABLESCRIPT is not set # CONFIG_NSH_DISABLE_ITEF is not set # CONFIG_NSH_DISABLE_LOOPS is not set -CONFIG_NSH_MMCSDMINOR=0 CONFIG_NSH_ROMFSETC=y # CONFIG_NSH_ROMFSRC is not set CONFIG_NSH_ROMFSMOUNTPT="/etc" @@ -1025,12 +1058,7 @@ CONFIG_NSH_ARCHROMFS=y # Console Configuration # CONFIG_NSH_CONSOLE=y -# CONFIG_NSH_USBCONSOLE is not set # CONFIG_NSH_ALTCONDEV is not set - -# -# USB Device Trace Support -# CONFIG_NSH_ARCHINIT=y # CONFIG_NSH_LOGIN is not set # CONFIG_NSH_CONSOLE_LOGIN is not set @@ -1047,14 +1075,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_LIB_HEX2BIN 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 @@ -1062,8 +1089,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_USBMONITOR is not set +# CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32ldiscovery/nsh/Make.defs b/configs/stm32ldiscovery/nsh/Make.defs index fc936f8f9da0a439c6a0a65be5c64e0ba3c489fa..1d4b9050ccaeee23df647d742513c7660739a48d 100644 --- a/configs/stm32ldiscovery/nsh/Make.defs +++ b/configs/stm32ldiscovery/nsh/Make.defs @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32ldiscovery/nsh/defconfig b/configs/stm32ldiscovery/nsh/defconfig index 2e13a6c77d61e4ce3dab9de43249369f4b323224..04498a3779f4171912a3d9182e70378901989d29 100644 --- a/configs/stm32ldiscovery/nsh/defconfig +++ b/configs/stm32ldiscovery/nsh/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -419,6 +419,8 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set # CONFIG_STM32_TIM9_CAP is not set @@ -537,11 +539,11 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -557,9 +559,12 @@ CONFIG_DISABLE_ENVIRON=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=5 @@ -645,6 +650,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=1536 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -660,6 +666,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -673,7 +680,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -746,8 +758,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -762,6 +776,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -859,6 +874,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -879,7 +895,6 @@ CONFIG_ARCH_HAVE_TLS=y # # 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 @@ -905,10 +920,9 @@ CONFIG_EXAMPLES_NSH=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1010,7 +1024,6 @@ 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 @@ -1032,6 +1045,7 @@ CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_USLEEP is not set CONFIG_NSH_DISABLE_WGET=y # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1069,7 +1083,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/stm32vldiscovery/nsh/Make.defs b/configs/stm32vldiscovery/nsh/Make.defs index 3f02d1771a7509cfce1c6e6c91bcbf5f12919140..54853c23b572645f896a941f09e81a3d1f4e2f21 100644 --- a/configs/stm32vldiscovery/nsh/Make.defs +++ b/configs/stm32vldiscovery/nsh/Make.defs @@ -77,7 +77,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/stm32vldiscovery/nsh/defconfig b/configs/stm32vldiscovery/nsh/defconfig index 588a4f9703faf5908d450663de9a13c6250a4d5f..25ebdfe79225560130bbd2f22f1cae8c058d6234 100644 --- a/configs/stm32vldiscovery/nsh/defconfig +++ b/configs/stm32vldiscovery/nsh/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -419,6 +419,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -542,7 +544,6 @@ CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set CONFIG_ARCH_HAVE_IRQBUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options @@ -551,6 +552,7 @@ CONFIG_NSH_MMCSDMINOR=0 # # STM32VL-Discovery Hardware Configuration # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -566,9 +568,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_MAX_WDOGPARMS=2 CONFIG_PREALLOC_WDOGS=4 @@ -658,6 +663,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 CONFIG_DISABLE_POLL=y CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -673,6 +679,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -691,7 +698,12 @@ CONFIG_RTC=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -764,8 +776,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -780,6 +794,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -902,6 +917,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -927,7 +943,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -954,9 +969,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1064,7 +1079,6 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_MB is not set # CONFIG_NSH_DISABLE_MKDIR is not set # CONFIG_NSH_DISABLE_MKFATFS 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 @@ -1086,6 +1100,7 @@ CONFIG_NSH_DISABLE_UNAME=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1124,7 +1139,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/sure-pic32mx/nsh/Make.defs b/configs/sure-pic32mx/nsh/Make.defs index 430f95a8f08708a058dcdf5bdbbea7e791d8d40a..9134fd6b253a270395a6a9de965eca284bfa5b4b 100644 --- a/configs/sure-pic32mx/nsh/Make.defs +++ b/configs/sure-pic32mx/nsh/Make.defs @@ -71,7 +71,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sure-pic32mx/nsh/defconfig b/configs/sure-pic32mx/nsh/defconfig index 271065aa30fffeca3b9cfa634ccb5e6c7e43c8df..bf079f0e17041ca5fc4849f482ea3fb3c9ebeeb5 100644 --- a/configs/sure-pic32mx/nsh/defconfig +++ b/configs/sure-pic32mx/nsh/defconfig @@ -64,7 +64,7 @@ CONFIG_DEBUG_FULLOPT=y # CONFIG_ARCH_HC is not set CONFIG_ARCH_MIPS=y # CONFIG_ARCH_RGMP is not set -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/sure-pic32mx/usbnsh/Make.defs b/configs/sure-pic32mx/usbnsh/Make.defs index 9eaf383f2df2358d1783fc431d9ae1094f4580d1..3d1b7dee386e5d865c7566b46eff4a515dfe030c 100644 --- a/configs/sure-pic32mx/usbnsh/Make.defs +++ b/configs/sure-pic32mx/usbnsh/Make.defs @@ -71,7 +71,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/sure-pic32mx/usbnsh/defconfig b/configs/sure-pic32mx/usbnsh/defconfig index ba6b357806ef201076d239b1880ecaba0dd17a70..42a85541b46bc509ad09ed7a744fbc84fa5b2a42 100644 --- a/configs/sure-pic32mx/usbnsh/defconfig +++ b/configs/sure-pic32mx/usbnsh/defconfig @@ -64,7 +64,7 @@ CONFIG_DEBUG_FULLOPT=y # CONFIG_ARCH_HC is not set CONFIG_ARCH_MIPS=y # CONFIG_ARCH_RGMP is not set -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/teensy-2.0/hello/Make.defs b/configs/teensy-2.0/hello/Make.defs index 24cf2831919fa9c726f4bd40a5456012c3903847..d5eb3f9c4c8bbc9d3b03c1839016a7069f6c94c5 100644 --- a/configs/teensy-2.0/hello/Make.defs +++ b/configs/teensy-2.0/hello/Make.defs @@ -73,7 +73,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/teensy-2.0/hello/defconfig b/configs/teensy-2.0/hello/defconfig index 9442cd2b0918eac2d51d2b1f374f8520fef93544..b39e8d3db801d315022be758054bd4840c216863 100644 --- a/configs/teensy-2.0/hello/defconfig +++ b/configs/teensy-2.0/hello/defconfig @@ -63,7 +63,7 @@ CONFIG_ARCH_AVR=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/teensy-2.0/nsh/Make.defs b/configs/teensy-2.0/nsh/Make.defs index 726fc73f85b8b96d3948e365d27d81b2df3267d3..abf35b198bee5544e9d4fe87f894fa9af80d2a55 100644 --- a/configs/teensy-2.0/nsh/Make.defs +++ b/configs/teensy-2.0/nsh/Make.defs @@ -73,7 +73,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/teensy-2.0/nsh/defconfig b/configs/teensy-2.0/nsh/defconfig index 125663eb913f25f604c921e59d29a2a915f1e70a..d46226fbf57f4008445cb9c540aff35bdd70361f 100644 --- a/configs/teensy-2.0/nsh/defconfig +++ b/configs/teensy-2.0/nsh/defconfig @@ -63,7 +63,7 @@ CONFIG_ARCH_AVR=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/teensy-2.0/usbmsc/Make.defs b/configs/teensy-2.0/usbmsc/Make.defs index 785aa0a9c623e24b7d816720d18d5c76acfeecb9..f0518e9448ab3c0ad1b511820601bfc190bf1fdf 100644 --- a/configs/teensy-2.0/usbmsc/Make.defs +++ b/configs/teensy-2.0/usbmsc/Make.defs @@ -73,7 +73,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/teensy-2.0/usbmsc/defconfig b/configs/teensy-2.0/usbmsc/defconfig index 1d9b27f4c3a1fc3753b5eff05aec31b881762e9c..c93c850b6c8ea91e9dabd5cd35274d691d15037a 100644 --- a/configs/teensy-2.0/usbmsc/defconfig +++ b/configs/teensy-2.0/usbmsc/defconfig @@ -63,7 +63,7 @@ CONFIG_ARCH_AVR=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/teensy-3.x/include/board.h b/configs/teensy-3.x/include/board.h index e7342683519532a9aa0f92fce702bbfe1e15010c..b7099de6e8ca32148e140a13c16a86a3e8bb7736 100644 --- a/configs/teensy-3.x/include/board.h +++ b/configs/teensy-3.x/include/board.h @@ -190,7 +190,7 @@ #define LED_STACKCREATED 1 /* STATUS LED=ON */ #define LED_INIRQ 2 /* STATUS LED=no change */ #define LED_SIGNAL 2 /* STATUS LED=no change */ -#define LED_ASSERTION 2 /* STATUS LED=no change */ +#define LED_ASSERTION 3 /* STATUS LED=no change */ #define LED_PANIC 3 /* STATUS LED=flashing */ /* Button definitions ***************************************************************/ @@ -232,6 +232,28 @@ # define PIN_UART0_TX PIN_UART1_TX_1 #endif +#ifdef CONFIG_KINETIS_I2C0 +#ifdef CONFIG_TEENSY_3X_I2C_ALT_PINS +# define PIN_I2C0_SCL (PIN_I2C0_SCL_1 | PIN_ALT2_OPENDRAIN | PIN_ALT2_SLOW) +# define PIN_I2C0_SDA (PIN_I2C0_SDA_1 | PIN_ALT2_OPENDRAIN | PIN_ALT2_SLOW) +#else +# define PIN_I2C0_SCL (PIN_I2C0_SCL_2 | PIN_ALT2_OPENDRAIN | PIN_ALT2_SLOW) +# define PIN_I2C0_SDA (PIN_I2C0_SDA_2 | PIN_ALT2_OPENDRAIN | PIN_ALT2_SLOW) +#endif +#endif + +/* REVISIT: Added only for clean compilation with I2C1 enabled. */ + +#ifdef CONFIG_KINETIS_I2C1 +#ifdef CONFIG_TEENSY_3X_I2C_ALT_PINS +# define PIN_I2C1_SCL (PIN_I2C1_SCL_1 | PIN_ALT2_OPENDRAIN | PIN_ALT2_SLOW) +# define PIN_I2C1_SDA (PIN_I2C1_SDA_1 | PIN_ALT2_OPENDRAIN | PIN_ALT2_SLOW) +#else +# define PIN_I2C1_SCL (PIN_I2C1_SCL_2 | PIN_ALT2_OPENDRAIN | PIN_ALT2_SLOW) +# define PIN_I2C1_SDA (PIN_I2C1_SDA_2 | PIN_ALT2_OPENDRAIN | PIN_ALT2_SLOW) +#endif +#endif + /************************************************************************************ * Public Data ************************************************************************************/ diff --git a/configs/teensy-3.x/nsh/Make.defs b/configs/teensy-3.x/nsh/Make.defs index 597d2e8cf3e94730bcddf53bf9a1053ef7497e42..f42e7beae3aca4d333a827d1f75c05761ce0b6ea 100644 --- a/configs/teensy-3.x/nsh/Make.defs +++ b/configs/teensy-3.x/nsh/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/teensy-3.x/nsh/defconfig b/configs/teensy-3.x/nsh/defconfig index 5fa77642ca76e4ed6ff00784142e4f7648bc0b64..073e881a48b53200a68eb78dd2375b31adfaf543 100644 --- a/configs/teensy-3.x/nsh/defconfig +++ b/configs/teensy-3.x/nsh/defconfig @@ -65,7 +65,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/teensy-3.x/src/Makefile b/configs/teensy-3.x/src/Makefile index 3483e6deb2ac48b427c53d3595504bce3aa213e1..fdb261c551ebcd23abccc93d247714da15735c6b 100644 --- a/configs/teensy-3.x/src/Makefile +++ b/configs/teensy-3.x/src/Makefile @@ -36,7 +36,7 @@ -include $(TOPDIR)/Make.defs ASRCS = -CSRCS = k20_boot.c k20_spi.c +CSRCS = k20_boot.c k20_spi.c k20_i2c.c ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += k20_autoleds.c diff --git a/configs/teensy-3.x/src/k20_boot.c b/configs/teensy-3.x/src/k20_boot.c index 6bd0282ddf48f564bea65e49406116aec7aed455..e6447871e60833e982a11fb8439bd2547362f036 100644 --- a/configs/teensy-3.x/src/k20_boot.c +++ b/configs/teensy-3.x/src/k20_boot.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/teensy-3.x/src/k20_boot.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -47,14 +47,6 @@ #include "up_arch.h" #include "teensy-3x.h" -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -88,3 +80,12 @@ void kinetis_boardinitialize(void) board_autoled_initialize(); #endif } + +#if defined(CONFIG_BOARD_INITIALIZE) +void board_initialize(void) +{ +#if defined(CONFIG_KINETIS_I2C0) || defined(CONFIG_KINETIS_I2C1) + kinetis_i2cdev_initialize(); +#endif +} +#endif diff --git a/configs/teensy-3.x/src/k20_i2c.c b/configs/teensy-3.x/src/k20_i2c.c new file mode 100644 index 0000000000000000000000000000000000000000..76cc8e884aa7bd485f0d41e3c120d36f08965ccf --- /dev/null +++ b/configs/teensy-3.x/src/k20_i2c.c @@ -0,0 +1,88 @@ +/**************************************************************************** + * configs/teensy-3.x/src/k20_i2c.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Matias v01d + * + * 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 "up_arch.h" +#include "chip.h" +#include "kinetis.h" +#include "kinetis_i2c.h" +#include "teensy-3x.h" + +#if defined(CONFIG_KINETIS_I2C0) || defined(CONFIG_KINETIS_I2C1) + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: kinetis_i2cdev_initialize + * + * Description: + * Called to configure I2C + * + ************************************************************************************/ + +void kinetis_i2cdev_initialize(void) +{ + i2c_dev = NULL; + +#if defined(CONFIG_KINETIS_I2C0) + i2c_dev = kinetis_i2cbus_initialize(0); +#if defined(CONFIG_I2C_DRIVER) + i2c_register(i2c_dev, 0); +#endif +#endif + +#if defined(CONFIG_KINETIS_I2C1) + i2c_dev = kinetis_i2cbus_initialize(1); +#if defined(CONFIG_I2C_DRIVER) + i2c_register(i2c_dev, 1); +#endif +#endif +} + +#endif /* CONFIG_KINETIS_I2C0 || CONFIG_KINETIS_I2C1 */ diff --git a/configs/teensy-3.x/src/teensy-3x.h b/configs/teensy-3.x/src/teensy-3x.h index 0e0b16b25994f2df95923de5a73094567369f3ed..030ac3d2cd624a277456b3d6fdcc3d5e391b7d75 100644 --- a/configs/teensy-3.x/src/teensy-3x.h +++ b/configs/teensy-3.x/src/teensy-3x.h @@ -44,6 +44,7 @@ #include #include #include +#include /************************************************************************************ * Pre-processor Definitions @@ -76,6 +77,8 @@ * Public data ************************************************************************************/ +FAR struct i2c_master_s* i2c_dev; + #ifndef __ASSEMBLY__ /************************************************************************************ @@ -92,6 +95,16 @@ extern void weak_function kinetis_spidev_initialize(void); +/************************************************************************************ + * Name: kinetis_i2cdev_initialize + * + * Description: + * Called to configure I2C + * + ************************************************************************************/ + +void kinetis_i2cdev_initialize(void); + /************************************************************************************ * Name: kinetis_usbinitialize * diff --git a/configs/teensy-3.x/usbnsh/Make.defs b/configs/teensy-3.x/usbnsh/Make.defs index e750c7b5705ca3cdac18a414d18db70c03e91bff..0d0d0dfa56a9f4dfb34165eef0a055927ca72328 100644 --- a/configs/teensy-3.x/usbnsh/Make.defs +++ b/configs/teensy-3.x/usbnsh/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/teensy-3.x/usbnsh/defconfig b/configs/teensy-3.x/usbnsh/defconfig index 8918783e5d9710b933d8e9173a6a122264059970..ad8e9f149d78d5a3e7227a7a1f6a3f6455571ab7 100644 --- a/configs/teensy-3.x/usbnsh/defconfig +++ b/configs/teensy-3.x/usbnsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/teensy-lc/nsh/Make.defs b/configs/teensy-lc/nsh/Make.defs index f70645f9e8fad2842f60911b6ed9b3e2f9d8f64e..aa08be609c3bafc183ebe9bff4b9496ab8123c2b 100644 --- a/configs/teensy-lc/nsh/Make.defs +++ b/configs/teensy-lc/nsh/Make.defs @@ -72,7 +72,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/teensy-lc/nsh/defconfig b/configs/teensy-lc/nsh/defconfig index a9e30375cf58c142a20dbe85d2e537a017ece563..6b14248f1fa7313ada279b7a1b10384114c9c25f 100644 --- a/configs/teensy-lc/nsh/defconfig +++ b/configs/teensy-lc/nsh/defconfig @@ -62,7 +62,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/tm4c123g-launchpad/nsh/Make.defs b/configs/tm4c123g-launchpad/nsh/Make.defs index c297559d64fbd9f5ee35dac0827049f5edabb4c7..9414fd49837c161d935167707e5e557146994d74 100644 --- a/configs/tm4c123g-launchpad/nsh/Make.defs +++ b/configs/tm4c123g-launchpad/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/tm4c123g-launchpad/nsh/defconfig b/configs/tm4c123g-launchpad/nsh/defconfig index 34f15d30638ad0aea901a42e96ec45254ade66f0..2b1fff6606863284b9ae9ee0e3717cb6756b30f5 100644 --- a/configs/tm4c123g-launchpad/nsh/defconfig +++ b/configs/tm4c123g-launchpad/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/tm4c1294-launchpad/ipv6/Make.defs b/configs/tm4c1294-launchpad/ipv6/Make.defs index 13fa06838c28b7940d16281f39b0a81e9869d97c..286f00894f84a56cb920ef69f235bf5fd9abafc5 100644 --- a/configs/tm4c1294-launchpad/ipv6/Make.defs +++ b/configs/tm4c1294-launchpad/ipv6/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/tm4c1294-launchpad/ipv6/defconfig b/configs/tm4c1294-launchpad/ipv6/defconfig index 4676156316d131d5b744f2ea482eca7c78d659bf..703b7c92a94d5f6d4311aadbd3ef0ba8dec039d6 100644 --- a/configs/tm4c1294-launchpad/ipv6/defconfig +++ b/configs/tm4c1294-launchpad/ipv6/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/tm4c1294-launchpad/nsh/Make.defs b/configs/tm4c1294-launchpad/nsh/Make.defs index bb91d3bb86c0e3390c3ba03cf541d15920a5152f..a3773d93004dd7239fca3201eeecd0b23bd57883 100644 --- a/configs/tm4c1294-launchpad/nsh/Make.defs +++ b/configs/tm4c1294-launchpad/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/tm4c1294-launchpad/nsh/defconfig b/configs/tm4c1294-launchpad/nsh/defconfig index 8457971387b83053e0f3547ffae7680070773074..a26e9d5f1b3b05e2f0ef33a010cac5a5740ed8cc 100644 --- a/configs/tm4c1294-launchpad/nsh/defconfig +++ b/configs/tm4c1294-launchpad/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/tm4c1294-launchpad/src/tm4c_appinit.c b/configs/tm4c1294-launchpad/src/tm4c_appinit.c index 2245ac31e9eb3f9ab791834dcba96813f26b7328..747c1f20df3e22f6903d116a81950e599c14a41c 100644 --- a/configs/tm4c1294-launchpad/src/tm4c_appinit.c +++ b/configs/tm4c1294-launchpad/src/tm4c_appinit.c @@ -43,6 +43,8 @@ #include "tm4c1294-launchpad.h" +#ifdef CONFIG_LIB_BOARDCTL + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -84,3 +86,27 @@ int board_app_initialize(uintptr_t arg) return OK; #endif } + +/**************************************************************************** + * Name: board_pwm_setup + * + * Description: + * No implementation for now, it's called by PWM tool via boardctl(). + * See include/nuttx/board.h + * + * Input Parameters: + * None. + * + * Returned Value: + * Zero on Success. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARDCTL_PWMTEST +int board_pwm_setup(void) +{ + return OK; +} +#endif /* CONFIG_BOARDCTL_PWMTEST */ + +#endif /* CONFIG_LIB_BOARDCTL */ diff --git a/configs/tm4c1294-launchpad/src/tm4c_bringup.c b/configs/tm4c1294-launchpad/src/tm4c_bringup.c index 9c8a60f2b432c97ed19e7824b0b3cc6a6b90f5af..8031a8687d103a410ab3729d56d20cd3b06843e1 100644 --- a/configs/tm4c1294-launchpad/src/tm4c_bringup.c +++ b/configs/tm4c1294-launchpad/src/tm4c_bringup.c @@ -39,12 +39,17 @@ #include +#include +#include #include #include #include +#include + #include "tiva_i2c.h" +#include "tiva_pwm.h" #include "tm4c1294-launchpad.h" /**************************************************************************** @@ -55,6 +60,13 @@ # define HAVE_TIMER #endif +#ifdef CONFIG_TM4C1294_LAUNCHPAD_PWM +# define HAVE_PWM +#endif + +#define PWM_PATH_FMT "/dev/pwm%d" +#define PWM_PATH_FMTLEN (10) + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -136,6 +148,83 @@ static void tm4c_i2ctool(void) # define tm4c_i2ctool() #endif +/**************************************************************************** +* Name: tm4c_pwm_register +* +* Description: +* Register a PWM dev file with the upper_level PWM driver. +* +* Input Parameters: +* channel - A number identifying the PWM channel use. +* +* Returned Value: +* None. +* +****************************************************************************/ + +#ifdef HAVE_PWM +void tm4c_pwm_register(int channel) +{ + FAR struct pwm_lowerhalf_s *dev; + int ret; + char pwm_path[PWM_PATH_FMTLEN]; + + dev = tiva_pwm_initialize(channel); + if (dev == NULL) + { + pwmerr("ERROR: Failed to get PWM%d interface\n", channel); + } + else + { + snprintf(pwm_path, PWM_PATH_FMTLEN, PWM_PATH_FMT, channel); + ret = pwm_register(pwm_path, dev); + if (ret < 0) + { + pwmerr("ERROR: Failed to register PWM%d driver: %d\n", + channel, ret); + } + } +} +#endif + +/**************************************************************************** + * Name: tm4c_pwm + * + * Description: + * Register PWM drivers for the PWM tool. + * + ****************************************************************************/ + +#ifdef HAVE_PWM +static void tm4c_pwm(void) +{ +#ifdef CONFIG_TIVA_PWM0_CHAN0 + tm4c_pwm_register(0); +#endif +#ifdef CONFIG_TIVA_PWM0_CHAN1 + tm4c_pwm_register(1); +#endif +#ifdef CONFIG_TIVA_PWM0_CHAN2 + tm4c_pwm_register(2); +#endif +#ifdef CONFIG_TIVA_PWM0_CHAN3 + tm4c_pwm_register(3); +#endif +#ifdef CONFIG_TIVA_PWM0_CHAN4 + tm4c_pwm_register(4); +#endif +#ifdef CONFIG_TIVA_PWM0_CHAN5 + tm4c_pwm_register(5); +#endif +#ifdef CONFIG_TIVA_PWM0_CHAN6 + tm4c_pwm_register(6); +#endif +#ifdef CONFIG_TIVA_PWM0_CHAN7 + tm4c_pwm_register(7); +#endif +} +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -158,6 +247,12 @@ int tm4c_bringup(void) tm4c_i2ctool(); +#ifdef HAVE_PWM + /* Register PWM drivers */ + + tm4c_pwm(); +#endif + #ifdef HAVE_TIMER /* Initialize the timer driver */ diff --git a/configs/twr-k60n512/nsh/Make.defs b/configs/twr-k60n512/nsh/Make.defs index e002cca1a053466b45471b88570eb6b02389cb6d..948929aca67f69fac43c168be2328a4109d490dd 100644 --- a/configs/twr-k60n512/nsh/Make.defs +++ b/configs/twr-k60n512/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/twr-k60n512/nsh/defconfig b/configs/twr-k60n512/nsh/defconfig index 05df6f831e89b6ab3e3536f8722fc7526517d750..49bc1c331cd7b47b583da37a21a310224c176b49 100644 --- a/configs/twr-k60n512/nsh/defconfig +++ b/configs/twr-k60n512/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/u-blox-c027/nsh/Make.defs b/configs/u-blox-c027/nsh/Make.defs index 7d08bc556877703992488bef48ed7407c29d4345..938059a6f98f0d3c12f5cbebde9dc4bea42816b6 100644 --- a/configs/u-blox-c027/nsh/Make.defs +++ b/configs/u-blox-c027/nsh/Make.defs @@ -74,7 +74,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/u-blox-c027/nsh/defconfig b/configs/u-blox-c027/nsh/defconfig index 79f246bc6f8b3d31fbf40e35e8510fdc6ceb189b..944ede078b333fb5ea94ad3410317415ecf5bc99 100644 --- a/configs/u-blox-c027/nsh/defconfig +++ b/configs/u-blox-c027/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/ubw32/nsh/Make.defs b/configs/ubw32/nsh/Make.defs index 236169bdca8474c5bb82e015bca61c2bde9cf9fe..27398b70bccde17ed8e13821a9145fd4318b765e 100644 --- a/configs/ubw32/nsh/Make.defs +++ b/configs/ubw32/nsh/Make.defs @@ -71,7 +71,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/ubw32/nsh/defconfig b/configs/ubw32/nsh/defconfig index bb425839734e2293a81cc6ba4ef390654bd4d52a..aec162d0a1c3a951150b6b53436d8040b9f66039 100644 --- a/configs/ubw32/nsh/defconfig +++ b/configs/ubw32/nsh/defconfig @@ -64,7 +64,7 @@ CONFIG_DEBUG_FULLOPT=y # CONFIG_ARCH_HC is not set CONFIG_ARCH_MIPS=y # CONFIG_ARCH_RGMP is not set -# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/us7032evb1/README.txt b/configs/us7032evb1/README.txt index 7a94b1af06c2cf5f872e0f9fa99e2f339d1b00c7..15efbddfe0003139768dbdc800942748f7e080c8 100644 --- a/configs/us7032evb1/README.txt +++ b/configs/us7032evb1/README.txt @@ -110,9 +110,9 @@ specific to the SH-1 Architecture selection CONFIG_ARCH - identifies the arch subdirectory and, hence, the - processor architecture. This should be sh (for arch/sh) + processor architecture. This should be renesas (for arch/renesas) CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory. - This should be sh1 (for arch/sh/src/sh1 and arch/sh/include/sh1) + This should be sh1 (for arch/renesas/src/sh1 and arch/renesas/include/sh1) CONFIG_ARCH_SH1 and CONFIG_ARCH_CHIP_SH7032 - for use in C code. These identify the particular chip or SoC that the architecture is implemented in. diff --git a/configs/us7032evb1/nsh/defconfig b/configs/us7032evb1/nsh/defconfig index e87a5da115d0df6ecc7cf7ba887e0f13d9962b34..1744ab6fb3b93131040c74f3dee7c8d352b06e35 100644 --- a/configs/us7032evb1/nsh/defconfig +++ b/configs/us7032evb1/nsh/defconfig @@ -54,12 +54,12 @@ CONFIG_DEBUG_FULLOPT=y # CONFIG_ARCH_HC is not set # CONFIG_ARCH_MIPS is not set # CONFIG_ARCH_RGMP is not set -CONFIG_ARCH_SH=y +CONFIG_ARCH_RENESAS=y # 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="sh" +CONFIG_ARCH="renesas" CONFIG_ARCH_CHIP="sh1" CONFIG_ARCH_CHIP_SH7032=y # CONFIG_ARCH_CHIP_M30262F8 is not set diff --git a/configs/us7032evb1/ostest/defconfig b/configs/us7032evb1/ostest/defconfig index 0c8a86314e24a6d2a515db0a73c86a1467667b11..4b2fe31023e1c828d7f7e140c70ef8c810e12aca 100644 --- a/configs/us7032evb1/ostest/defconfig +++ b/configs/us7032evb1/ostest/defconfig @@ -54,12 +54,12 @@ CONFIG_DEBUG_FULLOPT=y # CONFIG_ARCH_HC is not set # CONFIG_ARCH_MIPS is not set # CONFIG_ARCH_RGMP is not set -CONFIG_ARCH_SH=y +CONFIG_ARCH_RENESAS=y # 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="sh" +CONFIG_ARCH="renesas" CONFIG_ARCH_CHIP="sh1" CONFIG_ARCH_CHIP_SH7032=y # CONFIG_ARCH_CHIP_M30262F8 is not set diff --git a/configs/viewtool-stm32f107/highpri/Make.defs b/configs/viewtool-stm32f107/highpri/Make.defs index 485e163139d427d41b17ecd1db1d582059fb5767..ba912c3b509fa82bb779ef3e9bdf0fc802bd94a4 100644 --- a/configs/viewtool-stm32f107/highpri/Make.defs +++ b/configs/viewtool-stm32f107/highpri/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/viewtool-stm32f107/highpri/defconfig b/configs/viewtool-stm32f107/highpri/defconfig index 1799fad74c9c9d0cce7fefedf217d2bdbac6c6ba..be27c3afcf975729549a660179dc2391182bb3c4 100644 --- a/configs/viewtool-stm32f107/highpri/defconfig +++ b/configs/viewtool-stm32f107/highpri/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -423,6 +423,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set @@ -548,6 +550,7 @@ CONFIG_ARCH_BUTTONS=y CONFIG_VIEWTOOL_HIGHPRI=y CONFIG_VIEWTOOL_TIM6_FREQUENCY=36000000 CONFIG_VIEWTOOL_TIM6_PERIOD=36000 +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -563,9 +566,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 CONFIG_START_MONTH=12 @@ -663,6 +669,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -678,6 +685,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -691,7 +699,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -765,8 +778,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -781,6 +796,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -892,6 +908,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -913,7 +930,6 @@ CONFIG_ARCH_HAVE_TLS=y # 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_ELF is not set # CONFIG_EXAMPLES_FTPC is not set @@ -939,10 +955,9 @@ CONFIG_ARCH_HAVE_TLS=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_POLL is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1018,7 +1033,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/viewtool-stm32f107/netnsh/Make.defs b/configs/viewtool-stm32f107/netnsh/Make.defs index d36b783357972afac0817a01c115177cf3168be7..0a39dda71c7bca5057eda66cbb00b92600df376e 100644 --- a/configs/viewtool-stm32f107/netnsh/Make.defs +++ b/configs/viewtool-stm32f107/netnsh/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/viewtool-stm32f107/netnsh/defconfig b/configs/viewtool-stm32f107/netnsh/defconfig index a86887820401597553349ff72d80f6971052d56b..67ffa627f6abaf301c11a66c2039e34ed6eb1215 100644 --- a/configs/viewtool-stm32f107/netnsh/defconfig +++ b/configs/viewtool-stm32f107/netnsh/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -340,7 +340,7 @@ 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_TIM8 is not set # CONFIG_STM32_HAVE_TIM9 is not set # CONFIG_STM32_HAVE_TIM10 is not set # CONFIG_STM32_HAVE_TIM11 is not set @@ -396,7 +396,6 @@ CONFIG_STM32_PWR=y # 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 @@ -422,11 +421,12 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set # CONFIG_STM32_TIM5_CAP is not set -# CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y CONFIG_STM32_SERIALDRIVER=y @@ -560,11 +560,11 @@ CONFIG_ARCH_HAVE_LEDS=y CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y # CONFIG_ARCH_BUTTONS is not set -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -580,9 +580,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2009 CONFIG_START_MONTH=9 @@ -680,6 +683,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -695,6 +699,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -708,7 +713,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -824,8 +834,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -840,6 +852,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -1071,6 +1084,7 @@ CONFIG_NETDB_DNSSERVER_NOADDR=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -1096,7 +1110,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # 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 @@ -1124,9 +1137,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1250,7 +1263,6 @@ 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 @@ -1274,6 +1286,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1350,7 +1363,7 @@ CONFIG_NSH_IOBUFFER_SIZE=512 # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/viewtool-stm32f107/nsh/Make.defs b/configs/viewtool-stm32f107/nsh/Make.defs index 55c08e0406d2287c4c0fccdad03914c4bc14bce2..39eaa39e1786c013d36366a916528cdb7a8b37ff 100644 --- a/configs/viewtool-stm32f107/nsh/Make.defs +++ b/configs/viewtool-stm32f107/nsh/Make.defs @@ -80,7 +80,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/viewtool-stm32f107/nsh/defconfig b/configs/viewtool-stm32f107/nsh/defconfig index ecb91533d6a6257326650e738442390b9543e70f..8de03f07146a7aedfd4687ea8d7c58dc96ca0d9d 100644 --- a/configs/viewtool-stm32f107/nsh/defconfig +++ b/configs/viewtool-stm32f107/nsh/defconfig @@ -66,7 +66,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set @@ -340,7 +340,7 @@ 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_TIM8 is not set # CONFIG_STM32_HAVE_TIM9 is not set # CONFIG_STM32_HAVE_TIM10 is not set # CONFIG_STM32_HAVE_TIM11 is not set @@ -396,7 +396,6 @@ CONFIG_STM32_PWR=y # 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 @@ -421,11 +420,12 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # # Timer Configuration # +# CONFIG_STM32_ONESHOT is not set +# CONFIG_STM32_FREERUN is not set # CONFIG_STM32_TIM1_CAP is not set # CONFIG_STM32_TIM3_CAP is not set # CONFIG_STM32_TIM4_CAP is not set # CONFIG_STM32_TIM5_CAP is not set -# CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y CONFIG_STM32_SERIALDRIVER=y @@ -541,11 +541,11 @@ CONFIG_ARCH_HAVE_LEDS=y CONFIG_ARCH_LEDS=y CONFIG_ARCH_HAVE_BUTTONS=y CONFIG_ARCH_BUTTONS=y -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_LIB_BOARDCTL is not set # @@ -561,9 +561,12 @@ CONFIG_DISABLE_OS_API=y # # Clocks and Timers # +CONFIG_ARCH_HAVE_TICKLESS=y +# CONFIG_SCHED_TICKLESS is not set CONFIG_USEC_PER_TICK=10000 # CONFIG_SYSTEM_TIME64 is not set # CONFIG_CLOCK_MONOTONIC is not set +CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2009 CONFIG_START_MONTH=9 @@ -661,6 +664,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # CONFIG_DISABLE_POLL is not set CONFIG_DEV_NULL=y # CONFIG_DEV_ZERO is not set +# CONFIG_DEV_URANDOM is not set # CONFIG_DEV_LOOP is not set # @@ -676,6 +680,7 @@ CONFIG_DEV_NULL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI is not set +CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_I2S is not set # @@ -689,7 +694,12 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set + +# +# IO Expander/GPIO Support +# # CONFIG_IOEXPANDER is not set +# CONFIG_DEV_GPIO is not set # # LCD Driver Support @@ -763,8 +773,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_USART1_IFLOWCONTROL is not set # CONFIG_USART1_OFLOWCONTROL is not set # CONFIG_USART1_DMA is not set +# CONFIG_PSEUDOTERM is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set +# CONFIG_HAVE_USBTRACE is not set # CONFIG_DRIVERS_WIRELESS is not set # @@ -779,6 +791,7 @@ CONFIG_SYSLOG_SERIAL_CONSOLE=y CONFIG_SYSLOG_CONSOLE=y # CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set +# CONFIG_SYSLOG_CHARDEV is not set # # Networking Support @@ -891,6 +904,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_LIB_CRC64_FAST is not set # CONFIG_LIB_KBDCODEC is not set # CONFIG_LIB_SLCDCODEC is not set +# CONFIG_LIB_HEX2BIN is not set # # Basic CXX Support @@ -917,7 +931,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # 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_ELF is not set # CONFIG_EXAMPLES_FTPC is not set @@ -943,9 +956,9 @@ CONFIG_EXAMPLES_NSH=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_POSIXSPAWN is not set # CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -1051,7 +1064,6 @@ 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 @@ -1073,6 +1085,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_USLEEP is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options @@ -1113,7 +1126,7 @@ CONFIG_NSH_CONSOLE=y # CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_HEX2BIN 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 diff --git a/configs/xtrs/nsh/defconfig b/configs/xtrs/nsh/defconfig index 13aa287939f80ae249e0ad242d7c6e8388392714..8bf05716eb3e1c3c8b0e1fbdacd4861e156c3b4a 100644 --- a/configs/xtrs/nsh/defconfig +++ b/configs/xtrs/nsh/defconfig @@ -54,7 +54,7 @@ CONFIG_WINDOWS_NATIVE=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/xtrs/ostest/defconfig b/configs/xtrs/ostest/defconfig index c20eb517ce6123688787a49cdcddded1bd7d4053..178cf58462e95097a0595e33d65ed454fb35163b 100644 --- a/configs/xtrs/ostest/defconfig +++ b/configs/xtrs/ostest/defconfig @@ -54,7 +54,7 @@ CONFIG_WINDOWS_NATIVE=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/xtrs/pashello/defconfig b/configs/xtrs/pashello/defconfig index b3fd7fdd938eb16d89a635333157accfaafecb67..218a91f1c96a60b134263f14036f0cd294fb28cf 100644 --- a/configs/xtrs/pashello/defconfig +++ b/configs/xtrs/pashello/defconfig @@ -54,7 +54,7 @@ CONFIG_WINDOWS_NATIVE=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/z16f2800100zcog/nsh/defconfig b/configs/z16f2800100zcog/nsh/defconfig index 78c315af00107a0374c6808c41658b7da7d5b504..3c2af0733f879cc7252aacf744ee6b164fad5e4c 100644 --- a/configs/z16f2800100zcog/nsh/defconfig +++ b/configs/z16f2800100zcog/nsh/defconfig @@ -63,7 +63,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set CONFIG_ARCH_Z16=y diff --git a/configs/z16f2800100zcog/ostest/defconfig b/configs/z16f2800100zcog/ostest/defconfig index be9dc28597288f94e3235a442f0bc9efa5f130f4..10554e2b38a347a3f176345fdae30278275cc2fe 100644 --- a/configs/z16f2800100zcog/ostest/defconfig +++ b/configs/z16f2800100zcog/ostest/defconfig @@ -63,7 +63,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set CONFIG_ARCH_Z16=y diff --git a/configs/z16f2800100zcog/pashello/defconfig b/configs/z16f2800100zcog/pashello/defconfig index cc0ad6952d22e9c6f7aeb90d5f7db9a10e06bf25..984a060075dcf5f38e86f268a0eec663435bf649 100644 --- a/configs/z16f2800100zcog/pashello/defconfig +++ b/configs/z16f2800100zcog/pashello/defconfig @@ -70,7 +70,7 @@ CONFIG_WINDOWS_CYGWIN=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set CONFIG_ARCH_Z16=y diff --git a/configs/z80sim/nsh/defconfig b/configs/z80sim/nsh/defconfig index 97413cca42c2fd34d97d3daa2e64ed726f28040d..d7ee01a879e68a71ac7b2e494748a74f99d992d9 100644 --- a/configs/z80sim/nsh/defconfig +++ b/configs/z80sim/nsh/defconfig @@ -54,7 +54,7 @@ CONFIG_WINDOWS_NATIVE=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/z80sim/ostest/defconfig b/configs/z80sim/ostest/defconfig index 1e9c2f2185f915c88c7f513f0b76403be3bec649..f0f1fa906deedc832187ca68a97e4feb3d5e0db4 100644 --- a/configs/z80sim/ostest/defconfig +++ b/configs/z80sim/ostest/defconfig @@ -54,7 +54,7 @@ CONFIG_WINDOWS_NATIVE=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/z80sim/pashello/defconfig b/configs/z80sim/pashello/defconfig index 5215e22846a00452e2f0e8045d5cedf464ec2db2..b4916a226979f2b695070b7d42c1d502280fd04e 100644 --- a/configs/z80sim/pashello/defconfig +++ b/configs/z80sim/pashello/defconfig @@ -54,7 +54,7 @@ CONFIG_WINDOWS_NATIVE=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/z8encore000zco/ostest/defconfig b/configs/z8encore000zco/ostest/defconfig index 19532ebf970604b1c18ea57fe745c5216a86d554..c1c37025548e9548361a17aace71eb47de63a0d5 100644 --- a/configs/z8encore000zco/ostest/defconfig +++ b/configs/z8encore000zco/ostest/defconfig @@ -63,7 +63,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/z8f64200100kit/ostest/defconfig b/configs/z8f64200100kit/ostest/defconfig index cec4ac76ed0475e2c72c18245b44ddb63a3b5137..896db3448d9557883cda4286434ea00c5377ec29 100644 --- a/configs/z8f64200100kit/ostest/defconfig +++ b/configs/z8f64200100kit/ostest/defconfig @@ -63,7 +63,7 @@ CONFIG_DEBUG_FULLOPT=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/zkit-arm-1769/hello/Make.defs b/configs/zkit-arm-1769/hello/Make.defs index 102dbfe1c4b8f66d3539912f9a0b8653e632282d..c1e800774275a669f9332755fa0c9de55e3472ec 100644 --- a/configs/zkit-arm-1769/hello/Make.defs +++ b/configs/zkit-arm-1769/hello/Make.defs @@ -84,7 +84,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/zkit-arm-1769/hello/defconfig b/configs/zkit-arm-1769/hello/defconfig index a1607725f37975b639a963132a3de3ee425079bb..eb65f867f3e626ceef186677b29567ca179aa4e6 100644 --- a/configs/zkit-arm-1769/hello/defconfig +++ b/configs/zkit-arm-1769/hello/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/zkit-arm-1769/nsh/Make.defs b/configs/zkit-arm-1769/nsh/Make.defs index c53eade8a423cb3e9028cbc9a7e2cddacb6e654d..d8a9f5a1f6955c416120b9c6d04519351ae3a361 100644 --- a/configs/zkit-arm-1769/nsh/Make.defs +++ b/configs/zkit-arm-1769/nsh/Make.defs @@ -84,7 +84,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/zkit-arm-1769/nsh/defconfig b/configs/zkit-arm-1769/nsh/defconfig index 49c46598bbf1e1a6d0ce364c8645e1d1571d42c3..14a6d97e0466dbb2162d8eace4b5e6ba89f85af4 100644 --- a/configs/zkit-arm-1769/nsh/defconfig +++ b/configs/zkit-arm-1769/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/zkit-arm-1769/nxhello/Make.defs b/configs/zkit-arm-1769/nxhello/Make.defs index ae83d3bf59e4a7b0ef5e22edb060a6d64ef99d0e..18df46e580473ed583af637076dbdd75e8522706 100644 --- a/configs/zkit-arm-1769/nxhello/Make.defs +++ b/configs/zkit-arm-1769/nxhello/Make.defs @@ -84,7 +84,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/zkit-arm-1769/nxhello/defconfig b/configs/zkit-arm-1769/nxhello/defconfig index 9e98eedc88d84664fbbb13b4502515fe694a5995..1564d958038db0459ede74bdfb1bf6225696a8c0 100644 --- a/configs/zkit-arm-1769/nxhello/defconfig +++ b/configs/zkit-arm-1769/nxhello/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/zkit-arm-1769/thttpd/Make.defs b/configs/zkit-arm-1769/thttpd/Make.defs index a11c2868e8066d90803f38288ecddf43a167b904..018ce9ba7ad0f5622e5de5ab672b2c62d482ea98 100644 --- a/configs/zkit-arm-1769/thttpd/Make.defs +++ b/configs/zkit-arm-1769/thttpd/Make.defs @@ -84,7 +84,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/configs/zkit-arm-1769/thttpd/defconfig b/configs/zkit-arm-1769/thttpd/defconfig index b9829c43feeb8d5ed35fb8159639c3e418e3d421..eba94893056b1396d588ed4ab99984dbcbff1c39 100644 --- a/configs/zkit-arm-1769/thttpd/defconfig +++ b/configs/zkit-arm-1769/thttpd/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/zp214xpa/nsh/Make.defs b/configs/zp214xpa/nsh/Make.defs index 4e6db0acdc8bf50d63089e93b54decc23aefa648..aa76faf4f3b08c7486b4b3efe48bc3b1aeb4af86 100644 --- a/configs/zp214xpa/nsh/Make.defs +++ b/configs/zp214xpa/nsh/Make.defs @@ -86,7 +86,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/zp214xpa/nsh/defconfig b/configs/zp214xpa/nsh/defconfig index 54d6a26c8f24fcd21f4b00564b0923d2c3141900..60c6a1e69f0e73890330dcbfa998e4d9778e8597 100644 --- a/configs/zp214xpa/nsh/defconfig +++ b/configs/zp214xpa/nsh/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/configs/zp214xpa/nxlines/Make.defs b/configs/zp214xpa/nxlines/Make.defs index 75b8a40e0c07705a5e421a65b36cb551f36c9708..e86090ca97f750189d3ad05f250f29505523b966 100644 --- a/configs/zp214xpa/nxlines/Make.defs +++ b/configs/zp214xpa/nxlines/Make.defs @@ -86,7 +86,7 @@ else endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/configs/zp214xpa/nxlines/defconfig b/configs/zp214xpa/nxlines/defconfig index 6754cfcc3209d8de67b864e5b435c0683aab732d..fc721d2aa32bc64e938715c9a8491223ea55b653 100644 --- a/configs/zp214xpa/nxlines/defconfig +++ b/configs/zp214xpa/nxlines/defconfig @@ -61,7 +61,7 @@ CONFIG_ARCH_ARM=y # 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_RENESAS is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set # CONFIG_ARCH_Z16 is not set diff --git a/drivers/Kconfig b/drivers/Kconfig index c3ef7aa49aff3fcf8b1700c7a274f51d46fe1758..9b508fdd7fa7f029dc3a2d788178409aba7fff5e 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -595,4 +595,13 @@ menuconfig DRIVERS_WIRELESS Drivers for various wireless devices. source drivers/wireless/Kconfig + +menuconfig DRIVERS_CONTACTLESS + bool "Contactless Device Support" + default n + ---help--- + Drivers for various contactless devices. + +source drivers/contactless/Kconfig + source drivers/syslog/Kconfig diff --git a/drivers/Makefile b/drivers/Makefile index fefb6a718b546e1efe4d2b30d501779950cccf5d..daac4cd18c172b719f49d5acda2beae35241cb1a 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -76,6 +76,7 @@ include usbhost$(DELIM)Make.defs include usbmonitor$(DELIM)Make.defs include video$(DELIM)Make.defs include wireless$(DELIM)Make.defs +include contactless$(DELIM)Make.defs ifneq ($(CONFIG_NFILE_DESCRIPTORS),0) CSRCS += dev_null.c dev_zero.c diff --git a/drivers/README.txt b/drivers/README.txt index a76c0e3434ff372ba7547d7586bbc26261353fe4..fbb13ce25d77c80a8e3c040a302f174e8284cfa3 100644 --- a/drivers/README.txt +++ b/drivers/README.txt @@ -55,6 +55,11 @@ bch/ performed by loop.c. See include/nuttx/fs/fs.h for registration information. +contactless/ + Contactless devices are related to wireless devices. They are not + communication devices with other similar peers, but couplers/interfaces + to contactless cards and tags. + eeprom/ An EEPROM is a form of Memory Technology Device (see drivers/mtd). EEPROMs are non-volatile memory like FLASH, but differ in underlying diff --git a/drivers/analog/ad5410.c b/drivers/analog/ad5410.c index 5aeede163ce771b97b8020419a716f82cbf83b90..1608fc0689fe5cf0570e94ebd72b33634a78ff4f 100644 --- a/drivers/analog/ad5410.c +++ b/drivers/analog/ad5410.c @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * arch/drivers/analog/ad5410.c * * Copyright (C) 2010, 2016 Gregory Nutt. All rights reserved. @@ -37,7 +37,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************************************/ + ****************************************************************************/ #include diff --git a/drivers/analog/ads1255.c b/drivers/analog/ads1255.c index 75b256cf16276b6d9b6628426263e895adb25dc9..30810c2f69f2ac01f65714e4276091e48e45d7b6 100644 --- a/drivers/analog/ads1255.c +++ b/drivers/analog/ads1255.c @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * arch/drivers/analog/ads1255.c * * Copyright (C) 2010, 2016 Gregory Nutt. All rights reserved. @@ -37,7 +37,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************************************/ + ****************************************************************************/ /**************************************************************************** * Included Files diff --git a/drivers/analog/dac.c b/drivers/analog/dac.c index daf8b5f34a458b244998b1b7582af7faae11286a..fbbc7618334ebebfe57754200775daaee7a2136f 100644 --- a/drivers/analog/dac.c +++ b/drivers/analog/dac.c @@ -478,6 +478,7 @@ static int dac_ioctl(FAR struct file *filep, int cmd, unsigned long arg) int dac_txdone(FAR struct dac_dev_s *dev) { int ret = -ENOENT; + int sval; /* Verify that the xmit FIFO is not empty */ @@ -497,7 +498,11 @@ int dac_txdone(FAR struct dac_dev_s *dev) { /* Inform any waiting threads that new xmit space is available */ - ret = sem_post(&dev->ad_xmit.af_sem); + ret = sem_getvalue(&dev->ad_xmit.af_sem, &sval); + if (ret == OK && sval <= 0) + { + ret = sem_post(&dev->ad_xmit.af_sem); + } } } diff --git a/drivers/audio/Kconfig b/drivers/audio/Kconfig index 81c247a64200c4d018efb5a6f4c3cb41e5fe600f..20664dbe2b3aac0775e7439da2f854eb79c831bf 100644 --- a/drivers/audio/Kconfig +++ b/drivers/audio/Kconfig @@ -33,7 +33,18 @@ config AUDIO_I2SCHAR_TXTIMEOUT transfers. This is in units of system clock ticks (configurable). The special value of zero disables RX timeouts. Default: 0 -endif #AUDIO_I2SCHAR +endif # AUDIO_I2SCHAR + +config AUDIO_TONE + bool "Audio Tone Generator using PWM" + default n + depends on PWM && AUDIO_DEVICES + ---help--- + This driver enables the Audio Tone Generator for NuttX. + +if AUDIO_TONE + +endif # AUDIO_TONE config VS1053 bool "VS1053 codec chip" diff --git a/drivers/audio/Make.defs b/drivers/audio/Make.defs index f645deade79368faca5f2440f92409e6e5215bef..5932714f6d68d9570376441e93d97bb798f5276b 100644 --- a/drivers/audio/Make.defs +++ b/drivers/audio/Make.defs @@ -62,6 +62,10 @@ ifeq ($(CONFIG_AUDIO_I2SCHAR),y) CSRCS += i2schar.c endif +ifeq ($(CONFIG_AUDIO_TONE),y) +CSRCS += tone.c +endif + # Include Audio driver support DEPPATH += --dep-path audio diff --git a/drivers/audio/tone.c b/drivers/audio/tone.c new file mode 100644 index 0000000000000000000000000000000000000000..93d5324e90224659218aeaa5dc4455933a2d91fa --- /dev/null +++ b/drivers/audio/tone.c @@ -0,0 +1,957 @@ +/**************************************************************************** + * drivers/audio/tone.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Alan Carvalho de Assis + * + * This driver is based on Tone Alarm driver from PX4 project. It was + * modified to become a NuttX driver and to use the Oneshot Timer API. + * + * The PX4 driver is here: + * https://github.com/PX4/Firmware/blob/master/src/drivers/stm32/tone_alarm/tone_alarm.cpp + * + * 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 +#include + +#include + +#ifdef CONFIG_AUDIO_TONE + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Define tone modes */ + +#define MODE_NORMAL 1 +#define MODE_LEGATO 2 +#define MODE_STACCATO 3 + +/* Max tune string length*/ + +#define MAX_TUNE_LEN (1 * 256) + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* This structure describes the state of the upper half driver */ + +struct tone_upperhalf_s +{ + uint8_t crefs; /* The number of times the device has been + * opened */ + volatile bool started; /* True: pulsed output is being generated */ + sem_t exclsem; /* Supports mutual exclusion */ + struct pwm_info_s tone; /* Pulsed output for Audio Tone */ + struct pwm_lowerhalf_s *devtone; + struct oneshot_lowerhalf_s *oneshot; +}; + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* Buffer to store the tune */ + +static char tune_buf[MAX_TUNE_LEN]; + +/* Semitone offsets from C for the characters 'A'-'G' */ + +static const uint8_t g_note_tab[] = { 9, 11, 0, 2, 4, 5, 7 }; + +/* Notes in Frequency */ + +static const uint16_t g_notes_freq[84] = +{ + 0x0041, 0x0045, 0x0049, 0x004d, 0x0052, 0x0057, 0x005c, + 0x0061, 0x0067, 0x006e, 0x0074, 0x007b, 0x0082, 0x008a, + 0x0092, 0x009b, 0x00a4, 0x00ae, 0x00b8, 0x00c3, 0x00cf, + 0x00dc, 0x00e9, 0x00f6, 0x0105, 0x0115, 0x0125, 0x0137, + 0x0149, 0x015d, 0x0171, 0x0187, 0x019f, 0x01b8, 0x01d2, + 0x01ed, 0x020b, 0x022a, 0x024b, 0x026e, 0x0293, 0x02ba, + 0x02e3, 0x030f, 0x033e, 0x0370, 0x03a4, 0x03db, 0x0416, + 0x0454, 0x0496, 0x04dc, 0x0526, 0x0574, 0x05c7, 0x061f, + 0x067d, 0x06e0, 0x0748, 0x07b7, 0x082d, 0x08a9, 0x092d, + 0x09b9, 0x0a4d, 0x0ae9, 0x0b8f, 0x0c3f, 0x0cfa, 0x0dc0, + 0x0e91, 0x0f6f, 0x105a, 0x1152, 0x125a, 0x1372, 0x149a, + 0x15d3, 0x171f, 0x187f, 0x19f4, 0x1b80, 0x1d22, 0x1ede +}; + +/* Global variable used by the tone generator */ + +static const char *g_tune; +static const char *g_next; +static uint8_t g_tempo; +static uint8_t g_note_mode; +static uint32_t g_note_length; +static uint32_t g_silence_length; +static uint8_t g_octave; +static bool g_repeat; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static int tone_open(FAR struct file *filep); +static int tone_close(FAR struct file *filep); +static ssize_t tone_read(FAR struct file *filep, FAR char *buffer, + size_t buflen); +static ssize_t tone_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen); + +static int next_char(void); +static uint8_t next_number(void); +static uint8_t next_dots(void); +static void next_note(FAR struct tone_upperhalf_s *upper); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const struct file_operations g_toneops = +{ + tone_open, /* open */ + tone_close, /* close */ + tone_read, /* read */ + tone_write, /* write */ + 0, /* seek */ + 0 /* ioctl */ +#ifndef CONFIG_DISABLE_POLL + , 0 /* poll */ +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , 0 /* unlink */ +#endif +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: oneshot_callback + ****************************************************************************/ + +static void oneshot_callback(FAR struct oneshot_lowerhalf_s *lower, + FAR void *arg) +{ + FAR struct tone_upperhalf_s *upper = (FAR struct tone_upperhalf_s *)arg; + + audinfo("Oneshot timer expired!\n"); + + /* Play the next note */ + + next_note(upper); +} + +/**************************************************************************** + * Name: note_duration + * + * Description: + * This function calculates the duration in microseconds of play and + * silence for a note given the current tempo, length and mode and the + * number of dots following in the play string. + * + ****************************************************************************/ + +static uint32_t note_duration(FAR uint32_t *silence, uint32_t note_length, + uint32_t dots) +{ + uint32_t whole_note_period = (60 * 1000000 * 4) / g_tempo; + uint32_t note_period; + uint32_t dot_extension; + + if (note_length == 0) + { + note_length = 1; + } + + note_period = whole_note_period / note_length; + + switch (g_note_mode) + { + case MODE_NORMAL: + *silence = note_period / 8; + break; + + case MODE_STACCATO: + *silence = note_period / 4; + break; + + case MODE_LEGATO: + *silence = 0; + break; + + default: + auderr("Mode undefined!\n"); + break; + } + + note_period -= *silence; + dot_extension = note_period / 2; + + while (dots--) + { + note_period += dot_extension; + dot_extension /= 2; + } + + return note_period; +} + +/**************************************************************************** + * Name: rest_duration + * + * Description: + * This function calculates the duration in microseconds of a rest + * corresponding to a given note length. + * + ****************************************************************************/ + +static uint32_t rest_duration(uint32_t rest_length, uint32_t dots) +{ + uint32_t whole_note_period = (60 * 1000000 * 4) / g_tempo; + uint32_t rest_period; + uint32_t dot_extension; + + if (rest_length == 0) + { + rest_length = 1; + } + + rest_period = whole_note_period / rest_length; + + dot_extension = rest_period / 2; + + while (dots--) + { + rest_period += dot_extension; + dot_extension /= 2; + } + + return rest_period; +} + +/**************************************************************************** + * Name: start_note + ****************************************************************************/ + +static void start_note(FAR struct tone_upperhalf_s *upper, uint8_t note) +{ + FAR struct pwm_lowerhalf_s *tone = upper->devtone; + + upper->tone.frequency = g_notes_freq[note - 1]; + upper->tone.duty = 50; + + tone->ops->start(tone, &upper->tone); + + return; +} + +/**************************************************************************** + * Name: stop_note + ****************************************************************************/ + +static void stop_note(FAR struct tone_upperhalf_s *upper) +{ + FAR struct pwm_lowerhalf_s *tone = upper->devtone; + + tone->ops->stop(tone); + + return; +} + +/**************************************************************************** + * Name: start_tune + * + * Description: + * This function starts playing the note. + * + ****************************************************************************/ + +static void start_tune(FAR struct tone_upperhalf_s *upper, const char *tune) +{ + FAR struct timespec ts; + + /* Kill any current playback */ + + ONESHOT_CANCEL(upper->oneshot, &ts); + + /* Record the tune */ + + g_tune = tune; + g_next = tune; + + /* Initialise player state */ + + g_tempo = 120; + g_note_length = 4; + g_note_mode = MODE_NORMAL; + g_octave = 4; + g_silence_length = 0; + g_repeat = false; + + /* Schedule a callback to start playing */ + + ts.tv_sec = 1; + ts.tv_nsec = 0; + + ONESHOT_START(upper->oneshot, oneshot_callback, upper, &ts); +} + +/**************************************************************************** + * Name: next_note + * + * Description: + * This function parses the next note out of the string and play it. + * + ****************************************************************************/ + +static void next_note(FAR struct tone_upperhalf_s *upper) +{ + uint32_t note; + uint32_t note_length; + uint32_t duration; + uint32_t sec; + uint32_t nsec; + FAR struct timespec ts; + + /* Do we have an inter-note gap to wait for? */ + + if (g_silence_length > 0) + { + stop_note(upper); + + duration = g_silence_length; + + /* Setup the time duration */ + + sec = duration / USEC_PER_SEC; + nsec = ((duration) - (sec * USEC_PER_SEC)) * NSEC_PER_USEC; + + ts.tv_sec = (time_t) sec; + ts.tv_nsec = (unsigned long)nsec; + + ONESHOT_START(upper->oneshot, oneshot_callback, upper, &ts); + + g_silence_length = 0; + return; + } + + /* Make sure we still have a tune - may be removed by the write / ioctl + * handler */ + + if ((g_next == NULL) || (g_tune == NULL)) + { + stop_note(upper); + return; + } + + /* Parse characters out of the string until we have resolved a note */ + + note = 0; + note_length = g_note_length; + + while (note == 0) + { + /* We always need at least one character from the string */ + + int c = next_char(); + + if (c == 0) + { + goto tune_end; + } + + g_next++; + + switch (c) + { + uint8_t nt; + + /* Select note length */ + + case 'L': + g_note_length = next_number(); + if (g_note_length < 1) + { + auderr("note length too short!\n"); + goto tune_error; + } + break; + + /* Select octave */ + + case 'O': + g_octave = next_number(); + if (g_octave > 6) + { + g_octave = 6; + } + break; + + /* Decrease octave */ + + case '<': + if (g_octave > 0) + { + g_octave--; + } + break; + + /* Increase octave */ + + case '>': + if (g_octave < 6) + { + g_octave++; + } + break; + + /* Select inter-note gap */ + + case 'M': + c = next_char(); + + if (c == 0) + { + auderr("no character after M!\n"); + goto tune_error; + } + + g_next++; + + switch (c) + { + case 'N': + g_note_mode = MODE_NORMAL; + break; + + case 'L': + g_note_mode = MODE_LEGATO; + break; + + case 'S': + g_note_mode = MODE_STACCATO; + break; + + case 'F': + g_repeat = false; + break; + + case 'B': + g_repeat = true; + break; + + default: + auderr("unknown symbol: %c!\n", c); + goto tune_error; + break; + } + + /* Pause for a note length */ + + case 'P': + + stop_note(upper); + + duration = rest_duration(next_number(), next_dots()); + + /* Setup the time duration */ + + sec = duration / USEC_PER_SEC; + nsec = ((duration) - (sec * USEC_PER_SEC)) * NSEC_PER_USEC; + + ts.tv_sec = (time_t) sec; + ts.tv_nsec = (unsigned long)nsec; + + ONESHOT_START(upper->oneshot, oneshot_callback, upper, &ts); + + return; + + /* Change tempo */ + + case 'T': + nt = next_number(); + + if ((nt >= 32) && (nt <= 255)) + { + g_tempo = nt; + } + else + { + auderr("T is out of range 32-255!\n"); + goto tune_error; + } + break; + + /* Play an arbitrary note */ + + case 'N': + note = next_number(); + if (note > 84) + { + auderr("Note higher than 84!\n"); + goto tune_error; + } + + /* This is a rest - pause for the current note length */ + + if (note == 0) + { + duration = rest_duration(g_note_length, next_dots()); + + /* Setup the time duration */ + + sec = duration / USEC_PER_SEC; + nsec = ((duration) - (sec * USEC_PER_SEC)) * NSEC_PER_USEC; + + ts.tv_sec = (time_t) sec; + ts.tv_nsec = (unsigned long)nsec; + + ONESHOT_START(upper->oneshot, oneshot_callback, upper, &ts); + + return; + } + break; + + /* Play a note in the current octave */ + + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + note = g_note_tab[c - 'A'] + (g_octave * 12) + 1; + + c = next_char(); + + switch (c) + { + /* Up a semitone */ + + case '#': + case '+': + if (note < 84) + { + note++; + } + + g_next++; + break; + + /* Down a semitone */ + + case '-': + if (note > 1) + { + note--; + } + + g_next++; + break; + + /* No next char here is OK */ + + default: + break; + } + + /* Shorthand length notation */ + + note_length = next_number(); + + if (note_length == 0) + { + note_length = g_note_length; + } + + break; + + default: + goto tune_error; + } + } + + /* Compute the duration of the note and the following silence (if any) */ + + duration = note_duration(&g_silence_length, note_length, next_dots()); + + /* Start playing the note */ + + start_note(upper, note); + + /* Setup time duration */ + + sec = duration / USEC_PER_SEC; + nsec = ((duration) - (sec * USEC_PER_SEC)) * NSEC_PER_USEC; + + ts.tv_sec = (time_t) sec; + ts.tv_nsec = (unsigned long)nsec; + + /* And arrange a callback when the note should stop */ + + ONESHOT_START(upper->oneshot, oneshot_callback, upper, &ts); + + return; + + /* Tune looks bad (unexpected EOF, bad character, etc.) */ + +tune_error: + auderr("tune error\n"); + + /* Don't loop on error */ + + g_repeat = false; + + /* Stop (and potentially restart) the tune */ + +tune_end: + stop_note(upper); + + if (g_repeat) + { + start_tune(upper, g_tune); + } + else + { + g_tune = NULL; + } +} + +/**************************************************************************** + * Name: next_char + * + * Description: + * This function find the next character in the string, discard any + * whitespace and return the canonical (uppercase) version. + * + ****************************************************************************/ + +static int next_char(void) +{ + while (isspace(*g_next)) + { + g_next++; + } + + return toupper(*g_next); +} + +/**************************************************************************** + * Name: next_number + * + * Description: + * This function extract a number from the string, consuming all the digit + * characters. + * + ****************************************************************************/ + +static uint8_t next_number(void) +{ + uint8_t number = 0; + int c; + + for (;;) + { + c = next_char(); + + if (!isdigit(c)) + { + return number; + } + + g_next++; + number = (number * 10) + (c - '0'); + } + + return number; +} + +/**************************************************************************** + * Name: next_dots + * + * Description: + * This function consumes dot characters from the string, returning the + * number consumed. + * + ****************************************************************************/ + +static uint8_t next_dots(void) +{ + uint8_t dots = 0; + + while (next_char() == '.') + { + g_next++; + dots++; + } + + return dots; +} + +/**************************************************************************** + * Name: tone_open + * + * Description: + * This function is called whenever the PWM device is opened. + * + ****************************************************************************/ + +static int tone_open(FAR struct file *filep) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct tone_upperhalf_s *upper = inode->i_private; + uint8_t tmp; + int ret; + + audinfo("crefs: %d\n", upper->crefs); + + /* Get exclusive access to the device structures */ + + ret = sem_wait(&upper->exclsem); + if (ret < 0) + { + ret = -get_errno(); + goto errout; + } + + /* Increment the count of references to the device. If this the first time + * that the driver has been opened for this device, then initialize the + * device. */ + + tmp = upper->crefs + 1; + if (tmp == 0) + { + /* More than 255 opens; uint8_t overflows to zero */ + + ret = -EMFILE; + goto errout_with_sem; + } + + /* Save the new open count on success */ + + upper->crefs = tmp; + ret = OK; + +errout_with_sem: + sem_post(&upper->exclsem); + +errout: + return ret; +} + +/**************************************************************************** + * Name: tone_close + * + * Description: + * This function is called when the PWM device is closed. + * + ****************************************************************************/ + +static int tone_close(FAR struct file *filep) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct tone_upperhalf_s *upper = inode->i_private; + int ret; + + audinfo("crefs: %d\n", upper->crefs); + + /* Get exclusive access to the device structures */ + + ret = sem_wait(&upper->exclsem); + if (ret < 0) + { + ret = -get_errno(); + goto errout; + } + + /* Decrement the references to the driver. If the reference count will + * decrement to 0, then uninitialize the driver. */ + + if (upper->crefs > 1) + { + upper->crefs--; + } + + sem_post(&upper->exclsem); + ret = OK; + +errout: + return ret; +} + +/**************************************************************************** + * Name: tone_read + * + * Description: + * A dummy read method. This is provided only to satisfy the VFS layer. + * + ****************************************************************************/ + +static ssize_t tone_read(FAR struct file *filep, FAR char *buffer, + size_t buflen) +{ + /* Return zero -- usually meaning end-of-file */ + + return 0; +} + +/**************************************************************************** + * Name: tone_write + * + * Description: + * A dummy write method. This is provided only to satisfy the VFS layer. + * + ****************************************************************************/ + +static ssize_t tone_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct tone_upperhalf_s *upper = inode->i_private; + + /* We need to receive a string #RRGGBB = 7 bytes */ + + if (buffer == NULL) + { + /* Well... nothing to do */ + + return -EINVAL; + } + + if (buflen >= MAX_TUNE_LEN) + { + /* Too big to it inside internal buffer (with extra NUL terminator) */ + + return -EINVAL; + } + + /* Copy music to internal buffer */ + + memcpy(tune_buf, buffer, buflen); + + /* Failsafe NUL terminated string */ + + tune_buf[buflen] = '\0'; + + /* Let the music play */ + + start_tune(upper, tune_buf); + + return buflen; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: tone_register + * + * Description: + * This function binds an instance of a "lower half" PWM driver with + * the "upper half" Audio Tone device and registers that device so that can + * be used by application code. + * + * + * Input parameters: + * path - The full path to the driver to be registers in the NuttX pseudo- + * filesystem. The recommended convention is to name of PWM driver + * as "/dev/tone0". + * tone - A pointer to an instance of lower half PWM + * drivers for the tone device. This instance will be bound to the Audio + * tone driver and must persists as long as that driver persists. + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +int tone_register(FAR const char *path, FAR struct pwm_lowerhalf_s *tone, + FAR struct oneshot_lowerhalf_s *oneshot) +{ + FAR struct tone_upperhalf_s *upper; + + /* Allocate the upper-half data structure */ + + upper = + (FAR struct tone_upperhalf_s *)kmm_zalloc(sizeof(struct tone_upperhalf_s)); + + if (!upper) + { + auderr("ERROR: Allocation failed\n"); + return -ENOMEM; + } + + /* Initialize the PWM device structure (it was already zeroed by + * kmm_zalloc()). + */ + + sem_init(&upper->exclsem, 0, 1); + upper->devtone = tone; + upper->oneshot = oneshot; + + /* Register the PWM device */ + + audinfo("Registering %s\n", path); + return register_driver(path, &g_toneops, 0666, upper); +} + +#endif /* CONFIG_AUDIO_TONE */ diff --git a/drivers/contactless/Kconfig b/drivers/contactless/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..b26177eb9cbae7b5bfe61fa8af4437b54d79c206 --- /dev/null +++ b/drivers/contactless/Kconfig @@ -0,0 +1,69 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +if DRIVERS_CONTACTLESS + +config CL_MFRC522 + bool "NXP MFRC522 ISO14443/Mifare Transceiver" + default n + select SPI + ---help--- + This options adds driver support for the MFRC522 ISO14443/Mifare chip. + +if CL_MFRC522 + +config MFRC522_SPI_FREQ + int "SPI frequency for MFRC522" + default 1000000 + depends on CL_MFRC522 + +config CL_MFRC522_DEBUG + bool "Enable MFRC522 debug" + default n + depends on CL_MFRC522 + +config CL_MFRC522_DEBUG_TX + bool "trace TX frames" + default n + depends on MFRC522_DEBUG + +config CL_MFRC522_DEBUG_RX + bool "trace RX frames" + default n + depends on MFRC522_DEBUG + +endif # CL_MFRC522 + +config CL_PN532 + bool "pn532 NFC-chip support" + default n + select SPI + ---help--- + This options adds driver support for the PN532 NFC chip. + +if CL_PN532 + +config PN532_SPI_FREQ + int "SPI frequency for PN532" + default 1000000 + depends on CL_PN532 + +config CL_PN532_DEBUG + bool "Enable PN532 debug" + default n + depends on CL_PN532 + +config CL_PN532_DEBUG_TX + bool "trace TX frames" + default n + depends on CL_PN532_DEBUG + +config CL_PN532_DEBUG_RX + bool "trace RX frames" + default n + depends on CL_PN532_DEBUG + +endif # CL_PN532 +endif # DRIVERS_CONTACTLESS diff --git a/drivers/contactless/Make.defs b/drivers/contactless/Make.defs new file mode 100644 index 0000000000000000000000000000000000000000..0df7134d88e9848f06b7c815ed57f0d04e5c5776 --- /dev/null +++ b/drivers/contactless/Make.defs @@ -0,0 +1,53 @@ +############################################################################ +# drivers/contactless/Make.defs +# +# Copyright (C) 2011-2012, 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. +# +############################################################################ + +ifeq ($(CONFIG_DRIVERS_CONTACTLESS),y) + +# Include contactless drivers + +ifeq ($(CONFIG_CL_MFRC522),y) +CSRCS += mfrc522.c +endif + +ifeq ($(CONFIG_CL_PN532),y) +CSRCS += pn532.c +endif + +# Include contactless devices build support + +DEPPATH += --dep-path contactless +VPATH += :contactless +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)contactless} +endif diff --git a/drivers/contactless/mfrc522.c b/drivers/contactless/mfrc522.c new file mode 100644 index 0000000000000000000000000000000000000000..804ea0fa4b6c6190f9c75afb867452da06c3a23e --- /dev/null +++ b/drivers/contactless/mfrc522.c @@ -0,0 +1,1616 @@ +/**************************************************************************** + * drivers/contactless/mfrc522.c + * + * Copyright(C) 2016 Uniquix Ltda. All rights reserved. + * Author: Alan Carvalho de Assis + * + * This driver is based on Arduino library for MFRC522 from Miguel + * Balboa released into the public domain: + * https://github.com/miguelbalboa/rfid/ + * + * 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 "mfrc522.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#ifdef CONFIG_CL_MFRC522_DEBUG +# define mfrc522err _err +# define mfrc522info _info +#else +# ifdef CONFIG_CPP_HAVE_VARARGS +# define mfrc522err(x...) +# define mfrc522info(x...) +# else +# define mfrc522err (void) +# define mfrc522info (void) +# endif +#endif + +#ifdef CONFIG_CL_MFRC522_DEBUG_TX +# define tracetx errdumpbuffer +#else +# define tracetx(x...) +#endif + +#ifdef CONFIG_CL_MFRC522_DEBUG_RX +# define tracerx errdumpbuffer +#else +# define tracerx(x...) +#endif + +#define FRAME_SIZE(f) (sizeof(struct mfrc522_frame) + f->len + 2) +#define FRAME_POSTAMBLE(f) (f->data[f->len + 1]) + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static inline void mfrc522_configspi(FAR struct spi_dev_s *spi); +static void mfrc522_lock(FAR struct spi_dev_s *spi); +static void mfrc522_unlock(FAR struct spi_dev_s *spi); + +/* Character driver methods */ + +static int mfrc522_open(FAR struct file *filep); +static int mfrc522_close(FAR struct file *filep); +static ssize_t mfrc522_read(FAR struct file *, FAR char *, size_t); +static ssize_t mfrc522_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen); +static int mfrc522_ioctl(FAR struct file *filep, int cmd, + unsigned long arg); + +uint8_t mfrc522_readu8(FAR struct mfrc522_dev_s *dev, uint8_t regaddr); +void mfrc522_writeu8(FAR struct mfrc522_dev_s *dev, uint8_t regaddr, + FAR uint8_t regval); +void mfrc522_writeblk(FAR struct mfrc522_dev_s *dev, uint8_t regaddr, + uint8_t *regval, int length); +void mfrc522_readblk(FAR struct mfrc522_dev_s *dev, uint8_t regaddr, + FAR uint8_t *regval, int length, uint8_t rxalign); + +void mfrc522_softreset(FAR struct mfrc522_dev_s *dev); + +int mfrc522_picc_select(FAR struct mfrc522_dev_s *dev, + FAR struct picc_uid_s *uid, uint8_t validbits); + +/* IRQ Handling TODO: +static int mfrc522_irqhandler(FAR int irq, FAR void *context, FAR void* dev); +static inline int mfrc522_attachirq(FAR struct mfrc522_dev_s *dev, xcpt_t isr); +*/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const struct file_operations g_mfrc522fops = +{ + mfrc522_open, + mfrc522_close, + mfrc522_read, + mfrc522_write, + 0, + mfrc522_ioctl +#ifndef CONFIG_DISABLE_POLL + , 0 +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , 0 +#endif +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +static void mfrc522_lock(FAR struct spi_dev_s *spi) +{ + (void)SPI_LOCK(spi, true); + + SPI_SETMODE(spi, SPIDEV_MODE0); + SPI_SETBITS(spi, 8); + (void)SPI_HWFEATURES(spi, 0); + (void)SPI_SETFREQUENCY(spi, CONFIG_MFRC522_SPI_FREQ); +} + +static void mfrc522_unlock(FAR struct spi_dev_s *spi) +{ + (void)SPI_LOCK(spi, false); +} + +static inline void mfrc522_configspi(FAR struct spi_dev_s *spi) +{ + /* Configure SPI for the MFRC522 module. */ + + SPI_SETMODE(spi, SPIDEV_MODE0); + SPI_SETBITS(spi, 8); + (void)SPI_HWFEATURES(spi, 0); + (void)SPI_SETFREQUENCY(spi, CONFIG_MFRC522_SPI_FREQ); +} + +static inline void mfrc522_select(struct mfrc522_dev_s *dev) +{ + SPI_SELECT(dev->spi, SPIDEV_CONTACTLESS, true); +} + +static inline void mfrc522_deselect(struct mfrc522_dev_s *dev) +{ + SPI_SELECT(dev->spi, SPIDEV_CONTACTLESS, false); +} + +/**************************************************************************** + * Name: mfrc522_readu8 + * + * Description: + * Read a byte from a register address. + * + * Input Parameters: + * + * Returned Value: the read byte from the register + * + ****************************************************************************/ + +uint8_t mfrc522_readu8(FAR struct mfrc522_dev_s *dev, uint8_t regaddr) +{ + uint8_t regval; + uint8_t address = (0x80 | (regaddr & 0x7E)); + + mfrc522_lock(dev->spi); + mfrc522_select(dev); + SPI_SEND(dev->spi, address); + regval = SPI_SEND(dev->spi, 0); + mfrc522_deselect(dev); + mfrc522_unlock(dev->spi); + + tracerx("read", regval, 1); + return regval; +} + +/**************************************************************************** + * Name: mfrc522_write8 + * + * Description: + * Write a byte to a register address. + * + * Input Parameters: + * + * Returned Value: + * + ****************************************************************************/ + +void mfrc522_writeu8(FAR struct mfrc522_dev_s *dev, uint8_t regaddr, + FAR uint8_t regval) +{ + mfrc522_lock(dev->spi); + mfrc522_select(dev); + SPI_SEND(dev->spi, regaddr & 0x7E); + SPI_SEND(dev->spi, regval); + mfrc522_deselect(dev); + mfrc522_unlock(dev->spi); + + tracerx("write", ®val, 1); +} + +/**************************************************************************** + * Name: mfrc522_readblk + * + * Description: + * Read a block of bytes from a register address. Align the bit positions of + * regval[0] from rxalign..7. + * + * Input Parameters: + * + * Returned Value: none + * + ****************************************************************************/ + +void mfrc522_readblk(FAR struct mfrc522_dev_s *dev, uint8_t regaddr, + FAR uint8_t *regval, int length, uint8_t rxalign) +{ + uint8_t i = 0; + uint8_t address = (0x80 | (regaddr & 0x7E)); + + mfrc522_lock(dev->spi); + mfrc522_select(dev); + + /* Inform the MFRC522 the address we want to read */ + + SPI_SEND(dev->spi, address); + + while (i < length) + { + if (i == 0 && rxalign) + { + uint8_t mask = 0; + uint8_t value; + uint8_t j; + + for (j = rxalign; j <= 7; j++) + { + mask |= (1 << j); + } + + /* Read the first byte */ + + value = SPI_SEND(dev->spi, address); + + /* Apply mask to current regval[0] with the read value */ + + regval[0] = (regval[0] & ~mask) | (value & mask); + } + else + { + /* Read the remaining bytes */ + + regval[i] = SPI_SEND(dev->spi, address); + } + i++; + } + + /* Read the last byte. Send 0 to stop reading (it maybe wrong, 1 byte out) */ + + regval[i] = SPI_SEND(dev->spi, 0); + + mfrc522_deselect(dev); + mfrc522_unlock(dev->spi); + + tracerx("readblk", regval, size); +} + +/**************************************************************************** + * Name: mfrc522_writeblk + * + * Description: + * Write a block of bytes to a register address. + * + * Input Parameters: + * + * Returned Value: none + * + ****************************************************************************/ + +void mfrc522_writeblk(FAR struct mfrc522_dev_s *dev, uint8_t regaddr, + uint8_t *regval, int length) +{ + uint8_t address = (regaddr & 0x7E); + + mfrc522_lock(dev->spi); + mfrc522_select(dev); + + /* Inform the MFRC522 the address we want write to */ + + SPI_SEND(dev->spi, address); + + /* Send the block of bytes */ + + SPI_SNDBLOCK(dev->spi, regval, length); + + mfrc522_deselect(dev); + mfrc522_unlock(dev->spi); + + tracerx("writeblk", regval, size); +} + +/**************************************************************************** + * Name: mfrc522_calc_crc + * + * Description: + * Use the CRC coprocessor in the MFRC522 to calculate a CRC_A. + * + * Input Parameters: + * + * Returned Value: OK or -ETIMEDOUT + * + ****************************************************************************/ + +int mfrc522_calc_crc(FAR struct mfrc522_dev_s *dev, uint8_t *buffer, + int length, uint8_t *result) +{ + struct timespec tstart; + struct timespec tend; + + /* Stop any command in execution */ + + mfrc522_writeu8(dev, MFRC522_COMMAND_REG, MFRC522_IDLE_CMD); + + /* Clear the CRCIRq interrupt request bit */ + + mfrc522_writeu8(dev, MFRC522_DIV_IRQ_REG, MFRC522_CRC_IRQ); + + /* Flush all bytes in the FIFO */ + + mfrc522_writeu8(dev, MFRC522_FIFO_LEVEL_REG, MFRC522_FLUSH_BUFFER); + + /* Write data to the FIFO */ + + mfrc522_writeblk(dev, MFRC522_FIFO_DATA_REG, buffer, length); + + /* Start the calculation */ + + mfrc522_writeu8(dev, MFRC522_COMMAND_REG, MFRC522_CALC_CRC_CMD); + + /* Wait for CRC completion or 200ms time-out */ + + clock_gettime(CLOCK_REALTIME, &tstart); + tstart.tv_nsec += 200000; + if (tstart.tv_nsec >= 1000 * 1000 * 1000) + { + tstart.tv_sec++; + tstart.tv_nsec -= 1000 * 1000 * 1000; + } + + while(1) + { + uint8_t irqreg; + + irqreg = mfrc522_readu8(dev, MFRC522_DIV_IRQ_REG); + if ( irqreg & MFRC522_CRC_IRQ) + { + break; + } + + /* Get time now */ + + clock_gettime(CLOCK_REALTIME, &tend); + + if ((tend.tv_sec > tstart.tv_sec) && (tend.tv_nsec > tstart.tv_nsec)) + { + return -ETIMEDOUT; + } + } + + /* Stop calculating CRC for new content of FIFO */ + + mfrc522_writeu8(dev, MFRC522_COMMAND_REG, MFRC522_IDLE_CMD); + + result[0] = mfrc522_readu8(dev, MFRC522_CRC_RESULT_REGL); + result[1] = mfrc522_readu8(dev, MFRC522_CRC_RESULT_REGH); + + return OK; +} + +/**************************************************************************** + * Name: mfrc522_comm_picc + * + * Description: + * Transfers data to the MFRC522 FIFO, executes a command, waits for + * completion and transfers data back from the FIFO. + * CRC validation can only be done if back_data and back_len are specified. + * + * Input Parameters: + * + * Returned Value: OK or -ETIMEDOUT + * + ****************************************************************************/ + +int mfrc522_comm_picc(FAR struct mfrc522_dev_s *dev, uint8_t command, + uint8_t waitirq, uint8_t *send_data, uint8_t send_len, + uint8_t *back_data, uint8_t *back_len, + uint8_t *validbits, uint8_t rxalign, bool checkcrc) +{ + int ret; + uint8_t errors; + uint8_t vbits; + uint8_t value; + struct timespec tstart; + struct timespec tend; + + /* Prepare values for BitFramingReg */ + + uint8_t txlastbits = validbits ? *validbits : 0; + uint8_t bitframing = (rxalign << 4) + txlastbits; + + /* Stop any active command */ + + mfrc522_writeu8(dev, MFRC522_COMMAND_REG, MFRC522_IDLE_CMD); + + /* Clear all seven interrupt request bits */ + + value = mfrc522_readu8(dev, MFRC522_COM_IRQ_REG); + mfrc522_writeu8(dev, MFRC522_COM_IRQ_REG, value | MFRC522_COM_IRQ_MASK); + + /* Flush all bytes in the FIFO */ + + mfrc522_writeu8(dev, MFRC522_FIFO_LEVEL_REG, MFRC522_FLUSH_BUFFER); + + /* Write data to FIFO */ + + mfrc522_writeblk(dev, MFRC522_FIFO_DATA_REG, send_data, send_len); + + /* Bit adjustments */ + + mfrc522_writeu8(dev, MFRC522_BIT_FRAMING_REG, bitframing); + + /* Execute command */ + + mfrc522_writeu8(dev, MFRC522_COMMAND_REG, command); + + /* We setup the TAuto flag in the mfrc522_init() then we could use the + * internal MFC522 Timer to detect timeout, but because there could be some + * hardware fault, let us to use a NuttX timeout as well. + */ + + clock_gettime(CLOCK_REALTIME, &tstart); + tstart.tv_nsec += 200000; + if (tstart.tv_nsec >= 1000 * 1000 * 1000) + { + tstart.tv_sec++; + tstart.tv_nsec -= 1000 * 1000 * 1000; + } + + /* If it is a Transceive command, then start transmittion */ + + if (command == MFRC522_TRANSCV_CMD) + { + value = mfrc522_readu8(dev, MFRC522_BIT_FRAMING_REG); + mfrc522_writeu8(dev, MFRC522_BIT_FRAMING_REG, value | MFRC522_START_SEND); + } + + /* Wait for the command to complete */ + + while (1) + { + uint8_t irqsreg; + + irqsreg = mfrc522_readu8(dev, MFRC522_COM_IRQ_REG); + + /* If at least an of selected IRQ happened */ + + if (irqsreg & waitirq) + { + break; + } + + /* Timer expired */ + + if (irqsreg & MFRC522_TIMER_IRQ) + { + return -ETIMEDOUT; + } + + /* Get time now */ + + clock_gettime(CLOCK_REALTIME, &tend); + + if ((tend.tv_sec > tstart.tv_sec) && (tend.tv_nsec > tstart.tv_nsec)) + { + return -ETIMEDOUT; + } + } + + /* Read error register to verify if there are any issue */ + + errors = mfrc522_readu8(dev, MFRC522_ERROR_REG); + + /* Check for Protocol error */ + + if (errors & (MFRC522_PROTO_ERR)) + { + return -EPROTO; + } + + /* Check for Parity and Buffer Overflow errors */ + + if (errors & (MFRC522_PARITY_ERR | MFRC522_BUF_OVFL_ERR)) + { + return -EIO; + } + + /* Check collision error */ + + if (errors & MFRC522_COLL_ERR) + { + return -EBUSY; /* should it be EAGAIN ? */ + } + + /* If the caller wants data back, get it from the MFRC522 */ + + if (back_data && back_len) + { + uint8_t nbytes; + + /* Number of bytes in the FIFO */ + + nbytes = mfrc522_readu8(dev, MFRC522_FIFO_LEVEL_REG); + + /* Returned more bytes than the expected */ + + if (nbytes > *back_len) + { + return -ENOMEM; + } + + *back_len = nbytes; + + /* Read the data from FIFO */ + + mfrc522_readblk(dev, MFRC522_FIFO_DATA_REG, back_data, nbytes, rxalign); + + /* RxLastBits[2:0] indicates the number of valid bits received */ + + vbits = mfrc522_readu8(dev, MFRC522_CONTROL_REG) + & MFRC522_RX_LAST_BITS_MASK; + + if (validbits) + { + *validbits = vbits; + } + } + + /* Perform CRC_A validation if requested */ + + if (back_data && back_len && checkcrc) + { + uint8_t ctrlbuf[2]; + + /* In this case a MIFARE Classic NAK is not OK */ + + if (*back_len == 1 && vbits == 4) + { + return -EACCES; + } + + /* We need the CRC_A value or all 8 bits of the last byte */ + + if (*back_len < 2 || vbits != 0) + { + return -EPERM; + } + + /* Verify CRC_A */ + + ret = mfrc522_calc_crc(dev, &back_data[0], *back_len - 2, &ctrlbuf[0]); + if (ret != OK) + { + return ret; + } + + if ((back_data[*back_len - 2] != ctrlbuf[0]) || + (back_data[*back_len - 1] != ctrlbuf[1])) + { + return -EFAULT; + } + } + + return OK; +} + +/**************************************************************************** + * Name: mfrc522_transcv_data + * + * Description: + * Executes the Transceive command + * + * Input Parameters: + * + * Returned Value: OK or -ETIMEDOUT + * + ****************************************************************************/ + +int mfrc522_transcv_data(FAR struct mfrc522_dev_s *dev, uint8_t *senddata, + uint8_t sendlen, uint8_t *backdata, uint8_t *backlen, + uint8_t *validbits, uint8_t rxalign, bool check_crc) +{ + uint8_t waitirq = MFRC522_RX_IRQ | MFRC522_IDLE_IRQ; + + return mfrc522_comm_picc(dev, MFRC522_TRANSCV_CMD, waitirq, senddata, + sendlen, backdata, backlen, validbits, rxalign, + check_crc); +} + +/**************************************************************************** + * Name: mfrc522_picc_reqa_wupa + * + * Description: + * Transmits REQA or WUPA commands + * + * Input Parameters: + * + * Returned Value: OK or -ETIMEDOUT + * + ****************************************************************************/ + +int mfrc522_picc_reqa_wupa(FAR struct mfrc522_dev_s *dev, uint8_t command, + uint8_t *buffer, uint8_t length) +{ + uint8_t validbits; + uint8_t value; + int status; + + if (!buffer || length < 2) + { + return -EINVAL; + } + + /* Force clear of received bits if a collision is detected */ + + value = mfrc522_readu8(dev, MFRC522_COLL_REG); + mfrc522_writeu8(dev, MFRC522_COLL_REG, value & MFRC522_VALUES_AFTER_COLL); + + validbits = 7; + status = mfrc522_transcv_data(dev, &command, 1, buffer, &length, &validbits, + 0, false); + + /* For REQA and WUPA we need to transmit only 7 bits */ + + if (status != OK) + { + return status; + } + + /* ATQA must be exactly 16 bits */ + + if (length != 2 || validbits != 0) + { + return -EAGAIN; + } + + mfrc522info("buffer[0]=0x%02X | buffer[1]=0x%02X\n", buffer[0], buffer[1]); + return OK; +} + +/**************************************************************************** + * Name: mfrc522_picc_request_a + * + * Description: + * Transmits a REQuest command, Type A. Invites PICCs in state IDLE to go to + * READY and prepare for anticollision or selection. + * + * Input Parameters: + * + * Returned Value: OK or -ETIMEDOUT + * + ****************************************************************************/ + +int mfrc522_picc_request_a(FAR struct mfrc522_dev_s *dev, uint8_t *buffer, + uint8_t length) +{ + return mfrc522_picc_reqa_wupa(dev, PICC_CMD_REQA, buffer, length); +} + +/**************************************************************************** + * Name: mfrc522_picc_detect + * + * Description: + * Detects if a Contactless Card is near + * + * Input Parameters: + * + * Returned Value: OK or -ETIMEDOUT + * + ****************************************************************************/ + +int mfrc522_picc_detect(FAR struct mfrc522_dev_s *dev) +{ + int ret; + uint8_t buffer_atqa[2]; + uint8_t length = sizeof(buffer_atqa); + + /* Send a REQA command */ + + ret = mfrc522_picc_request_a(dev, buffer_atqa, length); + return (ret == OK || ret == -EBUSY); +} + +/**************************************************************************** + * Name: mfrc522_picc_select + * + * Description: + * Selects a near Card and read its UID. + * + * Input Parameters: + * + * Returned Value: OK or -ETIMEDOUT + * + ****************************************************************************/ + +int mfrc522_picc_select(FAR struct mfrc522_dev_s *dev, + FAR struct picc_uid_s *uid, uint8_t validbits) +{ + bool uid_complete; + bool select_done; + bool use_cascade_tag; + uint8_t cascade_level = 1; + int result; + uint8_t i; + uint8_t value; + uint8_t count; + + /* The first index in uid->data[] that is used in the current Cascade Level */ + + uint8_t uid_index; + + /* The number of known UID bits in the current Cascade Level. */ + + uint8_t curr_level_known_bits; + + /* The SELECT/ANTICOLLISION uses a 7 byte standard frame + 2 bytes CRC_A */ + + uint8_t buffer[9]; + + /* The number of bytes used in the buffer, number bytes on FIFO */ + + uint8_t buffer_used; + + /* Used to defines the bit position for the first bit received */ + + uint8_t rxalign; + + /* The number of valid bits in the last transmitted byte. */ + + uint8_t txlastbits; + + uint8_t *resp_buf; + uint8_t resp_len; + + /* Sanity check */ + + if (validbits > 80) + { + return -EINVAL; + } + + /* Force clear of received bits if a collision is detected */ + + value = mfrc522_readu8(dev, MFRC522_COLL_REG); + mfrc522_writeu8(dev, MFRC522_COLL_REG, value & MFRC522_VALUES_AFTER_COLL); + + /* Repeat cascade level loop until we have a complete UID */ + + uid_complete = false; + while (!uid_complete) + { + uint8_t bytes_to_copy; + + /* Set the Cascade Level in the SEL byte, find out if we need to use the + * Cascade Tag in byte 2. + */ + + switch (cascade_level) + { + case 1: + buffer[0] = PICC_CMD_SEL_CL1; + uid_index = 0; + + /* When we know that the UID has more than 4 bytes */ + + use_cascade_tag = validbits && (uid->size > 4); + break; + + case 2: + buffer[0] = PICC_CMD_SEL_CL2; + uid_index = 3; + + /* When we know that the UID has more than 7 bytes */ + + use_cascade_tag = validbits && (uid->size > 7); + break; + + case 3: + buffer[0] = PICC_CMD_SEL_CL3; + uid_index = 6; + use_cascade_tag = false; + break; + + default: + return -EIO; /* Internal error */ + } + + /* How many UID bits are known in this Cascade Level? */ + + curr_level_known_bits = validbits - (8 * uid_index); + if (curr_level_known_bits < 0) + { + curr_level_known_bits = 0; + } + + /* Copy the known bits from uid->uid_data[] to buffer[] */ + + i = 2; /* destination index in buffer[] */ + if (use_cascade_tag) + { + buffer[i++] = PICC_CMD_CT; + } + + /* Number of bytes needed to represent the known bits for this level */ + + bytes_to_copy = curr_level_known_bits / 8 + + (curr_level_known_bits % 8 ? 1 : 0); + + if (bytes_to_copy) + { + /* Max 4 bytes in each Cascade Level. Only 3 left if we use the + * Cascade Tag. + */ + + uint8_t max_bytes = use_cascade_tag ? 3 : 4; + + if (bytes_to_copy > max_bytes) + { + bytes_to_copy = max_bytes; + } + + for (count = 0; count < bytes_to_copy; count++) + { + buffer[i++] = uid->uid_data[uid_index + count]; + } + } + + /* Now that the data has been copied we need to include the 8 bits in CT + * in curr_level_known_bits. + */ + + if (use_cascade_tag) + { + curr_level_known_bits += 8; + } + + /* Repeat anti collision loop until we can transmit all UID bits + BCC + * and receive a SAK - max 32 iterations. + */ + + select_done = false; + while (!select_done) + { + /* Find out how many bits and bytes to send and receive. */ + + if (curr_level_known_bits >= 32) + { + /* All UID bits in this Cascade Level are known. This is a + * SELECT. + */ + + /* NVB - Number of Valid Bits: Seven whole bytes */ + + buffer[1] = 0x70; + + /* Calculate BCC - Block Check Character */ + + buffer[6] = buffer[2] ^ buffer[3] ^ buffer[4] ^ buffer[5]; + + /* Calculate CRC_A */ + + result = mfrc522_calc_crc(dev, buffer, 7, &buffer[7]); + if (result != OK) + { + return result; + } + + txlastbits = 0; /* 0 => All 8 bits are valid. */ + buffer_used = 9; + + /* Store response in the last 3 bytes of buffer (BCC and CRC_A - + * not needed after tx). + */ + + resp_buf = &buffer[6]; + resp_len = 3; + } + else + { + /* This is an ANTICOLLISION */ + + txlastbits = curr_level_known_bits % 8; + + /* Number of whole bytes in the UID part. */ + + count = curr_level_known_bits / 8; + i = 2 + count; + + /* NVB - Number of Valid Bits */ + + buffer[1] = (i << 4) + txlastbits; + buffer_used = i + (txlastbits ? 1 : 0); + + /* Store response in the unused part of buffer */ + + resp_buf = &buffer[i]; + resp_len = sizeof(buffer) - i; + } + + /* Set bit adjustments */ + + rxalign = txlastbits; + mfrc522_writeu8(dev, MFRC522_BIT_FRAMING_REG, + (rxalign << 4) + txlastbits); + + /* Transmit the buffer and receive the response */ + + result = mfrc522_transcv_data(dev, buffer, buffer_used, resp_buf, + &resp_len, &txlastbits, rxalign, false); + + /* More than one PICC in the field => collision */ + + if (result == -EBUSY) + { + uint8_t coll_pos; + uint8_t coll_reg = mfrc522_readu8(dev, MFRC522_COLL_REG); + + /* CollPosNotValid */ + + if (coll_reg & 0x20) + { + /* Without a valid collision position we cannot continue */ + + return -EBUSY; + } + + coll_pos = coll_reg & 0x1F; /* Values 0-31, 0 means bit 32. */ + if (coll_pos == 0) + { + coll_pos = 32; + } + + if (coll_pos <= curr_level_known_bits) + { + /* No progress - should not happen */ + + return -EIO; + } + + /* Choose the PICC with the bit set. */ + + curr_level_known_bits = coll_pos; + + /* The bit to modify */ + + count = (curr_level_known_bits - 1) % 8; + + /* First byte is index 0. */ + + i = 1 + (curr_level_known_bits / 8) + (count ? 1 : 0); + buffer[i] |= (1 << count); + } + else if (result != OK) + { + return result; + } + else /* OK */ + { + /* This was a SELECT. */ + + if (curr_level_known_bits >= 32) + { + /* No more collision */ + + select_done = true; + } + else + { + /* This was an ANTICOLLISION. */ + /* We have all 32 bits of the UID in this Cascade Level */ + + curr_level_known_bits = 32; + + /* Run loop again to do the SELECT */ + } + } + } + + /* We do not check the CBB - it was constructed by us above. */ + /* Copy the found UID bytes from buffer[] to uid->uid_data[] */ + + i = (buffer[2] == PICC_CMD_CT) ? 3 : 2; /* source index in buffer[] */ + bytes_to_copy = (buffer[2] == PICC_CMD_CT) ? 3 : 4; + + for (count = 0; count < bytes_to_copy; count++) + { + uid->uid_data[uid_index + count] = buffer[i++]; + } + + /* Check response SAK (Select Acknowledge) */ + + if (resp_len != 3 || txlastbits != 0) + { + /* SAK must be exactly 24 bits (1 byte + CRC_A). */ + + return -EIO; + } + + /* Verify CRC_A - do our own calculation and store the control in + * buffer[2..3] - those bytes are not needed anymore. + */ + + result = mfrc522_calc_crc(dev, resp_buf, 1, &buffer[2]); + if (result != OK) + { + return result; + } + + /* Is it correct */ + + if ((buffer[2] != resp_buf[1]) || (buffer[3] != resp_buf[2])) + { + return -EINVAL; + } + + /* Cascade bit set - UID not complete yes */ + + if (resp_buf[0] & 0x04) + { + cascade_level++; + } + else + { + uid_complete = true; + uid->sak = resp_buf[0]; + } + } + + /* Set correct uid->size */ + + uid->size = 3 * cascade_level + 1; + + return OK; +} + +/**************************************************************************** + * Name: mfrc522_softreset + * + * Description: + * Send a software reset command + * + * Input Parameters: a pointer to mfrc522_dev_s structure + * + * Returned Value: none + * + ****************************************************************************/ + +void mfrc522_softreset(FAR struct mfrc522_dev_s *dev) +{ + /* Send a software reset command */ + + mfrc522_writeu8(dev, MFRC522_COMMAND_REG, MFRC522_SOFTRST_CMD); + + /* Wait the internal state machine to initialize */ + + usleep(50000); + + /* Wait for the PowerDown bit in COMMAND_REG to be cleared */ + + while (mfrc522_readu8(dev, MFRC522_COMMAND_REG) & MFRC522_POWER_DOWN); +} + +/**************************************************************************** + * Name: mfrc522_enableantenna + * + * Description: + * Turns the antenna on by enabling the pins TX1 and TX2 + * + * Input Parameters: a pointer to mfrc522_dev_s structure + * + * Returned Value: none + * + ****************************************************************************/ + +void mfrc522_enableantenna(FAR struct mfrc522_dev_s *dev) +{ + uint8_t value = mfrc522_readu8(dev, MFRC522_TX_CTRL_REG); + + if ((value & (MFRC522_TX1_RF_EN | MFRC522_TX2_RF_EN)) != 0x03) + { + mfrc522_writeu8(dev, MFRC522_TX_CTRL_REG, value | 0x03); + } +} + +/**************************************************************************** + * Name: mfrc522_disableantenna + * + * Description: + * Turns the antenna off cutting the signals on TX1 and TX2 + * + * Input Parameters: a pointer to mfrc522_dev_s structure + * + * Returned Value: none + * + ****************************************************************************/ + +void mfrc522_disableantenna(FAR struct mfrc522_dev_s *dev) +{ + uint8_t value = mfrc522_readu8(dev, MFRC522_TX_CTRL_REG); + + value &= ~(MFRC522_TX1_RF_EN | MFRC522_TX2_RF_EN); + mfrc522_writeu8(dev, MFRC522_TX_CTRL_REG, value); +} + +/**************************************************************************** + * Name: mfrc522_getfwversion + * + * Description: + * Read the MFRC522 firmware version. + * + * Input Parameters: a pointer to mfrc522_dev_s structure + * + * Returned Value: the firmware version byte + * + ****************************************************************************/ + +uint8_t mfrc522_getfwversion(FAR struct mfrc522_dev_s *dev) +{ + return mfrc522_readu8(dev, MFRC522_VERSION_REG); +} + +/**************************************************************************** + * Name: mfrc522_getantennagain + * + * Description: + * Read the MFRC522 receiver gain (RxGain). + * See 9.3.3.6 / table 98 in MFRC522 datasheet. + * + * Input Parameters: a pointer to mfrc522_dev_s structure + * + * Returned Value: none + * + ****************************************************************************/ + +uint8_t mfrc522_getantennagain(FAR struct mfrc522_dev_s *dev) +{ + return mfrc522_readu8(dev, MFRC522_RF_CFG_REG) & MFRC522_RX_GAIN_MASK; +} + +/**************************************************************************** + * Name: mfrc522_setantennagain + * + * Description: + * Set the MFRC522 receiver gain (RxGain) to value value specified in mask. + * See 9.3.3.6 / table 98 in MFRC522 datasheet. + * + * Input Parameters: a pointer to mfrc522_dev_s structure + * + * Returned Value: none + * + ****************************************************************************/ + +void mfrc522_setantennagain(FAR struct mfrc522_dev_s *dev, uint8_t mask) +{ + uint8_t value; + + if ((value = mfrc522_getantennagain(dev)) != mask) + { + mfrc522_writeu8(dev, MFRC522_RF_CFG_REG, value & ~MFRC522_RX_GAIN_MASK); + mfrc522_writeu8(dev, MFRC522_RF_CFG_REG, mask & MFRC522_RX_GAIN_MASK); + } +} + +/**************************************************************************** + * Name: mfrc522_init + * + * Description: + * Initializes the MFRC522 chip + * + * Input Parameters: a pointer to mfrc522_dev_s structure + * + * Returned Value: none + * + ****************************************************************************/ + +void mfrc522_init(FAR struct mfrc522_dev_s *dev) +{ + /* Force a reset */ + + mfrc522_softreset(dev); + + /* We need a timeout if something when communicating with a TAG case + * something goes wrong. f_timer = 13.56 MHz / (2*TPreScaler+1) where: + * TPreScaler = [TPrescaler_Hi:Tprescaler_Lo]. Tprescaler_Hi are the four + * low bits in TmodeReg. Tprescaler_Lo is on TPrescalerReg. + * + * TAuto=1; timer starts automatically at the end of the transmission in + * all communication modes at all speeds. + */ + + mfrc522_writeu8(dev, MFRC522_TMODE_REG, MFRC522_TAUTO); + + /* TPreScaler = TModeReg[3..0]:TPrescalerReg, ie: 0x0A9 = 169 => + * f_timer=40kHz, then the timer period will be 25us. + */ + + mfrc522_writeu8(dev, MFRC522_TPRESCALER_REG, 0xA9); + + /* Reload timer with 0x3E8 = 1000, ie 25ms before timeout. */ + + mfrc522_writeu8(dev, MFRC522_TRELOAD_REGH, 0x06); + mfrc522_writeu8(dev, MFRC522_TRELOAD_REGL, 0xE8); + + /* Force 100% ASK modulation independent of the ModGsPReg setting */ + + mfrc522_writeu8(dev, MFRC522_TX_ASK_REG, MFRC522_FORCE_100ASK); + + /* Set the preset value for the CRC to 0x6363 (ISO 14443-3 part 6.2.4) */ + + mfrc522_writeu8(dev, MFRC522_MODE_REG, 0x3D); + + /* Enable the Antenna pins */ + + mfrc522_enableantenna(dev); +} + +/**************************************************************************** + * Name: mfrc522_selftest + * + * Description: + * Executes a self-test of the MFRC522 chip + * + * See 16.1.1 in the MFRC522 datasheet + * + * Input Parameters: a pointer to mfrc522_dev_s structure + * + * Returned Value: none + * + ****************************************************************************/ + +int mfrc522_selftest(FAR struct mfrc522_dev_s *dev) +{ + uint8_t i; + uint8_t result[64]; + uint8_t zeros[25] = {0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0}; + + /* Execute a software reset */ + + mfrc522_softreset(dev); + + /* Flush the FIFO buffer */ + + mfrc522_writeu8(dev, MFRC522_FIFO_LEVEL_REG, MFRC522_FLUSH_BUFFER); + + /* Clear the internal buffer by writing 25 bytes 0x00 */ + + mfrc522_writeblk(dev, MFRC522_FIFO_DATA_REG, zeros, 25); + + /* Transfer to internal buffer */ + + mfrc522_writeu8(dev, MFRC522_COMMAND_REG, MFRC522_MEM_CMD); + + /* Enable self-test */ + + mfrc522_writeu8(dev, MFRC522_AUTOTEST_REG, MFRC522_SELFTEST_EN); + + /* Write 0x00 to FIFO buffer */ + + mfrc522_writeu8(dev, MFRC522_FIFO_DATA_REG, 0x00); + + /* Start self-test by issuing the CalcCRC command */ + + mfrc522_writeu8(dev, MFRC522_COMMAND_REG, MFRC522_CALC_CRC_CMD); + + /* Wait for self-test to complete */ + + for (i = 0; i < 255; i++) + { + uint8_t n; + + n = mfrc522_readu8(dev, MFRC522_DIV_IRQ_REG); + if (n & MFRC522_CRC_IRQ) + { + break; + } + } + + /* Stop calculating CRC for new content in the FIFO */ + + mfrc522_writeu8(dev, MFRC522_COMMAND_REG, MFRC522_IDLE_CMD); + + /* Read out the 64 bytes result from the FIFO buffer */ + + mfrc522_readblk(dev, MFRC522_FIFO_DATA_REG, result, 64, 0); + + /* Self-test done. Reset AutoTestReg register to normal operation */ + + mfrc522_writeu8(dev, MFRC522_AUTOTEST_REG, 0x00); + + mfrc522info("Self Test Result:\n"); + for (i = 1; i <= 64; i++) + { + printf("0x%02X ", result[i - 1]); + + if ((i % 8) == 0) + { + printf("\n"); + } + } + + mfrc522info("Done!\n"); + return OK; +} + +/**************************************************************************** + * Name: mfrc522_open + * + * Description: + * This function is called whenever the MFRC522 device is opened. + * + ****************************************************************************/ + +static int mfrc522_open(FAR struct file *filep) +{ + FAR struct inode *inode; + FAR struct mfrc522_dev_s *dev; + + DEBUGASSERT(filep); + inode = filep->f_inode; + + DEBUGASSERT(inode && inode->i_private); + dev = inode->i_private; + + mfrc522_configspi(dev->spi); + + usleep(10000); + + mfrc522_getfwversion(dev); + + dev->state = MFRC522_STATE_IDLE; + return OK; +} + +/**************************************************************************** + * Name: mfrc522_close + * + * Description: + * This routine is called when the MFRC522 device is closed. + * + ****************************************************************************/ + +static int mfrc522_close(FAR struct file *filep) +{ + FAR struct inode *inode; + FAR struct mfrc522_dev_s *dev; + + DEBUGASSERT(filep); + inode = filep->f_inode; + + DEBUGASSERT(inode && inode->i_private); + dev = inode->i_private; + + dev->state = MFRC522_STATE_NOT_INIT; + + return OK; +} + +/**************************************************************************** + * Name: mfrc522_read + * + * Description: + * This routine is called when the device is read. + * + * Returns TAG id as string to buffer. + * or -EIO if no TAG found + * + ****************************************************************************/ + +static ssize_t mfrc522_read(FAR struct file *filep, FAR char *buffer, + size_t buflen) +{ + FAR struct inode *inode; + FAR struct mfrc522_dev_s *dev; + FAR struct picc_uid_s uid; + + DEBUGASSERT(filep); + inode = filep->f_inode; + + DEBUGASSERT(inode && inode->i_private); + dev = inode->i_private; + + /* Is a card near? */ + + if (!mfrc522_picc_detect(dev)) + { + mfrc522err("Card is not present!\n"); + return -EAGAIN; + } + + /* Now read the UID */ + + mfrc522_picc_select(dev, &uid, 0); + + if (uid.sak != 0) + { + if (buffer) + { + snprintf(buffer, buflen, "0x%02X%02X%02X%02X", + uid.uid_data[0], uid.uid_data[1], + uid.uid_data[2], uid.uid_data[3]); + return buflen; + } + } + + return OK; +} + +/**************************************************************************** + * Name: mfrc522_write + ****************************************************************************/ + +static ssize_t mfrc522_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen) +{ + FAR struct inode *inode; + FAR struct mfrc522_dev_s *dev; + + DEBUGASSERT(filep); + inode = filep->f_inode; + + DEBUGASSERT(inode && inode->i_private); + dev = inode->i_private; + + (void)dev; + + return -ENOSYS; +} + +/**************************************************************************** + * Name: mfrc522_ioctl + ****************************************************************************/ + +static int mfrc522_ioctl(FAR struct file *filep, int cmd, unsigned long arg) +{ + FAR struct inode *inode; + FAR struct mfrc522_dev_s *dev; + int ret = OK; + + DEBUGASSERT(filep); + inode = filep->f_inode; + + DEBUGASSERT(inode && inode->i_private); + dev = inode->i_private; + + switch (cmd) + { + case MFRC522IOC_GET_PICC_UID: + { + struct picc_uid_s *uid = (struct picc_uid_s *)arg; + + /* Is a card near? */ + + if (mfrc522_picc_detect(dev)) + { + ret = mfrc522_picc_select(dev, uid, 0); + } + } + break; + + case MFRC522IOC_GET_STATE: + ret = dev->state; + break; + + default: + mfrc522err("ERROR: Unrecognized cmd: %d\n", cmd); + ret = -ENOTTY; + break; + } + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: mfrc522_register + * + * Description: + * Register the MFRC522 character device as 'devpath' + * + * Input Parameters: + * devpath - The full path to the driver to register. + * E.g., "/dev/rfid0" + * spi - An instance of the SPI interface to use to communicate with + * MFRC522. + * config - chip config + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int mfrc522_register(FAR const char *devpath, FAR struct spi_dev_s *spi) +{ + FAR struct mfrc522_dev_s *dev; + uint8_t fwver; + int ret = 0; + + /* Initialize the MFRC522 device structure */ + + dev = (FAR struct mfrc522_dev_s *)kmm_malloc(sizeof(struct mfrc522_dev_s)); + if (!dev) + { + mfrc522err("ERROR: Failed to allocate instance\n"); + return -ENOMEM; + } + + dev->spi = spi; + + /* Device is not initialized yet */ + + dev->state = MFRC522_STATE_NOT_INIT; + +#if defined CONFIG_PM + dev->pm_level = PM_IDLE; +#endif + + /* mfrc522_attachirq(dev, mfrc522_irqhandler); */ + + /* Initialize the MFRC522 */ + + mfrc522_init(dev); + + /* Device initialized and idle */ + + dev->state = MFRC522_STATE_IDLE; + + /* Read the Firmware Version */ + + fwver = mfrc522_getfwversion(dev); + + mfrc522info("MFRC522 Firmware Version: 0x%02X!\n", fwver); + + /* If returned firmware version is unknown don't register the device */ + + if (fwver != 0x90 && fwver != 0x91 && fwver != 0x92 && fwver != 0x88 ) + { + mfrc522err("None supported device detected!\n"); + goto firmware_error; + } + + /* Register the character driver */ + + ret = register_driver(devpath, &g_mfrc522fops, 0666, dev); + if (ret < 0) + { + mfrc522err("ERROR: Failed to register driver: %d\n", ret); + kmm_free(dev); + } + + return ret; + +firmware_error: + kmm_free(dev); + return -ENODEV; +} diff --git a/drivers/contactless/mfrc522.h b/drivers/contactless/mfrc522.h new file mode 100644 index 0000000000000000000000000000000000000000..9bc3903fd4fa21fcc11dc19eb5f4c3505e41a016 --- /dev/null +++ b/drivers/contactless/mfrc522.h @@ -0,0 +1,429 @@ +/**************************************************************************** + * drivers/contactless/mfrc522.h + * + * Copyright(C) 2016 Uniquix Ltda. All rights reserved. + * Authors: 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. + * + ****************************************************************************/ + +#ifndef __DRIVERS_CONTACTLESS_MFRC522_H +#define __DRIVERS_CONTACTLESS_MFRC522_H 1 + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include +#include + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* The commands used by the PCD to manage communication with several PICCs + * (ISO 14443-3, Type A, section 6.4) + */ + +#define PICC_CMD_REQA 0x26 /* REQuest command, Type A */ +#define PICC_CMD_WUPA 0x52 /* Wake-UP command, Type A */ +#define PICC_CMD_CT 0x88 /* Cascade Tag, used during anti collision. */ +#define PICC_CMD_SEL_CL1 0x93 /* Anti collision/Select, Cascade Level 1 */ +#define PICC_CMD_SEL_CL2 0x95 /* Anti collision/Select, Cascade Level 2 */ +#define PICC_CMD_SEL_CL3 0x97 /* Anti collision/Select, Cascade Level 3 */ +#define PICC_CMD_HLTA 0x50 /* HaLT command, Type A */ + +/* The commands used for MIFARE Classic + * (from http://www.mouser.com/ds/2/302/MF1S503x-89574.pdf, Section 9) + * Use PCD_MFAuthent to authenticate access to a sector, then use these + * commands to read/write/modify the blocks on the sector. + * The read/write commands can also be used for MIFARE Ultralight. + */ + +#define PICC_CMD_MF_AUTH_KEY_A 0x60 /* Perform authentication with Key A */ +#define PICC_CMD_MF_AUTH_KEY_B 0x61 /* Perform authentication with Key B */ +#define PICC_CMD_MF_READ 0x30 /* Reads one 16 byte block from auth sector */ +#define PICC_CMD_MF_WRITE 0xA0 /* Writes one 16 byte block to auth senctor */ +#define PICC_CMD_MF_DECREMENT 0xC0 /* Decrements contents of a block */ +#define PICC_CMD_MF_INCREMENT 0xC1 /* Increments contents of a block */ +#define PICC_CMD_MF_RESTORE 0xC2 /* Reads the contents of a block */ +#define PICC_CMD_MF_TRANSFER 0xB0 /* Writes the contents of a block */ + +/* The commands used for MIFARE Ultralight + * (from http://www.nxp.com/documents/data_sheet/MF0ICU1.pdf, Section 8.6) + * The PICC_CMD_MF_READ/_MF_WRITE can also be used for MIFARE Ultralight. + */ + +#define PICC_CMD_UL_WRITE 0xA2 /* Writes one 4 byte page to the PICC. */ + +/* MFRC522 Registers */ + +/* NOTE: All SPI addresses are shifted one bit left in the SPI address byte + * See section 8.1.2.3 from MFRC522 datasheet + */ + +/* Page 0: Commands and status */ + /* 0x00 - reserved for future use */ +#define MFRC522_COMMAND_REG (0x01 << 1) /* starts/stops command execution */ +#define MFRC522_COM_IEN_REG (0x02 << 1) /* dis/enable int. req. ctrl bits */ +#define MFRC522_DIV_IEN_REG (0x03 << 1) /* dis/enable int. req. ctrl bits */ +#define MFRC522_COM_IRQ_REG (0x04 << 1) /* interrupt request bits */ +#define MFRC522_DIV_IRQ_REG (0x05 << 1) /* interrupt request bits */ +#define MFRC522_ERROR_REG (0x06 << 1) /* error bits status of last cmd */ +#define MFRC522_STATUS1_REG (0x07 << 1) /* communication status bits */ +#define MFRC522_STATUS2_REG (0x08 << 1) /* rcvr and transmitter status */ +#define MFRC522_FIFO_DATA_REG (0x09 << 1) /* input/output of FIFO buffer */ +#define MFRC522_FIFO_LEVEL_REG (0x0A << 1) /* number of bytes stored in the FIFO */ +#define MFRC522_WATER_LEVEL_REG (0x0B << 1) /* level for FIFO under/overflow */ +#define MFRC522_CONTROL_REG (0x0C << 1) /* miscellaneos control register */ +#define MFRC522_BIT_FRAMING_REG (0x0D << 1) /* adjustments for bit-oriented frames */ +#define MFRC522_COLL_REG (0x0E << 1) /* bit position of first bit-collision detected */ + /* 0x0F - reserved for future use */ +/* Page 1: Commands */ + /* 0x10 - reserved for future use */ +#define MFRC522_MODE_REG (0x11 << 1) /* defines general modes for transmit/receive */ +#define MFRC522_TX_MODE_REG (0x12 << 1) /* defines transmission data rate and framing */ +#define MFRC522_RX_MODE_REG (0x13 << 1) /* defines reception data rate and framing */ +#define MFRC522_TX_CTRL_REG (0x14 << 1) /* controls antenna driver pins TX1 and TX2 */ +#define MFRC522_TX_ASK_REG (0x15 << 1) /* controls the setting of transmission modulation */ +#define MFRC522_TX_SEL_REG (0x16 << 1) /* selects the internal sources for antenna driver */ +#define MFRC522_RX_SEL_REG (0x17 << 1) /* selects the internal receiver settings */ +#define MFRC522_RX_THLD_REG (0x18 << 1) /* selects the thresholds for bit decoder */ +#define MFRC522_DEMOD_REG (0x19 << 1) /* defines demodulator settings */ + /* 0x1A - reserved for future use */ + /* 0x1B - reserved for future use */ +#define MFRC522_MF_TX_REG (0x1C << 1) /* controls some MIFARE comm tx param */ +#define MFRC522_MF_RX_REG (0x1D << 1) /* controls some MIFARE comm rx param */ + /* 0x1E - reserved for future use */ +#define MFRC522_SERIAL_SPD_REG (0x1F << 1) /* selects the speed of the serial UART */ + +/* Page 2: Configuration */ + /* 0x20 - reserved for future use */ +#define MFRC522_CRC_RESULT_REGH (0x21 << 1) /* shows the MSB values of CRC calc. */ +#define MFRC522_CRC_RESULT_REGL (0x22 << 1) /* shows the LSB values of CRC calc. */ + /* 0x23 - reserved for future use */ +#define MFRC522_MOD_WIDTH_REG (0x24 << 1) /* controls the ModWidth setting */ + /* 0x25 - reserved for future use */ +#define MFRC522_RF_CFG_REG (0x26 << 1) /* configures the receiver gain */ +#define MFRC522_GSN_REG (0x27 << 1) /* selects the conductance of n-driver TX1/2 */ +#define MFRC522_CW_GSP_REG (0x28 << 1) /* defines the conductance of p-driver during no modulation */ +#define MFRC522_MOD_GSP_REG (0x29 << 1) /* defines the conductance of p-driver during modulation */ +#define MFRC522_TMODE_REG (0x2A << 1) /* defines settings for the internal timer */ +#define MFRC522_TPRESCALER_REG (0x2B << 1) /* the lower 8 bits of TPrescaler value */ +#define MFRC522_TRELOAD_REGH (0x2C << 1) /* defines the 16-bit timer reload value */ +#define MFRC522_TRELOAD_REGL (0x2D << 1) /* defines the 16-bit timer reload value */ +#define MFRC522_TCOUNT_VAL_REGH (0x2E << 1) /* shows the 16-bit timer value */ +#define MFRC522_TCOUNT_VAL_REGL (0x2F << 1) /* shows the 16-bit timer value */ + +/* Page 3: Test Registers */ + /* 0x30 - reserved for future use */ +#define MFRC522_TEST_SEL1_REG (0x31 << 1) /* general test signal configuration */ +#define MFRC522_TEST_SEL2_REG (0x32 << 1) /* general test signal configuration */ +#define MFRC522_TEST_PIN_EN_REG (0x33 << 1) /* enables pin output driver on pins D1 to D7 */ +#define MFRC522_TEST_PIN_VAL_REG (0x34 << 1) /* defines the values to D1 to D7 */ +#define MFRC522_TEST_BUS_REG (0x35 << 1) /* shows the status of the internal test bus */ +#define MFRC522_AUTOTEST_REG (0x36 << 1) /* controls the digital self test */ +#define MFRC522_VERSION_REG (0x37 << 1) /* shows the software version */ +#define MFRC522_ANALOG_TEST_REG (0x38 << 1) /* controls the pins AUX1 and AUX2 */ +#define MFRC522_TEST_DAC1_REG (0x39 << 1) /* defines the test value for TestDAC1 */ +#define MFRC522_TEST_DAC2_REG (0x3A << 1) /* defines the test value for TestDAC2 */ +#define MFRC522_TEST_ADC_REG (0x3B << 1) /* show the value of ADC I and Q channels */ + +/* Section 9.3.1.2: MFRC522 Command Register */ + +#define MFRC522_CMD_MASK 0x0F +# define MFRC522_IDLE_CMD 0x00 /* no action, cancels current command execution */ +# define MFRC522_MEM_CMD 0x01 /* stores 25 bytes into the internal buffer */ +# define MFRC522_GEN_RND_ID_CMD 0x02 /* generates a 10-bytes random ID number */ +# define MFRC522_CALC_CRC_CMD 0x03 /* activates the CRC coprocessor or self test */ +# define MFRC522_TRANSMIT_CMD 0x04 /* transmits data from the FIFO buffer */ +# define MFRC522_NO_CHANGE_CMD 0x07 /* no command change, used to modify CommandReg */ +# define MFRC522_RECEIVE_CMD 0x08 /* activates the receiver circuits */ +# define MFRC522_TRANSCV_CMD 0x0C /* transmits data from FIFO and receive automatically */ +# define MFRC522_MF_AUTH_CMD 0x0E /* performs the MIFARE stand authentication as a reader */ +# define MFRC522_SOFTRST_CMD 0x0F /* resets the MFRC522 */ +#define MFRC522_POWER_DOWN (1 << 4) /* soft power-down mode entered */ +#define MFRC522_RCV_OFF (1 << 5) /* turns off analog part of receiver */ + +/* Section 9.3.1.3: ComIEnReg register */ + +#define MFRC522_TIMER_IEN (1 << 0) /* allows the timer interrupt request on pin IRQ */ +#define MFRC522_ERR_IEN (1 << 1) /* allows the error interrupt request on pin IRQ */ +#define MFRC522_LO_ALERT_IEN (1 << 2) /* allows the low alert interrupt request on pin IRQ */ +#define MFRC522_HI_ALERT_IEN (1 << 3) /* allows the high alert interrupt request on pin IRQ */ +#define MFRC522_IDLE_IEN (1 << 4) /* allows the idle interrupt request on pin IRQ */ +#define MFRC522_RX_IEN (1 << 5) /* allows the receiver interrupt request on pin IRQ */ +#define MFRC522_TX_IEN (1 << 6) /* allows the transmitter interrupt request on pin IRQ */ +#define MFRC522_IRQ_INV (1 << 7) /* signal on pin IRQ is inverse of IRq bit from Status1Reg */ + +/* Section 9.3.1.4: DivIEnReg register */ + +#define MFRC522_CRC_IEN (1 << 2) /* allows the CRC interrupt request on pin IRQ */ +#define MFRC522_MFIN_ACT_IEN (1 << 4) /* allows the MFIN active interrupt request on pin IRQ */ +#define MFRC522_IRQ_PUSH_PULL (1 << 7) /* 1 = IRQ pin is a standard CMOS output pin, 0 = open-drain */ + +/* Section 9.3.1.5: ComIrqReg register */ + +#define MFRC522_COM_IRQ_MASK (0x7F) +#define MFRC522_TIMER_IRQ (1 << 0) /* enabled when TCounterValReg reaches value 0 */ +#define MFRC522_ERR_IRQ (1 << 1) /* any error bit in the ErrorReg register is set */ +#define MFRC522_LO_ALERT_IRQ (1 << 2) /* Status1Reg register’s LoAlert bit is set */ +#define MFRC522_HI_ALERT_IRQ (1 << 3) /* Status1Reg register’s HiAlert bit is set */ +#define MFRC522_IDLE_IRQ (1 << 4) /* if a command terminates this bit is set */ +#define MFRC522_RX_IRQ (1 << 5) /* receiver has detected the end of a valid data stream */ +#define MFRC522_TX_IRQ (1 << 6) /* set immediately after the last data bit was transmitted */ +#define MFRC522_SET1 (1 << 7) /* indicate the status of ComIrqReg bits */ + +/* Section 9.3.1.6: DivIrqReg register */ + +#define MFRC522_CRC_IRQ (1 << 2) /* the CalcCRC command is active and all data is processed */ +#define MFRC522_MFIN_ACT_IRQ (1 << 4) /* MFIN is active, int is set on rising/falling signal edge */ +#define MFRC522_SET2 (1 << 7) /* indicates the status of the marked bits in the DivIrqReg */ + +/* Section 9.3.1.7: ErrorReg register */ + +#define MFRC522_PROTO_ERR (1 << 0) /* set if the SOF is incorrect or during MFAuthent if data is incorrect */ +#define MFRC522_PARITY_ERR (1 << 1) /* parity check failed */ +#define MFRC522_CRC_ERR (1 << 2) /* the RxCRCEn bit is set and the CRC calculation fails */ +#define MFRC522_COLL_ERR (1 << 3) /* a bit-collision is detected */ +#define MFRC522_BUF_OVFL_ERR (1 << 4) /* FIFO is full and the host or internal state machine try to write data */ +#define MFRC522_TEMP_ERR (1 << 6) /* internal temperature sensor detects overheating */ +#define MFRC522_WR_ERR (1 << 7) /* data write error in the FIFO, host writing to FIFO at the wrong time */ + +/* Section 9.3.1.8: Status1Reg register */ + +#define MFRC522_LO_ALERT (1 << 0) /* number of bytes on FIFO lower than the water-mark */ +#define MFRC522_HI_ALERT (1 << 1) /* number of bytes on FIFO higher than the water-mark */ +#define MFRC522_TRUNNING (1 << 3) /* timer is running */ +#define MFRC522_IRQ (1 << 4) /* indicates if any interrupt source requests attention */ +#define MFRC522_CRC_READY (1 << 5) /* the CRC calculation has finished */ +#define MFRC522_CRC_OK (1 << 6) /* when the calculation is done correctly this bit change to 1 */ + +/* Section 9.3.1.9: Status2Reg register */ + +#define MFRC522_MODEM_STATE_MASK (7 << 0) /* shows the state of the transmitter and receiver state machine */ +#define MFRC522_MODEM_IDLE (0) /* idle */ +#define MFRC522_MODEM_WAIT_BFR (1) /* wait for the BitFramingReg register’s StartSend bit */ +#define MFRC522_MODEM_TXWAIT (2) /* wait until RF field is present if TxWaitRF bit is set to 1 */ +#define MFRC522_MODEM_TXING (3) /* transmitting */ +#define MFRC522_MODEM_RXWAIT (4) /* wait until RF field is present if TxWaitRF bit is set to 1 */ +#define MFRC522_MODEM_WAIT_DATA (5) /* wait for data */ +#define MFRC522_MODEM_RXING (6) /* receiving */ +#define MFRC522_MF_CRYPTO1_ON (1 << 3) /* MIFARE Crypto1 unit is switched on */ +#define MFRC522_I2C_FORCE_HS (1 << 6) /* set the I2C to high-speed mode (R/W bit) */ +#define MFRC522_TEMP_SENS_CLEAR (1 << 7) /* clears the temperature error if it is below 125C (R/W bit) */ + +/* Section 9.3.1.10: FIFODataReg register */ + +#define MFRC522_FIFO_DATA_MASK (0xFF) /* Input and output of 64 byte FIFO buffer */ + +/* Section 9.3.1.11: FIFOLevelReg register */ + +#define MFRC522_FIFOLEVEL_MASK (0x7F) /* indicates the number of bytes stored in the FIFO buffer */ +#define MFRC522_FLUSH_BUFFER (1 << 7) /* immediately clears the internal FIFO buffer */ + +/* Section 9.3.1.12: WaterLevelReg register */ + +#define MFRC522_WATER_LEVEL_MASK (0x3F) /* level for FIFO under- and overflow warning */ + +/* Section 9.3.1.13: ControlReg register */ + +#define MFRC522_RX_LAST_BITS_MASK (7 << 0) /* indicates the number of valid bits in the last received byte */ +#define MFRC522_TSTART_NOW (1 << 6) /* timer starts immediately */ +#define MFRC522_TSTOP_NOW (1 << 7) /* timer stops immediately */ + +/* Section 9.3.1.14: BitFramingReg register */ + +#define MFRC522_TX_LAST_BITS_MASK (7 << 0) /* defines the number of bits of the last byte that will be transmitted */ +#define MFRC522_RX_ALIGN_MASK (7 << 4) /* used for reception of bit-oriented frames */ +#define MFRC522_START_SEND (1 << 7) /* starts the transmission of data */ + +/* Section 9.3.1.15: CollReg register */ + +#define MFRC522_COLL_POS_MASK (0x1F) /* shows the bit position of the first detected collision */ +#define MFRC522_COLL_POS_NOT_VALID (1 << 5) /* no collision detected or it is out of the range of CollPos[4:0] */ +#define MFRC522_VALUES_AFTER_COLL (1 << 7) /* 0 means: all received bits will be cleared after a collision */ + +/* Section 9.3.2.2: ModeReg register */ + +#define MFRC522_CRC_PRESET_MASK (0x3) /* defines the preset value for the CalcCRC */ +#define MFRC522_CRC_PRESET_0000 (0x0) /* 0000h CRC preset value */ +#define MFRC522_CRC_PRESET_6363 (0x1) /* 6363h CRC preset value */ +#define MFRC522_CRC_PRESET_A671 (0x2) /* A671h CRC preset value */ +#define MFRC522_CRC_PRESET_FFFF (0x3) /* FFFFh CRC preset value */ +#define MFRC522_POL_MFIN (1 << 3) /* defines the polarity of pin MFIN */ +#define MFRC522_TX_WAIT_RF (1 << 5) /* transmitter can only be started if an RF field is generated */ +#define MFRC522_MSB_FIRST (1 << 7) /* CRC coprocessor calculates the CRC with MSB first */ + +/* Section 9.3.2.3: TxModeReg register */ + +#define MFRC522_INV_MOD (1 << 3) /* modulation of transmitted data is inverted */ +#define MFRC522_TX_SPEED_MASK (7 << 4) /* defines the bit rate during data transmission */ +#define MFRC522_TX_106KBD (0 << 4) /* 106 kBd */ +#define MFRC522_TX_212KBD (1 << 4) /* 212 kBd */ +#define MFRC522_TX_424KBD (2 << 4) /* 424 kBd */ +#define MFRC522_TX_848KBD (3 << 4) /* 848 kBd */ + /* 4-7 << 4 - reserved */ +#define MFRC522_TX_CRC_EN (1 << 7) /* enables CRC generation during data transmission */ + +/* Section 9.3.2.4: RxModeReg register */ + +#define MFRC522_RX_MULTIPLE (1 << 2) /* enable to receive more than one data frame, only at 106kBd */ +#define MFRC522_RX_NO_ERR (1 << 3) /* ignore invalid data stream error (less than 4 bits received) */ +#define MFRC522_RX_SPEED_MASK (7 << 4) /* defines the bit rate during data reception */ +#define MFRC522_RX_106KBD (0 << 4) /* 106 kBd */ +#define MFRC522_RX_212KBD (1 << 4) /* 212 kBd */ +#define MFRC522_RX_424KBD (2 << 4) /* 424 kBd */ +#define MFRC522_RX_848KBD (3 << 4) /* 848 kBd */ + /* 4-7 << 4 - reserved */ +#define MFRC522_RX_CRC_EN (1 << 7) /* enables CRC generation during data reception */ + +/* Section 9.3.2.5: TxControlReg register */ + +#define MFRC522_TX1_RF_EN (1 << 0) /* output signal on pin TX1 delivers 13.56MHz */ +#define MFRC522_TX2_RF_EN (1 << 1) /* output signal on pin TX2 delivers 13.56MHz */ + /* bit 2 - reserved */ +#define MFRC522_TX2_CW (1 << 3) /* output signal on pin TX2 delivers (un)modulated 13.56MHz */ +#define MFRC522_INV_TX1_RF_OFF (1 << 4) /* output signal on pin TX1 is inverted when driver TX1 is disabled */ +#define MFRC522_INV_TX2_RF_OFF (1 << 5) /* output signal on pin TX2 is inverted when driver TX2 is disabled */ +#define MFRC522_INV_TX1_RF_ON (1 << 6) /* output signal on pin TX1 is inverted when driver TX1 is enabled */ +#define MFRC522_INV_TX2_RF_ON (1 << 7) /* output signal on pin TX2 is inverted when driver TX2 is enabled */ + +/* Section 9.3.2.6: TxASKReg register */ + +#define MFRC522_FORCE_100ASK (1 << 6) /* forces a 100% ASK modulation independent of the ModGsPReg setting */ + +/* Section 9.3.2.7: TxSelReg register */ + +#define MFRC522_MFOUT_SEL_MASK (0xF) /* selects the input for pin MFOUT */ +#define MFRC522_MFOUT_3STATE (0) /* 3-state */ +#define MFRC522_MFOUT_LOW (1) /* constant Low */ +#define MFRC522_MFOUT_HIGH (2) /* constant High */ +#define MFRC522_MFOUT_TEST_BUS (3) /* test bus signal as defined by the TstBusBitSel[2:0] value */ +#define MFRC522_MFOUT_INT_ENV (4) /* modulation signal (envelope) from the internal encoder */ +#define MFRC522_MFOUT_TX_STREAM (5) /* serial data stream to be transmitted, data stream before Miller encoder */ + /* 6 - reserved */ +#define MFRC522_MFOUT_RX_STREAM (7) /* serial data stream received, data stream after Manchester decoder */ + /* 8-15 - reserved */ +#define MFRC522_DRV_SEL_MASK (3 << 4) /* selects the input of drivers TX1 and TX2 */ +#define MFRC522_DRV_SEL_3STATE (0 << 4) /* 3-state */ +#define MFRC522_DRV_SEL_INT_ENV (1 << 4) /* modulation signal (envelope) from the internal encoder */ +#define MFRC522_DVR_SEL_ENV_MFIN (2 << 4) /* modulation signal (envelope) from pin MFIN */ +#define MFRC522_DVR_SEL_HIGH (3 << 4) /* High: depends on InvTx1RFOn/InvTx1RFOff and InvTx2RFOn/InvTx2RFOff */ + +/* Section 9.3.2.8: RxSelReg register */ + +#define MFRC522_RX_WAIT_MASK (0x3F) /* delay the receiver RxWait bit-clocks after transmission */ +#define MFRC522_UART_SEL_MASK (3 << 6) /* selects the input of the contactless UART */ +#define MFRC522_UART_LOW (0 << 6) /* constant Low */ +#define MFRC522_UART_MANCHESTER (1 << 6) /* Manchester with subcarrier from pin MFIN */ +#define MFRC522_UART_INT_MOD (2 << 6) /* modulated signal from the internal analog module, default */ +#define MFRC522_UART_NRZ_CODE (3 << 6) /* NRZ coding without subcarrier from pin MFIN */ + +/* Section 9.3.2.9: RxThresholdReg register */ + +#define MFRC522_COLL_LEVEL_MASK (7) /* the minimum signal strength to generate a bit-collision */ +#define MFRC522_MIN_LEVEL_MASK (0xF << 4) /* the minimum signal strength that will be accepted */ + +/* Section 9.3.2.10: DemodReg register */ + +#define MFRC522_TAU_SYNC_MASK (3 << 0) /* changes the time-constant of the internal PLL during burst */ +#define MFRC522_TAU_RCV_MASK (3 << 2) /* changes the time-constant of the internal PLL during data reception */ +#define MFRC522_TPRESCAL_EVEN (1 << 4) /* defines the Timer Prescaler formula to use */ +#define MFRC522_FIX_IQ (1 << 5) /* defines if reception will be fixed at channel I or Q based on AddIQ[1:0] */ +#define MFRC522_ADD_IQ_MASK (3 << 6) /* defines the use of I and Q channel during reception */ + +/* Section 9.3.2.13: MfTxReg register */ + +#define MFRC522_MF_TX_WAIT_MASK (3 << 0) /* defines the additional response time */ + +/* Section 9.3.2.14 MfRxReg register */ + +#define MFRC522_MF_RX_PARITY_DIS (1 << 4 ) /* disable parity bit to transmittion and reception */ + +/* Section 9.3.2.16: SerialSpeedReg register */ + +#define MFRC522_BR_T1_MASK (0x1F) /* factor BR_T1 adjusts the transfer speed */ +#define MFRC522_BR_T0_MASK (7 << 5) /* factor BR_T0 adjusts the transfer speed */ + +/* Section 9.3.3.6: RFCfgReg register */ + +#define MFRC522_RX_GAIN_MASK (0x7 << 4) +#define MFRC522_RX_GAIN_18DB (0x0 << 4) +#define MFRC522_RX_GAIN_23DB (0x1 << 4) +#define MFRC522_RX_GAIN_18DB_2 (0x2 << 4) +#define MFRC522_RX_GAIN_23DB_2 (0x3 << 4) +#define MFRC522_RX_GAIN_33DB (0x4 << 4) +#define MFRC522_RX_GAIN_38DB (0x5 << 4) +#define MFRC522_RX_GAIN_43DB (0x6 << 4) +#define MFRC522_RX_GAIN_48DB (0x7 << 4) + +/* MFRC522 TModeReg and TPrescalerReg registers */ + +#define MFRC522_TPRESCALER_HI_MASK (0xF) +#define MFRC522_TAUTO_RESTART (1 << 4) +#define MFRC522_TGATED_MASK (3 << 5) +#define MFRC522_TGATED_NONGATED (0 << 5) /* non-gated mode */ +#define MFRC522_TGATED_MFIN (1 << 5) /* gated by pin MFIN */ +#define MFRC522_TGATED_AUX1 (2 << 5) /* gated by pin AUX1 */ +#define MFRC522_TAUTO (1 << 7) /* timer starts automatically at the end of the transmission */ + +/* MFRC522 AutoTestReg register */ + +#define MFRC522_SELFTEST_MASK (0xF) /* for default operation the self test must be disabled by value 0000b */ +#define MFRC522_RFT_MASK (3 << 4) /* reserved for production tests */ +#define MFRC522_AMP_RCV (1 << 6) /* non-linear signal processing mode, increase range distance at 106kBd */ + +#define MFRC522_SELFTEST_EN 9 /* the self test is enabled by value 1001b */ + +#ifndef CONFIG_MFRC522_SPI_FREQ +# define CONFIG_MFRC522_SPI_FREQ (5000000) +#endif + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +struct mfrc522_dev_s +{ + uint8_t state; + FAR struct spi_dev_s *spi; /* SPI interface */ +}; + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +bool mfrc522_set_config(struct mfrc522_dev_s *dev, uint8_t flags); + +#endif /* __DRIVERS_CONTACTLESS_MFRC522_H */ diff --git a/drivers/wireless/pn532.c b/drivers/contactless/pn532.c similarity index 96% rename from drivers/wireless/pn532.c rename to drivers/contactless/pn532.c index e9bf42737c3dc5469e9fd7591f6f49ea1cf9a1b7..a7b21131810ae9797cb231ed67209b0fa15ea7eb 100644 --- a/drivers/wireless/pn532.c +++ b/drivers/contactless/pn532.c @@ -1,5 +1,5 @@ /**************************************************************************** - * include/wireless/pn532.h + * drivers/contactless/pn532.c * * Copyright(C) 2012, 2013, 2016 Offcode Ltd. All rights reserved. * Authors: Janne Rosberg @@ -48,7 +48,6 @@ #include #include -#include #include "pn532.h" @@ -56,7 +55,20 @@ * Pre-processor Definitions ****************************************************************************/ -#ifdef CONFIG_WL_PN532_DEBUG +/* Configuration ************************************************************/ +/* Bit order H/W feature must be enabled in order to support LSB first + * operation. + */ + +#if !defined(CONFIG_SPI_HWFEATURES) || !defined(CONFIG_SPI_BITORDER) +# error CONFIG_SPI_HWFEATURES=y and CONFIG_SPI_BITORDER=y required by this driver +#endif + +#ifndef CONFIG_ARCH_HAVE_SPI_BITORDER +# warning This platform does not support SPI LSB-bit order +#endif + +#ifdef CONFIG_CL_PN532_DEBUG # define pn532err _err # define pn532info _info #else @@ -69,13 +81,13 @@ # endif #endif -#ifdef CONFIG_WL_PN532_DEBUG_TX +#ifdef CONFIG_CL_PN532_DEBUG_TX # define tracetx errdumpbuffer #else # define tracetx(x...) #endif -#ifdef CONFIG_WL_PN532_DEBUG_RX +#ifdef CONFIG_CL_PN532_DEBUG_RX # define tracerx errdumpbuffer #else # define tracerx(x...) @@ -142,11 +154,19 @@ static const uint8_t pn532ack[] = static void pn532_lock(FAR struct spi_dev_s *spi) { + int ret; + (void)SPI_LOCK(spi, true); SPI_SETMODE(spi, SPIDEV_MODE0); - SPI_SETBITS(spi, -8); - (void)SPI_HWFEATURES(spi, 0); + SPI_SETBITS(spi, 8); + + ret = SPI_HWFEATURES(spi, HWFEAT_LSBFIRST); + if (ret < 0) + { + pn532err("ERROR: SPI_HWFEATURES failed to set bit order: %d\n", ret); + } + (void)SPI_SETFREQUENCY(spi, CONFIG_PN532_SPI_FREQ); } @@ -157,11 +177,19 @@ static void pn532_unlock(FAR struct spi_dev_s *spi) static inline void pn532_configspi(FAR struct spi_dev_s *spi) { + int ret; + /* Configure SPI for the PN532 module. */ SPI_SETMODE(spi, SPIDEV_MODE0); - SPI_SETBITS(spi, -8); - (void)SPI_HWFEATURES(spi, 0); + SPI_SETBITS(spi, 8); + + ret = SPI_HWFEATURES(spi, HWFEAT_LSBFIRST); + if (ret < 0) + { + pn532err("ERROR: SPI_HWFEATURES failed to set bit order: %d\n", ret); + } + (void)SPI_SETFREQUENCY(spi, CONFIG_PN532_SPI_FREQ); } @@ -173,7 +201,7 @@ static inline void pn532_select(struct pn532_dev_s *dev) } else { - SPI_SELECT(dev->spi, SPIDEV_WIRELESS, true); + SPI_SELECT(dev->spi, SPIDEV_CONTACTLESS, true); } } @@ -185,7 +213,7 @@ static inline void pn532_deselect(struct pn532_dev_s *dev) } else { - SPI_SELECT(dev->spi, SPIDEV_WIRELESS, false); + SPI_SELECT(dev->spi, SPIDEV_CONTACTLESS, false); } } diff --git a/drivers/wireless/pn532.h b/drivers/contactless/pn532.h similarity index 97% rename from drivers/wireless/pn532.h rename to drivers/contactless/pn532.h index 8361f5ed505bf2c1229ca7493f0e145d35fe066e..ee6980532b3932cc69903d95c29d35318297cc33 100644 --- a/drivers/wireless/pn532.h +++ b/drivers/contactless/pn532.h @@ -1,5 +1,5 @@ /**************************************************************************** - * drivers/wireless/pn532.h + * drivers/contactless/pn532.h * * Copyright(C) 2012, 2013, 2016 Offcode Ltd. All rights reserved. * Authors: Janne Rosberg @@ -35,8 +35,8 @@ * ****************************************************************************/ -#ifndef __DRIVERS_WIRELESS_PN532_H -#define __DRIVERS_WIRELESS_PN532_H 1 +#ifndef __DRIVERS_CONTACTLESS_PN532_H +#define __DRIVERS_CONTACTLESS_PN532_H 1 /**************************************************************************** * Included Files @@ -48,7 +48,7 @@ #include #include -#include +#include /**************************************************************************** * Pre-Processor Definitions @@ -168,4 +168,4 @@ struct pn532_dev_s bool pn532_set_config(struct pn532_dev_s *dev, uint8_t flags); -#endif /* __DRIVERS_WIRELESS_PN532_H */ +#endif /* __DRIVERS_CONTACTLESS_PN532_H */ diff --git a/drivers/dev_urandom.c b/drivers/dev_urandom.c index 4923544eae246d59fb8b3b761e2c25c3c860049b..e7022cb9f54e7effafb27eae4ff2616c28410e14 100644 --- a/drivers/dev_urandom.c +++ b/drivers/dev_urandom.c @@ -51,6 +51,7 @@ #include #include +#include #include #include @@ -66,26 +67,20 @@ #endif #ifdef CONFIG_DEV_URANDOM_XORSHIFT128 -# define PRNG() xorshift128() +# define PRNG() do_xorshift128() #else /* CONFIG_DEV_URANDOM_CONGRUENTIAL */ -# define PRNG() congruential() +# define PRNG() do_congruential() #endif /**************************************************************************** * Private Types ****************************************************************************/ -typedef union +union xorshift128_state_u { - struct - { - uint32_t x; - uint32_t y; - uint32_t z; - uint32_t w; - }; + struct xorshift128_state_s state; uint8_t u[16]; -} xorshift128_state_t; +}; /**************************************************************************** * Private Function Prototypes @@ -106,7 +101,7 @@ static int devurand_poll(FAR struct file *filep, FAR struct pollfd *fds, * Private Data ****************************************************************************/ -static const struct file_operations devurand_fops = +static const struct file_operations g_urand_fops = { NULL, /* open */ NULL, /* close */ @@ -123,7 +118,7 @@ static const struct file_operations devurand_fops = }; #ifdef CONFIG_DEV_URANDOM_XORSHIFT128 -static xorshift128_state_t prng; +static union xorshift128_state_u g_prng; #endif /**************************************************************************** @@ -131,34 +126,22 @@ static xorshift128_state_t prng; ****************************************************************************/ /**************************************************************************** - * Name: xorshift128 + * Name: do_xorshift128 ****************************************************************************/ #ifdef CONFIG_DEV_URANDOM_XORSHIFT128 -static uint32_t xorshift128(void) +static inline uint32_t do_xorshift128(void) { - uint32_t t = prng.x; - - t ^= t << 11; - t ^= t >> 8; - - prng.x = prng.y; - prng.y = prng.z; - prng.z = prng.w; - - prng.w ^= prng.w >> 19; - prng.w ^= t; - - return prng.w; + return xorshift128(&g_prng.state); } #endif /**************************************************************************** - * Name: congruential + * Name: do_congruential ****************************************************************************/ #ifdef CONFIG_DEV_URANDOM_CONGRUENTIAL -static uint32_t congruential(void) +static inline uint32_t do_congruential(void) { /* REVISIT: We could probably generate a 32-bit value with a single * call to nrand(). @@ -246,8 +229,8 @@ static ssize_t devurand_write(FAR struct file *filep, FAR const char *buffer, srand(seed); return len; #else - len = min(len, sizeof(prng.u)); - memcpy(&prng.u, buffer, len); + len = min(len, sizeof(g_prng.u)); + memcpy(&g_prng.u, buffer, len); return len; #endif } @@ -287,18 +270,18 @@ static int devurand_poll(FAR struct file *filep, FAR struct pollfd *fds, void devurandom_register(void) { + /* Seed the PRNG */ + #ifdef CONFIG_DEV_URANDOM_CONGRUENTIAL srand(10197); #else - /* Seed the PRNG */ - - prng.w = 97; - prng.x = 101; - prng.y = prng.w << 17; - prng.z = prng.x << 25; + g_prng.state.w = 97; + g_prng.state.x = 101; + g_prng.state.y = g_prng.state.w << 17; + g_prng.state.z = g_prng.state.x << 25; #endif - (void)register_driver("/dev/urandom", &devurand_fops, 0666, NULL); + (void)register_driver("/dev/urandom", &g_urand_fops, 0666, NULL); } #endif /* CONFIG_DEV_URANDOM && CONFIG_DEV_URANDOM_ARCH */ diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 95bd11250073c7d6e33829a512a5ed2ec56dc670..b5a7399f2c002cf4b8caf5cec57d190554404975 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -30,5 +30,10 @@ config I2C_NTRACE config I2C_DRIVER bool "I2C character driver" default n + ---help--- + Build in support for a character driver at /dev/i2c[N] that may be + used to perform I2C bus transfers from applications. The intent of + this driver is to support I2C testing. It is not suitable for use + in any real driver application. endif # I2C diff --git a/drivers/ioexpander/Kconfig b/drivers/ioexpander/Kconfig index de3b5d09a14011385ab07b6543c1b0d550ae5c4b..2b801e86dce1bb565b8356ceddb2725d5465b4e4 100644 --- a/drivers/ioexpander/Kconfig +++ b/drivers/ioexpander/Kconfig @@ -17,7 +17,7 @@ if IOEXPANDER config IOEXPANDER_PCA9555 bool "PCA9555 I2C IO expander" default n - select I2C + depends on I2C ---help--- Enable support for the NXP PCA9555 IO Expander @@ -37,22 +37,14 @@ config PCA9555_INT_ENABLE ---help--- Enable driver interrupt functionality -endif # IOEXPANDER_PCA9555 - -config IOEXPANDER_INT_ENABLE - bool - default y if PCA9555_INT_ENABLE - ---help--- - This is the global INT supported flag for io expanders - -config IOEXPANDER_MULTIPIN - bool "Support multi-pin access routines" - default n +config PCA9555_INT_NCALLBACKS + int "Max number of interrupt callbacks" + default 4 + depends on PCA9555_INT_ENABLE ---help--- - This settings enable the definition of routines for - optimized simultaneous access to multiple pins. + This is the maximum number of interrupt callbacks supported -config IOEXPANDER_SHADOW_MODE +config PCA9555_SHADOW_MODE bool "Use Shadow Mode instead of Read-Modify-Write Operations" default n ---help--- @@ -65,13 +57,122 @@ config IOEXPANDER_SHADOW_MODE This reduces bus traffic and eliminates the problem of EMC-caused toggling of output pins. -config IOEXPANDER_RETRY +config PCA9555_RETRY bool "Retry to send commands and data at I2C communication errors" default n ---help--- Retry to send commands and data if a I2C-communication error occurs (eg. caused by EMC). +endif # IOEXPANDER_PCA9555 + +config IOEXPANDER_TCA64XX + bool "TCA64XX I2C IO expander" + default n + depends on I2C && EXPERIMENTAL + ---help--- + Enable support for the TCA64XX IO Expander + +if IOEXPANDER_TCA64XX + +config TCA64XX_MULTIPLE + bool "Multiple TCA64XX Devices" + default n + ---help--- + Can be defined to support multiple TCA64XX devices on board. + +config TCA64XX_INT_ENABLE + bool "Enable TCA64XX Interrupt Support" + default n + select IOEXPANDER_INT_ENABLE + ---help--- + Enable driver interrupt functionality + +config TCA64XX_INT_NCALLBACKS + int "Max number of interrupt callbacks" + default 4 + depends on TCA64XX_INT_ENABLE + ---help--- + This is the maximum number of interrupt callbacks supported + +config TCA64XX_INT_POLL + bool "Enable interrupt poll" + default n + ---help--- + Enable polling for missed interrupts. + +config TCA64XX_INT_POLLDELAY + int "Interrupt poll delay (used)" + default 500000 + depends on TCA64XX_INT_POLL + ---help--- + This microsecond delay defines the polling rate for missed interrupts. + +endif # IOEXPANDER_TCA64XX + +config IOEXPANDER_PCF8574 + bool "PCF8574 I2C IO expander" + default n + depends on I2C && EXPERIMENTAL + ---help--- + Enable support for the PCF8574 IO Expander + +if IOEXPANDER_PCF8574 + +config PCF8574_MULTIPLE + bool "Multiple PCF8574 Devices" + default n + ---help--- + Can be defined to support multiple PCF8574 devices on board. + +config PCF8574_INT_ENABLE + bool "Enable PCF8574 Interrupt Support" + default n + select IOEXPANDER_INT_ENABLE + ---help--- + Enable driver interrupt functionality + +config PCF8574_INT_NCALLBACKS + int "Max number of interrupt callbacks" + default 4 + depends on PCF8574_INT_ENABLE + ---help--- + This is the maximum number of interrupt callbacks supported + +config PCF8574_INT_POLL + bool "Enable interrupt poll" + default n + ---help--- + Enable polling for missed interrupts. + +config PCF8574_INT_POLLDELAY + int "Interrupt poll delay (used)" + default 500000 + depends on PCF8574_INT_POLL + ---help--- + This microsecond delay defines the polling rate for missed interrupts. + +endif # IOEXPANDER_PCF8574 + +config IOEXPANDER_INT_ENABLE + bool + default n + ---help--- + This is the global INT supported flag for io expanders + +config IOEXPANDER_NPINS + int "Number of pins" + default 16 + ---help--- + Maximum number of pins supported per driver. + +config IOEXPANDER_MULTIPIN + bool "Support multi-pin access routines" + default n + ---help--- + This settings enable the definition of routines for + optimized simultaneous access to multiple pins. + endif # IOEXPANDER config DEV_GPIO @@ -81,4 +182,12 @@ config DEV_GPIO Enables a simple GPIO input/output driver to support application- space testing of hardware. +config GPIO_LOWER_HALF + bool "GPIO Lower Half" + default n + depends on DEV_GPIO && IOEXPANDER + ---help--- + Enable support for a lower half driver that provides GPIO driver + support for I/O expander pins. + endmenu # IO Expander/GPIO Support diff --git a/drivers/ioexpander/Make.defs b/drivers/ioexpander/Make.defs index 37e669fe9437311fc49f312e9fbda36ad85952da..8c3107993e6126c769ec67a113084f67beed225a 100644 --- a/drivers/ioexpander/Make.defs +++ b/drivers/ioexpander/Make.defs @@ -1,8 +1,9 @@ ############################################################################ # drivers/ioexpander/Make.defs # -# Copyright (C) 2015 Gregory Nutt. All rights reserved. +# Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. # Author: Sebastien Lorquet +# Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -43,12 +44,23 @@ ifeq ($(CONFIG_IOEXPANDER_PCA9555),y) CSRCS += pca9555.c endif +ifeq ($(CONFIG_IOEXPANDER_TCA64XX),y) + CSRCS += tca64xx.c +endif + +ifeq ($(CONFIG_IOEXPANDER_PCF8574),y) + CSRCS += pcf8574.c +endif + endif # CONFIG_IOEXPANDER # GPIO test device driver (independent of IOEXPANDERS) ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += gpio.c +ifeq ($(CONFIG_GPIO_LOWER_HALF),y) + CSRCS += gpio_lower_half.c +endif endif # The folling implements an awkward OR diff --git a/drivers/ioexpander/gpio.c b/drivers/ioexpander/gpio.c index b20068eff2054e0257c523d1995448060e0cad09..bf256e8a0adb1675dc59dd3839d32f81cbf4ba30 100644 --- a/drivers/ioexpander/gpio.c +++ b/drivers/ioexpander/gpio.c @@ -187,7 +187,7 @@ static int gpio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) if (dev->gp_pintype == GPIO_OUTPUT_PIN) { DEBUGASSERT(arg == 0ul || arg == 1ul); - ret = dev->gp_ops->go_write(dev, (int)arg); + ret = dev->gp_ops->go_write(dev, (bool)arg); } else { @@ -197,13 +197,13 @@ static int gpio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) /* Command: GPIOC_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. + * Argument: A pointer to an bool value to receive the result: + * false=low value; true=high value. */ case GPIOC_READ: { - FAR int *ptr = (FAR int *)((uintptr_t)arg); + FAR bool *ptr = (FAR bool *)((uintptr_t)arg); DEBUGASSERT(ptr != NULL); ret = dev->gp_ops->go_read(dev, ptr); @@ -211,6 +211,21 @@ static int gpio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) } break; + /* Command: GPIOC_PINTYPE + * Description: Return the GPIO pin type. + * Argument: A pointer to an instance of type enum gpio_pintype_e + */ + + case GPIOC_PINTYPE: + { + FAR enum gpio_pintype_e *ptr = (FAR enum gpio_pintype_e *)((uintptr_t)arg); + DEBUGASSERT(ptr != NULL); + + *ptr = dev->gp_pintype; + ret = OK; + } + break; + /* Command: GPIOC_REGISTER * Description: Register to receive a signal whenever there an * interrupt is received on an input gpio pin. This @@ -253,6 +268,33 @@ static int gpio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) } break; + /* Command: GPIOC_UNREGISTER + * Description: Stop receiving signals for pin interrupts. + * Argument: None. + */ + + case GPIOC_UNREGISTER: + if (dev->gp_pintype == GPIO_INTERRUPT_PIN) + { + /* Make sure that the pin interrupt is disabled */ + + ret = dev->gp_ops->go_enable(dev, false); + if (ret >= 0) + { + /* Detach the handler */ + + ret = dev->gp_ops->go_attach(dev, NULL); + + dev->gp_pid = 0; + dev->gp_signo = 0; + } + } + else + { + ret = -EACCES; + } + break; + /* Unrecognized command */ default: @@ -303,7 +345,7 @@ int gpio_pin_register(FAR struct gpio_dev_s *dev, int minor) DEBUGASSERT(dev->gp_ops->go_read != NULL && dev->gp_ops->go_write != NULL); fmt = "/dev/gpout%u"; - + } break; @@ -321,12 +363,12 @@ int gpio_pin_register(FAR struct gpio_dev_s *dev, int minor) return ret; } - fmt = "/dev/gpint%u"; + fmt = "/dev/gpint%u"; } break; default: - return -EINVAL; + return -EINVAL; } snprintf(devname, 16, fmt, (unsigned int)minor); diff --git a/drivers/ioexpander/gpio_lower_half.c b/drivers/ioexpander/gpio_lower_half.c new file mode 100644 index 0000000000000000000000000000000000000000..a18d946e853d7d44a8faaae5c5d25a3e16134ec4 --- /dev/null +++ b/drivers/ioexpander/gpio_lower_half.c @@ -0,0 +1,375 @@ +/**************************************************************************** + * drivers/ioexpander/gpio_lower_half.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_GPIO_LOWER_HALF + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* GPIO lower half driver state */ + +struct gplh_dev_s +{ + /* Publically visible lower-half state */ + + struct gpio_dev_s gpio; + + /* Private lower half data follows */ + + uint8_t pin; /* I/O expander pin ID */ + FAR struct ioexpander_dev_s *ioe; /* Contain I/O expander interface */ +#ifdef CONFIG_IOEXPANDER_INT_ENABLE + FAR void *handle; /* Interrupt attach handle */ + pin_interrupt_t callback; /* Interrupt callback */ +#endif +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +static int gplh_handler(FAR struct ioexpander_dev_s *ioe, + ioe_pinset_t pinset, FAR void *arg); +#endif + +/* GPIO lower half interface methods */ + +static int gplh_read(FAR struct gpio_dev_s *gpio, FAR bool *value); +static int gplh_write(FAR struct gpio_dev_s *gpio, bool value); +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +static int gplh_attach(FAR struct gpio_dev_s *gpio, pin_interrupt_t callback); +static int gplh_enable(FAR struct gpio_dev_s *gpio, bool enable); +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* GPIO Lower Half interface operations */ + +static const struct gpio_operations_s g_gplh_ops = +{ + gplh_read, /* read */ + gplh_write, /* write */ +#ifdef CONFIG_IOEXPANDER_INT_ENABLE + gplh_attach, /* attach */ + gplh_enable, /* enable */ +#else + NULL, /* attach */ + NULL, /* enable */ +#endif +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: gplh_handler + * + * Description: + * I/O expander interrupt callback function. + * + ****************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +static int gplh_handler(FAR struct ioexpander_dev_s *ioe, + ioe_pinset_t pinset, FAR void *arg) +{ + FAR struct gplh_dev_s *priv = (FAR struct gplh_dev_s *)arg; + + DEBUGASSERT(priv != NULL && priv->callback != NULL); + + gpioinfo("pin%u: pinset: %lx callback=%p\n", + priv->pin, (unsigned long)pinset, priv->callback); + + /* We received the callback from the I/O expander, forward this to the + * upper half GPIO driver via its callback. + */ + + return priv->callback(&priv->gpio); +} +#endif + +/**************************************************************************** + * Name: gplh_read + * + * Description: + * Read the value of the I/O expander pin. + * + ****************************************************************************/ + +static int gplh_read(FAR struct gpio_dev_s *gpio, FAR bool *value) +{ + FAR struct gplh_dev_s *priv = (FAR struct gplh_dev_s *)gpio; + + DEBUGASSERT(priv != NULL && priv->ioe != NULL && value != NULL); + + gpioinfo("pin%u: value=%p\n", priv->pin, value); + + /* Return the value from the I/O expander */ + + return IOEXP_READPIN(priv->ioe, priv->pin, value); +} + +/**************************************************************************** + * Name: gplh_write + * + * Description: + * Set the value of an I/O expander output pin + * + ****************************************************************************/ + +static int gplh_write(FAR struct gpio_dev_s *gpio, bool value) +{ + FAR struct gplh_dev_s *priv = (FAR struct gplh_dev_s *)gpio; + + DEBUGASSERT(priv != NULL && priv->ioe != NULL); + + gpioinfo("pin%u: value=%u\n", priv->pin, value); + + /* Write the value using the I/O expander */ + + return IOEXP_WRITEPIN(priv->ioe, priv->pin, value); +} + +/**************************************************************************** + * Name: gplh_attach + * + * Description: + * Detach and disable any current interrupt on the pin. Save the callback + * information for use when the pin interrupt is enabled. + * + ****************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +static int gplh_attach(FAR struct gpio_dev_s *gpio, pin_interrupt_t callback) +{ + FAR struct gplh_dev_s *priv = (FAR struct gplh_dev_s *)gpio; + + DEBUGASSERT(priv != NULL && priv->ioe != NULL); + + gpioinfo("pin%u: callback=%p\n", priv->pin, callback); + + /* Detach and disable any current interrupt on the pin. */ + + if (priv->handle != NULL) + { + gpioinfo("pin%u: Detaching handle %p\n", priv->pin, priv->handle); + (void)IOEP_DETACH(priv->ioe, priv->handle); + priv->handle = NULL; + } + + /* Save the callback function pointer for use when the pin interrupt + * is enabled. + */ + + priv->callback = callback; + return OK; +} +#endif + +/**************************************************************************** + * Name: gplh_enable + * + * Description: + * Enable or disable the I/O expander pin interrupt + * + ****************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +static int gplh_enable(FAR struct gpio_dev_s *gpio, bool enable) +{ + FAR struct gplh_dev_s *priv = (FAR struct gplh_dev_s *)gpio; + int ret = OK; + + DEBUGASSERT(priv != NULL && priv->ioe != NULL); + + gpioinfo("pin%u: %s callback=%p handle=%p\n", + priv->pin, enable ? "Enabling" : "Disabling", + priv->callback, priv->handle); + + /* Are we enabling or disabling the pin interrupt? */ + + if (enable) + { + /* We are enabling the pin interrupt. Make certain that there is + * an interrupt handler already attached. + */ + + if (priv->callback == NULL) + { + /* No callback has been attached */ + + gpiowarn("WARNING: pin%u: Attempt to enable before attaching\n", + priv->pin); + ret = -EPERM; + } + + /* Check if the interrupt is already attached and enabled */ + + else if (priv->handle == NULL) + { + ioe_pinset_t pinset = ((ioe_pinset_t)1 << priv->pin); + + /* We have a callback and the callback is not yet attached. + * do it now. + */ + + gpioinfo("pin%u: Attaching %p\n", priv->pin, priv->callback); + + priv->handle = IOEP_ATTACH(priv->ioe, pinset, gplh_handler, priv); + if (priv->handle == NULL) + { + gpioerr("ERROR: pin%u: IOEP_ATTACH() failed\n", priv->pin); + ret = -EIO; + } + } + } + else + { + /* Check if we are already detached */ + + if (priv->handle == NULL) + { + gpiowarn("WARNING: pin%u: Already detached\n", priv->pin); + } + else + { + gpioinfo("pin%u: Detaching handle=%p\n", priv->pin, priv->handle); + ret = IOEP_DETACH(priv->ioe, priv->handle); + if (ret < 0) + { + gpioerr("ERROR: pin%u: IOEP_DETACH() failed\n", + priv->pin, ret); + } + + /* We are no longer attached */ + + priv->handle = NULL; + } + } + + return ret; +} +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: gpio_lower_half + * + * Description: + * Create a GPIO pin device driver instance for an I/O expander pin. + * The I/O expander pin must have already been configured by the caller + * for the particular pintype. + * + * Input Parameters: + * ioe - An instance of the I/O expander interface + * pin - The I/O expander pin number for the driver + * pintype - See enum gpio_pintype_e + * minor - The minor device number to use when registering the device + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int gpio_lower_half(FAR struct ioexpander_dev_s *ioe, unsigned int pin, + enum gpio_pintype_e pintype, int minor) +{ + FAR struct gplh_dev_s *priv; + FAR struct gpio_dev_s *gpio; + int ret; + + DEBUGASSERT(ioe != NULL && pin < CONFIG_IOEXPANDER_NPINS && + (unsigned int)pintype < GPIO_NPINTYPES); + +#ifndef CONFIG_IOEXPANDER_INT_ENABLE + /* If there is no I/O expander interrupt support, then we cannot handle + * interrupting pin types. + */ + + DEBUGASSERT(pintype != GPIO_INTERRUPT_PIN); +#endif + + /* Allocate an new instance of the GPIO lower half driver */ + + priv = (FAR struct gplh_dev_s *)kmm_zalloc(sizeof(struct gplh_dev_s)); + if (priv == NULL) + { + gpioerr("ERROR: Failed to allocate driver state\n"); + return -ENOMEM; + } + + /* Initialize the non-zero elements of the newly allocated instance */ + + priv->pin = (uint8_t)pin; + priv->ioe = ioe; + gpio = &priv->gpio; + gpio->gp_pintype = (uint8_t)pintype; + gpio->gp_ops = &g_gplh_ops; + + /* Register the GPIO driver */ + + ret = gpio_pin_register(gpio, minor); + if (ret < 0) + { + gpioerr("ERROR: gpio_pin_register() failed: %d\n", ret); + kmm_free(priv); + } + + return ret; +} + +#endif /* CONFIG_GPIO_LOWER_HALF */ diff --git a/drivers/ioexpander/pca9555.c b/drivers/ioexpander/pca9555.c index 34000d07eb31a76ed08b9fe80a88048762851fa7..3da9849dc350aabdba845f0d31ed4e4c39d3c726 100644 --- a/drivers/ioexpander/pca9555.c +++ b/drivers/ioexpander/pca9555.c @@ -92,6 +92,12 @@ static int pca9555_multireadpin(FAR struct ioexpander_dev_s *dev, static int pca9555_multireadbuf(FAR struct ioexpander_dev_s *dev, FAR uint8_t *pins, FAR bool *values, int count); #endif +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +static FAR void *pca9555_attach(FAR struct ioexpander_dev_s *dev, + ioe_pinset_t pinset, ioe_callback_t callback, FAR void *arg); +static int pca9555_detach(FAR struct ioexpander_dev_s *dev, + FAR void *handle); +#endif /**************************************************************************** * Private Data @@ -110,17 +116,23 @@ static struct pca9555_dev_s g_pca9555; static struct pca9555_dev_s *g_pca9555list; #endif +/* I/O expander vtable */ + static const struct ioexpander_ops_s g_pca9555_ops = { pca9555_direction, pca9555_option, pca9555_writepin, pca9555_readpin, - pca9555_readbuf, + pca9555_readbuf #ifdef CONFIG_IOEXPANDER_MULTIPIN - pca9555_multiwritepin, - pca9555_multireadpin, - pca9555_multireadbuf, + , pca9555_multiwritepin + , pca9555_multireadpin + , pca9555_multireadbuf +#endif +#ifdef CONFIG_IOEXPANDER_INT_ENABLE + , pca9555_attach + , pca9555_detach #endif }; @@ -223,7 +235,7 @@ static int pca9555_setbit(FAR struct pca9555_dev_s *pca, uint8_t addr, buf[0] = addr; -#ifdef CONFIG_IOEXPANDER_SHADOW_MODE +#ifdef CONFIG_PCA9555_SHADOW_MODE /* Get the shadowed register value */ buf[1] = pca->sreg[addr]; @@ -247,14 +259,14 @@ static int pca9555_setbit(FAR struct pca9555_dev_s *pca, uint8_t addr, buf[1] &= ~(1 << pin); } -#ifdef CONFIG_IOEXPANDER_SHADOW_MODE +#ifdef CONFIG_PCA9555_SHADOW_MODE /* Save the new register value in the shadow register */ pca->sreg[addr] = buf[1]; #endif ret = pca9555_write(pca, buf, 2); -#ifdef CONFIG_IOEXPANDER_RETRY +#ifdef CONFIG_PCA9555_RETRY if (ret != OK) { /* Try again (only once) */ @@ -296,7 +308,7 @@ static int pca9555_getbit(FAR struct pca9555_dev_s *pca, uint8_t addr, return ret; } -#ifdef CONFIG_IOEXPANDER_SHADOW_MODE +#ifdef CONFIG_PCA9555_SHADOW_MODE /* Save the new register value in the shadow register */ pca->sreg[addr] = buf; @@ -310,7 +322,15 @@ static int pca9555_getbit(FAR struct pca9555_dev_s *pca, uint8_t addr, * Name: pca9555_direction * * Description: - * See include/nuttx/ioexpander/ioexpander.h + * Set the direction of an ioexpander pin. Required. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin to alter in this call + * dir - One of the IOEXPANDER_DIRECTION_ macros + * + * Returned Value: + * 0 on success, else a negative error code * ****************************************************************************/ @@ -333,7 +353,18 @@ static int pca9555_direction(FAR struct ioexpander_dev_s *dev, uint8_t pin, * Name: pca9555_option * * Description: - * See include/nuttx/ioexpander/ioexpander.h + * Set pin options. Required. + * Since all IO expanders have various pin options, this API allows setting + * pin options in a flexible way. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin to alter in this call + * opt - One of the IOEXPANDER_OPTION_ macros + * val - The option's value + * + * Returned Value: + * 0 on success, else a negative error code * ****************************************************************************/ @@ -341,11 +372,12 @@ static int pca9555_option(FAR struct ioexpander_dev_s *dev, uint8_t pin, int opt, FAR void *val) { FAR struct pca9555_dev_s *pca = (FAR struct pca9555_dev_s *)dev; - int ival = (int)val; int ret = -EINVAL; if (opt == IOEXPANDER_OPTION_INVERT) { + int ival = (int)((intptr_t)val); + /* Get exclusive access to the PCA555 */ pca9555_lock(pca); @@ -360,7 +392,16 @@ static int pca9555_option(FAR struct ioexpander_dev_s *dev, uint8_t pin, * Name: pca9555_writepin * * Description: - * See include/nuttx/ioexpander/ioexpander.h + * Set the pin level. Required. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin to alter in this call + * val - The pin level. Usually TRUE will set the pin high, + * except if OPTION_INVERT has been set on this pin. + * + * Returned Value: + * 0 on success, else a negative error code * ****************************************************************************/ @@ -382,7 +423,17 @@ static int pca9555_writepin(FAR struct ioexpander_dev_s *dev, uint8_t pin, * Name: pca9555_readpin * * Description: - * See include/nuttx/ioexpander/ioexpander.h + * Read the actual PIN level. This can be different from the last value written + * to this pin. Required. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin + * valptr - Pointer to a buffer where the pin level is stored. Usually TRUE + * if the pin is high, except if OPTION_INVERT has been set on this pin. + * + * Returned Value: + * 0 on success, else a negative error code * ****************************************************************************/ @@ -404,7 +455,16 @@ static int pca9555_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin, * Name: pca9555_readbuf * * Description: - * See include/nuttx/ioexpander/ioexpander.h + * Read the buffered pin level. + * This can be different from the actual pin state. Required. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin + * valptr - Pointer to a buffer where the level is stored. + * + * Returned Value: + * 0 on success, else a negative error code * ****************************************************************************/ @@ -448,7 +508,7 @@ static int pca9555_getmultibits(FAR struct pca9555_dev_s *pca, uint8_t addr, return ret; } -#ifdef CONFIG_IOEXPANDER_SHADOW_MODE +#ifdef CONFIG_PCA9555_SHADOW_MODE /* Save the new register value in the shadow register */ pca->sreg[addr] = buf[0]; @@ -481,7 +541,16 @@ static int pca9555_getmultibits(FAR struct pca9555_dev_s *pca, uint8_t addr, * Name: pca9555_multiwritepin * * Description: - * See include/nuttx/ioexpander/ioexpander.h + * Set the pin level for multiple pins. This routine may be faster than + * individual pin accesses. Optional. + * + * Input Parameters: + * dev - Device-specific state data + * pins - The list of pin indexes to alter in this call + * val - The list of pin levels. + * + * Returned Value: + * 0 on success, else a negative error code * ****************************************************************************/ @@ -506,7 +575,7 @@ static int pca9555_multiwritepin(FAR struct ioexpander_dev_s *dev, * this would not save much. */ -#ifndef CONFIG_IOEXPANDER_SHADOW_MODE +#ifndef CONFIG_PCA9555_SHADOW_MODE ret = pca9555_writeread(pca, &addr, 1, &buf[1], 2); if (ret < 0) { @@ -550,7 +619,7 @@ static int pca9555_multiwritepin(FAR struct ioexpander_dev_s *dev, /* Now write back the new pins states */ buf[0] = addr; -#ifdef CONFIG_IOEXPANDER_SHADOW_MODE +#ifdef CONFIG_PCA9555_SHADOW_MODE /* Save the new register values in the shadow register */ pca->sreg[addr] = buf[1]; pca->sreg[addr+1] = buf[2]; @@ -565,7 +634,16 @@ static int pca9555_multiwritepin(FAR struct ioexpander_dev_s *dev, * Name: pca9555_multireadpin * * Description: - * See include/nuttx/ioexpander/ioexpander.h + * Read the actual level for multiple pins. This routine may be faster than + * individual pin accesses. Optional. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The list of pin indexes to read + * valptr - Pointer to a buffer where the pin levels are stored. + * + * Returned Value: + * 0 on success, else a negative error code * ****************************************************************************/ @@ -589,7 +667,16 @@ static int pca9555_multireadpin(FAR struct ioexpander_dev_s *dev, * Name: pca9555_multireadbuf * * Description: - * See include/nuttx/ioexpander/ioexpander.h + * Read the buffered level of multiple pins. This routine may be faster than + * individual pin accesses. Optional. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin + * valptr - Pointer to a buffer where the buffered levels are stored. + * + * Returned Value: + * 0 on success, else a negative error code * ****************************************************************************/ @@ -613,6 +700,92 @@ static int pca9555_multireadbuf(FAR struct ioexpander_dev_s *dev, #ifdef CONFIG_PCA9555_INT_ENABLE +/**************************************************************************** + * Name: pca9555_attach + * + * Description: + * Attach and enable a pin interrupt callback function. + * + * Input Parameters: + * dev - Device-specific state data + * pinset - The set of pin events that will generate the callback + * callback - The pointer to callback function. NULL will detach the + * callback. + * arg - User-provided callback argument + * + * Returned Value: + * A non-NULL handle value is returned on success. This handle may be + * used later to detach and disable the pin interrupt. + * + ****************************************************************************/ + +static FAR void *pca9555_attach(FAR struct ioexpander_dev_s *dev, + ioe_pinset_t pinset, ioe_callback_t callback, + FAR void *arg) +{ + FAR struct pca9555_dev_s *pca = (FAR struct pca9555_dev_s *)dev; + FAR void *handle = NULL; + int i; + + /* Get exclusive access to the PCA555 */ + + pca9555_lock(pca); + + /* Find and available in entry in the callback table */ + + for (i = 0; i < CONFIG_PCA9555_INT_NCALLBACKS; i++) + { + /* Is this entry available (i.e., no callback attached) */ + + if (pca->cb[i].cbfunc == NULL) + { + /* Yes.. use this entry */ + + pca->cb[i].pinset = pinset; + pca->cb[i].cbfunc = callback; + pca->cb[i].cbarg = arg; + handle = &pca->cb[i]; + break; + } + } + + /* Add this callback to the table */ + + pca9555_unlock(pca); + return handle; +} + +/**************************************************************************** + * Name: pca9555_detach + * + * Description: + * Detach and disable a pin interrupt callback function. + * + * Input Parameters: + * dev - Device-specific state data + * handle - The non-NULL opaque value return by pca9555_attch() + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int pca9555_detach(FAR struct ioexpander_dev_s *dev, FAR void *handle) +{ + FAR struct pca9555_dev_s *pca = (FAR struct pca9555_dev_s *)dev; + FAR struct pca9555_callback_s *cb = (FAR struct pca9555_callback_s *)handle; + + DEBUGASSERT(pca != NULL && cb != NULL); + DEBUGASSERT((uintptr_t)cb >= (uintptr_t)&pca->cb[0] && + (uintptr_t)cb <= (uintptr_t)&pca->cb[CONFIG_TCA64XX_INT_NCALLBACKS-1]); + UNUSED(pca); + + cb->pinset = 0; + cb->cbfunc = NULL; + cb->cbarg = NULL; + return OK; +} + /**************************************************************************** * Name: pca9555_irqworker * @@ -627,33 +800,46 @@ static void pca9555_irqworker(void *arg) FAR struct pca9555_dev_s *pca = (FAR struct pca9555_dev_s *)arg; uint8_t addr = PCA9555_REG_INPUT; uint8_t buf[2]; - unsigned int bits; + ioe_pinset_t pinset; int ret; + int i; /* Read inputs */ ret = pca9555_writeread(pca, &addr, 1, buf, 2); if (ret == OK) { -#ifdef CONFIG_IOEXPANDER_SHADOW_MODE +#ifdef CONFIG_PCA9555_SHADOW_MODE /* Don't forget to update the shadow registers at this point */ - pca->sreg[addr] = buf; + pca->sreg[addr] = buf[0]; + pca->sreg[addr+1] = buf[1]; #endif - bits = ((unsigned int)buf[0] << 8) | buf[1]; + /* Create a 16-bit pinset */ - /* If signal PID is registered, enqueue signal. */ + pinset = ((unsigned int)buf[0] << 8) | buf[1]; - if (pca->dev.sigpid) + /* Perform pin interrupt callbacks */ + + for (i = 0; i < CONFIG_PCA9555_INT_NCALLBACKS; i++) { -#ifdef CONFIG_CAN_PASS_STRUCTS - union sigval value; - value.sival_int = (int)bits; - ret = sigqueue(pca->dev.sigpid, pca->dev.sigval, value); -#else - ret = sigqueue(pca->dev.sigpid, pca->dev.sigval, - (FAR void *)bits); -#endif + /* Is this entry valid (i.e., callback attached)? If so, did + * any of the requested pin interrupts occur? + */ + + if (pca->cb[i].cbfunc != NULL) + { + /* Did any of the requested pin interrupts occur? */ + + ioe_pinset_t match = pinset & pca->cb[i].pinset; + if (match != 0) + { + /* Yes.. perform the callback */ + + (void)pca->cb[i].cbfunc(&pca->dev, match, + pca->cb[i].cbarg); + } + } } } @@ -697,10 +883,10 @@ static int pca9555_interrupt(int irq, FAR void *context) * completed. */ - if (work_available(&pca->dev.work)) + if (work_available(&pca->work)) { pca->config->enable(pca->config, FALSE); - work_queue(HPWORK, &pca->dev.work, pca9555_irqworker, + work_queue(HPWORK, &pca->work, pca9555_irqworker, (FAR void *)pca, 0); } diff --git a/drivers/ioexpander/pca9555.h b/drivers/ioexpander/pca9555.h index 7152a58bb13a0c7ee414be58b8d29fc8ad11a5c8..815d92de23708f8e86dbb25998a37d3db1a346f4 100644 --- a/drivers/ioexpander/pca9555.h +++ b/drivers/ioexpander/pca9555.h @@ -50,6 +50,8 @@ #include #include + +#include #include #include @@ -75,11 +77,22 @@ * Enables support for the PCA9555 driver (Needs CONFIG_INPUT) * CONFIG_PCA9555_MULTIPLE * Can be defined to support multiple PCA9555 devices on board. - * CONFIG_PCA9555_INT_DISABLE - * Disable driver GPIO interrupt functionality (ignored if GPIO functionality is - * disabled). + * CONFIG_PCA9555_INT_NCALLBACKS + * Maximum number of supported pin interrupt callbacks. */ +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +# ifndef CONFIG_PCA9555_INT_NCALLBACKS +# define CONFIG_PCA9555_INT_NCALLBACKS 4 +# endif +#endif + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +# ifndef CONFIG_SCHED_WORKQUEUE +# error Work queue support required. CONFIG_SCHED_WORKQUEUE must be selected. +# endif +#endif + #undef CONFIG_PCA9555_REFCNT /* Driver support ***************************************************************************/ @@ -113,13 +126,25 @@ * Public Types ********************************************************************************************/ +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +/* This type represents on registered pin interrupt callback */ + +struct pca9555_callback_s +{ + ioe_pinset_t pinset; /* Set of pin interrupts that will generate + * the callback. */ + ioe_callback_t cbfunc; /* The saved callback function pointer */ + FAR void *cbarg; /* Callback argument */ +}; +#endif + /* This structure represents the state of the PCA9555 driver */ struct pca9555_dev_s { struct ioexpander_dev_s dev; /* Nested structure to allow casting as public gpio * expander. */ -#ifdef CONFIG_IOEXPANDER_SHADOW_MODE +#ifdef CONFIG_PCA9555_SHADOW_MODE uint8_t sreg[8]; /* Shadowed registers of the PCA9555 */ #endif #ifdef CONFIG_PCA9555_MULTIPLE @@ -128,6 +153,14 @@ struct pca9555_dev_s FAR struct pca9555_config_s *config; /* Board configuration data */ FAR struct i2c_master_s *i2c; /* Saved I2C driver instance */ sem_t exclsem; /* Mutual exclusion */ + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE + struct work_s work; /* Supports the interrupt handling "bottom half" */ + + /* Saved callback information for each I/O expander client */ + + struct pca9555_callback_s cb[CONFIG_PCA9555_INT_NCALLBACKS]; +#endif }; #endif /* CONFIG_IOEXPANDER && CONFIG_IOEXPANDER_PCA9555 */ diff --git a/drivers/ioexpander/pcf8574.c b/drivers/ioexpander/pcf8574.c new file mode 100644 index 0000000000000000000000000000000000000000..53b938d03e2d3789bc98b5e39ab033ac4c8827e5 --- /dev/null +++ b/drivers/ioexpander/pcf8574.c @@ -0,0 +1,1133 @@ +/**************************************************************************** + * drivers/ioexpander/pcf8574.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. + * + ********************************************************************************************/ + + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "pcf8574.h" + +#ifdef CONFIG_IOEXPANDER_PCF8574 + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#ifndef MAX +# define MAX(a,b) (((a) > (b)) ? (a) : (b)) +#endif + +#ifndef MIN +# define MIN(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/* PCF8574xx Helpers */ + +static void pcf8574_lock(FAR struct pcf8574_dev_s *priv); +static int pcf8574_read(FAR struct pcf8574_dev_s *priv, FAR uint8_t *portval); +static int pcf8574_write(struct pcf8574_dev_s *priv, uint8_t portval); + +/* I/O Expander Methods */ + +static int pcf8574_direction(FAR struct ioexpander_dev_s *dev, uint8_t pin, + int dir); +static int pcf8574_option(FAR struct ioexpander_dev_s *dev, uint8_t pin, + int opt, void *regval); +static int pcf8574_writepin(FAR struct ioexpander_dev_s *dev, uint8_t pin, + bool value); +static int pcf8574_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin, + FAR bool *value); +#ifdef CONFIG_IOEXPANDER_MULTIPIN +static int pcf8574_multiwritepin(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, int count); +static int pcf8574_multireadpin(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, int count); +#endif +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +static FAR void *pcf8574_attach(FAR struct ioexpander_dev_s *dev, + ioe_pinset_t pinset, ioe_callback_t callback, FAR void *arg); +static int pcf8574_detach(FAR struct ioexpander_dev_s *dev, FAR void *handle); +#endif + +#ifdef CONFIG_PCF8574_INT_ENABLE +static void pcf8574_int_update(void *handle, uint8_t input); +static void pcf8574_register_update(FAR struct pcf8574_dev_s *priv); +static void pcf8574_irqworker(void *arg); +static void pcf8574_interrupt(FAR void *arg); +#ifdef CONFIG_PCF8574_INT_POLL +static void pcf8574_poll_expiry(int argc, wdparm_t arg1, ...); +#endif +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +#ifndef CONFIG_PCF8574_MULTIPLE +/* If only a single device is supported, then the driver state structure may + * as well be pre-allocated. + */ + +static struct pcf8574_dev_s g_pcf8574; +#endif + +/* I/O expander vtable */ + +static const struct ioexpander_ops_s g_pcf8574_ops = +{ + pcf8574_direction, + pcf8574_option, + pcf8574_writepin, + pcf8574_readpin, + pcf8574_readpin +#ifdef CONFIG_IOEXPANDER_MULTIPIN + , pcf8574_multiwritepin + , pcf8574_multireadpin + , pcf8574_multireadpin +#endif +#ifdef CONFIG_IOEXPANDER_INT_ENABLE + , pcf8574_attach + , pcf8574_detach +#endif +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: pcf8574_lock + * + * Description: + * Get exclusive access to the I/O Expander + * + ****************************************************************************/ + +static void pcf8574_lock(FAR struct pcf8574_dev_s *priv) +{ + while (sem_wait(&priv->exclsem) < 0) + { + /* EINTR is the only expected error from sem_wait() */ + + DEBUGASSERT(errno == EINTR); + } +} + +#define pcf8574_unlock(p) sem_post(&(p)->exclsem) + +/**************************************************************************** + * Name: pcf8574_read + * + * Description: + * Read the PCF8574 8-bit value from a PCF8574xx port + * + * Primitive I2C read operation for the PCA8574. The PCF8574 is + * 'interesting' in that it doesn't really have a data direction register, + * but instead the outputs are current-limited when high, so by setting an + * IO line high, you are also making it an input. Consequently, before + * using this method, you'll need to perform a pca8574_write() setting the + * bits you are interested in reading to 1's, then call this method. + * + ****************************************************************************/ + +static int pcf8574_read(FAR struct pcf8574_dev_s *priv, FAR uint8_t *portval) +{ + struct i2c_msg_s msg; + + DEBUGASSERT(priv != NULL && priv->i2c != NULL && priv->config != NULL); + + /* Setup for the transfer */ + + msg.frequency = priv->config->frequency, + msg.addr = priv->config->address, + msg.flags = I2C_M_READ; + msg.buffer = portval; + msg.length = 1; + + /* Then perform the transfer. */ + + return I2C_TRANSFER(priv->i2c, &msg, 1); +} + +/**************************************************************************** + * Name: pcf8574_write + * + * Description: + * Write an 8-bit value to a PCF8574xx port + * + * Primitive I2C write operation for the PCA8574. The I2C interface + * simply sets the state of the 8 IO lines in the PCA8574 port. + * + ****************************************************************************/ + +static int pcf8574_write(struct pcf8574_dev_s *priv, uint8_t portval) +{ + struct i2c_msg_s msg; + + DEBUGASSERT(priv != NULL && priv->i2c != NULL && priv->config != NULL); + + /* Setup for the transfer */ + + msg.frequency = priv->config->frequency, + msg.addr = priv->config->address; + msg.flags = 0; + msg.buffer = (FAR uint8_t *)&portval; + msg.length = 1; + + /* Then perform the transfer. */ + + return I2C_TRANSFER(priv->i2c, &msg, 1); +} + +/**************************************************************************** + * Name: pcf8574_direction + * + * Description: + * Set the direction of an ioexpander pin. Required. + * + * The PCF8574 is 'interesting' in that it doesn't really have a data + * direction register, but instead the outputs are current-limited when + * high, so by setting an IO line high, you are also making it an input. + * Consequently, before using this method, you'll need to perform a + * pca8574_write() setting the bits you are interested in reading to 1's, + * before calling pca8574_read(). + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin to alter in this call + * dir - One of the IOEXPANDER_DIRECTION_ macros + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int pcf8574_direction(FAR struct ioexpander_dev_s *dev, uint8_t pin, + int direction) +{ + FAR struct pcf8574_dev_s *priv = (FAR struct pcf8574_dev_s *)dev; + int ret; + + DEBUGASSERT(priv != NULL && priv->config != NULL && pin < 8 && + (direction == IOEXPANDER_DIRECTION_IN || + direction == IOEXPANDER_DIRECTION_OUT)); + + gpioinfo("I2C addr=%02x pin=%u direction=%s\n", + priv->config->address, pin, + (direction == IOEXPANDER_DIRECTION_IN) ? "IN" : "OUT"); + + /* Get exclusive access to the I/O Expander */ + + pcf8574_lock(priv); + + /* Set a bit in inpins if the pin is an input. Clear the bit in + * inpins if the pin is an output. + */ + + if (direction == IOEXPANDER_DIRECTION_IN) + { + priv->inpins |= (1 << pin); + priv->outstate &= ~(1 << pin); + } + else + { + priv->inpins &= ~(1 << pin); + } + + /* Write the OR of the set of input pins and the set of output pins. + * In order to read input pins, we have to write a '1' to putt he + * pin in the current limiting state. + */ + + ret = pcf8574_write(priv, priv->inpins | priv->outstate); + + pcf8574_unlock(priv); + return ret; +} + +/**************************************************************************** + * Name: pcf8574_option + * + * Description: + * Set pin options. Required. + * Since all IO expanders have various pin options, this API allows setting + * pin options in a flexible way. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin to alter in this call + * opt - One of the IOEXPANDER_OPTION_ macros + * val - The option's value + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int pcf8574_option(FAR struct ioexpander_dev_s *dev, uint8_t pin, + int opt, FAR void *value) +{ + FAR struct pcf8574_dev_s *priv = (FAR struct pcf8574_dev_s *)dev; + int ret = -ENOSYS; + + DEBUGASSERT(priv != NULL && priv->config != NULL); + + gpioinfo("I2C addr=%02x pin=%u option=%u\n", + priv->config->address, pin, opt); + +#ifdef CONFIG_PCF8574_INT_ENABLE + /* Interrupt configuration */ + + if (opt == IOEXPANDER_OPTION_INTCFG) + { + unsigned int ival = (unsigned int)((uintptr_t)value); + ioe_pinset_t bit = ((ioe_pinset_t)1 << pin); + + ret = OK; + pcf8574_lock(priv); + switch (ival) + { + case IOEXPANDER_VAL_HIGH: /* Interrupt on high level */ + priv->trigger &= ~bit; + priv->level[0] |= bit; + priv->level[1] &= ~bit; + break; + + case IOEXPANDER_VAL_LOW: /* Interrupt on low level */ + priv->trigger &= ~bit; + priv->level[0] &= ~bit; + priv->level[1] |= bit; + break; + + case IOEXPANDER_VAL_RISING: /* Interrupt on rising edge */ + priv->trigger |= bit; + priv->level[0] |= bit; + priv->level[1] &= ~bit; + break; + + case IOEXPANDER_VAL_FALLING: /* Interrupt on falling edge */ + priv->trigger |= bit; + priv->level[0] &= ~bit; + priv->level[1] |= bit; + break; + + case IOEXPANDER_VAL_BOTH: /* Interrupt on both edges */ + priv->trigger |= bit; + priv->level[0] |= bit; + priv->level[1] |= bit; + break; + + case IOEXPANDER_VAL_DISABLE: + break; + + default: + ret = -EINVAL; + } + + pcf8574_unlock(priv); + } +#endif + + return ret; +} + +/**************************************************************************** + * Name: pcf8574_writepin + * + * Description: + * Set the pin level. Required. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin to alter in this call + * val - The pin level. Usually TRUE will set the pin high, + * except if OPTION_INVERT has been set on this pin. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int pcf8574_writepin(FAR struct ioexpander_dev_s *dev, uint8_t pin, + bool value) +{ + FAR struct pcf8574_dev_s *priv = (FAR struct pcf8574_dev_s *)dev; + int ret; + + DEBUGASSERT(priv != NULL && priv->config != NULL && pin < 8); + + gpioinfo("I2C addr=%02x pin=%u value=%u\n", + priv->config->address, pin, value); + + /* Get exclusive access to the I/O Expander */ + + pcf8574_lock(priv); + + /* Make sure that this is an output pin */ + + if ((priv->inpins & (1 << pin)) != 0) + { + gpioerr("ERROR: pin%u is an input\n", pin); + pcf8574_unlock(priv); + return -EINVAL; + } + + /* Set/clear a bit in outstate. */ + + if (value) + { + priv->outstate |= (1 << pin); + } + else + { + priv->outstate &= ~(1 << pin); + } + + /* Write the OR of the set of input pins and the set of output pins. + * In order to set the new output value. + */ + + ret = pcf8574_write(priv, priv->inpins | priv->outstate); + + pcf8574_unlock(priv); + return ret; +} + +/**************************************************************************** + * Name: pcf8574_readpin + * + * Description: + * Read the actual PIN level. This can be different from the last value written + * to this pin. Required. + * + * The PCF8574 is 'interesting' in that it doesn't really have a data + * direction register, but instead the outputs are current-limited when + * high, so by setting an IO line high, you are also making it an input. + * Consequently, before using this method, you'll need to perform a + * pca8574_write() setting the bits you are interested in reading to 1's, + * before calling pca8574_read(). + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin + * valptr - Pointer to a buffer where the pin level is stored. Usually TRUE + * if the pin is high, except if OPTION_INVERT has been set on this pin. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int pcf8574_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin, + FAR bool *value) +{ + FAR struct pcf8574_dev_s *priv = (FAR struct pcf8574_dev_s *)dev; + uint8_t regval; + int ret; + + DEBUGASSERT(priv != NULL && priv->config != NULL && pin < 8 && value != NULL); + + gpioinfo("I2C addr=%02x, pin=%u\n", priv->config->address, pin); + + /* Get exclusive access to the I/O Expander */ + + pcf8574_lock(priv); + + /* Is the pin an output? */ + + if ((priv->inpins & (1 << pin)) == 0) + { + /* We cannot read the value on pin directly. Just Return the last + * value that we wrote to the pin. + */ + + *value = ((priv->outstate & (1 << pin)) != 0); + pcf8574_unlock(priv); + return OK; + } + + /* It is an input pin. Read the input register for this pin + * + * The Input Port Register reflects the incoming logic levels of the pins, + * regardless of whether the pin is defined as an input or an output by + * the Configuration Register. They act only on read operation. + */ + + ret = pcf8574_read(priv, ®val); + if (ret < 0) + { + gpioerr("ERROR: Failed to read port register: %d\n", ret); + + goto errout_with_lock; + } + +#ifdef CONFIG_PCF8574_INT_ENABLE + /* Update the input status with the 8 bits read from the expander */ + + pcf8574_int_update(priv, regval); +#endif + + /* Return 0 or 1 to indicate the state of pin */ + + *value = (bool)((regval >> (pin & 7)) & 1); + ret = OK; + +errout_with_lock: + pcf8574_unlock(priv); + return ret; +} + +/**************************************************************************** + * Name: pcf8574_multiwritepin + * + * Description: + * Set the pin level for multiple pins. This routine may be faster than + * individual pin accesses. Optional. + * + * Input Parameters: + * dev - Device-specific state data + * pins - The list of pin indexes to alter in this call + * val - The list of pin levels. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_MULTIPIN +static int pcf8574_multiwritepin(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, + int count) +{ + FAR struct pcf8574_dev_s *priv = (FAR struct pcf8574_dev_s *)dev; + uint8_t pin; + int ret; + int i; + + DEBUGASSERT(priv != NULL && priv->config != NULL && + pins != NULL && values != NULL); + + gpioinfo("I2C addr=%02x count=%d\n", priv->config->address, count); + + /* Get exclusive access to the I/O Expander */ + + pcf8574_lock(priv); + + /* Process each pin setting */ + + for (i = 0; i < count; i++) + { + /* Make sure that this is an output pin */ + + pin = pins[i]; + DEBUGASSERT(pin < 8); + + gpioinfo("%d. pin=%u value=%u\n", pin, values[i]); + + if ((priv->inpins & (1 << pin)) != 0) + { + gpioerr("ERROR: pin%u is an input\n", pin); + continue; + } + + /* Set/clear a bit in outstate. */ + + if (values[i]) + { + priv->outstate |= (1 << pin); + } + else + { + priv->outstate &= ~(1 << pin); + } + } + + /* Write the OR of the set of input pins and the set of output pins. + * In order to set the new output value. + */ + + ret = pcf8574_write(priv, priv->inpins | priv->outstate); + + pcf8574_unlock(priv); + return ret; +} +#endif + +/**************************************************************************** + * Name: pcf8574_multireadpin + * + * Description: + * Read the actual level for multiple pins. This routine may be faster than + * individual pin accesses. Optional. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The list of pin indexes to read + * valptr - Pointer to a buffer where the pin levels are stored. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_MULTIPIN +static int pcf8574_multireadpin(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, + int count) +{ + FAR struct pcf8574_dev_s *priv = (FAR struct pcf8574_dev_s *)dev; + uint8_t regval; + uint8_t pin; + int ret; + int i; + + DEBUGASSERT(priv != NULL && priv->config != NULL && + pins != NULL && values != NULL); + + gpioinfo("I2C addr=%02x, count=%d\n", priv->config->address, count); + + /* Get exclusive access to the I/O Expander */ + + pcf8574_lock(priv); + + /* Read the input register for this pin + * + * The Input Port Register reflects the incoming logic levels of the pins, + * regardless of whether the pin is defined as an input or an output by + * the Configuration Register. They act only on read operation. + */ + + ret = pcf8574_read(priv, ®val); + if (ret < 0) + { + gpioerr("ERROR: Failed to read port register: %d\n", ret); + goto errout_with_lock; + } + +#ifdef CONFIG_PCF8574_INT_ENABLE + /* Update the input status with the 8 bits read from the expander */ + + pcf8574_int_update(priv, regval); +#endif + + /* Return the requested pin values */ + + for (i = 0; i < count; i++) + { + /* Make sure that this is an output pin */ + + pin = pins[i]; + DEBUGASSERT(pin < 8); + + /* Is the pin an output? */ + + if ((priv->inpins & (1 << pin)) == 0) + { + /* We cannot read the value on pin directly. Just Return the last + * value that we wrote to the pin. + */ + + values[i] = ((priv->outstate & (1 << pin)) != 0); + } + else + { + values[i] = ((regval & (1 << pin)) != 0); + } + + gpioinfo("%d. pin=%u value=%u\n", pin, values[i]); + } + + ret = OK; + +errout_with_lock: + pcf8574_unlock(priv); + return ret; +} +#endif + +/**************************************************************************** + * Name: pcf8574_attach + * + * Description: + * Attach and enable a pin interrupt callback function. + * + * Input Parameters: + * dev - Device-specific state data + * pinset - The set of pin events that will generate the callback + * callback - The pointer to callback function. NULL will detach the + * callback. + * arg - User-provided callback argument + * + * Returned Value: + * A non-NULL handle value is returned on success. This handle may be + * used later to detach and disable the pin interrupt. + * + ****************************************************************************/ + +#ifdef CONFIG_PCF8574_INT_ENABLE +static FAR void *pcf8574_attach(FAR struct ioexpander_dev_s *dev, + ioe_pinset_t pinset, ioe_callback_t callback, + FAR void *arg) +{ + FAR struct pcf8574_dev_s *priv = (FAR struct pcf8574_dev_s *)dev; + FAR void *handle = NULL; + int i; + + /* Get exclusive access to the I/O Expander */ + + pcf8574_lock(priv); + + /* Find and available in entry in the callback table */ + + for (i = 0; i < CONFIG_PCF8574_INT_NCALLBACKS; i++) + { + /* Is this entry available (i.e., no callback attached) */ + + if (priv->cb[i].cbfunc == NULL) + { + /* Yes.. use this entry */ + + priv->cb[i].pinset = pinset; + priv->cb[i].cbfunc = callback; + priv->cb[i].cbarg = arg; + handle = &priv->cb[i]; + break; + } + } + + pcf8574_unlock(priv); + return handle; +} +#endif + +/**************************************************************************** + * Name: pcf8574_detach + * + * Description: + * Detach and disable a pin interrupt callback function. + * + * Input Parameters: + * dev - Device-specific state data + * handle - The non-NULL opaque value return by pcf8574_attch() + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int pcf8574_detach(FAR struct ioexpander_dev_s *dev, FAR void *handle) +{ + FAR struct pcf8574_dev_s *priv = (FAR struct pcf8574_dev_s *)dev; + FAR struct pcf8574_callback_s *cb = (FAR struct pcf8574_callback_s *)handle; + + DEBUGASSERT(priv != NULL && cb != NULL); + DEBUGASSERT((uintptr_t)cb >= (uintptr_t)&priv->cb[0] && + (uintptr_t)cb <= (uintptr_t)&priv->cb[CONFIG_PCF8574_INT_NCALLBACKS-1]); + UNUSED(priv); + + cb->pinset = 0; + cb->cbfunc = NULL; + cb->cbarg = NULL; + return OK; +} + +/**************************************************************************** + * Name: pcf8574_int_update + * + * Description: + * Check for pending interrupts. + * + ****************************************************************************/ + +#ifdef CONFIG_PCF8574_INT_ENABLE +static void pcf8574_int_update(void *handle, uint8_t input) +{ + struct pcf8574_dev_s *priv = handle; + irqstate_t flags; + uint8_t diff; + int pin; + + flags = enter_critical_section(); + + /* Check the changed bits from last read */ + + diff = priv->input ^ input; + priv->input = input; + + /* PCF8574 doesn't support irq trigger, we have to do this in software. */ + + for (pin = 0; pin < 8; pin++) + { + if (PCF8574_EDGE_SENSITIVE(priv, pin)) + { + /* Edge triggered. Was there a change in the level? */ + + if ((diff & 1) != 0) + { + /* Set interrupt as a function of edge type */ + + if (((input & 1) == 0 && PCF8574_EDGE_FALLING(priv, pin)) || + ((input & 1) != 0 && PCF8574_EDGE_RISING(priv, pin))) + { + priv->intstat |= 1 << pin; + } + } + } + else /* if (PCF8574_LEVEL_SENSITIVE(priv, pin)) */ + { + /* Level triggered. Set intstat if match in level type. */ + + if (((input & 1) != 0 && PCF8574_LEVEL_HIGH(priv, pin)) || + ((input & 1) == 0 && PCF8574_LEVEL_LOW(priv, pin))) + { + priv->intstat |= 1 << pin; + } + } + + diff >>= 1; + input >>= 1; + } + + leave_critical_section(flags); +} +#endif + +/**************************************************************************** + * Name: tc64_update_registers + * + * Description: + * Read all pin states and update pending interrupts. + * + * Input Parameters: + * dev - Device-specific state data + * pins - The list of pin indexes to alter in this call + * val - The list of pin levels. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +#ifdef CONFIG_PCF8574_INT_ENABLE +static void pcf8574_register_update(FAR struct pcf8574_dev_s *priv) +{ + uint8_t regval; + int ret; + + /* Read from the PCF8574 port. + * + * The Input Port Register reflects the incoming logic levels of the pins, + * regardless of whether the pin is defined as an input or an output by + * the Configuration Register. They act only on read operation. + */ + + ret = pcf8574_read(priv, ®val); + if (ret < 0) + { + gpioerr("ERROR: Failed to read port register: %d\n", ret); + } + else + { + /* Update the input status with the 8 bits read from the expander */ + + pcf8574_int_update(priv, regval); + } +} +#endif + +/**************************************************************************** + * Name: pcf8574_irqworker + * + * Description: + * Handle GPIO interrupt events (this function actually executes in the + * context of the worker thread). + * + ****************************************************************************/ + +#ifdef CONFIG_PCF8574_INT_ENABLE +static void pcf8574_irqworker(void *arg) +{ + FAR struct pcf8574_dev_s *priv = (FAR struct pcf8574_dev_s *)arg; + uint8_t pinset; + int ret; + int i; + + DEBUGASSERT(priv != NULL && priv->config != NULL); + + /* Check for pending interrupts */ + + pcf8574_lock(priv); + pcf8574_register_update(priv); + + /* Sample and clear the pending interrupts. */ + + pinset = priv->intstat; + priv->intstat = 0; + pcf8574_unlock(priv); + + /* Perform pin interrupt callbacks */ + + for (i = 0; i < CONFIG_PCF8574_INT_NCALLBACKS; i++) + { + /* Is this entry valid (i.e., callback attached)? */ + + if (priv->cb[i].cbfunc != NULL) + { + /* Did any of the requested pin interrupts occur? */ + + ioe_pinset_t match = pinset & priv->cb[i].pinset; + if (match != 0) + { + /* Yes.. perform the callback */ + + (void)priv->cb[i].cbfunc(&priv->dev, match, + priv->cb[i].cbarg); + } + } + } + +#ifdef CONFIG_PCF8574_INT_POLL + /* Check for pending interrupts */ + + pcf8574_register_update(priv); + + /* Re-start the poll timer */ + + sched_lock(); + ret = wd_start(priv->wdog, PCF8574_POLLDELAY, (wdentry_t)pcf8574_poll_expiry, + 1, (wdparm_t)priv); + if (ret < 0) + { + gpioerr("ERROR: Failed to start poll timer\n"); + } +#endif + + /* Re-enable interrupts */ + + priv->config->enable(priv->config, true); + +#ifdef CONFIG_PCF8574_INT_POLL + sched_unlock(); +#endif +} +#endif + +/**************************************************************************** + * Name: pcf8574_interrupt + * + * Description: + * Handle GPIO interrupt events (this function executes in the + * context of the interrupt). + * + ****************************************************************************/ + +#ifdef CONFIG_PCF8574_INT_ENABLE +static void pcf8574_interrupt(FAR void *arg) +{ + FAR struct pcf8574_dev_s *priv = (FAR struct pcf8574_dev_s *)arg; + + DEBUGASSERT(priv != NULL && priv->config != NULL); + + /* Defer interrupt processing to the worker thread. This is not only + * much kinder in the use of system resources but is probably necessary + * to access the I/O expander device. + * + * Notice that further GPIO interrupts are disabled until the work is + * actually performed. This is to prevent overrun of the worker thread. + * Interrupts are re-enabled in pcf8574_irqworker() when the work is + * completed. + */ + + if (work_available(&priv->work)) + { +#ifdef CONFIG_PCF8574_INT_POLL + /* Cancel the poll timer */ + + (void)wd_cancel(priv->wdog); +#endif + + /* Disable interrupts */ + + priv->config->enable(priv->config, false); + + /* Schedule interrupt related work on the high priority worker thread. */ + + work_queue(HPWORK, &priv->work, pcf8574_irqworker, + (FAR void *)priv, 0); + } +} +#endif + +/**************************************************************************** + * Name: pcf8574_poll_expiry + * + * Description: + * The poll timer has expired; check for missed interrupts + * + * Input Parameters: + * Standard wdog expiration arguments. + * + ****************************************************************************/ + +#if defined(CONFIG_PCF8574_INT_ENABLE) && defined(CONFIG_PCF8574_INT_POLL) +static void pcf8574_poll_expiry(int argc, wdparm_t arg1, ...) +{ + FAR struct pcf8574_dev_s *priv; + + DEBUGASSERT(argc == 1); + priv = (FAR struct pcf8574_dev_s *)arg1; + DEBUGASSERT(priv != NULL && priv->config != NULL); + + /* Defer interrupt processing to the worker thread. This is not only + * much kinder in the use of system resources but is probably necessary + * to access the I/O expander device. + * + * Notice that further GPIO interrupts are disabled until the work is + * actually performed. This is to prevent overrun of the worker thread. + * Interrupts are re-enabled in pcf8574_irqworker() when the work is + * completed. + */ + + if (work_available(&priv->work)) + { + /* Disable interrupts */ + + priv->config->enable(priv->config, false); + + /* Schedule interrupt related work on the high priority worker thread. */ + + work_queue(HPWORK, &priv->work, pcf8574_irqworker, + (FAR void *)priv, 0); + } +} +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: pcf8574_initialize + * + * Description: + * Instantiate and configure the PCF8574xx device driver to use the provided + * I2C device instance. + * + * Input Parameters: + * i2c - An I2C driver instance + * minor - The device i2c address + * config - Persistent board configuration data + * + * Returned Value: + * an ioexpander_dev_s instance on success, NULL on failure. + * + ****************************************************************************/ + +FAR struct ioexpander_dev_s *pcf8574_initialize(FAR struct i2c_master_s *i2c, + FAR struct pcf8574_config_s *config) +{ + FAR struct pcf8574_dev_s *priv; + int ret; + +#ifdef CONFIG_PCF8574_MULTIPLE + /* Allocate the device state structure */ + + priv = (FAR struct pcf8574_dev_s *)kmm_zalloc(sizeof(struct pcf8574_dev_s)); + if (!priv) + { + gpioerr("ERROR: Failed to allocate driver instance\n"); + return NULL; + } +#else + /* Use the one-and-only I/O Expander driver instance */ + + priv = &g_pcf8574; +#endif + + /* Initialize the device state structure */ + + priv->dev.ops = &g_pcf8574_ops; + priv->i2c = i2c; + priv->config = config; + +#ifdef CONFIG_PCF8574_INT_ENABLE + /* Initial interrupt state: Edge triggered on both edges */ + + priv->trigger = 0xff; /* All edge triggered */ + priv->level[0] = 0xff; /* All rising edge */ + priv->level[1] = 0xff; /* All falling edge */ + +#ifdef CONFIG_PCF8574_INT_POLL + /* Set up a timer to poll for missed interrupts */ + + priv->wdog = wd_create(); + DEBUGASSERT(priv->wdog != NULL); + + ret = wd_start(priv->wdog, PCF8574_POLLDELAY, (wdentry_t)pcf8574_poll_expiry, + 1, (wdparm_t)priv); + if (ret < 0) + { + gpioerr("ERROR: Failed to start poll timer\n"); + } +#endif + + /* Attach the I/O expander interrupt handler and enable interrupts */ + + priv->config->attach(config, pcf8574_interrupt, priv); + priv->config->enable(config, true); +#endif + + sem_init(&priv->exclsem, 0, 1); + return &priv->dev; +} + +#endif /* CONFIG_IOEXPANDER_PCF8574 */ diff --git a/drivers/ioexpander/pcf8574.h b/drivers/ioexpander/pcf8574.h new file mode 100644 index 0000000000000000000000000000000000000000..ec16490807367d81a25e571ff7b82b2929f2c3a5 --- /dev/null +++ b/drivers/ioexpander/pcf8574.h @@ -0,0 +1,172 @@ +/******************************************************************************************** + * drivers/ioexpander/pcf8574.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_IOEXPANDER_PCF8574_H +#define __DRIVERS_IOEXPANDER_PCF8574_H + +/******************************************************************************************** + * Included Files + ********************************************************************************************/ + +#include + +#include + +#include +#include + +#include +#include +#include + +#include +#include + +#if defined(CONFIG_IOEXPANDER) && defined(CONFIG_IOEXPANDER_PCF8574) + +/******************************************************************************************** + * Pre-processor Definitions + ********************************************************************************************/ + +/* Configuration ****************************************************************************/ +/* Prerequisites: + * CONFIG_I2C + * I2C support is required + * CONFIG_IOEXPANDER + * Enables I/O expander support + * + * Other settings that effect the driver: CONFIG_DISABLE_POLL + * + * CONFIG_IOEXPANDER_PCF8574 + * Enables support for the PCF8574 driver (Needs CONFIG_INPUT) + * CONFIG_PCF8574_MULTIPLE + * Can be defined to support multiple PCF8574 devices on board. + * CONFIG_PCF8574_INT_NCALLBACKS + * Maximum number of supported pin interrupt callbacks. + * CONFIG_PCF8574_INT_POLL + * Enables a poll for missed interrupts + * CONFIG_PCF8574_INT_POLLDELAY + * If CONFIG_PCF8574_INT_POLL=y, then this is the delay in microseconds + * between polls for missed interrupts. + */ + +#ifndef CONFIG_I2C +# error "CONFIG_I2C is required by PCF8574" +#endif + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +# ifndef CONFIG_PCF8574_INT_NCALLBACKS +# define CONFIG_PCF8574_INT_NCALLBACKS 4 +# endif +#endif + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +# ifndef CONFIG_SCHED_WORKQUEUE +# error Work queue support required. CONFIG_SCHED_WORKQUEUE must be selected. +# endif +#endif + +#ifndef CONFIG_PCF8574_INT_POLLDELAY +# define CONFIG_PCF8574_INT_POLLDELAY 500000 +#endif + +/* PCF8574 Definitions **********************************************************************/ + +#define PCF8574_I2C_MAXFREQUENCY 400000 /* 400KHz */ +#define PCF8574_POLLDELAY (CONFIG_PCF8574_INT_POLLDELAY / USEC_PER_TICK) + +#define PCF8574_LEVEL_SENSITIVE(d,p) \ + (((d)->trigger & ((ioe_pinset_t)1 << (p))) == 0) +#define PCF8574_LEVEL_HIGH(d,p) \ + (((d)->level[0] & ((ioe_pinset_t)1 << (p))) != 0) +#define PCF8574_LEVEL_LOW(d,p) \ + (((d)->level[1] & ((ioe_pinset_t)1 << (p))) != 0) + +#define PCF8574_EDGE_SENSITIVE(d,p) \ + (((d)->trigger & ((ioe_pinset_t)1 << (p))) != 0) +#define PCF8574_EDGE_RISING(d,p) \ + (((d)->level[0] & ((ioe_pinset_t)1 << (p))) != 0) +#define PCF8574_EDGE_FALLING(d,p) \ + (((d)->level[1] & ((ioe_pinset_t)1 << (p))) != 0) +#define PCF8574_EDGE_BOTH(d,p) \ + (PCF8574_LEVEL_RISING(d,p) && PCF8574_LEVEL_FALLING(d,p)) + +/******************************************************************************************** + * Public Types + ********************************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +/* This type represents on registered pin interrupt callback */ + +struct pcf8574_callback_s +{ + ioe_pinset_t pinset; /* Set of pin interrupts that will generate + * the callback. */ + ioe_callback_t cbfunc; /* The saved callback function pointer */ + FAR void *cbarg; /* Callback argument */ +}; +#endif + +/* This structure represents the state of the PCF8574 driver */ + +struct pcf8574_dev_s +{ + struct ioexpander_dev_s dev; /* Nested structure to allow casting as public gpio + * expander. */ + FAR struct pcf8574_config_s *config; /* Board configuration data */ + FAR struct i2c_master_s *i2c; /* Saved I2C driver instance */ + sem_t exclsem; /* Mutual exclusion */ + uint8_t inpins; /* Set of input pins */ + uint8_t outstate; /* State of all output pins */ + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +#ifdef CONFIG_PCF8574_INT_POLL + WDOG_ID wdog; /* Timer used to poll for missed interrupts */ +#endif + + uint8_t input; /* Last input registeres */ + uint8_t intstat; /* Pending interrupts */ + uint8_t trigger; /* Bit encoded: 0=level 1=edge */ + uint8_t level[2]; /* Bit encoded: 01=high/rising, 10 low/falling, 11 both */ + struct work_s work; /* Supports the interrupt handling "bottom half" */ + + /* Saved callback information for each I/O expander client */ + + struct pcf8574_callback_s cb[CONFIG_PCF8574_INT_NCALLBACKS]; +#endif +}; + +#endif /* CONFIG_IOEXPANDER && CONFIG_IOEXPANDER_PCF8574 */ +#endif /* __DRIVERS_IOEXPANDER_PCF8574_H */ diff --git a/drivers/ioexpander/skeleton.c b/drivers/ioexpander/skeleton.c new file mode 100644 index 0000000000000000000000000000000000000000..03f15f8cffb890bda7cf37f9990805e670f21e73 --- /dev/null +++ b/drivers/ioexpander/skeleton.c @@ -0,0 +1,767 @@ +/**************************************************************************** + * drivers/ioexpander/skeleton.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + +#include +#include +#include +#include + +#include +#include +#include + +#include "skeleton.h" + +#if defined(CONFIG_IOEXPANDER_skeleton) + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +/* This type represents on registered pin interrupt callback */ + +struct skel_callback_s +{ + ioe_pinset_t pinset; /* Set of pin interrupts that will generate + * the callback. */ + ioe_callback_t cbfunc; /* The saved callback function pointer */ +}; +#endif + +/* This structure represents the state of the I/O Expander driver */ + +struct skel_dev_s +{ + struct ioexpander_dev_s dev; /* Nested structure to allow casting as public gpio + * expander. */ +#ifdef CONFIG_skeleton_MULTIPLE + FAR struct skel_dev_s *flink; /* Supports a singly linked list of drivers */ +#endif + sem_t exclsem; /* Mutual exclusion */ + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE + struct work_s work; /* Supports the interrupt handling "bottom half" */ + + /* Saved callback information for each I/O expander client */ + + struct skel_callback_s cb[CONFIG_skeleton_INT_NCALLBACKS]; +#endif +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static void skel_lock(FAR struct skel_dev_s *priv); + +static int skel_direction(FAR struct ioexpander_dev_s *dev, uint8_t pin, + int dir); +static int skel_option(FAR struct ioexpander_dev_s *dev, uint8_t pin, + int opt, void *val); +static int skel_writepin(FAR struct ioexpander_dev_s *dev, uint8_t pin, + bool value); +static int skel_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin, + FAR bool *value); +static int skel_readbuf(FAR struct ioexpander_dev_s *dev, uint8_t pin, + FAR bool *value); +#ifdef CONFIG_IOEXPANDER_MULTIPIN +static int skel_multiwritepin(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, int count); +static int skel_multireadpin(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, int count); +static int skel_multireadbuf(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, int count); +#endif +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +static int skel_attach(FAR struct ioexpander_dev_s *dev, + ioe_pinset_t pinset, ioe_callback_t callback); +#endif + +static void skel_irqworker(void *arg); +static void skel_interrupt(FAR void *arg); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +#ifndef CONFIG_skeleton_MULTIPLE +/* If only a single device is supported, then the driver state structure may + * as well be pre-allocated. + */ + +static struct skel_dev_s g_skel; +#endif + +/* I/O expander vtable */ + +static const struct ioexpander_ops_s g_skel_ops = +{ + skel_direction, + skel_option, + skel_writepin, + skel_readpin, + skel_readbuf +#ifdef CONFIG_IOEXPANDER_MULTIPIN + , skel_multiwritepin + , skel_multireadpin + , skel_multireadbuf +#endif +#ifdef CONFIG_IOEXPANDER_INT_ENABLE + , skel_attach +#endif +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: skel_lock + * + * Description: + * Get exclusive access to the I/O Expander + * + ****************************************************************************/ + +static void skel_lock(FAR struct skel_dev_s *priv) +{ + while (sem_wait(&priv->exclsem) < 0) + { + /* EINTR is the only expected error from sem_wait() */ + + DEBUGASSERT(errno == EINTR); + } +} + +#define skel_unlock(p) sem_post(&(p)->exclsem) + +/**************************************************************************** + * Name: skel_direction + * + * Description: + * Set the direction of an ioexpander pin. Required. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin to alter in this call + * dir - One of the IOEXPANDER_DIRECTION_ macros + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int skel_direction(FAR struct ioexpander_dev_s *dev, uint8_t pin, + int direction) +{ + FAR struct skel_dev_s *priv = (FAR struct skel_dev_s *)dev; + int ret; + + gpioinfo("pin=%u direction=%s\n", + pin, (direction == IOEXPANDER_DIRECTION_IN) ? "IN" : "OUT"); + + DEBUGASSERT(priv != NULL && pin < CONFIG_IOEXPANDER_NPINS && + (direction == IOEXPANDER_DIRECTION_IN || + direction == IOEXPANDER_DIRECTION_IN)); + + /* Get exclusive access to the I/O Expander */ + + skel_lock(priv); + + /* Set the pin direction in the I/O Expander */ +#warning Missing logic + + skel_unlock(priv); + return ret; +} + +/**************************************************************************** + * Name: skel_option + * + * Description: + * Set pin options. Required. + * Since all IO expanders have various pin options, this API allows setting + * pin options in a flexible way. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin to alter in this call + * opt - One of the IOEXPANDER_OPTION_ macros + * val - The option's value + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int skel_option(FAR struct ioexpander_dev_s *dev, uint8_t pin, + int opt, FAR void *val) +{ + FAR struct skel_dev_s *priv = (FAR struct skel_dev_s *)dev; + int ret = -ENOSYS; + + gpioinfo("addr=%02x pin=%u option=%u\n", priv->addr, pin, opt); + + DEBUGASSERT(priv != NULL); + + /* Check for pin polarity inversion. */ + + if (opt == IOEXPANDER_OPTION_INVERT) + { + /* Get exclusive access to the I/O Expander */ + + skel_lock(priv); + + /* Set the pin option */ +#warning Missing logic + + skel_unlock(priv); + } + + return ret; +} + +/**************************************************************************** + * Name: skel_writepin + * + * Description: + * Set the pin level. Required. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin to alter in this call + * val - The pin level. Usually TRUE will set the pin high, + * except if OPTION_INVERT has been set on this pin. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int skel_writepin(FAR struct ioexpander_dev_s *dev, uint8_t pin, + bool value) +{ + FAR struct skel_dev_s *priv = (FAR struct skel_dev_s *)dev; + int ret; + + gpioinfo("pin=%u value=%u\n", pin, value); + + DEBUGASSERT(priv != NULL && pin < CONFIG_IOEXPANDER_NPINS); + + /* Get exclusive access to the I/O Expander */ + + skel_lock(priv); + + /* Write the pin value */ +#warning Missing logic + + skel_unlock(priv); + return ret; +} + +/**************************************************************************** + * Name: skel_readpin + * + * Description: + * Read the actual PIN level. This can be different from the last value written + * to this pin. Required. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin + * valptr - Pointer to a buffer where the pin level is stored. Usually TRUE + * if the pin is high, except if OPTION_INVERT has been set on this pin. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int skel_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin, + FAR bool *value) +{ + FAR struct skel_dev_s *priv = (FAR struct skel_dev_s *)dev; + int ret; + + gpioinfo("pin=%u\n", priv->addr); + + DEBUGASSERT(priv != NULL && pin < CONFIG_IOEXPANDER_NPINS && value != NULL); + + /* Get exclusive access to the I/O Expander */ + + skel_lock(priv); + + /* Read the pin value */ +#warning Missing logic + + /* Return the pin value via the value pointer */ +#warning Missing logic + + skel_unlock(priv); + return ret; +} + +/**************************************************************************** + * Name: skel_readbuf + * + * Description: + * Read the buffered pin level. + * This can be different from the actual pin state. Required. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin + * valptr - Pointer to a buffer where the level is stored. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int skel_readbuf(FAR struct ioexpander_dev_s *dev, uint8_t pin, + FAR bool *value) +{ + FAR struct skel_dev_s *priv = (FAR struct skel_dev_s *)dev; + int ret; + + /* Get exclusive access to the I/O Expander */ + + skel_lock(priv); + + /* Read the buffered pin level */ +#warning Missing logic + + skel_unlock(priv); + return ret; +} + +/**************************************************************************** + * Name: skel_getmultibits + * + * Description: + * Read multiple bits from I/O Expander registers. + * + ****************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_MULTIPIN +static int skel_getmultibits(FAR struct skel_dev_s *priv, FAR uint8_t *pins, + FAR bool *values, int count) +{ + ioe_pinset_t pinset; + int pin; + int ret = OK; + int i; + + /* Read the pinset from the IO-Expander hardware */ +#warning Missing logic + + /* Read the requested bits */ + + for (i = 0; i < count; i++) + { + pin = pins[i]; + if (pin >= CONFIG_IOEXPANDER_NPINS) + { + return -ENXIO; + } + + values[i] = ((pinset & (1 << pin) != 0); + } + + return OK; +} +#endif + +/**************************************************************************** + * Name: skel_multiwritepin + * + * Description: + * Set the pin level for multiple pins. This routine may be faster than + * individual pin accesses. Optional. + * + * Input Parameters: + * dev - Device-specific state data + * pins - The list of pin indexes to alter in this call + * val - The list of pin levels. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_MULTIPIN +static int skel_multiwritepin(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, + int count) +{ + FAR struct skel_dev_s *priv = (FAR struct skel_dev_s *)dev; + ioe_pinset_t pinset; + int pin; + int ret; + int i; + + /* Get exclusive access to the I/O Expander */ + + skel_lock(priv); + + /* Read the pinset from the IO-Expander hardware */ +#warning Missing logic + + /* Apply the user defined changes */ + + for (i = 0; i < count; i++) + { + pin = pins[i]; + if (pin >= CONFIG_IOEXPANDER_NPINS) + { + skel_unlock(priv); + return -ENXIO; + } + + if (values[i]) + { + pinset |= (1 << pin); + } + else + { + pinset &= ~(1 << pin); + } + } + + /* Now write back the new pins states */ +#warning Missing logic + + skel_unlock(priv); + return ret; +} +#endif + +/**************************************************************************** + * Name: skel_multireadpin + * + * Description: + * Read the actual level for multiple pins. This routine may be faster than + * individual pin accesses. Optional. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The list of pin indexes to read + * valptr - Pointer to a buffer where the pin levels are stored. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_MULTIPIN +static int skel_multireadpin(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, + int count) +{ + FAR struct skel_dev_s *priv = (FAR struct skel_dev_s *)dev; + int ret; + + gpioinfo("count=%u\n", count); + + DEBUGASSERT(priv != NULL && pins != NULL && values != NULL && count > 0); + + /* Get exclusive access to the I/O Expander */ + + skel_lock(priv); + ret = skel_getmultibits(priv, pins, values, count); + skel_unlock(priv); + return ret; +} +#endif + +/**************************************************************************** + * Name: skel_multireadbuf + * + * Description: + * Read the buffered level of multiple pins. This routine may be faster than + * individual pin accesses. Optional. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin + * valptr - Pointer to a buffer where the buffered levels are stored. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_MULTIPIN +static int skel_multireadbuf(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, + int count) +{ + FAR struct skel_dev_s *priv = (FAR struct skel_dev_s *)dev; + int ret; + + gpioinfo("count=%u\n", count); + + DEBUGASSERT(priv != NULL && pins != NULL && values != NULL && count > 0); + + /* Get exclusive access to the I/O Expander */ + + skel_lock(priv); + ret = skel_getmultibits(priv, pins, values, count); + skel_unlock(priv); + return ret; +} +#endif + +/**************************************************************************** + * Name: skel_attach + * + * Description: + * Attach a pin interrupt callback function. + * + * Input Parameters: + * dev - Device-specific state data + * pinset - The set of pin events that will generate the callback + * callback - The pointer to callback function. NULL will detach the + * callback. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +#ifdef CONFIG_skeleton_INT_ENABLE +static int skel_attach(FAR struct ioexpander_dev_s *dev, ioe_pinset_t pinset, + ioe_callback_t callback) +{ + FAR struct skel_dev_s *priv = (FAR struct skel_dev_s *)dev; + int ret; + int i; + + /* Get exclusive access to the I/O Expander */ + + skel_lock(priv); + + /* Find and available in entry in the callback table */ + + ret = -ENOSPC; + for (i = 0; i < CONFIG_skeleton_INT_NCALLBACKS; i++) + { + /* Is this entry available (i.e., no callback attached) */ + + if (priv->cb[i].cbfunc == NULL) + { + /* Yes.. use this entry */ + + priv->cb[i].pinset = pinset; + priv->cb[i].cbfunc = callback; + ret = OK; + } + } + + /* Add this callback to the table */ + + skel_unlock(priv); + return ret; +} +#endif + +/**************************************************************************** + * Name: skel_irqworker + * + * Description: + * Handle GPIO interrupt events (this function actually executes in the + * context of the worker thread). + * + ****************************************************************************/ + +#ifdef CONFIG_skeleton_INT_ENABLE +static void skel_irqworker(void *arg) +{ + FAR struct skel_dev_s *priv = (FAR struct skel_dev_s *)arg; + ioe_pinset_t pinset; + int ret; + int i; + + /* Read the pinset from the IO-Expander hardware */ +#warning Missing logic + + /* Perform pin interrupt callbacks */ + + for (i = 0; i < CONFIG_skeleton_INT_NCALLBACKS; i++) + { + /* Is this entry valid (i.e., callback attached)? If so, did andy of + * the requested pin interrupts occur? + */ + + if (priv->cb[i].cbfunc != NULL) + { + /* Did any of the requested pin interrupts occur? */ + + ioe_pinset_t match = pinset & priv->cb[i].pinset; + if (match != 0) + { + /* Yes.. perform the callback */ + + (void)priv->cb[i].cbfunc(&priv->dev, match); + } + } + } + + /* Re-enable interrupts */ +#warning Missing logic +} +#endif + +/**************************************************************************** + * Name: skel_interrupt + * + * Description: + * Handle GPIO interrupt events (this function executes in the + * context of the interrupt). + * + * NOTE: A more typical prototype for an interrupt handler would be: + * + * int skel_interrupt(int irq, FAR void *context) + * + * However, it is assume that the lower half, board specific interface + * can provide intercept the actual interrupt, and call this function with + * the arg that can be mapped to the provide driver structure instance. + * + * Presumably the lower level interface provides an attach() method that + * provides both the address of skel_interrupt() as well as the arg value. + * + ****************************************************************************/ + +#ifdef CONFIG_skeleton_INT_ENABLE +static void skel_interrupt(FAR void *arg) +{ + FAR struct skel_dev_s *priv = (FAR struct skel_dev_s )arg; + + DEBUGASSERT(priv != NULL); + + /* Defer interrupt processing to the worker thread. This is not only + * much kinder in the use of system resources but is probably necessary + * to access the I/O expander device. + * + * Notice that further GPIO interrupts are disabled until the work is + * actually performed. This is to prevent overrun of the worker thread. + * Interrupts are re-enabled in skel_irqworker() when the work is + * completed. + */ + + if (work_available(&priv->work)) + { + /* Disable interrupts */ +#warning Missing logic + + /* Schedule interrupt related work on the high priority worker thread. */ + + work_queue(HPWORK, &priv->work, skel_irqworker, + (FAR void *)priv, 0); + } + + return OK; +} +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: skel_initialize + * + * Description: + * Initialize a I/O Expander device. + * + * NOTE: There are no arguments to the initialization function this + * skelton example. Typical implementations take two arguments: + * + * 1) A reference to an I2C or SPI interface used to interace with the + * device, and + * 2) A read-only configuration structure that provides things like: I2C + * or SPI characteristics and callbacks to attache, enable, and disable + * interrupts. + * + ****************************************************************************/ + +FAR struct ioexpander_dev_s *skel_initialize(void) +{ + FAR struct skel_dev_s *priv; + +#ifdef CONFIG_skeleton_MULTIPLE + /* Allocate the device state structure */ + + priv = (FAR struct skel_dev_s *)kmm_zalloc(sizeof(struct skel_dev_s)); + if (!priv) + { + gpioerr("ERROR: Failed to allocate driver instance\n"); + return NULL; + } +#else + /* Use the one-and-only I/O Expander driver instance */ + + priv = &g_skel; +#endif + + /* Initialize the device state structure */ + /* NOTE: Normally you would also save the I2C/SPI device interface and + * any configuration information here as well. + */ + + priv->dev.ops = &g_skel_ops; + +#ifdef CONFIG_skeleton_INT_ENABLE + /* Attach the I/O expander interrupt handler and enable interrupts */ +#warning Missing logic + +#endif + + sem_init(&priv->exclsem, 0, 1); + return &priv->dev; +} + +#endif /* CONFIG_IOEXPANDER_skeleton */ diff --git a/drivers/ioexpander/tca64xx.c b/drivers/ioexpander/tca64xx.c new file mode 100644 index 0000000000000000000000000000000000000000..72838d77b20b7d754e919bc800fcee671f235c8f --- /dev/null +++ b/drivers/ioexpander/tca64xx.c @@ -0,0 +1,1412 @@ +/**************************************************************************** + * drivers/ioexpander/tca64xx.h + * Supports the following parts: TCA6408, TCA6416, TCA6424 + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * This header file derives, in part, from the Project Ara TCA64xx driver + * which has this copyright: + * + * Copyright (c) 2014-2015 Google Inc. + * All rights reserved. + * Author: Patrick Titiano, Jean Pihet + * + * 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 of the copyright holder 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 HOLDER 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 "tca64xx.h" + +#ifdef CONFIG_IOEXPANDER_TCA64XX + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#ifndef MAX +# define MAX(a,b) (((a) > (b)) ? (a) : (b)) +#endif + +#ifndef MIN +# define MIN(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/* TCA64xx Helpers */ + +static void tca64_lock(FAR struct tca64_dev_s *priv); +static FAR const struct tca64_part_s *tca64_getpart(FAR struct tca64_dev_s *priv); +static uint8_t tca64_ngpios(FAR struct tca64_dev_s *priv); +static uint8_t tca64_input_reg(FAR struct tca64_dev_s *priv, uint8_t pin); +static uint8_t tca64_output_reg(FAR struct tca64_dev_s *priv, uint8_t pin); +static uint8_t tca64_polarity_reg(FAR struct tca64_dev_s *priv, uint8_t pin); +static uint8_t tca64_config_reg(FAR struct tca64_dev_s *priv, uint8_t pin); +static int tca64_getreg(FAR struct tca64_dev_s *priv, uint8_t regaddr, + FAR uint8_t *regval, unsigned int count); +static int tca64_putreg(struct tca64_dev_s *priv, uint8_t regaddr, + FAR uint8_t *regval, unsigned int count); + +/* I/O Expander Methods */ + +static int tca64_direction(FAR struct ioexpander_dev_s *dev, uint8_t pin, + int dir); +static int tca64_option(FAR struct ioexpander_dev_s *dev, uint8_t pin, + int opt, void *regval); +static int tca64_writepin(FAR struct ioexpander_dev_s *dev, uint8_t pin, + bool value); +static int tca64_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin, + FAR bool *value); +#ifdef CONFIG_IOEXPANDER_MULTIPIN +static int tca64_multiwritepin(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, int count); +static int tca64_multireadpin(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, int count); +#endif +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +static FAR void *tca64_attach(FAR struct ioexpander_dev_s *dev, + ioe_pinset_t pinset, ioe_callback_t callback, FAR void *arg); +static int tca64_detach(FAR struct ioexpander_dev_s *dev, FAR void *handle); +#endif + +#ifdef CONFIG_TCA64XX_INT_ENABLE +static void tca64_int_update(FAR struct tca64_dev_s *priv, + ioe_pinset_t input, ioe_pinset_t mask); +static void tca64_register_update(FAR struct tca64_dev_s *priv); +static void tca64_irqworker(void *arg); +static void tca64_interrupt(FAR void *arg); +#ifdef CONFIG_TCA64XX_INT_POLL +static void tca64_poll_expiry(int argc, wdparm_t arg1, ...); +#endif +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +#ifndef CONFIG_TCA64XX_MULTIPLE +/* If only a single device is supported, then the driver state structure may + * as well be pre-allocated. + */ + +static struct tca64_dev_s g_tca64; +#endif + +/* I/O expander vtable */ + +static const struct ioexpander_ops_s g_tca64_ops = +{ + tca64_direction, + tca64_option, + tca64_writepin, + tca64_readpin, + tca64_readpin +#ifdef CONFIG_IOEXPANDER_MULTIPIN + , tca64_multiwritepin + , tca64_multireadpin + , tca64_multireadpin +#endif +#ifdef CONFIG_IOEXPANDER_INT_ENABLE + , tca64_attach + , tca64_detach +#endif +}; + +/* TCA64 part data */ + +static const struct tca64_part_s g_tca64_parts[TCA64_NPARTS] = +{ + { + TCA6408_PART, + MIN(TCA6408_NR_GPIOS, CONFIG_IOEXPANDER_NPINS), + TCA6408_INPUT_REG, + TCA6408_OUTPUT_REG, + TCA6408_POLARITY_REG, + TCA6408_CONFIG_REG, + }, + { + TCA6416_PART, + MIN(TCA6416_NR_GPIOS, CONFIG_IOEXPANDER_NPINS), + TCA6416_INPUT0_REG, + TCA6416_OUTPUT0_REG, + TCA6416_POLARITY0_REG, + TCA6416_CONFIG0_REG, + }, + { + TCA6424_PART, + MIN(TCA6424_NR_GPIOS, CONFIG_IOEXPANDER_NPINS), + TCA6424_INPUT0_REG, + TCA6424_OUTPUT0_REG, + TCA6424_POLARITY0_REG, + TCA6424_CONFIG0_REG, + }, +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: tca64_lock + * + * Description: + * Get exclusive access to the I/O Expander + * + ****************************************************************************/ + +static void tca64_lock(FAR struct tca64_dev_s *priv) +{ + while (sem_wait(&priv->exclsem) < 0) + { + /* EINTR is the only expected error from sem_wait() */ + + DEBUGASSERT(errno == EINTR); + } +} + +#define tca64_unlock(p) sem_post(&(p)->exclsem) + +/**************************************************************************** + * Name: tca64_getpart + * + * Description: + * Look up information for the selected part + * + ****************************************************************************/ + +static FAR const struct tca64_part_s *tca64_getpart(FAR struct tca64_dev_s *priv) +{ + DEBUGASSERT(priv != NULL && priv->config != NULL && + priv->config->part < TCA64_NPARTS); + + return &g_tca64_parts[priv->config->part]; +} + +/**************************************************************************** + * Name: tca64_ngpios + * + * Description: + * Return the number of GPIOs supported by the selected part + * + ****************************************************************************/ + +static uint8_t tca64_ngpios(FAR struct tca64_dev_s *priv) +{ + FAR const struct tca64_part_s *part = tca64_getpart(priv); + return part->tp_ngpios; +} + +/**************************************************************************** + * Name: tca64_input_reg + * + * Description: + * Return the address of the input register for the specified pin. + * + ****************************************************************************/ + +static uint8_t tca64_input_reg(FAR struct tca64_dev_s *priv, uint8_t pin) +{ + FAR const struct tca64_part_s *part = tca64_getpart(priv); + uint8_t reg = part->tp_output; + + DEBUGASSERT(pin <= part->tp_ngpios); + return reg + (pin >> 3); +} + +/**************************************************************************** + * Name: tca64_output_reg + * + * Description: + * Return the address of the output register for the specified pin. + * + ****************************************************************************/ + +static uint8_t tca64_output_reg(FAR struct tca64_dev_s *priv, uint8_t pin) +{ + FAR const struct tca64_part_s *part = tca64_getpart(priv); + uint8_t reg = part->tp_output; + + DEBUGASSERT(pin <= part->tp_ngpios); + return reg + (pin >> 3); +} + +/**************************************************************************** + * Name: tca64_polarity_reg + * + * Description: + * Return the address of the polarity register for the specified pin. + * + ****************************************************************************/ + +static uint8_t tca64_polarity_reg(FAR struct tca64_dev_s *priv, uint8_t pin) +{ + FAR const struct tca64_part_s *part = tca64_getpart(priv); + uint8_t reg = part->tp_output; + + DEBUGASSERT(pin <= part->tp_ngpios); + return reg + (pin >> 3); +} + +/**************************************************************************** + * Name: tca64_config_reg + * + * Description: + * Return the address of the configuration register for the specified pin. + * + ****************************************************************************/ + +static uint8_t tca64_config_reg(FAR struct tca64_dev_s *priv, uint8_t pin) +{ + FAR const struct tca64_part_s *part = tca64_getpart(priv); + uint8_t reg = part->tp_config; + + DEBUGASSERT(pin <= part->tp_ngpios); + return reg + (pin >> 3); +} + +/**************************************************************************** + * Name: tca64_getreg + * + * Description: + * Read an 8-bit value from a TCA64xx register + * + ****************************************************************************/ + +static int tca64_getreg(FAR struct tca64_dev_s *priv, uint8_t regaddr, + FAR uint8_t *regval, unsigned int count) +{ + struct i2c_msg_s msg[2]; + int ret; + + DEBUGASSERT(priv != NULL && priv->i2c != NULL && priv->config != NULL); + + /* Set up for the transfer */ + + msg[0].frequency = TCA64XX_I2C_MAXFREQUENCY, + msg[0].addr = priv->config->address, + msg[0].flags = 0, + msg[0].buffer = ®addr, + msg[0].length = 1, + + msg[1].frequency = TCA64XX_I2C_MAXFREQUENCY, + msg[1].addr = priv->config->address, + msg[1].flags = I2C_M_READ, + msg[1].buffer = regval, + msg[1].length = count, + + /* Perform the transfer */ + + ret = I2C_TRANSFER(priv->i2c, msg, 2); + if (ret < 0) + { + gpioerr("ERROR: I2C addr=%02x regaddr=%02x: failed, ret=%d!\n", + priv->config->address, regaddr, ret); + } + else + { + gpioinfo("I2C addr=%02x regaddr=%02x: read %02x\n", + priv->config->address, regaddr, *regval); + } + + return ret; +} + +/**************************************************************************** + * Name: tca64_putreg + * + * Description: + * Write an 8-bit value to a TCA64xx register + * + ****************************************************************************/ + +static int tca64_putreg(struct tca64_dev_s *priv, uint8_t regaddr, + FAR uint8_t *regval, unsigned int count) +{ + struct i2c_msg_s msg[1]; + uint8_t cmd[2]; + int ret; + int i; + + DEBUGASSERT(priv != NULL && priv->i2c != NULL && priv->config != NULL); + + /* Set up for the transfer */ + + cmd[0] = regaddr; + + for (i = 0; i < count; i++) + { + cmd[i+1] = regval[i]; + } + + msg[0].frequency = TCA64XX_I2C_MAXFREQUENCY, + msg[0].addr = priv->config->address, + msg[0].flags = 0, + msg[0].buffer = cmd, + msg[0].length = count + 1, + + ret = I2C_TRANSFER(priv->i2c, msg, 1); + if (ret < 0) + { + gpioerr("ERROR: claddr=%02x, regaddr=%02x: failed, ret=%d!\n", + priv->config->address, regaddr, ret); + } + else + { + gpioinfo("claddr=%02x, regaddr=%02x, regval=%02x\n", + priv->config->address, regaddr, regval); + } + + return ret; +} + +/**************************************************************************** + * Name: tca64_direction + * + * Description: + * Set the direction of an ioexpander pin. Required. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin to alter in this call + * dir - One of the IOEXPANDER_DIRECTION_ macros + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int tca64_direction(FAR struct ioexpander_dev_s *dev, uint8_t pin, + int direction) +{ + FAR struct tca64_dev_s *priv = (FAR struct tca64_dev_s *)dev; + uint8_t regaddr; + uint8_t regval; + int ret; + + DEBUGASSERT(priv != NULL && priv->config != NULL && + pin < CONFIG_IOEXPANDER_NPINS && + (direction == IOEXPANDER_DIRECTION_IN || + direction == IOEXPANDER_DIRECTION_OUT)); + + gpioinfo("I2C addr=%02x pin=%u direction=%s\n", + priv->config->address, pin, + (direction == IOEXPANDER_DIRECTION_IN) ? "IN" : "OUT"); + + /* Get exclusive access to the I/O Expander */ + + tca64_lock(priv); + + /* Read the Configuration Register associated with this pin. The + * Configuration Register configures the direction of the I/O pins. + */ + + regaddr = tca64_config_reg(priv, pin); + ret = tca64_getreg(priv, regaddr, ®val, 1); + if (ret < 0) + { + gpioerr("ERROR: Failed to read config register at %u: %d\n", + regaddr, ret); + goto errout_with_lock; + } + + /* Set the pin direction in the I/O Expander */ + + if (direction == IOEXPANDER_DIRECTION_IN) + { + /* Configure pin as input. If a bit in the configuration register is + * set to 1, the corresponding port pin is enabled as an input with a + * high-impedance output driver. + */ + + regval |= (1 << (pin & 7)); + } + else /* if (direction == IOEXPANDER_DIRECTION_OUT) */ + { + /* Configure pin as output. If a bit in this register is cleared to + * 0, the corresponding port pin is enabled as an output. + * + * REVISIT: The value of output has not been selected! This might + * put a glitch on the output. + */ + + regval &= ~(1 << (pin & 7)); + } + + /* Write back the modified register content */ + + ret = tca64_putreg(priv, regaddr, ®val, 1); + if (ret < 0) + { + gpioerr("ERROR: Failed to write config register at %u: %d\n", + regaddr, ret); + } + +errout_with_lock: + tca64_unlock(priv); + return ret; +} + +/**************************************************************************** + * Name: tca64_option + * + * Description: + * Set pin options. Required. + * Since all IO expanders have various pin options, this API allows setting + * pin options in a flexible way. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin to alter in this call + * opt - One of the IOEXPANDER_OPTION_ macros + * val - The option's value + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int tca64_option(FAR struct ioexpander_dev_s *dev, uint8_t pin, + int opt, FAR void *value) +{ + FAR struct tca64_dev_s *priv = (FAR struct tca64_dev_s *)dev; + int ret = -ENOSYS; + + DEBUGASSERT(priv != NULL && priv->config != NULL); + + gpioinfo("I2C addr=%02x pin=%u option=%u\n", + priv->config->address, pin, opt); + + /* Check for pin polarity inversion. The Polarity Inversion Register + * allows polarity inversion of pins defined as inputs by the + * Configuration Register. If a bit in this register is set, the + * corresponding port pin's polarity is inverted. If a bit in this + * register is cleared, the corresponding port pin's original polarity + * is retained. + */ + + if (opt == IOEXPANDER_OPTION_INVERT) + { + unsigned int ival = (unsigned int)((uintptr_t)value); + uint8_t regaddr; + uint8_t polarity; + + /* Get exclusive access to the I/O Expander */ + + tca64_lock(priv); + + /* Read the polarity register */ + + regaddr = tca64_polarity_reg(priv, pin); + ret = tca64_getreg(priv, regaddr, &polarity, 1); + if (ret < 0) + { + gpioerr("ERROR: Failed to read polarity register at %u: %d\n", + regaddr, ret); + tca64_unlock(priv); + return ret; + } + + /* Set/clear the pin option */ + + if (ival == IOEXPANDER_OPTION_INVERT) + { + polarity |= (1 << (pin & 7)); + } + else + { + polarity &= ~(1 << (pin & 7)); + } + + /* Write back the modified register */ + + ret = tca64_putreg(priv, regaddr, &polarity, 1); + if (ret < 0) + { + gpioerr("ERROR: Failed to read polarity register at %u: %d\n", + regaddr, ret); + } + + tca64_unlock(priv); + } + +#ifdef CONFIG_TCA64XX_INT_ENABLE + /* Interrupt configuration */ + + else if (opt == IOEXPANDER_OPTION_INTCFG) + { + unsigned int ival = (unsigned int)((uintptr_t)value); + ioe_pinset_t bit = ((ioe_pinset_t)1 << pin); + + ret = OK; + tca64_lock(priv); + switch (ival) + { + case IOEXPANDER_VAL_HIGH: /* Interrupt on high level */ + priv->trigger &= ~bit; + priv->level[0] |= bit; + priv->level[1] &= ~bit; + break; + + case IOEXPANDER_VAL_LOW: /* Interrupt on low level */ + priv->trigger &= ~bit; + priv->level[0] &= ~bit; + priv->level[1] |= bit; + break; + + case IOEXPANDER_VAL_RISING: /* Interrupt on rising edge */ + priv->trigger |= bit; + priv->level[0] |= bit; + priv->level[1] &= ~bit; + break; + + case IOEXPANDER_VAL_FALLING: /* Interrupt on falling edge */ + priv->trigger |= bit; + priv->level[0] &= ~bit; + priv->level[1] |= bit; + break; + + case IOEXPANDER_VAL_BOTH: /* Interrupt on both edges */ + priv->trigger |= bit; + priv->level[0] |= bit; + priv->level[1] |= bit; + break; + + case IOEXPANDER_VAL_DISABLE: + break; + + default: + ret = -EINVAL; + } + + tca64_unlock(priv); + } +#endif + + return ret; +} + +/**************************************************************************** + * Name: tca64_writepin + * + * Description: + * Set the pin level. Required. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin to alter in this call + * val - The pin level. Usually TRUE will set the pin high, + * except if OPTION_INVERT has been set on this pin. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int tca64_writepin(FAR struct ioexpander_dev_s *dev, uint8_t pin, + bool value) +{ + FAR struct tca64_dev_s *priv = (FAR struct tca64_dev_s *)dev; + uint8_t regaddr; + uint8_t regval; + int ret; + + DEBUGASSERT(priv != NULL && priv->config != NULL && + pin < CONFIG_IOEXPANDER_NPINS); + + gpioinfo("I2C addr=%02x pin=%u value=%u\n", + priv->config->address, pin, value); + + /* Get exclusive access to the I/O Expander */ + + tca64_lock(priv); + + /* Read the output register. */ + + regaddr = tca64_output_reg(priv, pin); + ret = tca64_getreg(priv, regaddr, ®val, 1); + if (ret < 0) + { + gpioerr("ERROR: Failed to read output register at %u: %d\n", + regaddr, ret); + goto errout_with_lock; + } + + /* Set output pins default value (before configuring it as output) The + * Output Port Register shows the outgoing logic levels of the pins + * defined as outputs by the Configuration Register. + */ + + if (value != 0) + { + regval |= (1 << (pin & 7)); + } + else + { + regval &= ~(1 << (pin & 7)); + } + + /* Write the modified output register value */ + + ret = tca64_putreg(priv, regaddr, ®val, 1); + if (ret < 0) + { + gpioerr("ERROR: Failed to write output register at %u: %d\n", + regaddr, ret); + } + +errout_with_lock: + tca64_unlock(priv); + return ret; +} + +/**************************************************************************** + * Name: tca64_readpin + * + * Description: + * Read the actual PIN level. This can be different from the last value written + * to this pin. Required. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The index of the pin + * valptr - Pointer to a buffer where the pin level is stored. Usually TRUE + * if the pin is high, except if OPTION_INVERT has been set on this pin. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int tca64_readpin(FAR struct ioexpander_dev_s *dev, uint8_t pin, + FAR bool *value) +{ + FAR struct tca64_dev_s *priv = (FAR struct tca64_dev_s *)dev; + uint8_t regaddr; + uint8_t regval; + int ret; + + DEBUGASSERT(priv != NULL && priv->config != NULL && + pin < CONFIG_IOEXPANDER_NPINS && value != NULL); + + gpioinfo("I2C addr=%02x, pin=%u\n", priv->config->address, pin); + + /* Get exclusive access to the I/O Expander */ + + tca64_lock(priv); + + /* Read the input register for this pin + * + * The Input Port Register reflects the incoming logic levels of the pins, + * regardless of whether the pin is defined as an input or an output by + * the Configuration Register. They act only on read operation. + */ + + regaddr = tca64_input_reg(priv, pin); + ret = tca64_getreg(priv, regaddr, ®val, 1); + if (ret < 0) + { + gpioerr("ERROR: Failed to read input register at %u: %d\n", + regaddr, ret); + goto errout_with_lock; + } + +#ifdef CONFIG_TCA64XX_INT_ENABLE + /* Update the input status with the 8 bits read from the expander */ + + tca64_int_update(priv, (ioe_pinset_t)regval << (pin & ~7), + (ioe_pinset_t)0xff << (pin & ~7)); +#endif + + /* Return 0 or 1 to indicate the state of pin */ + + *value = (bool)((regval >> (pin & 7)) & 1); + ret = OK; + +errout_with_lock: + tca64_unlock(priv); + return ret; +} + +/**************************************************************************** + * Name: tca64_multiwritepin + * + * Description: + * Set the pin level for multiple pins. This routine may be faster than + * individual pin accesses. Optional. + * + * Input Parameters: + * dev - Device-specific state data + * pins - The list of pin indexes to alter in this call + * val - The list of pin levels. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_MULTIPIN +static int tca64_multiwritepin(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, + int count) +{ + FAR struct tca64_dev_s *priv = (FAR struct tca64_dev_s *)dev; + ioe_pinset_t pinset; + uint8_t regaddr; + uint8_t ngpios; + uint8_t nregs; + uint8_t pin; + int ret; + int i; + + /* Get exclusive access to the I/O Expander */ + + tca64_lock(priv); + + /* Read the output registers for pin 0 through the number of supported + * pins. + */ + + ngpios = tca64_ngpios(priv); + nregs = (ngpios + 7) >> 3; + pinset = 0; + regaddr = tca64_output_reg(priv, 0); + + ret = tca64_getreg(priv, regaddr, (FAR uint8_t *)&pinset, nregs); + if (ret < 0) + { + gpioerr("ERROR: Failed to read %u ouput registers at %u: %d\n", + nregs, regaddr, ret); + goto errout_with_lock; + } + + /* Apply the user defined changes */ + + for (i = 0; i < count; i++) + { + pin = pins[i]; + DEBUGASSERT(pin < CONFIG_IOEXPANDER_NPINS); + + if (values[i]) + { + pinset |= (1 << pin); + } + else + { + pinset &= ~(1 << pin); + } + } + + /* Now write back the new pins states */ + + ret = tca64_putreg(priv, regaddr, (FAR uint8_t *)&pinset, nregs); + if (ret < 0) + { + gpioerr("ERROR: Failed to write %u output registers at %u: %d\n", + nregs, regaddr, ret); + } + +errout_with_lock: + tca64_unlock(priv); + return ret; +} +#endif + +/**************************************************************************** + * Name: tca64_multireadpin + * + * Description: + * Read the actual level for multiple pins. This routine may be faster than + * individual pin accesses. Optional. + * + * Input Parameters: + * dev - Device-specific state data + * pin - The list of pin indexes to read + * valptr - Pointer to a buffer where the pin levels are stored. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_MULTIPIN +static int tca64_multireadpin(FAR struct ioexpander_dev_s *dev, + FAR uint8_t *pins, FAR bool *values, + int count) +{ + FAR struct tca64_dev_s *priv = (FAR struct tca64_dev_s *)dev; + ioe_pinset_t pinset; + uint8_t regaddr; + uint8_t ngpios; + uint8_t nregs; + uint8_t pin; + int ret; + int i; + + DEBUGASSERT(priv != NULL && priv->config != NULL && pins != NULL && + values != NULL && count > 0); + + gpioinfo("I2C addr=%02x, count=%u\n", priv->config->address, count); + + /* Get exclusive access to the I/O Expander */ + + tca64_lock(priv); + + /* Read the input register for pin 0 through the number of supported pins. + * + * The Input Port Register reflects the incoming logic levels of the pins, + * regardless of whether the pin is defined as an input or an output by + * the Configuration Register. They act only on read operation. + */ + + ngpios = tca64_ngpios(priv); + nregs = (ngpios + 7) >> 3; + pinset = 0; + regaddr = tca64_input_reg(priv, 0); + + ret = tca64_getreg(priv, regaddr, (FAR uint8_t *)&pinset, nregs); + if (ret < 0) + { + gpioerr("ERROR: Failed to read input %u registers at %u: %d\n", + nregs, regaddr, ret); + goto errout_with_lock; + } + + /* Update the input status with the 8 bits read from the expander */ + + for (i = 0; i < count; i++) + { + pin = pins[i]; + DEBUGASSERT(pin < CONFIG_IOEXPANDER_NPINS); + + values[i] = ((pinset & (1 << pin)) != 0); + } + +#ifdef CONFIG_TCA64XX_INT_ENABLE + /* Update the input status with the 32 bits read from the expander */ + + tca64_int_update(priv, pinset, PINSET_ALL); +#endif + +errout_with_lock: + tca64_unlock(priv); + return ret; +} +#endif + +/**************************************************************************** + * Name: tca64_attach + * + * Description: + * Attach and enable a pin interrupt callback function. + * + * Input Parameters: + * dev - Device-specific state data + * pinset - The set of pin events that will generate the callback + * callback - The pointer to callback function. NULL will detach the + * callback. + * arg - User-provided callback argument + * + * Returned Value: + * A non-NULL handle value is returned on success. This handle may be + * used later to detach and disable the pin interrupt. + * + ****************************************************************************/ + +#ifdef CONFIG_TCA64XX_INT_ENABLE +static FAR void *tca64_attach(FAR struct ioexpander_dev_s *dev, + ioe_pinset_t pinset, ioe_callback_t callback, + FAR void *arg) +{ + FAR struct tca64_dev_s *priv = (FAR struct tca64_dev_s *)dev; + FAR void *handle = NULL; + int i; + + /* Get exclusive access to the I/O Expander */ + + tca64_lock(priv); + + /* Find and available in entry in the callback table */ + + for (i = 0; i < CONFIG_TCA64XX_INT_NCALLBACKS; i++) + { + /* Is this entry available (i.e., no callback attached) */ + + if (priv->cb[i].cbfunc == NULL) + { + /* Yes.. use this entry */ + + priv->cb[i].pinset = pinset; + priv->cb[i].cbfunc = callback; + priv->cb[i].cbarg = arg; + handle = &priv->cb[i]; + break; + } + } + + tca64_unlock(priv); + return handle; +} +#endif + +/**************************************************************************** + * Name: tca64_detach + * + * Description: + * Detach and disable a pin interrupt callback function. + * + * Input Parameters: + * dev - Device-specific state data + * handle - The non-NULL opaque value return by tca64_attch() + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +static int tca64_detach(FAR struct ioexpander_dev_s *dev, FAR void *handle) +{ + FAR struct tca64_dev_s *priv = (FAR struct tca64_dev_s *)dev; + FAR struct tca64_callback_s *cb = (FAR struct tca64_callback_s *)handle; + + DEBUGASSERT(priv != NULL && cb != NULL); + DEBUGASSERT((uintptr_t)cb >= (uintptr_t)&priv->cb[0] && + (uintptr_t)cb <= (uintptr_t)&priv->cb[CONFIG_TCA64XX_INT_NCALLBACKS-1]); + UNUSED(priv); + + cb->pinset = 0; + cb->cbfunc = NULL; + cb->cbarg = NULL; + return OK; +} + +/**************************************************************************** + * Name: tca64_int_update + * + * Description: + * Check for pending interrupts. + * + ****************************************************************************/ + +#ifdef CONFIG_TCA64XX_INT_ENABLE +static void tca64_int_update(FAR struct tca64_dev_s *priv, ioe_pinset_t input, + ioe_pinset_t mask) +{ + ioe_pinset_t diff; + irqstate_t flags; + int ngios = tca64_ngpios(priv); + int pin; + + flags = enter_critical_section(); + + /* Check the changed bits from last read */ + + input = (priv->input & ~mask) | (input & mask); + diff = priv->input ^ input; + priv->input = input; + + /* TCA64XX doesn't support irq trigger, we have to do this in software. */ + + for (pin = 0; pin < ngios; pin++) + { + if (TCA64_EDGE_SENSITIVE(priv, pin)) + { + /* Edge triggered. Was there a change in the level? */ + + if ((diff & 1) != 0) + { + /* Set interrupt as a function of edge type */ + + if (((input & 1) == 0 && TCA64_EDGE_FALLING(priv, pin)) || + ((input & 1) != 0 && TCA64_EDGE_RISING(priv, pin))) + { + priv->intstat |= 1 << pin; + } + } + } + else /* if (TCA64_LEVEL_SENSITIVE(priv, pin)) */ + { + /* Level triggered. Set intstat bit if match in level type. */ + + if (((input & 1) != 0 && TCA64_LEVEL_HIGH(priv, pin)) || + ((input & 1) == 0 && TCA64_LEVEL_LOW(priv, pin))) + { + priv->intstat |= 1 << pin; + } + } + + diff >>= 1; + input >>= 1; + } + + leave_critical_section(flags); +} +#endif + +/**************************************************************************** + * Name: tc64_update_registers + * + * Description: + * Read all pin states and update pending interrupts. + * + * Input Parameters: + * dev - Device-specific state data + * pins - The list of pin indexes to alter in this call + * val - The list of pin levels. + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +#ifdef CONFIG_TCA64XX_INT_ENABLE +static void tca64_register_update(FAR struct tca64_dev_s *priv) +{ + ioe_pinset_t pinset; + uint8_t regaddr; + uint8_t ngpios; + uint8_t nregs; + int ret; + + /* Read the input register for pin 0 through the number of supported pins. + * + * The Input Port Register reflects the incoming logic levels of the pins, + * regardless of whether the pin is defined as an input or an output by + * the Configuration Register. They act only on read operation. + */ + + ngpios = tca64_ngpios(priv); + nregs = (ngpios + 7) >> 3; + pinset = 0; + regaddr = tca64_input_reg(priv, 0); + + ret = tca64_getreg(priv, regaddr, (FAR uint8_t *)&pinset, nregs); + if (ret < 0) + { + gpioerr("ERROR: Failed to read input %u registers at %u: %d\n", + nregs, regaddr, ret); + return; + } + + /* Update the input status with the 32 bits read from the expander */ + + tca64_int_update(priv, pinset, PINSET_ALL); +} +#endif + +/**************************************************************************** + * Name: tca64_irqworker + * + * Description: + * Handle GPIO interrupt events (this function actually executes in the + * context of the worker thread). + * + ****************************************************************************/ + +#ifdef CONFIG_TCA64XX_INT_ENABLE +static void tca64_irqworker(void *arg) +{ + FAR struct tca64_dev_s *priv = (FAR struct tca64_dev_s *)arg; + ioe_pinset_t pinset; + uint8_t regaddr; + uint8_t ngpios; + uint8_t nregs; + int ret; + int i; + + DEBUGASSERT(priv != NULL && priv->config != NULL); + + /* Get exclusive access to read inputs and assess pending interrupts. */ + + tca64_lock(priv); + + /* Read the input register for pin 0 through the number of supported pins. + * + * The Input Port Register reflects the incoming logic levels of the pins, + * regardless of whether the pin is defined as an input or an output by + * the Configuration Register. They act only on read operation. + */ + + ngpios = tca64_ngpios(priv); + nregs = (ngpios + 7) >> 3; + pinset = 0; + regaddr = tca64_input_reg(priv, 0); + + ret = tca64_getreg(priv, regaddr, (FAR uint8_t *)&pinset, nregs); + if (ret < 0) + { + gpioerr("ERROR: Failed to read input %u registers at %u: %d\n", + nregs, regaddr, ret); + tca64_unlock(priv); + goto errout_with_restart; + } + + /* Update the input status with the 32 bits read from the expander */ + + tca64_int_update(priv, pinset, PINSET_ALL); + + /* Sample and clear the pending interrupts. */ + + pinset = priv->intstat; + priv->intstat = 0; + tca64_unlock(priv); + + /* Perform pin interrupt callbacks */ + + for (i = 0; i < CONFIG_TCA64XX_INT_NCALLBACKS; i++) + { + /* Is this entry valid (i.e., callback attached)? */ + + if (priv->cb[i].cbfunc != NULL) + { + /* Did any of the requested pin interrupts occur? */ + + ioe_pinset_t match = pinset & priv->cb[i].pinset; + if (match != 0) + { + /* Yes.. perform the callback */ + + (void)priv->cb[i].cbfunc(&priv->dev, match, + priv->cb[i].cbarg); + } + } + } + +errout_with_restart: + +#ifdef CONFIG_TCA64XX_INT_POLL + /* Check for pending interrupts */ + + tca64_register_update(priv); + + /* Re-start the poll timer */ + + sched_lock(); + ret = wd_start(priv->wdog, TCA64XX_POLLDELAY, (wdentry_t)tca64_poll_expiry, + 1, (wdparm_t)priv); + if (ret < 0) + { + gpioerr("ERROR: Failed to start poll timer\n"); + } +#endif + + /* Re-enable interrupts */ + + priv->config->enable(priv->config, true); + +#ifdef CONFIG_TCA64XX_INT_POLL + sched_unlock(); +#endif +} +#endif + +/**************************************************************************** + * Name: tca64_interrupt + * + * Description: + * Handle GPIO interrupt events (this function executes in the + * context of the interrupt). + * + ****************************************************************************/ + +#ifdef CONFIG_TCA64XX_INT_ENABLE +static void tca64_interrupt(FAR void *arg) +{ + FAR struct tca64_dev_s *priv = (FAR struct tca64_dev_s *)arg; + + DEBUGASSERT(priv != NULL && priv->config != NULL); + + /* Defer interrupt processing to the worker thread. This is not only + * much kinder in the use of system resources but is probably necessary + * to access the I/O expander device. + * + * Notice that further GPIO interrupts are disabled until the work is + * actually performed. This is to prevent overrun of the worker thread. + * Interrupts are re-enabled in tca64_irqworker() when the work is + * completed. + */ + + if (work_available(&priv->work)) + { +#ifdef CONFIG_TCA64XX_INT_POLL + /* Cancel the poll timer */ + + (void)wd_cancel(priv->wdog); +#endif + + /* Disable interrupts */ + + priv->config->enable(priv->config, false); + + /* Schedule interrupt related work on the high priority worker thread. */ + + work_queue(HPWORK, &priv->work, tca64_irqworker, + (FAR void *)priv, 0); + } +} +#endif + +/**************************************************************************** + * Name: tca64_poll_expiry + * + * Description: + * The poll timer has expired; check for missed interrupts + * + * Input Parameters: + * Standard wdog expiration arguments. + * + ****************************************************************************/ + +#if defined(CONFIG_TCA64XX_INT_ENABLE) && defined(CONFIG_TCA64XX_INT_POLL) +static void tca64_poll_expiry(int argc, wdparm_t arg1, ...) +{ + FAR struct tca64_dev_s *priv; + + DEBUGASSERT(argc == 1); + priv = (FAR struct tca64_dev_s *)arg1; + DEBUGASSERT(priv != NULL && priv->config != NULL); + + /* Defer interrupt processing to the worker thread. This is not only + * much kinder in the use of system resources but is probably necessary + * to access the I/O expander device. + * + * Notice that further GPIO interrupts are disabled until the work is + * actually performed. This is to prevent overrun of the worker thread. + * Interrupts are re-enabled in tca64_irqworker() when the work is + * completed. + */ + + if (work_available(&priv->work)) + { + /* Disable interrupts */ + + priv->config->enable(priv->config, false); + + /* Schedule interrupt related work on the high priority worker thread. */ + + work_queue(HPWORK, &priv->work, tca64_irqworker, + (FAR void *)priv, 0); + } +} +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: tca64_initialize + * + * Description: + * Instantiate and configure the TCA64xx device driver to use the provided + * I2C device instance. + * + * Input Parameters: + * i2c - An I2C driver instance + * minor - The device i2c address + * config - Persistent board configuration data + * + * Returned Value: + * an ioexpander_dev_s instance on success, NULL on failure. + * + ****************************************************************************/ + +FAR struct ioexpander_dev_s *tca64_initialize(FAR struct i2c_master_s *i2c, + FAR struct tca64_config_s *config) +{ + FAR struct tca64_dev_s *priv; + int ret; + +#ifdef CONFIG_TCA64XX_MULTIPLE + /* Allocate the device state structure */ + + priv = (FAR struct tca64_dev_s *)kmm_zalloc(sizeof(struct tca64_dev_s)); + if (!priv) + { + gpioerr("ERROR: Failed to allocate driver instance\n"); + return NULL; + } +#else + /* Use the one-and-only I/O Expander driver instance */ + + priv = &g_tca64; +#endif + + /* Initialize the device state structure */ + + priv->dev.ops = &g_tca64_ops; + priv->i2c = i2c; + priv->config = config; + +#ifdef CONFIG_TCA64XX_INT_ENABLE + /* Initial interrupt state: Edge triggered on both edges */ + + priv->trigger = PINSET_ALL; /* All edge triggered */ + priv->level[0] = PINSET_ALL; /* All rising edge */ + priv->level[1] = PINSET_ALL; /* All falling edge */ + +#ifdef CONFIG_TCA64XX_INT_POLL + /* Set up a timer to poll for missed interrupts */ + + priv->wdog = wd_create(); + DEBUGASSERT(priv->wdog != NULL); + + ret = wd_start(priv->wdog, TCA64XX_POLLDELAY, (wdentry_t)tca64_poll_expiry, + 1, (wdparm_t)priv); + if (ret < 0) + { + gpioerr("ERROR: Failed to start poll timer\n"); + } +#endif + + /* Attach the I/O expander interrupt handler and enable interrupts */ + + priv->config->attach(config, tca64_interrupt, priv); + priv->config->enable(config, true); +#endif + + sem_init(&priv->exclsem, 0, 1); + return &priv->dev; +} + +#endif /* CONFIG_IOEXPANDER_TCA64XX */ diff --git a/drivers/ioexpander/tca64xx.h b/drivers/ioexpander/tca64xx.h new file mode 100644 index 0000000000000000000000000000000000000000..dbe9557b455731ca00ff97b194041277ac860a22 --- /dev/null +++ b/drivers/ioexpander/tca64xx.h @@ -0,0 +1,244 @@ +/******************************************************************************************** + * drivers/ioexpander/tca64.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Sebastien Lorquet + * + * References: + * "16-bit I2C-bus and SMBus I/O port with interrupt product datasheet", + * Rev. 08 - 22 October 2009, NXP + * + * 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_IOEXPANDER_TCA64XX_H +#define __DRIVERS_IOEXPANDER_TCA64XX_H + +/******************************************************************************************** + * Included Files + ********************************************************************************************/ + +#include + +#include + +#include +#include + +#include +#include +#include + +#include +#include + +#if defined(CONFIG_IOEXPANDER) && defined(CONFIG_IOEXPANDER_TCA64XX) + +/******************************************************************************************** + * Pre-processor Definitions + ********************************************************************************************/ + +/* Configuration ****************************************************************************/ +/* Prerequisites: + * CONFIG_I2C + * I2C support is required + * CONFIG_IOEXPANDER + * Enables I/O expander support + * + * Other settings that effect the driver: CONFIG_DISABLE_POLL + * + * CONFIG_IOEXPANDER_TCA64XX + * Enables support for the TCA64XX driver (Needs CONFIG_INPUT) + * CONFIG_TCA64XX_MULTIPLE + * Can be defined to support multiple TCA64XX devices on board. + * CONFIG_TCA64XX_INT_NCALLBACKS + * Maximum number of supported pin interrupt callbacks. + * CONFIG_TCA64XX_INT_POLL + * Enables a poll for missed interrupts + * CONFIG_TCA64XX_INT_POLLDELAY + * If CONFIG_TCA64XX_INT_POLL=y, then this is the delay in microseconds + * between polls for missed interrupts. + */ + +#ifndef CONFIG_I2C +# error "CONFIG_I2C is required by TCA64XX" +#endif + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +# ifndef CONFIG_TCA64XX_INT_NCALLBACKS +# define CONFIG_TCA64XX_INT_NCALLBACKS 4 +# endif +#endif + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +# ifndef CONFIG_SCHED_WORKQUEUE +# error Work queue support required. CONFIG_SCHED_WORKQUEUE must be selected. +# endif +#endif + +#ifndef CONFIG_TCA64XX_INT_POLLDELAY +# define CONFIG_TCA64XX_INT_POLLDELAY 500000 +#endif + +/* TCA64XX Definitions **********************************************************************/ + +/* I2C frequency */ + +#define TCA64XX_I2C_MAXFREQUENCY 400000 /* 400KHz */ + +/* TCA64XX Parts ****************************************************************************/ + +#define TCA6408_INPUT_REG 0x00 +#define TCA6408_OUTPUT_REG 0x01 +#define TCA6408_POLARITY_REG 0x02 +#define TCA6408_CONFIG_REG 0x03 + +#define TCA6408_NR_GPIOS 8 + +#define TCA6416_INPUT0_REG 0x00 +#define TCA6416_INPUT1_REG 0x01 +#define TCA6416_OUTPUT0_REG 0x02 +#define TCA6416_OUTPUT1_REG 0x03 +#define TCA6416_POLARITY0_REG 0x04 +#define TCA6416_POLARITY1_REG 0x05 +#define TCA6416_CONFIG0_REG 0x06 +#define TCA6416_CONFIG1_REG 0x07 + +#define TCA6416_NR_GPIOS 16 + +#define TCA6424_INPUT0_REG 0x00 +#define TCA6424_INPUT1_REG 0x01 +#define TCA6424_INPUT2_REG 0x02 +#define TCA6424_OUTPUT0_REG 0x04 +#define TCA6424_OUTPUT1_REG 0x05 +#define TCA6424_OUTPUT2_REG 0x06 +#define TCA6424_POLARITY0_REG 0x08 +#define TCA6424_POLARITY1_REG 0x09 +#define TCA6424_POLARITY2_REG 0x0A +#define TCA6424_CONFIG0_REG 0x0C +#define TCA6424_CONFIG1_REG 0x0D +#define TCA6424_CONFIG2_REG 0x0E + +#define TCA6424_NR_GPIOS 24 + +#define TCA64XX_NR_GPIO_MAX TCA6424_NR_GPIOS + +/* 1us (datasheet: reset pulse duration (Tw) is 4ns */ + +#define TCA64XX_TW 1 + +/* 1us (datasheet: time to reset (Treset) is 600ns */ + +#define TCA64XX_TRESET 1 + +#define TCA64XX_IRQ_TYPE_EDGE_BOTH 0x00000000 +#define TCA64XX_IRQ_TYPE_EDGE_RISING 0x00000001 +#define TCA64XX_IRQ_TYPE_EDGE_FALLING 0x00000002 +#define TCA64XX_IRQ_TYPE_LEVEL_HIGH 0x00000001 +#define TCA64XX_IRQ_TYPE_LEVEL_LOW 0x00000002 + +#define TCA64XX_IRQ_TYPE_EDGE 0x00000000 +#define TCA64XX_IRQ_TYPE_LEVEL 0x00000001 + +#define TCA64XX_POLLDELAY (CONFIG_TCA64XX_INT_POLLDELAY / USEC_PER_TICK) + +#define TCA64_LEVEL_SENSITIVE(d,p) \ + (((d)->trigger & ((ioe_pinset_t)1 << (p))) == 0) +#define TCA64_LEVEL_HIGH(d,p) \ + (((d)->level[0] & ((ioe_pinset_t)1 << (p))) != 0) +#define TCA64_LEVEL_LOW(d,p) \ + (((d)->level[1] & ((ioe_pinset_t)1 << (p))) != 0) + +#define TCA64_EDGE_SENSITIVE(d,p) \ + (((d)->trigger & ((ioe_pinset_t)1 << (p))) != 0) +#define TCA64_EDGE_RISING(d,p) \ + (((d)->level[0] & ((ioe_pinset_t)1 << (p))) != 0) +#define TCA64_EDGE_FALLING(d,p) \ + (((d)->level[1] & ((ioe_pinset_t)1 << (p))) != 0) +#define TCA64_EDGE_BOTH(d,p) \ + (TCA64_LEVEL_RISING(d,p) && TCA64_LEVEL_FALLING(d,p)) + +/******************************************************************************************** + * Public Types + ********************************************************************************************/ + +/* This structure represents the configuration of one part */ + +struct tca64_part_s +{ + uint8_t tp_id; /* Part ID (see enum tca64xx_part_e) */ + uint8_t tp_ngpios; /* Number of supported GPIOs */ + uint8_t tp_input; /* Address of first input register */ + uint8_t tp_output; /* Address of first output register */ + uint8_t tp_polarity; /* Address of first polarity register */ + uint8_t tp_config; /* Address of first configuration register */ +}; + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +/* This type represents on registered pin interrupt callback */ + +struct tca64_callback_s +{ + ioe_pinset_t pinset; /* Set of pin interrupts that will generate + * the callback. */ + ioe_callback_t cbfunc; /* The saved callback function pointer */ + FAR void *cbarg; /* Callback argument */ +}; +#endif + +/* This structure represents the state of the TCA64XX driver */ + +struct tca64_dev_s +{ + struct ioexpander_dev_s dev; /* Nested structure to allow casting as public gpio + * expander. */ + FAR struct tca64_config_s *config; /* Board configuration data */ + FAR struct i2c_master_s *i2c; /* Saved I2C driver instance */ + uint8_t part; /* TCA64xx part ID (see enum tca64xx_part_e) */ + sem_t exclsem; /* Mutual exclusion */ + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +#ifdef CONFIG_TCA64XX_INT_POLL + WDOG_ID wdog; /* Timer used to poll for missed interrupts */ +#endif + + ioe_pinset_t input; /* Last input registeres */ + ioe_pinset_t intstat; /* Pending interrupts */ + ioe_pinset_t trigger; /* Bit encoded: 0=level 1=edge */ + ioe_pinset_t level[2]; /* Bit encoded: 01=high/rising, 10 low/falling, 11 both */ + struct work_s work; /* Supports the interrupt handling "bottom half" */ + + /* Saved callback information for each I/O expander client */ + + struct tca64_callback_s cb[CONFIG_TCA64XX_INT_NCALLBACKS]; +#endif +}; + +#endif /* CONFIG_IOEXPANDER && CONFIG_IOEXPANDER_TCA64XX */ +#endif /* __DRIVERS_IOEXPANDER_TCA64XX_H */ diff --git a/drivers/lcd/Kconfig b/drivers/lcd/Kconfig index 97618eba04b54f22ec2eede0f2e7f6305f1ca932..b3abcaeabd85ab4a9721ebab29ac1e49c907ef1b 100644 --- a/drivers/lcd/Kconfig +++ b/drivers/lcd/Kconfig @@ -285,8 +285,21 @@ config UG9664HSWAG01_POWER endif +config LCD_SH1106_OLED_132 + bool "Generic 0.96'' OLED Display Module (SH1106/SSD1306)" + default n + select LCD_SSD1306 + ---help--- + 0.96'' OLED Display Module, featuring an SH1106, typically advertised as + SSD1306. Mostly similar to "UG2864HSWEG01" although it uses the full + 132x28 pixels. + + Required LCD driver settings: + LCD_MAXCONTRAST should be 255, but any value >0 and <=255 will be accepted. + LCD_MAXPOWER should be 1: 0=off, 1=on + config LCD_UG2864HSWEG01 - bool "UG-2864HSWEG01 OLED Display Module" + bool "UG-2864HSWEG01 OLED Display Module (SSD1306)" default n select LCD_SSD1306 ---help--- @@ -301,7 +314,7 @@ config LCD_UG2864HSWEG01 SPI_CMDDATA - Include support for cmd/data selection. config LCD_UG2832HSWEG04 - bool "UG-2832HSWEG04 OLED Display Module" + bool "UG-2832HSWEG04 OLED Display Module (SSD1306)" default n depends on !LCD_UG2864HSWEG01 select LCD_SSD1306 @@ -323,22 +336,22 @@ config LCD_SSD1306 if LCD_SSD1306 choice - prompt "UG-2832HSWEG04 Interface" + prompt "SSD1306 Interface" default LCD_SSD1306_SPI config LCD_SSD1306_SPI - bool "UG-2832HSWEG04 on SPI Interface" + bool "SSD1306 on SPI Interface" select SPI ---help--- Enables support for the SPI interface. config LCD_SSD1306_I2C - bool "UG-2832HSWEG04 on I2C Interface" + bool "SSD1306 on I2C Interface" select I2C ---help--- Enables support for the I2C interface -endchoice # UG-2832HSWEG04 Interface +endchoice # SSD1306 Interface endif # LCD_SSD1306 if LCD_SSD1306_SPI @@ -369,13 +382,13 @@ endif # LCD_SSD1306_SPI if LCD_SSD1306_I2C config SSD1306_I2CADDR - int "UG-2832HSWEG04 I2C Address" + int "SSD1306 I2C Address" default 120 ---help--- I2C Address of SSD1306 config SSD1306_I2CFREQ - int "UG-2832HSWEG04 I2C Frequency" + int "SSD1306 I2C Frequency" default 400000 ---help--- I2C Frequency to communicate with SSD1306 diff --git a/drivers/lcd/memlcd.c b/drivers/lcd/memlcd.c index 59976b7a521ba2e42ab0a41f6668a509196d1a4a..85a1678f84bf02bc8614e6dd2f6b2c47d83fed1a 100644 --- a/drivers/lcd/memlcd.c +++ b/drivers/lcd/memlcd.c @@ -59,7 +59,17 @@ * Pre-processor Definitions ****************************************************************************/ -/* Configuration */ +/* Bit order H/W feature must be enabled in order to support LSB first + * operation. + */ + +#if !defined(CONFIG_SPI_HWFEATURES) || !defined(CONFIG_SPI_BITORDER) +# error CONFIG_SPI_HWFEATURES=y and CONFIG_SPI_BITORDER=y required by this driver +#endif + +#ifndef CONFIG_ARCH_HAVE_SPI_BITORDER +# warning This platform does not support SPI LSB-bit order +#endif /* Cisplay resolution */ @@ -103,7 +113,7 @@ /* Other misc settings */ #define MEMLCD_SPI_FREQUENCY 2250000 -#define MEMLCD_SPI_BITS (-8) +#define MEMLCD_SPI_BITS 8 #define MEMLCD_SPI_MODE SPIDEV_MODE0 #define LS_BIT (1 << 0) @@ -268,6 +278,8 @@ static inline int __test_bit(int nr, const volatile uint8_t * addr) static void memlcd_select(FAR struct spi_dev_s *spi) { + int ret; + /* Select memlcd (locking the SPI bus in case there are multiple * devices competing for the SPI bus */ @@ -281,12 +293,18 @@ static void memlcd_select(FAR struct spi_dev_s *spi) SPI_SETMODE(spi, MEMLCD_SPI_MODE); SPI_SETBITS(spi, MEMLCD_SPI_BITS); - (void)SPI_HWFEATURES(spi, 0); -# ifdef CONFIG_MEMLCD_SPI_FREQUENCY + + ret = SPI_HWFEATURES(spi, HWFEAT_LSBFIRST); + if (ret < 0) + { + lcderr("ERROR: SPI_HWFEATURES failed to set bit order: %d\n", ret); + } + +#ifdef CONFIG_MEMLCD_SPI_FREQUENCY (void)SPI_SETFREQUENCY(spi, CONFIG_MEMLCD_SPI_FREQUENCY); -# else +#else (void)SPI_SETFREQUENCY(spi, MEMLCD_SPI_FREQUENCY); -# endif +#endif } /**************************************************************************** @@ -544,6 +562,7 @@ static int memlcd_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t * buffer, * Get information about the LCD video controller configuration. * ****************************************************************************/ + static int memlcd_getvideoinfo(FAR struct lcd_dev_s *dev, FAR struct fb_videoinfo_s *vinfo) { @@ -690,6 +709,7 @@ static int memlcd_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) * the specified LCD. NULL is returned on any failure. * ****************************************************************************/ + FAR struct lcd_dev_s *memlcd_initialize(FAR struct spi_dev_s *spi, FAR struct memlcd_priv_s *priv, unsigned int devno) diff --git a/drivers/lcd/ssd1306.h b/drivers/lcd/ssd1306.h index 696371ebfbce710109733594ed1ff6493f94868e..b04f2bc400983dca388ee5b44bd12f1679da7810 100644 --- a/drivers/lcd/ssd1306.h +++ b/drivers/lcd/ssd1306.h @@ -64,7 +64,8 @@ # define CONFIG_SSD1306_NINTERFACES 1 #endif -#if !defined(CONFIG_LCD_UG2864HSWEG01) && !defined(CONFIG_LCD_UG2832HSWEG04) +#if !defined(CONFIG_LCD_SH1106_OLED_132) && !defined(CONFIG_LCD_UG2864HSWEG01) && \ + !defined(CONFIG_LCD_UG2832HSWEG04) # error "Unknown and unsupported SSD1306 LCD" #endif @@ -77,6 +78,14 @@ # undef CONFIG_LCD_RPORTRAIT #endif +/************************************************************************************** + * Pre-processor Definitions + **************************************************************************************/ + +#ifndef CONFIG_NX_BGCOLOR +# define CONFIG_NX_BGCOLOR SSD1306_Y1_BLACK +#endif + /* SSD1306 Commands *******************************************************************/ #define SSD1306_SETCOLL(ad) (0x00 | ((ad) & 0x0f)) /* Set Lower Column Address: (00h - 0fh) */ @@ -149,6 +158,12 @@ # define SSD1306_DEV_XOFFSET 2 /* Offset to logical column 0 */ # define SSD1306_DEV_PAGES 4 /* 4 pages */ # define SSD1306_DEV_CMNPAD 0x02 /* COM configuration */ +#elif defined(CONFIG_LCD_SH1106_OLED_132) +# define SSD1306_DEV_NATIVE_XRES 128 /* Only 128 columns used, supporting 132 is a bit difficult */ +# define SSD1306_DEV_NATIVE_YRES 64 /* 8 pages each 8 rows */ +# define SSD1306_DEV_XOFFSET 0 /* Offset to logical column 0 */ +# define SSD1306_DEV_PAGES 8 /* 8 pages */ +# define SSD1306_DEV_CMNPAD 0x12 /* COM configuration */ #endif #if defined(CONFIG_LCD_LANDSCAPE) || defined(CONFIG_LCD_RLANDSCAPE) @@ -163,7 +178,12 @@ /* Bytes per logical row and actual device row */ -#define SSD1306_DEV_XSTRIDE (SSD1306_DEV_XRES >> 3) +#if defined(CONFIG_LCD_SH1106_OLED_132) +# define SSD1306_DEV_XSTRIDE (SSD1306_DEV_XRES >> 3) +#else +# define SSD1306_DEV_XSTRIDE (SSD1306_DEV_XRES >> 3) +#endif + #define SSD1306_DEV_YSTRIDE (SSD1306_DEV_YRES >> 3) /* Color depth and format */ @@ -202,6 +222,14 @@ # undef SSD1306_DEV_REVERSEX # define SSD1306_DEV_REVERSEY 1 # endif +#elif defined(CONFIG_LCD_SH1106_OLED_132) +# if defined(CONFIG_LCD_LANDSCAPE) +# undef SSD1306_DEV_REVERSEX +# define SSD1306_DEV_REVERSEY 1 +# elif defined(CONFIG_LCD_RLANDSCAPE) +# define SSD1306_DEV_REVERSEX 1 +# undef SSD1306_DEV_REVERSEY +# endif #endif /* Bit helpers */ @@ -257,3 +285,4 @@ static inline void ssd1306_configspi(FAR struct spi_dev_s *spi) #endif #endif /* __DRIVERS_LCD_SSD1306_H */ + diff --git a/drivers/lcd/ssd1306_base.c b/drivers/lcd/ssd1306_base.c index 96a50c369d19a4acb7e5784fbc9c5974aa8d58e7..d26808e93d69a293a736bacbebc571985116d4ff 100644 --- a/drivers/lcd/ssd1306_base.c +++ b/drivers/lcd/ssd1306_base.c @@ -885,7 +885,7 @@ FAR struct lcd_dev_s *ssd1306_initialize(FAR struct i2c_master_s *dev, unsigned /* Clear the display */ up_mdelay(100); - ssd1306_fill(&priv->dev, SSD1306_Y1_BLACK); + ssd1306_fill(&priv->dev, CONFIG_NX_BGCOLOR); return &priv->dev; } diff --git a/drivers/lcd/ssd1306_i2c.c b/drivers/lcd/ssd1306_i2c.c index d6de937e35c1e8255f542dff98a2606eadf4fd9b..04a2e9ee3621cb37ad65bc94177d60f3f3e02890 100644 --- a/drivers/lcd/ssd1306_i2c.c +++ b/drivers/lcd/ssd1306_i2c.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -51,6 +52,10 @@ #if defined(CONFIG_LCD_SSD1306) && defined(CONFIG_LCD_SSD1306_I2C) +/**************************************************************************** + * Public Functions + ****************************************************************************/ + /**************************************************************************** * Name: ssd1306_sendbyte * @@ -67,7 +72,7 @@ void ssd1306_sendbyte(FAR struct ssd1306_dev_s *priv, uint8_t regval) */ struct i2c_msg_s msg; - uint8_t txbuffer[1]; + uint8_t txbuffer[2]; int ret; #ifdef CONFIG_LCD_SSD1306_REGDEBUG @@ -78,7 +83,8 @@ void ssd1306_sendbyte(FAR struct ssd1306_dev_s *priv, uint8_t regval) * address followed by one byte of data. */ - txbuffer[0] = regval; + txbuffer[0] = 0x00; + txbuffer[1] = regval; /* Setup 8-bit SSD1306 address write message */ @@ -86,8 +92,8 @@ void ssd1306_sendbyte(FAR struct ssd1306_dev_s *priv, uint8_t regval) msg.addr = priv->addr; /* 7-bit address */ msg.flags = 0; /* Write transaction, beginning with START */ msg.buffer = txbuffer; /* Transfer from this address */ - msg.length = 1; /* Send one byte following the address - * (then STOP) */ + msg.length = 2; /* Send two bytes following the address + * then STOP */ /* Perform the transfer */ @@ -108,26 +114,34 @@ void ssd1306_sendbyte(FAR struct ssd1306_dev_s *priv, uint8_t regval) void ssd1306_sendblk(FAR struct ssd1306_dev_s *priv, uint8_t *data, uint8_t len) { + struct i2c_msg_s msg[2]; + uint8_t transfer_mode; + int ret; + /* 8-bit data read sequence: * - * Start - I2C_Write_Address - SSD1306_Reg_Address - SSD1306_Write_Data - STOP + * Start - I2C_Write_Address - Data transfer select - SSD1306_Write_Data - STOP */ - struct i2c_msg_s msg; - int ret; + /* Send the SSD1306 register address (with no STOP) */ + + transfer_mode = 0x40; /* Select data transfer */ - /* Setup 8-bit SSD1306 address write message */ + msg[0].frequency = CONFIG_SSD1306_I2CFREQ; /* I2C frequency */ + msg[0].addr = priv->addr; /* 7-bit address */ + msg[0].flags = 0; /* Write transaction, beginning with START */ + msg[0].buffer = &transfer_mode; /* Transfer mode send */ + msg[0].length = 1; /* Send the one byte register address */ - msg.frequency = CONFIG_SSD1306_I2CFREQ; /* I2C frequency */ - msg.addr = priv->addr; /* 7-bit address */ - msg.flags = 0; /* Write transaction, beginning with START */ - msg.buffer = data; /* Transfer from this address */ - msg.length = len; /* Send one byte following the address - * (then STOP) */ + /* Followed by the SSD1306 write data (with no RESTART, then STOP) */ - /* Perform the transfer */ + msg[1].frequency = CONFIG_SSD1306_I2CFREQ; /* I2C frequency */ + msg[1].addr = priv->addr; /* 7-bit address */ + msg[1].flags = I2C_M_NORESTART; /* Write transaction with no RESTART */ + msg[1].buffer = data; /* Transfer from this address */ + msg[1].length = len; /* Send the data, then STOP */ - ret = I2C_TRANSFER(priv->i2c, &msg, 1); + ret = I2C_TRANSFER(priv->i2c, msg, 2); if (ret < 0) { snerr("ERROR: I2C_TRANSFER failed: %d\n", ret); @@ -135,3 +149,4 @@ void ssd1306_sendblk(FAR struct ssd1306_dev_s *priv, uint8_t *data, uint8_t len) } #endif /* CONFIG_LCD_SSD1306 &7 CONFIG_LCD_SSD1306_I2C */ + diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index 44fd420d7ba88067323e6e9c8feb9a6435feda88..ba45d0f512304984e462097d968eec8500964f72 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig @@ -456,6 +456,41 @@ config M25P_SUBSECTOR_ERASE endif # MTD_M25P +config MTD_MX25L + bool "SPI-based MX25L3233F / MX25L6433F" + default n + select SPI + ---help--- + SPI-based driver for Macronix MX25L3233F or MX25L6433F. + +if MTD_MX25L + +config MX25L_SPIMODE + int "MX25L SPI mode" + default 0 + +config MX25L_SPIFREQUENCY + int "MX25L SPI Frequency" + default 20000000 + +config MX25L_SECTOR512 + bool "Simulate 512 byte Erase Blocks" + default n + +config MX25L_SUBSECTOR_ERASE + bool "Sub-Sector Erase" + default n + ---help--- + Some devices (such as the EON EN25F80) support a smaller erase block + size (4K vs 64K). This option enables support for sub-sector erase. + The SMART file system can take advantage of this option if it is enabled. + +config MX25L_DEBUG + bool "Enable driver debug features" + default n + +endif # MTD_MX25L + config MTD_S25FL1 bool "QuadSPI-based S25FL1 FLASH" default n @@ -514,7 +549,6 @@ config MTD_N25QXXX ---help--- Support the N25Q016A, N25Q032A, N25Q064A, N25Q128A, N25Q256A - if MTD_N25QXXX config N25QXXX_QSPIMODE diff --git a/drivers/mtd/Make.defs b/drivers/mtd/Make.defs index 9a8396a7fbfae92cb7e62a3d9ae7ffdb11d17a87..c26e48025e1685d489f9c7ccd3019652256ed166 100644 --- a/drivers/mtd/Make.defs +++ b/drivers/mtd/Make.defs @@ -39,7 +39,7 @@ ifeq ($(CONFIG_MTD),y) -CSRCS += at45db.c ftl.c m25px.c ramtron.c mtd_config.c +CSRCS += at45db.c ftl.c ramtron.c mtd_config.c ifeq ($(CONFIG_MTD_PARTITION),y) CSRCS += mtd_partition.c @@ -104,6 +104,14 @@ ifeq ($(CONFIG_MTD_AT25),y) CSRCS += at25.c endif +ifeq ($(CONFIG_MTD_M25P),y) +CSRCS += m25px.c +endif + +ifeq ($(CONFIG_MTD_M25L),y) +CSRCS += m25lx.c +endif + ifeq ($(CONFIG_MTD_S25FL1),y) CSRCS += s25fl1.c endif diff --git a/drivers/mtd/mtd_nandscheme.c b/drivers/mtd/mtd_nandscheme.c index 367dcc18d6a4882b3eab8b7744b5e2bbd04661f2..cf0557f22ab1fbb85eda8754479eebbb0882e7ce 100644 --- a/drivers/mtd/mtd_nandscheme.c +++ b/drivers/mtd/mtd_nandscheme.c @@ -1,5 +1,5 @@ /**************************************************************************** - * include/nuttx/mtd/mtd_nandscheme.c + * drivers/mtd/mtd_nandscheme.c * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/drivers/mtd/mx25lx.c b/drivers/mtd/mx25lx.c new file mode 100644 index 0000000000000000000000000000000000000000..47c447cf1b2ba310b752e77c5b2ebac9233963e0 --- /dev/null +++ b/drivers/mtd/mx25lx.c @@ -0,0 +1,1052 @@ +/************************************************************************************ + * drivers/mtd/mx25lx.c + * Driver for SPI-based or QSPI-based MX25Lxx33L parts of 32 or 64MBit. + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Aleksandr Vyhovanec + * + * Copied from / based on sst25.c and w25.c drivers written by + * Gregory Nutt + * Ken Pettit + * + * 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 + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Configuration ********************************************************************/ +/* Per the data sheet, MX25L 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_MX25L_SPIMODE to select the best mode for your device. If + * CONFIG_MX25L_SPIMODE is not defined, mode 0 will be used. + */ + +#ifndef CONFIG_MX25L_SPIMODE +# define CONFIG_MX25L_SPIMODE SPIDEV_MODE0 +#endif + +/* SPI Frequency. May be up to 133 MHz. */ + +#ifndef CONFIG_MX25L_SPIFREQUENCY +# define CONFIG_MX25L_SPIFREQUENCY 20000000 +#endif + +/* Chip Geometries ******************************************************************/ + +/* MX25L3233F capacity is 32Mbit (4096Kbit x 8) = 4Mb (512kb x 8) */ + +#define MX25L_MX25L3233F_SECTOR_SHIFT 12 /* Sector size 1 << 12 = 4Kb */ +#define MX25L_MX25L3233F_NSECTORS 1024 +#define MX25L_MX25L3233F_PAGE_SHIFT 8 /* Page size 1 << 8 = 256 */ + +/* MX25L6433F capacity is 32Mbit (8192Kbit x 8) = 8Mb (1024kb x 8) */ + +#define MX25L_MX25L6433F_SECTOR_SHIFT 12 /* Sector size 1 << 12 = 4Kb */ +#define MX25L_MX25L6433F_NSECTORS 2048 +#define MX25L_MX25L6433F_PAGE_SHIFT 8 /* Page size 1 << 8 = 256 */ + +#ifdef CONFIG_MX25L_SECTOR512 /* Simulate a 512 byte sector */ +# define MX25L_SECTOR512_SHIFT 9 /* Sector size 1 << 9 = 512 bytes */ +#endif + +#define MX25L_ERASED_STATE 0xff /* State of FLASH when erased */ + +#define MX25L_CACHE_VALID (1 << 0) /* 1=Cache has valid data */ +#define MX25L_CACHE_DIRTY (1 << 1) /* 1=Cache is dirty */ +#define MX25L_CACHE_ERASED (1 << 2) /* 1=Backing FLASH is erased */ + +#define IS_VALID(p) ((((p)->flags) & MX25L_CACHE_VALID) != 0) +#define IS_DIRTY(p) ((((p)->flags) & MX25L_CACHE_DIRTY) != 0) +#define IS_ERASED(p) ((((p)->flags) & MX25L_CACHE_ERASED) != 0) + +#define SET_VALID(p) do { (p)->flags |= MX25L_CACHE_VALID; } while (0) +#define SET_DIRTY(p) do { (p)->flags |= MX25L_CACHE_DIRTY; } while (0) +#define SET_ERASED(p) do { (p)->flags |= MX25L_CACHE_ERASED; } while (0) + +#define CLR_VALID(p) do { (p)->flags &= ~MX25L_CACHE_VALID; } while (0) +#define CLR_DIRTY(p) do { (p)->flags &= ~MX25L_CACHE_DIRTY; } while (0) +#define CLR_ERASED(p) do { (p)->flags &= ~MX25L_CACHE_ERASED; } while (0) + +/* MX25L Instructions *****************************************************************/ +/* Command Value Description Addr Data */ +/* Dummy */ +#define MX25L_READ 0x03 /* Read data bytes 3 0 >=1 */ +#define MX25L_FAST_READ 0x0b /* Higher speed read 3 1 >=1 */ +#define MX25L_2READ 0xbb /* 2 x I/O read command */ +#define MX25L_DREAD 0x3b /* 1I / 2O read command 3 1 >=1 */ +#define MX25L_4READ 0xeb /* 4 x I/O read command */ +#define MX25L_QREAD 0x6b /* 1I / 4O read command 3 1 >=1 */ +#define MX25L_WREN 0x06 /* Write Enable 0 0 0 */ +#define MX25L_WRDI 0x04 /* Write Disable 0 0 0 */ +#define MX25L_RDSR 0x05 /* Read status register 0 0 >=1 */ +#define MX25L_RDCR 0x15 /* Read config register 0 0 >=1 */ +#define MX25L_WRSR 0x01 /* Write stat/conf register 0 0 2 */ +#define MX25L_4PP 0x38 /* Quad page program 3 0 1-256 */ +#define MX25L_SE 0x20 /* 4Kb Sector erase 3 0 0 */ +#define MX25L_BE32 0x52 /* 32Kbit block Erase 3 0 0 */ +#define MX25L_BE64 0xd8 /* 64Kbit block Erase 3 0 0 */ +#define MX25L_CE 0xc7 /* Chip erase 0 0 0 */ +#define MX25L_CE_ALT 0x60 /* Chip erase (alternate) 0 0 0 */ +#define MX25L_PP 0x02 /* Page program 3 0 1-256 */ +#define MX25L_DP 0xb9 /* Deep power down 0 0 0 */ +#define MX25L_RDP 0xab /* Release deep power down 0 0 0 */ +#define MX25L_PGM_SUSPEND 0x75 /* Suspends program 0 0 0 */ +#define MX25L_ERS_SUSPEND 0xb0 /* Suspends erase 0 0 0 */ +#define MX25L_PGM_RESUME 0x7A /* Resume program 0 0 0 */ +#define MX25L_ERS_RESUME 0x30 /* Resume erase 0 0 0 */ +#define MX25L_RDID 0x9f /* Read identification 0 0 3 */ +#define MX25L_RES 0xab /* Read electronic ID 0 3 1 */ +#define MX25L_REMS 0x90 /* Read manufacture and ID 1 2 >=2 */ +#define MX25L_ENSO 0xb1 /* Enter secured OTP 0 0 0 */ +#define MX25L_EXSO 0xc1 /* Exit secured OTP 0 0 0 */ +#define MX25L_RDSCUR 0x2b /* Read security register 0 0 0 */ +#define MX25L_WRSCUR 0x2f /* Write security register 0 0 0 */ +#define MX25L_RSTEN 0x66 /* Reset Enable 0 0 0 */ +#define MX25L_RST 0x99 /* Reset Memory 0 0 0 */ +#define MX25L_RDSFDP 0x5a /* read out until CS# high */ +#define MX25L_SBL 0xc0 /* Set Burst Length */ +#define MX25L_SBL_ALT 0x77 /* Set Burst Length */ +#define MX25L_NOP 0x00 /* No Operation 0 0 0 */ + +/* MX25L Registers ******************************************************************/ +/* Read ID (RDID) register values */ + +#define MX25L_MANUFACTURER 0xc2 /* Macronix manufacturer ID */ +#define MX25L3233F_DEVID 0x15 /* MX25L3233F device ID */ + +/* JEDEC Read ID register values */ + +#define MX25L_JEDEC_MANUFACTURER 0xc2 /* Macronix manufacturer ID */ +#define MX25L_JEDEC_MEMORY_TYPE 0x20 /* MX25Lx memory type */ +#define MX25L_JEDEC_MX25L3233F_CAPACITY 0x16 /* MX25L3233F memory capacity */ +#define MX25L_JEDEC_MX25L6433F_CAPACITY 0x17 /* MX25L6433F memory capacity */ + +/* Status register bit definitions */ + +#define MX25L_SR_WIP (1 << 0) /* Bit 0: Write in progress */ +#define MX25L_SR_WEL (1 << 1) /* Bit 1: Write enable latch */ +#define MX25L_SR_BP_SHIFT (2) /* Bits 2-5: Block protect bits */ +#define MX25L_SR_BP_MASK (15 << MX25L_SR_BP_SHIFT) +#define MX25L_SR_QE (1 << 6) /* Bit 6: Quad enable */ +#define MX25L_SR_SRWD (1 << 7) /* Bit 7: Status register write protect */ + +/* Configuration registerregister bit definitions */ + +#define MX25L_CR_ODS (1 << 0) /* Bit 0: Output driver strength */ +#define MX25L_CR_TB (1 << 3) /* Bit 3: Top/bottom selected */ +#define MX25L_CR_DC (1 << 6) /* Bit 6: Dummy cycle */ + +#define MX25L_DUMMY MX25L_NOP + +/* Debug ****************************************************************************/ + +#ifdef CONFIG_MX25L_DEBUG +# define mxlerr(format, ...) _err(format, ##__VA_ARGS__) +# define mxlinfo(format, ...) _info(format, ##__VA_ARGS__) +#else +# define mxlerr(x...) +# define mxlinfo(x...) +#endif + +/************************************************************************************ + * 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 mx25l_dev_s. + */ + +struct mx25l_dev_s +{ + struct mtd_dev_s mtd; /* MTD interface */ + FAR struct spi_dev_s *dev; /* Saved SPI interface instance */ + uint8_t sectorshift; + uint8_t pageshift; + uint16_t nsectors; +#if defined(CONFIG_MX25L_SECTOR512) + uint8_t flags; /* Buffered sector flags */ + uint16_t esectno; /* Erase sector number in the cache */ + FAR uint8_t *sector; /* Allocated sector data */ +#endif +}; + +/************************************************************************************ + * Private Function Prototypes + ************************************************************************************/ + +/* Helpers */ + +static void mx25l_lock(FAR struct spi_dev_s *dev); +static inline void mx25l_unlock(FAR struct spi_dev_s *dev); +static inline int mx25l_readid(FAR struct mx25l_dev_s *priv); +static void mx25l_waitwritecomplete(FAR struct mx25l_dev_s *priv); +static void mx25l_writeenable(FAR struct mx25l_dev_s *priv); +static void mx25l_writedisable(FAR struct mx25l_dev_s *priv); +static inline void mx25l_sectorerase(FAR struct mx25l_dev_s *priv, off_t offset); +static inline int mx25l_chiperase(FAR struct mx25l_dev_s *priv); +static void mx25l_byteread(FAR struct mx25l_dev_s *priv, FAR uint8_t *buffer, + off_t address, size_t nbytes); +static inline void mx25l_pagewrite(FAR struct mx25l_dev_s *priv, + FAR const uint8_t *buffer, + off_t address, size_t nbytes); +#if defined(CONFIG_MX25L_SECTOR512) +static void mx25l_cacheflush(FAR struct mx25l_dev_s *priv); +static FAR uint8_t *mx25l_cacheread(FAR struct mx25l_dev_s *priv, off_t sector); +static void mx25l_cacheerase(FAR struct mx25l_dev_s *priv, off_t sector); +static void mx25l_cachewrite(FAR struct mx25l_dev_s *priv, + FAR const uint8_t *buffer, + off_t sector, size_t nsectors); +#endif + +/* MTD driver methods */ + +static int mx25l_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks); +static ssize_t mx25l_bread(FAR struct mtd_dev_s *dev, off_t startblock, + size_t nblocks, FAR uint8_t *buf); +static ssize_t mx25l_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, + size_t nblocks, FAR const uint8_t *buf); +static ssize_t mx25l_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, + FAR uint8_t *buffer); +static int mx25l_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg); + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: mx25l_lock + ************************************************************************************/ + +static void mx25l_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_MX25L_SPIMODE); + SPI_SETBITS(dev, 8); + (void)SPI_HWFEATURES(dev, 0); + (void)SPI_SETFREQUENCY(dev, CONFIG_MX25L_SPIFREQUENCY); +} + +/************************************************************************************ + * Name: mx25l_unlock + ************************************************************************************/ + +static inline void mx25l_unlock(FAR struct spi_dev_s *dev) +{ + (void)SPI_LOCK(dev, false); +} + +/************************************************************************************ + * Name: mx25l_readid + ************************************************************************************/ + +static inline int mx25l_readid(FAR struct mx25l_dev_s *priv) +{ + uint16_t manufacturer; + uint16_t memory; + uint16_t capacity; + + mxlinfo("priv: %p\n", priv); + + /* Lock the SPI bus, configure the bus, and select this FLASH part. */ + + mx25l_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, MX25L_RDID); + manufacturer = SPI_SEND(priv->dev, MX25L_DUMMY); + memory = SPI_SEND(priv->dev, MX25L_DUMMY); + capacity = SPI_SEND(priv->dev, MX25L_DUMMY); + + /* Deselect the FLASH and unlock the bus */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, false); + mx25l_unlock(priv->dev); + + mxlinfo("manufacturer: %02x memory: %02x capacity: %02x\n", + manufacturer, memory, capacity); + + /* Check for a valid manufacturer and memory type */ + + if (manufacturer == MX25L_JEDEC_MANUFACTURER && memory == MX25L_JEDEC_MEMORY_TYPE) + { + /* Okay.. is it a FLASH capacity that we understand? */ + + if (capacity == MX25L_JEDEC_MX25L3233F_CAPACITY) + { + /* Save the FLASH geometry */ + + priv->sectorshift = MX25L_MX25L3233F_SECTOR_SHIFT; + priv->nsectors = MX25L_MX25L3233F_NSECTORS; + priv->pageshift = MX25L_MX25L3233F_PAGE_SHIFT; + return OK; + } + else if (capacity == MX25L_JEDEC_MX25L6433F_CAPACITY) + { + /* Save the FLASH geometry */ + + priv->sectorshift = MX25L_MX25L6433F_SECTOR_SHIFT; + priv->nsectors = MX25L_MX25L6433F_NSECTORS; + priv->pageshift = MX25L_MX25L6433F_PAGE_SHIFT; + return OK; + } + } + + return -ENODEV; +} + +/************************************************************************************ + * Name: mx25l_waitwritecomplete + ************************************************************************************/ + +static void mx25l_waitwritecomplete(FAR struct mx25l_dev_s *priv) +{ + uint8_t status; + + /* 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, MX25L_RDSR); + + /* Send a dummy byte to generate the clock needed to shift out the status */ + + status = SPI_SEND(priv->dev, MX25L_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 & MX25L_SR_WIP) != 0) + { + mx25l_unlock(priv->dev); + usleep(1000); + mx25l_lock(priv->dev); + } + } + while ((status & MX25L_SR_WIP) != 0); + + mxlinfo("Complete\n"); +} + +/************************************************************************************ + * Name: mx25l_writeenable + ************************************************************************************/ + +static void mx25l_writeenable(FAR struct mx25l_dev_s *priv) +{ + /* Select this FLASH part */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, true); + + /* Send "Write Enable (WREN)" command */ + + (void)SPI_SEND(priv->dev, MX25L_WREN); + + /* Deselect the FLASH */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, false); + + mxlinfo("Enabled\n"); +} + +/************************************************************************************ + * Name: mx25l_writedisable + ************************************************************************************/ + +static void mx25l_writedisable(FAR struct mx25l_dev_s *priv) +{ + /* Select this FLASH part */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, true); + + /* Send "Write Disable (WRDI)" command */ + + (void)SPI_SEND(priv->dev, MX25L_WRDI); + + /* Deselect the FLASH */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, false); + + mxlinfo("Disabled\n"); +} + +/************************************************************************************ + * Name: mx25l_sectorerase (4k) + ************************************************************************************/ + +static void mx25l_sectorerase(FAR struct mx25l_dev_s *priv, off_t sector) +{ + off_t offset; + + offset = sector << priv->sectorshift; + + mxlinfo("sector: %08lx\n", (long)sector); + + /* Send write enable instruction */ + + mx25l_writeenable(priv); + + /* Select this FLASH part */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, true); + + /* Send the "Sector Erase (SE)" or "Block Erase (BE)" instruction + * that was passed in as the erase type. + */ + + (void)SPI_SEND(priv->dev, MX25L_SE); + + /* 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); + + /* Deselect the FLASH */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, false); + + mx25l_waitwritecomplete(priv); + + mxlinfo("Erased\n"); +} + +/************************************************************************************ + * Name: mx25l_chiperase + ************************************************************************************/ + +static inline int mx25l_chiperase(FAR struct mx25l_dev_s *priv) +{ + mxlinfo("priv: %p\n", priv); + + /* Send write enable instruction */ + + mx25l_writeenable(priv); + + /* Select this FLASH part */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, true); + + /* Send the "Chip Erase (CE)" instruction */ + + (void)SPI_SEND(priv->dev, MX25L_CE); + + /* Deselect the FLASH */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, false); + + mx25l_waitwritecomplete(priv); + + mxlinfo("Return: OK\n"); + return OK; +} + +/************************************************************************************ + * Name: mx25l_byteread + ************************************************************************************/ + +static void mx25l_byteread(FAR struct mx25l_dev_s *priv, FAR uint8_t *buffer, + off_t address, size_t nbytes) +{ + mxlinfo("address: %08lx nbytes: %d\n", (long)address, (int)nbytes); + + /* Wait for any preceding write or erase operation to complete. */ + + mx25l_waitwritecomplete(priv); + + /* Make sure that writing is disabled */ + + mx25l_writedisable(priv); + + /* Select this FLASH part */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, true); + + /* Send "Read from Memory " instruction */ + + (void)SPI_SEND(priv->dev, MX25L_FAST_READ); + + /* Send the address high byte first. */ + + (void)SPI_SEND(priv->dev, (address >> 16) & 0xff); + (void)SPI_SEND(priv->dev, (address >> 8) & 0xff); + (void)SPI_SEND(priv->dev, address & 0xff); + + /* Send a dummy byte */ + + (void)SPI_SEND(priv->dev, MX25L_DUMMY); + + /* Then read all of the requested bytes */ + + SPI_RECVBLOCK(priv->dev, buffer, nbytes); + + /* Deselect the FLASH */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, false); +} + +/************************************************************************************ + * Name: mx25l_pagewrite + ************************************************************************************/ + +static inline void mx25l_pagewrite(FAR struct mx25l_dev_s *priv, + FAR const uint8_t *buffer, + off_t address, size_t nbytes) +{ + mxlinfo("address: %08lx nwords: %d\n", (long)address, (int)nbytes); + + for (; nbytes > 0; nbytes -= (1 << priv->pageshift)) + { + /* Enable the write access to the FLASH */ + + mx25l_writeenable(priv); + + /* Select this FLASH part */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, true); + + /* Send the "Page Program (MX25L_PP)" Command */ + + SPI_SEND(priv->dev, MX25L_PP); + + /* Send the address high byte first. */ + + (void)SPI_SEND(priv->dev, (address >> 16) & 0xff); + (void)SPI_SEND(priv->dev, (address >> 8) & 0xff); + (void)SPI_SEND(priv->dev, address & 0xff); + + /* Then send the page of data */ + + SPI_SNDBLOCK(priv->dev, buffer, 1 << priv->pageshift); + + /* Deselect the FLASH and setup for the next pass through the loop */ + + SPI_SELECT(priv->dev, SPIDEV_FLASH, false); + + /* Wait for any preceding write or erase operation to complete. */ + + mx25l_waitwritecomplete(priv); + + /* Update addresses */ + + address += 1 << priv->pageshift; + buffer += 1 << priv->pageshift; + } + + mxlinfo("Written\n"); +} + +/************************************************************************************ + * Name: mx25l_cacheflush + ************************************************************************************/ + +#if defined(CONFIG_MX25L_SECTOR512) +static void mx25l_cacheflush(FAR struct mx25l_dev_s *priv) +{ + /* If the cached is dirty (meaning that it no longer matches the old FLASH contents) + * or was erased (with the cache containing the correct FLASH contents), then write + * the cached erase block to FLASH. + */ + + if (IS_DIRTY(priv) || IS_ERASED(priv)) + { + /* Write entire erase block to FLASH */ + + mx25l_pagewrite(priv, priv->sector, (off_t)priv->esectno << priv->sectorshift, + (1 << priv->sectorshift)); + + /* The case is no long dirty and the FLASH is no longer erased */ + + CLR_DIRTY(priv); + CLR_ERASED(priv); + } +} +#endif + +/************************************************************************************ + * Name: mx25l_cacheread + ************************************************************************************/ + +#if defined(CONFIG_MX25L_SECTOR512) +static FAR uint8_t *mx25l_cacheread(FAR struct mx25l_dev_s *priv, off_t sector) +{ + off_t esectno; + int shift; + int index; + + /* Convert from the 512 byte sector to the erase sector size of the device. For + * exmample, if the actual erase sector size if 4Kb (1 << 12), then we first + * shift to the right by 3 to get the sector number in 4096 increments. + */ + + shift = priv->sectorshift - MX25L_SECTOR512_SHIFT; + esectno = sector >> shift; + mxlinfo("sector: %ld esectno: %d shift=%d\n", sector, esectno, shift); + + /* Check if the requested erase block is already in the cache */ + + if (!IS_VALID(priv) || esectno != priv->esectno) + { + /* No.. Flush any dirty erase block currently in the cache */ + + mx25l_cacheflush(priv); + + /* Read the erase block into the cache */ + + mx25l_byteread(priv, priv->sector, (esectno << priv->sectorshift), 1 << priv->sectorshift); + + /* Mark the sector as cached */ + + priv->esectno = esectno; + + SET_VALID(priv); /* The data in the cache is valid */ + CLR_DIRTY(priv); /* It should match the FLASH contents */ + CLR_ERASED(priv); /* The underlying FLASH has not been erased */ + } + + /* Get the index to the 512 sector in the erase block that holds the argument */ + + index = sector & ((1 << shift) - 1); + + /* Return the address in the cache that holds this sector */ + + return &priv->sector[index << MX25L_SECTOR512_SHIFT]; +} +#endif + +/************************************************************************************ + * Name: mx25l_cacheerase + ************************************************************************************/ + +#if defined(CONFIG_MX25L_SECTOR512) +static void mx25l_cacheerase(FAR struct mx25l_dev_s *priv, off_t sector) +{ + FAR uint8_t *dest; + + /* First, make sure that the erase block containing the 512 byte sector is in + * the cache. + */ + + dest = mx25l_cacheread(priv, sector); + + /* Erase the block containing this sector if it is not already erased. + * The erased indicated will be cleared when the data from the erase sector + * is read into the cache and set here when we erase the block. + */ + + if (!IS_ERASED(priv)) + { + off_t esectno = sector >> (priv->sectorshift - MX25L_SECTOR512_SHIFT); + mxlinfo("sector: %ld esectno: %d\n", sector, esectno); + + mx25l_sectorerase(priv, esectno); + SET_ERASED(priv); + } + + /* Put the cached sector data into the erase state and mart the cache as dirty + * (but don't update the FLASH yet. The caller will do that at a more optimal + * time). + */ + + memset(dest, MX25L_ERASED_STATE, 1 << MX25L_SECTOR512_SHIFT); + SET_DIRTY(priv); +} +#endif + +/************************************************************************************ + * Name: mx25l_cachewrite + ************************************************************************************/ + +#if defined(CONFIG_MX25L_SECTOR512) +static void mx25l_cachewrite(FAR struct mx25l_dev_s *priv, FAR const uint8_t *buffer, + off_t sector, size_t nsectors) +{ + FAR uint8_t *dest; + + for (; nsectors > 0; nsectors--) + { + /* First, make sure that the erase block containing 512 byte sector is in + * memory. + */ + + dest = mx25l_cacheread(priv, sector); + + /* Erase the block containing this sector if it is not already erased. + * The erased indicated will be cleared when the data from the erase sector + * is read into the cache and set here when we erase the sector. + */ + + if (!IS_ERASED(priv)) + { + off_t esectno = sector >> (priv->sectorshift - MX25L_SECTOR512_SHIFT); + mxlinfo("sector: %ld esectno: %d\n", sector, esectno); + + mx25l_sectorerase(priv, esectno); + SET_ERASED(priv); + } + + /* Copy the new sector data into cached erase block */ + + memcpy(dest, buffer, 1 << MX25L_SECTOR512_SHIFT); + SET_DIRTY(priv); + + /* Set up for the next 512 byte sector */ + + buffer += 1 << MX25L_SECTOR512_SHIFT; + sector++; + } + + /* Flush the last erase block left in the cache */ + + mx25l_cacheflush(priv); +} +#endif + +/************************************************************************************ + * Name: mx25l_erase + ************************************************************************************/ + +static int mx25l_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks) +{ + FAR struct mx25l_dev_s *priv = (FAR struct mx25l_dev_s *)dev; + size_t blocksleft = nblocks; + + mxlinfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + + /* Lock access to the SPI bus until we complete the erase */ + + mx25l_lock(priv->dev); + + while (blocksleft-- > 0) + { + /* MX25LVF parts have complex block overlay structure for the moment + * we just erase in 4k blocks. + */ + +#ifdef CONFIG_MX25L_SECTOR512 + mx25l_cacheerase(priv, startblock); +#else + mx25l_sectorerase(priv, startblock); +#endif + startblock++; + } + +#ifdef CONFIG_MX25L_SECTOR512 + /* Flush the last erase block left in the cache */ + + mx25l_cacheflush(priv); +#endif + + mx25l_unlock(priv->dev); + return (int)nblocks; +} + +/************************************************************************************ + * Name: mx25l_bread + ************************************************************************************/ + +static ssize_t mx25l_bread(FAR struct mtd_dev_s *dev, off_t startblock, + size_t nblocks, FAR uint8_t *buffer) +{ + FAR struct mx25l_dev_s *priv = (FAR struct mx25l_dev_s *)dev; + ssize_t nbytes; + + mxlinfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + + /* On this device, we can handle the block read just like the byte-oriented read */ + +#ifdef CONFIG_MX25L_SECTOR512 + nbytes = mx25l_read(dev, startblock << MX25L_SECTOR512_SHIFT, nblocks << MX25L_SECTOR512_SHIFT, + buffer); + if (nbytes > 0) + { + return nbytes >> MX25L_SECTOR512_SHIFT; + } +#else + nbytes = mx25l_read(dev, startblock << priv->pageshift, nblocks << priv->pageshift, + buffer); + if (nbytes > 0) + { + return nbytes >> priv->pageshift; + } +#endif + + return (int)nbytes; +} + +/************************************************************************************ + * Name: mx25l_bwrite + ************************************************************************************/ + +static ssize_t mx25l_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, + size_t nblocks, FAR const uint8_t *buffer) +{ + FAR struct mx25l_dev_s *priv = (FAR struct mx25l_dev_s *)dev; + + mxlinfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + + /* Lock the SPI bus and write all of the pages to FLASH */ + + mx25l_lock(priv->dev); + +#if defined(CONFIG_MX25L_SECTOR512) + mx25l_cachewrite(priv, buffer, startblock, nblocks); +#else + mx25l_pagewrite(priv, buffer, startblock << priv->pageshift, + nblocks << priv->pageshift); +#endif + mx25l_unlock(priv->dev); + + return nblocks; +} + +/************************************************************************************ + * Name: mx25l_read + ************************************************************************************/ + +static ssize_t mx25l_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, + FAR uint8_t *buffer) +{ + FAR struct mx25l_dev_s *priv = (FAR struct mx25l_dev_s *)dev; // TODO: + + mxlinfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + + /* Lock the SPI bus and select this FLASH part */ + + mx25l_lock(priv->dev); + mx25l_byteread(priv, buffer, offset, nbytes); + mx25l_unlock(priv->dev); + mxlinfo("return nbytes: %d\n", (int)nbytes); + return nbytes; +} + +/************************************************************************************ + * Name: mx25l_ioctl + ************************************************************************************/ + +static int mx25l_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) +{ + FAR struct mx25l_dev_s *priv = (FAR struct mx25l_dev_s *)dev; + int ret = -EINVAL; /* Assume good command with bad parameters */ + + mxlinfo("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. + */ + +#ifdef CONFIG_MX25L_SECTOR512 + geo->blocksize = (1 << MX25L_SECTOR512_SHIFT); + geo->erasesize = (1 << MX25L_SECTOR512_SHIFT); + geo->neraseblocks = priv->nsectors << (priv->sectorshift - MX25L_SECTOR512_SHIFT); +#else + geo->blocksize = (1 << priv->pageshift); + geo->erasesize = (1 << priv->sectorshift); + geo->neraseblocks = priv->nsectors; +#endif + ret = OK; + + mxlinfo("blocksize: %d erasesize: %d neraseblocks: %d\n", + geo->blocksize, geo->erasesize, geo->neraseblocks); + } + } + break; + + case MTDIOC_BULKERASE: + { + /* Erase the entire device */ + + mx25l_lock(priv->dev); + ret = mx25l_chiperase(priv); + mx25l_unlock(priv->dev); + } + break; + + case MTDIOC_XIPBASE: + default: + ret = -ENOTTY; /* Bad command */ + break; + } + + mxlinfo("return %d\n", ret); + return ret; +} + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: mx25l_initialize_spi + * + * 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 *mx25l_initialize_spi(FAR struct spi_dev_s *dev) +{ + FAR struct mx25l_dev_s *priv; + int ret; + + mxlinfo("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 mx25l_dev_s *)kmm_zalloc(sizeof(struct mx25l_dev_s)); + if (priv) + { + /* Initialize the allocated structure. (unsupported methods were + * nullified by kmm_zalloc). + */ + + priv->mtd.erase = mx25l_erase; + priv->mtd.bread = mx25l_bread; + priv->mtd.bwrite = mx25l_bwrite; + priv->mtd.read = mx25l_read; + priv->mtd.ioctl = mx25l_ioctl; + priv->dev = dev; + + /* Deselect the FLASH */ + + SPI_SELECT(dev, SPIDEV_FLASH, false); + + /* Identify the FLASH chip and get its capacity */ + + ret = mx25l_readid(priv); + if (ret != OK) + { + /* Unrecognized! Discard all of that work we just did and return NULL */ + + mxlerr("ERROR: Unrecognized\n"); + kmm_free(priv); + return NULL; + } + else + { +#ifdef CONFIG_MX25L_SECTOR512 /* Simulate a 512 byte sector */ + /* Allocate a buffer for the erase block cache */ + + priv->sector = (FAR uint8_t *)kmm_malloc(1 << priv->sectorshift); + if (!priv->sector) + { + /* Allocation failed! Discard all of that work we just did and return NULL */ + + ferr("ERROR: Allocation failed\n"); + kmm_free(priv); + return NULL; + } +#endif + +#ifdef CONFIG_MTD_REGISTRATION + /* Register the MTD with the procfs system if enabled */ + + mtd_register(&priv->mtd, "mx25l"); +#endif + } + } + + /* Return the implementation-specific state structure as the MTD device */ + + mxlinfo("Return %p\n", priv); + return (FAR struct mtd_dev_s *)priv; +} diff --git a/drivers/mtd/n25qxxx.c b/drivers/mtd/n25qxxx.c index 38bde4e275f46f16fcdd1f6b628e848b7a46b7cd..e5272f47edf8008d7a39df14d83170381fa57a4a 100644 --- a/drivers/mtd/n25qxxx.c +++ b/drivers/mtd/n25qxxx.c @@ -241,15 +241,15 @@ #define IS_VALID(p) ((((p)->flags) & N25QXXX_CACHE_VALID) != 0) #define IS_DIRTY(p) ((((p)->flags) & N25QXXX_CACHE_DIRTY) != 0) -#define IS_ERASED(p) ((((p)->flags) & N25QXXX_CACHE_DIRTY) != 0) +#define IS_ERASED(p) ((((p)->flags) & N25QXXX_CACHE_ERASED) != 0) #define SET_VALID(p) do { (p)->flags |= N25QXXX_CACHE_VALID; } while (0) #define SET_DIRTY(p) do { (p)->flags |= N25QXXX_CACHE_DIRTY; } while (0) -#define SET_ERASED(p) do { (p)->flags |= N25QXXX_CACHE_DIRTY; } while (0) +#define SET_ERASED(p) do { (p)->flags |= N25QXXX_CACHE_ERASED; } while (0) #define CLR_VALID(p) do { (p)->flags &= ~N25QXXX_CACHE_VALID; } while (0) #define CLR_DIRTY(p) do { (p)->flags &= ~N25QXXX_CACHE_DIRTY; } while (0) -#define CLR_ERASED(p) do { (p)->flags &= ~N25QXXX_CACHE_DIRTY; } while (0) +#define CLR_ERASED(p) do { (p)->flags &= ~N25QXXX_CACHE_ERASED; } while (0) /* 512 byte sector support **********************************************************/ diff --git a/drivers/mtd/ramtron.c b/drivers/mtd/ramtron.c index 0152475b98b9484f915f3fc14f8ecc701d6ca6c6..ad448c8c7ebf2c7761c74d17b25c15dff60ba500 100644 --- a/drivers/mtd/ramtron.c +++ b/drivers/mtd/ramtron.c @@ -264,6 +264,14 @@ static const struct ramtron_parts_s g_ramtron_parts[] = 3, /* addr_len */ 25000000 /* speed */ }, + { + "MB85RS256B", /* name */ + 0x05, /* id1 */ + 0x09, /* id2 */ + 32L*1024L, /* size */ + 3, /* addr_len */ + 25000000 /* speed */ + }, #ifdef CONFIG_RAMTRON_FRAM_NON_JEDEC { "FM25H20", /* name */ diff --git a/drivers/mtd/s25fl1.c b/drivers/mtd/s25fl1.c index f3181dd475eb4b70c3b3a88f7421c1949335e5d0..33a2589638f678e6d60afe503a9f4fc41686d082 100644 --- a/drivers/mtd/s25fl1.c +++ b/drivers/mtd/s25fl1.c @@ -292,15 +292,15 @@ #define IS_VALID(p) ((((p)->flags) & S25FL1_CACHE_VALID) != 0) #define IS_DIRTY(p) ((((p)->flags) & S25FL1_CACHE_DIRTY) != 0) -#define IS_ERASED(p) ((((p)->flags) & S25FL1_CACHE_DIRTY) != 0) +#define IS_ERASED(p) ((((p)->flags) & S25FL1_CACHE_ERASED) != 0) #define SET_VALID(p) do { (p)->flags |= S25FL1_CACHE_VALID; } while (0) #define SET_DIRTY(p) do { (p)->flags |= S25FL1_CACHE_DIRTY; } while (0) -#define SET_ERASED(p) do { (p)->flags |= S25FL1_CACHE_DIRTY; } while (0) +#define SET_ERASED(p) do { (p)->flags |= S25FL1_CACHE_ERASED; } while (0) #define CLR_VALID(p) do { (p)->flags &= ~S25FL1_CACHE_VALID; } while (0) #define CLR_DIRTY(p) do { (p)->flags &= ~S25FL1_CACHE_DIRTY; } while (0) -#define CLR_ERASED(p) do { (p)->flags &= ~S25FL1_CACHE_DIRTY; } while (0) +#define CLR_ERASED(p) do { (p)->flags &= ~S25FL1_CACHE_ERASED; } while (0) /* 512 byte sector support **********************************************************/ diff --git a/drivers/mtd/sst25.c b/drivers/mtd/sst25.c index 8da5778d840eb7846dfa7e3c32b166642e415482..9c84c7fba90bd1db1bb341dceb933ffae6e7ae5b 100644 --- a/drivers/mtd/sst25.c +++ b/drivers/mtd/sst25.c @@ -171,15 +171,15 @@ #define IS_VALID(p) ((((p)->flags) & SST25_CACHE_VALID) != 0) #define IS_DIRTY(p) ((((p)->flags) & SST25_CACHE_DIRTY) != 0) -#define IS_ERASED(p) ((((p)->flags) & SST25_CACHE_DIRTY) != 0) +#define IS_ERASED(p) ((((p)->flags) & SST25_CACHE_ERASED) != 0) #define SET_VALID(p) do { (p)->flags |= SST25_CACHE_VALID; } while (0) #define SET_DIRTY(p) do { (p)->flags |= SST25_CACHE_DIRTY; } while (0) -#define SET_ERASED(p) do { (p)->flags |= SST25_CACHE_DIRTY; } while (0) +#define SET_ERASED(p) do { (p)->flags |= SST25_CACHE_ERASED; } while (0) #define CLR_VALID(p) do { (p)->flags &= ~SST25_CACHE_VALID; } while (0) #define CLR_DIRTY(p) do { (p)->flags &= ~SST25_CACHE_DIRTY; } while (0) -#define CLR_ERASED(p) do { (p)->flags &= ~SST25_CACHE_DIRTY; } while (0) +#define CLR_ERASED(p) do { (p)->flags &= ~SST25_CACHE_ERASED; } while (0) /************************************************************************************ * Private Types @@ -1228,7 +1228,7 @@ FAR struct mtd_dev_s *sst25_initialize(FAR struct spi_dev_s *dev) ferr("ERROR: Allocation failed\n"); kmm_free(priv); - priv = NULL; + return NULL; } #endif } diff --git a/drivers/mtd/w25.c b/drivers/mtd/w25.c index da015a8c421f036e172ae1e4e46c67d8b2dbc260..279525e1fc45623447f6e1fae16b54b4426603d0 100644 --- a/drivers/mtd/w25.c +++ b/drivers/mtd/w25.c @@ -200,15 +200,15 @@ #define IS_VALID(p) ((((p)->flags) & W25_CACHE_VALID) != 0) #define IS_DIRTY(p) ((((p)->flags) & W25_CACHE_DIRTY) != 0) -#define IS_ERASED(p) ((((p)->flags) & W25_CACHE_DIRTY) != 0) +#define IS_ERASED(p) ((((p)->flags) & W25_CACHE_ERASED) != 0) #define SET_VALID(p) do { (p)->flags |= W25_CACHE_VALID; } while (0) #define SET_DIRTY(p) do { (p)->flags |= W25_CACHE_DIRTY; } while (0) -#define SET_ERASED(p) do { (p)->flags |= W25_CACHE_DIRTY; } while (0) +#define SET_ERASED(p) do { (p)->flags |= W25_CACHE_ERASED; } while (0) #define CLR_VALID(p) do { (p)->flags &= ~W25_CACHE_VALID; } while (0) #define CLR_DIRTY(p) do { (p)->flags &= ~W25_CACHE_DIRTY; } while (0) -#define CLR_ERASED(p) do { (p)->flags &= ~W25_CACHE_DIRTY; } while (0) +#define CLR_ERASED(p) do { (p)->flags &= ~W25_CACHE_ERASED; } while (0) /************************************************************************************ * Private Types @@ -1278,7 +1278,7 @@ FAR struct mtd_dev_s *w25_initialize(FAR struct spi_dev_s *spi) ferr("ERROR: Allocation failed\n"); kmm_free(priv); - priv = NULL; + return NULL; } #endif } diff --git a/drivers/pipes/Kconfig b/drivers/pipes/Kconfig index 760f9384ddae305ad23a6ccbb0fd5a5e5091a27c..ace6ca8458db03dd16a4293c861943458adfbb14 100644 --- a/drivers/pipes/Kconfig +++ b/drivers/pipes/Kconfig @@ -5,20 +5,23 @@ config DEV_PIPE_MAXSIZE int "Maximum pipe/FIFO size" - default 1024 + default 1024 if !DEFAULT_SMALL + default 256 if DEFAULT_SMALL ---help--- Maximum configurable size of a pipe or FIFO at runtime. config DEV_PIPE_SIZE int "Default pipe size" - default 1024 + default 1024 if !DEFAULT_SMALL + default 256 if DEFAULT_SMALL ---help--- Sets the default size of the pipe ringbuffer in bytes. A value of zero disables pipe support. config DEV_FIFO_SIZE int "Default FIFO size" - default 1024 + default 1024 if !DEFAULT_SMALL + default 256 if DEFAULT_SMALL ---help--- Sets the default size of the FIFO ringbuffer in bytes. A value of zero disables FIFO support. diff --git a/drivers/pipes/pipe_common.c b/drivers/pipes/pipe_common.c index 3bb5fc405e002153ae6495cec78dc50e16238f17..730e0228dee87ebada26ae3ab533ffd042c99744 100644 --- a/drivers/pipes/pipe_common.c +++ b/drivers/pipes/pipe_common.c @@ -122,6 +122,7 @@ static void pipecommon_pollnotify(FAR struct pipe_dev_s *dev, for (i = 0; i < CONFIG_DEV_PIPE_NPOLLWAITERS; i++) { FAR struct pollfd *fds = dev->d_fds[i]; + if (fds) { fds->revents |= eventset & (fds->events | POLLERR | POLLHUP); @@ -599,6 +600,7 @@ ssize_t pipecommon_write(FAR struct file *filep, FAR const char *buffer, sem_post(&dev->d_rdsem); } } + last = nwritten; /* If O_NONBLOCK was set, then return partial bytes written or EGAIN */ @@ -609,6 +611,7 @@ ssize_t pipecommon_write(FAR struct file *filep, FAR const char *buffer, { nwritten = -EAGAIN; } + sem_post(&dev->d_bfsem); return nwritten; } @@ -785,11 +788,18 @@ int pipecommon_ioctl(FAR struct file *filep, int cmd, unsigned long arg) } break; - case FIONREAD: + case FIONWRITE: /* Number of bytes waiting in send queue */ + case FIONREAD: /* Number of bytes available for reading */ { int count; - /* Determine the number of bytes available in the buffer */ + /* Determine the number of bytes written to the buffer. This is, + * of course, also the number of bytes that may be read from the + * buffer. + * + * d_rdndx - index to remove next byte from the buffer + * d_wrndx - Index to next location to add a byte to the buffer. + */ if (dev->d_wrndx < dev->d_rdndx) { @@ -805,11 +815,17 @@ int pipecommon_ioctl(FAR struct file *filep, int cmd, unsigned long arg) } break; - case FIONWRITE: + /* Free space in buffer */ + + case FIONSPACE: { int count; - /* Determine the number of bytes free in the buffer */ + /* Determine the number of bytes free in the buffer. + * + * d_rdndx - index to remove next byte from the buffer + * d_wrndx - Index to next location to add a byte to the buffer. + */ if (dev->d_wrndx < dev->d_rdndx) { diff --git a/drivers/sensors/Kconfig b/drivers/sensors/Kconfig index c369db5fc543d51628028dfc503735586b46d576..95e4a9c385e96b49ab496abf41c4610f6c1891c3 100644 --- a/drivers/sensors/Kconfig +++ b/drivers/sensors/Kconfig @@ -18,6 +18,13 @@ config BH1750FVI ---help--- Enable driver support for the Rohm BH1750FVI light sensor. +config BMG160 + bool "Bosch BMG160 Gyroscope Sensor support" + default n + select SPI + ---help--- + Enable driver support for the Bosch BMG160 gyroscope sensor. + config BMP180 bool "Bosch BMP180 Barometer Sensor support" default n @@ -25,6 +32,26 @@ config BMP180 ---help--- Enable driver support for the Bosch BMP180 barometer sensor. +config SENSOR_KXTJ9 + bool "Kionix KXTJ9 Accelerometer support" + default n + select I2C + +if SENSOR_KXTJ9 + +config SENSOR_KXTJ9_I2C_BUS_SPEED + int "Kionix KXTJ9 Bus Speed in Hz" + default 400000 + +endif # SENSOR_KXTJ9 + +config LIS3DSH + bool "STMicro LIS3DSH 3-Axis acclerometer support" + default n + select SPI + ---help--- + Enable driver support for the STMicro LIS3DSH 3-Axis acclerometer. + config LIS331DL bool "ST LIS331DL device support" default n @@ -62,6 +89,13 @@ config MB7040_I2C_FREQUENCY range 1 400000 depends on MB7040 +config MLX90393 + bool "MLX90393 3-Axis Magnetometer" + default n + select SPI + ---help--- + Enable driver support for the Melex MLX90393 3-Axis magnetometer. + config MCP9844 bool "MCP9844 Temperature Sensor" default n @@ -160,6 +194,13 @@ config I2C_LM75 bool default y if LM75 +config LIS3MDL + bool "STMicro LIS3MDL 3-Axis magnetometer support" + default n + select SPI + ---help--- + Enable driver support for the ST LIS3MDL 3-axis magnetometer. + config LM75 bool "STMicro LM-75 Temperature Sensor support" default n diff --git a/drivers/sensors/Make.defs b/drivers/sensors/Make.defs index b2d5d52f43c6d68bd11e1264619c107f04f4b803..5527e98e4f73a2a1d1b7546c6c6486ada225acf0 100644 --- a/drivers/sensors/Make.defs +++ b/drivers/sensors/Make.defs @@ -49,6 +49,14 @@ ifeq ($(CONFIG_AS5048B),y) CSRCS += as5048b.c endif +ifeq ($(CONFIG_SENSOR_KXTJ9),y) + CSRCS += kxjt9.c +endif + +ifeq ($(CONFIG_LIS3DSH),y) + CSRCS += lis3dsh.c +endif + ifeq ($(CONFIG_LIS331DL),y) CSRCS += lis331dl.c endif @@ -65,6 +73,10 @@ ifeq ($(CONFIG_BH1750FVI),y) CSRCS += bh1750fvi.c endif +ifeq ($(CONFIG_BMG160),y) + CSRCS += bmg160.c +endif + ifeq ($(CONFIG_BMP180),y) CSRCS += bmp180.c endif @@ -85,6 +97,10 @@ ifeq ($(CONFIG_MCP9844),y) CSRCS += mcp9844.c endif +ifeq ($(CONFIG_MLX90393),y) + CSRCS += mlx90393.c +endif + ifeq ($(CONFIG_MS58XX),y) CSRCS += ms58xx.c endif @@ -109,6 +125,11 @@ endif ifeq ($(CONFIG_MPL115A),y) CSRCS += mpl115a.c endif + +ifeq ($(CONFIG_LIS3MDL),y) + CSRCS += lis3mdl.c +endif + endif # CONFIG_SPI # Quadrature encoder upper half diff --git a/drivers/sensors/bmg160.c b/drivers/sensors/bmg160.c new file mode 100644 index 0000000000000000000000000000000000000000..03ad72a5d04d2bb39cf0b68ee64e9bf073525f63 --- /dev/null +++ b/drivers/sensors/bmg160.c @@ -0,0 +1,595 @@ +/**************************************************************************** + * drivers/sensors/bmg160.c + * Character driver for the BMG160 3-Axis gyroscope. + * + * Copyright (C) 2016 DS-Automotion GmbH. All rights reserved. + * Author: Alexander Entinger + * Thomas Ilk + * + * 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 + +#if defined(CONFIG_SPI) && defined(CONFIG_BMG160) + +/**************************************************************************** + * Private + ****************************************************************************/ + +struct bmg160_sensor_data_s +{ + int16_t x_gyr; /* Measurement result for x axis */ + int16_t y_gyr; /* Measurement result for y axis */ + int16_t z_gyr; /* Measurement result for z axis */ +}; + +struct bmg160_dev_s +{ + FAR struct bmg160_dev_s *flink; /* Supports a singly linked list of + * drivers */ + FAR struct spi_dev_s *spi; /* Pointer to the SPI instance */ + FAR struct bmg160_config_s *config; /* Pointer to the configuration of the + * BMG160 sensor */ + sem_t datasem; /* Manages exclusive access to this + * structure */ + struct bmg160_sensor_data_s data; /* The data as measured by the sensor */ + struct work_s work; /* The work queue is responsible for + * retrieving the data from the sensor + * after the arrival of new data was + * signalled in an interrupt */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static void bmg160_read_register(FAR struct bmg160_dev_s *dev, + uint8_t const reg_addr, uint8_t * reg_data); +static void bmg160_write_register(FAR struct bmg160_dev_s *dev, + uint8_t const reg_addr, + uint8_t const reg_data); +static void bmg160_reset(FAR struct bmg160_dev_s *dev); +static void bmg160_read_measurement_data(FAR struct bmg160_dev_s *dev); +static void bmg160_read_gyroscope_data(FAR struct bmg160_dev_s *dev, + uint16_t * x_gyr, uint16_t * y_gyr, + uint16_t * z_gyr); +static int bmg160_interrupt_handler(int irq, FAR void *context); +static void bmg160_worker(FAR void *arg); + +static int bmg160_open(FAR struct file *filep); +static int bmg160_close(FAR struct file *filep); +static ssize_t bmg160_read(FAR struct file *, FAR char *, size_t); +static ssize_t bmg160_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen); +static int bmg160_ioctl(FAR struct file *filep, int cmd, unsigned long arg); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const struct file_operations g_bmg160_fops = +{ + bmg160_open, + bmg160_close, + bmg160_read, + bmg160_write, + NULL, + bmg160_ioctl +#ifndef CONFIG_DISABLE_POLL + , NULL +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL +#endif +}; + +/* Single linked list to store instances of drivers */ + +static struct bmg160_dev_s *g_bmg160_list = NULL; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: bmg160_read_register + ****************************************************************************/ + +static void bmg160_read_register(FAR struct bmg160_dev_s *dev, + uint8_t const reg_addr, uint8_t * reg_data) +{ + /* Lock the SPI bus so that only one device can access it at the same time */ + + SPI_LOCK(dev->spi, true); + + /* Set CS to low which selects the BMG160 */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, true); + + /* Transmit the register address from where we want to read - the MSB needs + * to be set to indicate the read indication. + */ + + SPI_SEND(dev->spi, reg_addr | 0x80); + + /* Write an idle byte while receiving the required data */ + + *reg_data = (uint8_t) (SPI_SEND(dev->spi, 0)); + + /* Set CS to high which deselects the BMG160 */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, false); + + /* Unlock the SPI bus */ + + SPI_LOCK(dev->spi, false); +} + +/**************************************************************************** + * Name: bmg160_write_register + ****************************************************************************/ + +static void bmg160_write_register(FAR struct bmg160_dev_s *dev, + uint8_t const reg_addr, + uint8_t const reg_data) +{ + /* Lock the SPI bus so that only one device can access it at the same time */ + + SPI_LOCK(dev->spi, true); + + /* Set CS to low which selects the BMG160 */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, true); + + /* Transmit the register address from where we want to read */ + + SPI_SEND(dev->spi, reg_addr); + + /* Transmit the content which should be written in the register */ + + SPI_SEND(dev->spi, reg_data); + + /* Set CS to high which deselects the BMG160 */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, false); + + /* Unlock the SPI bus */ + + SPI_LOCK(dev->spi, false); +} + +/**************************************************************************** + * Name: bmg160_reset + ****************************************************************************/ + +static void bmg160_reset(FAR struct bmg160_dev_s *dev) +{ + bmg160_write_register(dev, BMG160_BGW_SOFTRESET_REG, 0xB6); + + up_mdelay(100); +} + +/**************************************************************************** + * Name: bmg160_read_measurement_data + ****************************************************************************/ + +static void bmg160_read_measurement_data(FAR struct bmg160_dev_s *dev) +{ + int ret; + + /* Read Gyroscope */ + + uint16_t x_gyr = 0, y_gyr = 0, z_gyr = 0; + + bmg160_read_gyroscope_data(dev, &x_gyr, &y_gyr, &z_gyr); + + /* Aquire the semaphore before the data is copied */ + + ret = sem_wait(&dev->datasem); + if (ret < 0) + { + snerr("ERROR: Could not aquire dev->datasem: %d\n", ret); + return; + } + + /* Copy retrieve data to internal data structure */ + + dev->data.x_gyr = (int16_t) (x_gyr); + dev->data.y_gyr = (int16_t) (y_gyr); + dev->data.z_gyr = (int16_t) (z_gyr); + + /* Give back the semaphore */ + + sem_post(&dev->datasem); +} + +/**************************************************************************** + * Name: bmg160_read_gyroscope_data + ****************************************************************************/ + +static void bmg160_read_gyroscope_data(FAR struct bmg160_dev_s *dev, + uint16_t * x_gyr, uint16_t * y_gyr, + uint16_t * z_gyr) +{ + /* Lock the SPI bus so that only one device can access it at the same time */ + + SPI_LOCK(dev->spi, true); + + /* Set CS to low which selects the BMG160 */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, true); + + /* Transmit the register address from where we want to start reading. 0x80 + * -> MSB is set -> Read Indication. + */ + + SPI_SEND(dev->spi, (BMG160_RATE_X_LSB_REG | 0x80)); + + /* RX */ + + *x_gyr = ((uint16_t) (SPI_SEND(dev->spi, 0)) << 0); /* LSB */ + *x_gyr |= ((uint16_t) (SPI_SEND(dev->spi, 0)) << 8); /* MSB */ + + *y_gyr = ((uint16_t) (SPI_SEND(dev->spi, 0)) << 0); /* LSB */ + *y_gyr |= ((uint16_t) (SPI_SEND(dev->spi, 0)) << 8); /* MSB */ + + *z_gyr = ((uint16_t) (SPI_SEND(dev->spi, 0)) << 0); /* LSB */ + *z_gyr |= ((uint16_t) (SPI_SEND(dev->spi, 0)) << 8); /* MSB */ + + /* Set CS to high which deselects the BMG160 */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, false); + + /* Unlock the SPI bus */ + + SPI_LOCK(dev->spi, false); +} + +/**************************************************************************** + * Name: bmg160_interrupt_handler + ****************************************************************************/ + +static int bmg160_interrupt_handler(int irq, FAR void *context) +{ + /* This function should be called upon a rising edge on the BMG160 new data + * interrupt pin since it signals that new data has been measured. + */ + + FAR struct bmg160_dev_s *priv = 0; + int ret; + + /* Find out which BMG160 device caused the interrupt */ + + for (priv = g_bmg160_list; priv && priv->config->irq != irq; + priv = priv->flink); + DEBUGASSERT(priv != NULL); + + /* Task the worker with retrieving the latest sensor data. We should not do + * this in a interrupt since it might take too long. Also we cannot lock the + * SPI bus from within an interrupt. + */ + + DEBUGASSERT(priv->work.worker == NULL); + ret = work_queue(HPWORK, &priv->work, bmg160_worker, priv, 0); + if (ret < 0) + { + snerr("ERROR: Failed to queue work: %d\n", ret); + return ret; + } + + return OK; +} + +/**************************************************************************** + * Name: bmg160_worker + ****************************************************************************/ + +static void bmg160_worker(FAR void *arg) +{ + FAR struct bmg160_dev_s *priv = (FAR struct bmg160_dev_s *)(arg); + DEBUGASSERT(priv != NULL); + + /* Read out the latest sensor data */ + + bmg160_read_measurement_data(priv); +} + +/**************************************************************************** + * Name: bmg160_open + ****************************************************************************/ + +static int bmg160_open(FAR struct file *filep) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct bmg160_dev_s *priv = inode->i_private; +#ifdef CONFIG_DEBUG_SENSORS_INFO + uint8_t reg_content; +#endif + + DEBUGASSERT(priv != NULL); + + /* Perform a reset */ + + bmg160_reset(priv); + + /* Configure the sensor for our needs */ + + /* Enable - the full scale range FS = +/- 250 °/s */ + + bmg160_write_register(priv, + BMG160_RANGE_REG, + BMG160_RANGE_REG_FIX_VAL_bm | BMG160_RANGE_REG_FSR_1_bm | + BMG160_RANGE_REG_FSR_0_bm); + + /* Enable - the fastest data output rate ODR = 2000 Hz -> BW = 230 Hz */ + + bmg160_write_register(priv, BMG160_BW_REG, BMG160_BW_REG_ODR_0_bm); + + /* Enable - new data interrupt 1 */ + + bmg160_write_register(priv, + BMG160_INT_EN_0_REG, BMG160_INT_EN_0_REG_DATA_EN_bm); + + /* Enable - active high level interrupt 1 - push-pull interrupt */ + + bmg160_write_register(priv, + BMG160_INT_EN_1_REG, BMG160_INT_EN_1_REG_INT1_LVL_bm); + + /* Enable - map new data interrupt to INT1 */ + + bmg160_write_register(priv, + BMG160_INT_MAP_1_REG, + BMG160_INT_MAP_1_REG_INT1_DATA_bm); + + /* Read measurement data to ensure DRDY is low */ + + bmg160_read_measurement_data(priv); + +#ifdef CONFIG_DEBUG_SENSORS_INFO + /* Read back the content of all control registers for debug purposes */ + + reg_content = 0; + bmg160_read_register(priv, BMG160_RANGE_REG, ®_content); + sninfo("BMG160_RANGE_REG = %04x\n", reg_content); + + bmg160_read_register(priv, BMG160_BW_REG, ®_content); + sninfo("BMG160_BW_REG = %04x\n", reg_content); + + bmg160_read_register(priv, BMG160_INT_EN_0_REG, ®_content); + sninfo("BMG160_INT_EN_0_REG = %04x\n", reg_content); + + bmg160_read_register(priv, BMG160_INT_EN_1_REG, ®_content); + sninfo("BMG160_INT_EN_1_REG = %04x\n", reg_content); + + bmg160_read_register(priv, BMG160_INT_MAP_1_REG, ®_content); + sninfo("BMG160_INT_MAP_1_REG = %04x\n", reg_content); +#endif + + return OK; +} + +/**************************************************************************** + * Name: bmg160_close + ****************************************************************************/ + +static int bmg160_close(FAR struct file *filep) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct bmg160_dev_s *priv = inode->i_private; + + DEBUGASSERT(priv != NULL); + + /* Perform a reset */ + + bmg160_reset(priv); + + return OK; +} + +/**************************************************************************** + * Name: bmg160_read + ****************************************************************************/ + +static ssize_t bmg160_read(FAR struct file *filep, FAR char *buffer, + size_t buflen) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct bmg160_dev_s *priv = inode->i_private; + FAR struct bmg160_sensor_data_s *data; + int ret; + + DEBUGASSERT(priv != NULL); + + /* Check if enough memory was provided for the read call */ + + if (buflen < sizeof(FAR struct bmg160_sensor_data_s)) + { + snerr("ERROR: Not enough memory for reading out a sensor data sample\n"); + return -ENOSYS; + } + + /* Aquire the semaphore before the data is copied */ + + ret = sem_wait(&priv->datasem); + if (ret < 0) + { + int errcode = errno; + snerr("ERROR: Could not aquire priv->datasem: %d\n", errcode); + return -errcode; + } + + /* Copy the sensor data into the buffer */ + + data = (FAR struct bmg160_sensor_data_s *)buffer; + memset(data, 0, sizeof(FAR struct bmg160_sensor_data_s)); + + data->x_gyr = priv->data.x_gyr; + data->y_gyr = priv->data.y_gyr; + data->z_gyr = priv->data.z_gyr; + + /* Give back the semaphore */ + + sem_post(&priv->datasem); + + return sizeof(FAR struct bmg160_sensor_data_s); +} + +/**************************************************************************** + * Name: bmg160_write + ****************************************************************************/ + +static ssize_t bmg160_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen) +{ + return -ENOSYS; +} + +/**************************************************************************** + * Name: bmg160_ioctl + ****************************************************************************/ + +static int bmg160_ioctl(FAR struct file *filep, int cmd, unsigned long arg) +{ + int ret = OK; + + switch (cmd) + { + /* Command was not recognized */ + + default: + snerr("ERROR: Unrecognized cmd: %d\n", cmd); + ret = -ENOTTY; + break; + } + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: bmg160_register + * + * Description: + * Register the BMG160 character device as 'devpath' + * + * Input Parameters: + * devpath - The full path to the driver to register. E.g., "/dev/gyr0" + * spi - An instance of the SPI interface to use to communicate with + * BMG160 + * config - configuration for the BMG160 driver. For details see + * description above. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int bmg160_register(FAR const char *devpath, FAR struct spi_dev_s *spi, + FAR struct bmg160_config_s *config) +{ + FAR struct bmg160_dev_s *priv; + int ret; + + /* Sanity check */ + + DEBUGASSERT(spi != NULL); + DEBUGASSERT(config != NULL); + + /* Initialize the BMG160 device structure */ + + priv = (FAR struct bmg160_dev_s *)kmm_malloc(sizeof(struct bmg160_dev_s)); + if (priv == NULL) + { + snerr("ERROR: Failed to allocate instance\n"); + return -ENOMEM; + } + + priv->spi = spi; + priv->config = config; + priv->work.worker = NULL; + + /* Initialize sensor data access semaphore */ + + sem_init(&priv->datasem, 0, 1); + + /* Setup SPI frequency and mode */ + + SPI_SETFREQUENCY(spi, BMG160_SPI_FREQUENCY); + SPI_SETMODE(spi, BMG160_SPI_MODE); + + /* Attach the interrupt handler */ + + ret = priv->config->attach(priv->config, &bmg160_interrupt_handler); + if (ret < 0) + { + snerr("ERROR: Failed to attach interrupt\n"); + return ret; + } + + /* Register the character driver */ + + ret = register_driver(devpath, &g_bmg160_fops, 0666, priv); + if (ret < 0) + { + snerr("ERROR: Failed to register driver: %d\n", ret); + kmm_free(priv); + sem_destroy(&priv->datasem); + return ret; + } + + /* Since we support multiple BMG160 devices, we will need to add this new + * instance to a list of device instances so that it can be found by the + * interrupt handler based on the received IRQ number. */ + + priv->flink = g_bmg160_list; + g_bmg160_list = priv; + + return OK; +} + +#endif /* CONFIG_SPI && CONFIG_BMG160 */ diff --git a/drivers/sensors/kxjt9.c b/drivers/sensors/kxjt9.c new file mode 100644 index 0000000000000000000000000000000000000000..36b23e2fa35ebdaf43b425f6139444ea5c2f0a81 --- /dev/null +++ b/drivers/sensors/kxjt9.c @@ -0,0 +1,681 @@ +/**************************************************************************** + * drivers/sensors/kxjt9.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * This driver derives from the Motorola Moto Z MDK: + * + * Copyright (c) 2016 Motorola Mobility, LLC. + * 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 of the copyright holder 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 HOLDER 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 + +#if defined(CONFIG_I2C) && defined(CONFIG_SENSOR_KXTJ9) + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_SENSOR_KXTJ9_I2C_BUS_SPEED +# define CONFIG_SENSOR_KXTJ9_I2C_BUS_SPEED 400000 +#endif + +/* Register Definitions *****************************************************/ + +/* Output registers */ + +#define XOUT_L 0x06 +#define WHO_AM_I 0x0f +#define DCST_RESP 0x0c + +/* Control registers */ + +#define INT_REL 0x1a +#define CTRL_REG1 0x1b +#define INT_CTRL1 0x1e +#define DATA_CTRL 0x21 +#define CTRL_REG2 0x1d + +/* Control register 1 bits */ + +#define PC1_OFF 0x7f +#define PC1_ON (1 << 7) + +/* CTRL_REG1: set resolution, g-range, data ready enable */ +/* Output resolution: 8-bit valid or 12-bit valid */ + +#define RES_8BIT 0 +#define RES_12BIT (1 << 6) + +/* Data ready funtion enable bit: set during probe if using irq mode */ + +#define DRDYE (1 << 5) + +/* Output g-range: +/-2g, 4g, or 8g */ + +#define KXTJ9_G_2G 0 +#define KXTJ9_G_4G (1 << 3) +#define KXTJ9_G_8G (1 << 4) + +/* Interrupt control register 1 bits */ +/* Set these during probe if using irq mode */ + +#define KXTJ9_IEL (1 << 3) +#define KXTJ9_IEA (1 << 4) +#define KXTJ9_IEN (1 << 5) + +#define KXTJ9_SRST 0x80 +#define WHO_AM_I_KXCJ9 0x0a + +#define KXTJ9_CTRL1_CONFIG (RES_12BIT | KXTJ9_G_2G | DRDYE) + +/* Misc. driver defitions ***************************************************/ + +#define ACCEL_NUM_RETRIES 5 + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* This structure describes the state of one KXTJ9 device */ + +struct kxjt9_dev_s +{ + FAR struct i2c_master_s *i2c; + sem_t exclsem; + bool enable; + bool power_enabled; + uint8_t address; + uint8_t shift; + uint8_t ctrl_reg1; + uint8_t data_ctrl; + uint8_t int_ctrl; +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/* I2C helpers */ + +static int kxtj9_reg_read(FAR struct kxjt9_dev_s *priv, uint8_t regaddr, + FAR uint8_t *regval, unsigned int len); +static int kxtj9_reg_write(FAR struct kxjt9_dev_s *priv, + uint8_t regaddr, uint8_t regval); + +/* KXTJ9 helpers */ + +static int kxtj9_configure(FAR struct kxjt9_dev_s *priv, uint8_t odr); +static int kxtj9_enable(FAR struct kxjt9_dev_s *priv, bool on); +static int kxtj9_read_sensor_data(FAR struct kxjt9_dev_s *priv, + FAR struct kxtj9_sensor_data *sensor_data); +static void kxtj9_soft_reset(FAR struct kxjt9_dev_s *priv); +static void kxtj9_set_mode_standby(FAR struct kxjt9_dev_s *priv); + +/* Character driver methods */ + +static int kxjt9_open(FAR struct file *filep); +static int kxjt9_close(FAR struct file *filep); +static ssize_t kxjt9_read(FAR struct file *filep, FAR char *buffer, + size_t buflen); +static ssize_t kxjt9_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen); +static int kxjt9_ioctl(FAR struct file *filep, int cmd, + unsigned long arg); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const struct file_operations g_fops = +{ + kxjt9_open, + kxjt9_close, + kxjt9_read, + kxjt9_write, + NULL, + kxjt9_ioctl, +#ifndef CONFIG_DISABLE_POLL + NULL, +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + NULL, +#endif +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: kxtj9_reg_read + * + * Description: + * Read from multiple KXTJ9 registers. + * + ****************************************************************************/ + +static int kxtj9_reg_read(FAR struct kxjt9_dev_s *priv, uint8_t regaddr, + FAR uint8_t *regval, unsigned int len) +{ + struct i2c_msg_s msg[2]; + uint8_t buf[1]; + int retries = ACCEL_NUM_RETRIES; + int ret; + + do + { + /* Format two messages: The first is a write containing the register + * address + */ + + buf[0] = regaddr; + + msg[0].frequency = CONFIG_SENSOR_KXTJ9_I2C_BUS_SPEED, + msg[0].addr = priv->address; + msg[0].flags = 0; + msg[0].buffer = buf; + msg[0].length = 1; + + /* The second is a read with a restart containing the register data */ + + msg[1].frequency = CONFIG_SENSOR_KXTJ9_I2C_BUS_SPEED, + msg[1].addr = priv->address; + msg[1].flags = I2C_M_READ; + msg[1].buffer = regval; + msg[1].length = len; + + /* Then perform the transfer. */ + + ret = I2C_TRANSFER(priv->i2c, msg, 2); + } + while (ret < 0 && retries-- > 0); + + return ret; +} + +/**************************************************************************** + * Name: kxtj9_reg_write + * + * Description: + * Write a value to a single KXTJ9 register + * + ****************************************************************************/ + +static int kxtj9_reg_write(FAR struct kxjt9_dev_s *priv, uint8_t regaddr, + uint8_t regval) +{ + struct i2c_msg_s msg; + uint8_t buf[2]; + int ret; + int retries = ACCEL_NUM_RETRIES; + + do + { + /* Setup for the transfer */ + + buf[0] = regaddr; + buf[1] = regval; + + msg.frequency = CONFIG_SENSOR_KXTJ9_I2C_BUS_SPEED, + msg.addr = priv->address; + msg.flags = 0; + msg.buffer = buf; + msg.length = 2; + + /* Then perform the transfer. */ + + ret = I2C_TRANSFER(priv->i2c, &msg, 1); + } + while (ret < 0 && retries-- > 0); + + return ret; +} + +/**************************************************************************** + * Name: kxtj9_soft_reset + * + * Description: + * Configure the KXTJ9 device. Handler the SNIOC_CONFIGURE IOCTL command. + * + ****************************************************************************/ + +static void kxtj9_soft_reset(FAR struct kxjt9_dev_s *priv) +{ + uint8_t wbuf[1]; + + /* Set accel into standby and known state by disabling PC1 */ + + wbuf[0] = KXTJ9_CTRL1_CONFIG; + kxtj9_reg_write(priv, CTRL_REG1, wbuf[0]); + + /* Send the reset command */ + + kxtj9_reg_read(priv, CTRL_REG2, &wbuf[0], 1); + + wbuf[0] |= KXTJ9_SRST; + kxtj9_reg_write(priv, CTRL_REG2, wbuf[0]); + + /* Delay 10ms for the accel parts to re-initialize */ + + usleep(10000); +} + +/**************************************************************************** + * Name: kxtj9_set_mode_standby + * + * Description: + * Configure the KXTJ9 device. Handler the SNIOC_CONFIGURE IOCTL command. + * + ****************************************************************************/ + +static void kxtj9_set_mode_standby(FAR struct kxjt9_dev_s *priv) +{ + uint8_t wbuf[1]; + + /* Set Accel into standby and known state by disabling PC1 */ + + wbuf[0] = KXTJ9_CTRL1_CONFIG; + kxtj9_reg_write(priv, CTRL_REG1, wbuf[0]); + + /* Clear interrupts */ + + wbuf[0] = 0; + kxtj9_reg_write(priv, INT_CTRL1, wbuf[0]); +} + +/**************************************************************************** + * Name: kxtj9_configure + * + * Description: + * Configure the KXTJ9 device. Handler the SNIOC_CONFIGURE IOCTL command. + * + ****************************************************************************/ + +static int kxtj9_configure(FAR struct kxjt9_dev_s *priv, uint8_t odr) +{ + uint8_t wbuf[0]; + int ret; + + do + { + ret = sem_wait(&priv->exclsem); + } + while (ret < 0 && errno == EINTR); + + kxtj9_soft_reset(priv); + kxtj9_set_mode_standby(priv); + + /* Read WHO_AM_I register, should return 0x0a */ + + kxtj9_reg_read(priv, WHO_AM_I, &wbuf[0], 1); + if (wbuf[0] != WHO_AM_I_KXCJ9) + { + snerr("ERROR: Not KXCJ9 chipset, WHO_AM_I register is 0x%2x.\n", + wbuf[0]); + } + + /* Ensure that PC1 is cleared before updating control registers */ + + kxtj9_reg_write(priv, CTRL_REG1, 0); + + /* 12Bit Res and -2G~+2G range */ + + priv->ctrl_reg1 = KXTJ9_CTRL1_CONFIG; + kxtj9_reg_write(priv, CTRL_REG1, priv->ctrl_reg1); + + priv->data_ctrl = odr; + kxtj9_reg_write(priv, DATA_CTRL, priv->data_ctrl); + + /* In irq mode, populate INT_CTRL */ + + priv->int_ctrl = KXTJ9_IEN | KXTJ9_IEA | KXTJ9_IEL; + kxtj9_reg_write(priv, INT_CTRL1, priv->int_ctrl); + + sem_post(&priv->exclsem); + return 0; +} + +/**************************************************************************** + * Name: kxtj9_enable + * + * Description: + * Enable or disable the KXTJ9 device. Handler the SNIOC_ENABLE and + * SNIOC_DISABLE IOCTL commands. + * + ****************************************************************************/ + +static int kxtj9_enable(FAR struct kxjt9_dev_s *priv, bool on) +{ + uint8_t wbuf[1]; + int ret; + + do + { + ret = sem_wait(&priv->exclsem); + } + while (ret < 0 && errno == EINTR); + + if (!on && priv->power_enabled) + { + priv->ctrl_reg1 &= PC1_OFF; + kxtj9_reg_write(priv, CTRL_REG1, priv->ctrl_reg1); + + priv->power_enabled = false; + sninfo("KXTJ9 in disabled mode\n"); + } + else if (on && !priv->power_enabled) + { + /* Turn on outputs */ + + priv->ctrl_reg1 |= PC1_ON; + kxtj9_reg_write(priv, CTRL_REG1, priv->ctrl_reg1); + + /* Clear initial interrupt if in irq mode */ + + kxtj9_reg_read(priv, INT_REL, wbuf, 1); + priv->power_enabled = true; + sninfo("KXTJ9 in operating mode\n"); + } + + sem_post(&priv->exclsem); + return OK; +} + +/**************************************************************************** + * Name: kxtj9_read_sensor_data + * + * Description: + * Read sensor data. This supports the standard driver read() method. + * + ****************************************************************************/ + +static int kxtj9_read_sensor_data(FAR struct kxjt9_dev_s *priv, + FAR struct kxtj9_sensor_data *sensor_data) +{ + int16_t acc_data[3]; + uint8_t data; + int ret; + + do + { + ret = sem_wait(&priv->exclsem); + } + while (ret < 0 && errno == EINTR); + + kxtj9_reg_read(priv, XOUT_L, (uint8_t *)acc_data, 6); + + /* 12 bit resolution, get rid of the lowest 4 bits */ + + sensor_data->x = acc_data[0] >> 4; + sensor_data->y = acc_data[1] >> 4; + sensor_data->z = acc_data[2] >> 4; + + /* Read INT_REL to clear interrupt status */ + + kxtj9_reg_read(priv, INT_REL, &data, 1); + sem_post(&priv->exclsem); + return OK; +} + +/**************************************************************************** + * Name: kxjt9_open + * + * Description: + * This method is called when the device is opened. + * + ****************************************************************************/ + +static int kxjt9_open(FAR struct file *filep) +{ + return OK; +} + +/**************************************************************************** + * Name: kxjt9_close + * + * Description: + * This method is called when the device is closed. + * + ****************************************************************************/ + +static int kxjt9_close(FAR struct file *filep) +{ + return OK; +} + +/**************************************************************************** + * Name: kxjt9_read + * + * Description: + * The standard read method. + * + ****************************************************************************/ + +static ssize_t kxjt9_read(FAR struct file *filep, FAR char *buffer, + size_t buflen) +{ + FAR struct inode *inode; + FAR struct kxjt9_dev_s *priv; + size_t nsamples; + size_t i; + int ret; + + /* How many samples will fit in the buffer? */ + + nsamples = buflen / sizeof(struct kxtj9_sensor_data); + + /* If the provided buffer is not large enough to return a single sample, + * then return an error. + */ + + if (nsamples < 1) + { + snerr("ERROR: Bufer too small %lu < %u\n", + buflen, sizeof(struct kxtj9_sensor_data)); + return (ssize_t)-EINVAL; + } + + DEBUGASSERT(filep != NULL && filep->f_inode != NULL && buffer != NULL); + inode = filep->f_inode; + + priv = (FAR struct kxjt9_dev_s *)inode->i_private; + DEBUGASSERT(priv != NULL && priv->i2c != NULL); + + /* Return all of the samples that will fit in the user-provided buffer */ + + for (i = 0; i < nsamples; i++) + { + /* Get the next sample data */ + + ret = kxtj9_read_sensor_data(priv, (FAR struct kxtj9_sensor_data *)buffer); + if (ret < 0) + { + snerr("ERROR: kxtj9_read_sensor_data failed: %d\n", ret); + return (ssize_t)ret; + } + + /* Set up for the next sample */ + + buffer += sizeof(struct kxtj9_sensor_data); + } + + return (ssize_t)(nsamples * sizeof(struct kxtj9_sensor_data)); +} + +/**************************************************************************** + * Name: kxjt9_write + * + * Description: + * A dummy write method. + * + ****************************************************************************/ + +static ssize_t kxjt9_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen) +{ + return -ENOSYS; +} + +/**************************************************************************** + * Name: kxjt9_ioctl + * + * Description: + * The standard ioctl method. + * + ****************************************************************************/ + +static int kxjt9_ioctl(FAR struct file *filep, int cmd, unsigned long arg) +{ + FAR struct inode *inode; + FAR struct kxjt9_dev_s *priv; + int ret; + + /* Sanity check */ + + DEBUGASSERT(filep != NULL && filep->f_inode != NULL); + inode = filep->f_inode; + + priv = (FAR struct kxjt9_dev_s *)inode->i_private; + DEBUGASSERT(priv != NULL && priv->i2c != NULL); + + /* Handle ioctl commands */ + + switch (cmd) + { + /* Start converting. Arg: None. */ + + case SNIOC_ENABLE: + ret = kxtj9_enable(priv, true); + break; + + /* Stop converting. Arg: None. */ + + case SNIOC_DISABLE: + ret = kxtj9_enable(priv, false); + break; + + /* Configure the KXTJ9. Arg: enum kxtj9_odr_e value. */ + + case SNIOC_CONFIGURE: + { + DEBUGASSERT(arg <= UINT8_MAX); + ret = kxtj9_configure(priv, (uint8_t)arg); + sninfo("SNIOC_CONFIGURE: ODR=%u ret=%d\n", + (unsigned int)arg, ret); + } + break; + + /* Unrecognized commands */ + + default: + snerr("ERROR: Unrecognized cmd: %d arg: %lu\n", cmd, arg); + ret = -ENOTTY; + break; + } + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: kxjt9_register + * + * Description: + * Register the KXJT9 accelerometer device as 'devpath'. + * + * Input Parameters: + * devpath - The full path to the driver to register, e.g., "/dev/accel0". + * i2c - An I2C driver instance. + * addr - The I2C address of the KXJT9 accelerometer, gyroscope or + * magnetometer. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int kxjt9_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, + uint8_t address) +{ + FAR struct kxjt9_dev_s *priv; + int ret; + + /* Sanity check */ + + DEBUGASSERT(devpath != NULL && i2c != NULL); + + /* Initialize the device's structure */ + + priv = (FAR struct kxjt9_dev_s *)kmm_zalloc(sizeof(struct kxjt9_dev_s)); + if (priv == NULL) + { + snerr("ERROR: Failed to allocate driver instance\n"); + return -ENOMEM; + } + + priv->i2c = i2c; + priv->address = address; + sem_init(&priv->exclsem, 0, 1); + + /* Register the character driver */ + + ret = register_driver(devpath, &g_fops, 0666, priv); + if (ret < 0) + { + snerr("ERROR: Failed to register driver: %d\n", ret); + kmm_free(priv); + return ret; + } + + return OK; +} + +#endif /* CONFIG_I2C && CONFIG_SENSOR_KXTJ9 */ diff --git a/drivers/sensors/lis3dsh.c b/drivers/sensors/lis3dsh.c new file mode 100644 index 0000000000000000000000000000000000000000..243f89874dc5265a20f1583c03a7fd9d04dc85e1 --- /dev/null +++ b/drivers/sensors/lis3dsh.c @@ -0,0 +1,590 @@ +/**************************************************************************** + * drivers/sensors/lis3dsh.c + * Character driver for the LIS3DSH 3-Axis acclerometer. + * + * Copyright (C) 2016 DS-Automotion GmbH. All rights reserved. + * Author: Alexander Entinger + * Thomas Ilk + * + * 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 + +#if defined(CONFIG_SPI) && defined(CONFIG_LIS3DSH) + +/**************************************************************************** + * Private + ****************************************************************************/ + +struct lis3dsh_sensor_data_s +{ + int16_t x_acc; /* Measurement result for x axis */ + int16_t y_acc; /* Measurement result for y axis */ + int16_t z_acc; /* Measurement result for z axis */ +}; + +struct lis3dsh_dev_s +{ + FAR struct lis3dsh_dev_s *flink; /* Supports a singly linked list of + * drivers */ + FAR struct spi_dev_s *spi; /* Pointer to the SPI instance */ + FAR struct lis3dsh_config_s *config; /* Pointer to the configuration + * of the LIS3DSH sensor */ + sem_t datasem; /* Manages exclusive access to this + * structure */ + struct lis3dsh_sensor_data_s data; /* The data as measured by the sensor */ + struct work_s work; /* The work queue is responsible for + * retrieving the data from the + * sensor after the arrival of new + * data was signalled in an interrupt */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static void lis3dsh_read_register(FAR struct lis3dsh_dev_s *dev, + uint8_t const reg_addr, uint8_t *reg_data); +static void lis3dsh_write_register(FAR struct lis3dsh_dev_s *dev, + uint8_t const reg_addr, + uint8_t const reg_data); +static void lis3dsh_reset(FAR struct lis3dsh_dev_s *dev); +static void lis3dsh_read_measurement_data(FAR struct lis3dsh_dev_s *dev); +static void lis3dsh_read_acclerometer_data(FAR struct lis3dsh_dev_s *dev, + uint16_t *x_acc, uint16_t *y_acc, + uint16_t *z_acc); +static int lis3dsh_interrupt_handler(int irq, FAR void *context); +static void lis3dsh_worker(FAR void *arg); + +static int lis3dsh_open(FAR struct file *filep); +static int lis3dsh_close(FAR struct file *filep); +static ssize_t lis3dsh_read(FAR struct file *, FAR char *buffer, + size_t buflen); +static ssize_t lis3dsh_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen); +static int lis3dsh_ioctl(FAR struct file *filep, int cmd, unsigned long arg); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const struct file_operations g_lis3dsh_fops = +{ + lis3dsh_open, + lis3dsh_close, + lis3dsh_read, + lis3dsh_write, + NULL, + lis3dsh_ioctl +#ifndef CONFIG_DISABLE_POLL + , NULL +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL +#endif +}; + +/* Single linked list to store instances of drivers */ + +static struct lis3dsh_dev_s *g_lis3dsh_list = NULL; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: lis3dsh_read_register + ****************************************************************************/ + +static void lis3dsh_read_register(FAR struct lis3dsh_dev_s *dev, + uint8_t const reg_addr, uint8_t * reg_data) +{ + /* Lock the SPI bus so that only one device can access it at the same time */ + + SPI_LOCK(dev->spi, true); + + /* Set CS to low which selects the LIS3DSH */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, true); + + /* Transmit the register address from where we want to read - the MSB needs + * to be set to indicate the read indication. + */ + + SPI_SEND(dev->spi, reg_addr | 0x80); + + /* Write an idle byte while receiving the required data */ + + *reg_data = (uint8_t) (SPI_SEND(dev->spi, 0)); + + /* Set CS to high which deselects the LIS3DSH */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, false); + + /* Unlock the SPI bus */ + + SPI_LOCK(dev->spi, false); +} + +/**************************************************************************** + * Name: lis3dsh_write_register + ****************************************************************************/ + +static void lis3dsh_write_register(FAR struct lis3dsh_dev_s *dev, + uint8_t const reg_addr, + uint8_t const reg_data) +{ + /* Lock the SPI bus so that only one device can access it at the same time */ + + SPI_LOCK(dev->spi, true); + + /* Set CS to low which selects the LIS3DSH */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, true); + + /* Transmit the register address from where we want to read */ + + SPI_SEND(dev->spi, reg_addr); + + /* Transmit the content which should be written in the register */ + + SPI_SEND(dev->spi, reg_data); + + /* Set CS to high which deselects the LIS3DSH */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, false); + + /* Unlock the SPI bus */ + + SPI_LOCK(dev->spi, false); +} + +/**************************************************************************** + * Name: lis3dsh_reset + ****************************************************************************/ + +static void lis3dsh_reset(FAR struct lis3dsh_dev_s *dev) +{ + lis3dsh_write_register(dev, LIS3DSH_CTRL_REG_6, LIS3DSH_CTRL_REG_6_BOOT_bm); + + up_mdelay(100); +} + +/**************************************************************************** + * Name: lis3dsh_read_measurement_data + ****************************************************************************/ + +static void lis3dsh_read_measurement_data(FAR struct lis3dsh_dev_s *dev) +{ + uint16_t x_acc = 0; + uint16_t y_acc = 0; + uint16_t z_acc = 0; + int ret; + + /* Read acclerometer data */ + + lis3dsh_read_acclerometer_data(dev, &x_acc, &y_acc, &z_acc); + + /* Aquire the semaphore before the data is copied */ + + ret = sem_wait(&dev->datasem); + if (ret < 0) + { + snerr("ERROR: Could not aquire dev->datasem: %d\n", ret); + return; + } + + /* Copy retrieve data to internal data structure */ + + dev->data.x_acc = (int16_t)x_acc; + dev->data.y_acc = (int16_t)y_acc; + dev->data.z_acc = (int16_t)z_acc; + + /* Give back the semaphore */ + + sem_post(&dev->datasem); +} + +/**************************************************************************** + * Name: lis3dsh_read_acclerometer_data + ****************************************************************************/ + +static void lis3dsh_read_acclerometer_data(FAR struct lis3dsh_dev_s *dev, + uint16_t * x_acc, uint16_t * y_acc, + uint16_t * z_acc) +{ + /* Lock the SPI bus so that only one device can access it at the same time */ + + SPI_LOCK(dev->spi, true); + + /* Set CS to low which selects the LIS3DSH */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, true); + + /* Transmit the register address from where we want to start reading 0x80 -> + * MSB is set -> Read Indication. + */ + + SPI_SEND(dev->spi, (LIS3DSH_OUT_X_L_REG | 0x80)); + + /* RX */ + + *x_acc = ((uint16_t) (SPI_SEND(dev->spi, 0)) << 0); /* LSB */ + *x_acc |= ((uint16_t) (SPI_SEND(dev->spi, 0)) << 8); /* MSB */ + + *y_acc = ((uint16_t) (SPI_SEND(dev->spi, 0)) << 0); /* LSB */ + *y_acc |= ((uint16_t) (SPI_SEND(dev->spi, 0)) << 8); /* MSB */ + + *z_acc = ((uint16_t) (SPI_SEND(dev->spi, 0)) << 0); /* LSB */ + *z_acc |= ((uint16_t) (SPI_SEND(dev->spi, 0)) << 8); /* MSB */ + + /* Set CS to high which deselects the LIS3DSH */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, false); + + /* Unlock the SPI bus */ + + SPI_LOCK(dev->spi, false); +} + +/**************************************************************************** + * Name: lis3dsh_interrupt_handler + ****************************************************************************/ + +static int lis3dsh_interrupt_handler(int irq, FAR void *context) +{ + /* This function should be called upon a rising edge on the LIS3DSH new data + * interrupt pin since it signals that new data has been measured. + */ + + FAR struct lis3dsh_dev_s *priv = NULL; + int ret; + + /* Find out which device caused the interrupt */ + + for (priv = g_lis3dsh_list; priv && priv->config->irq != irq; + priv = priv->flink); + DEBUGASSERT(priv != NULL); + + /* Task the worker with retrieving the latest sensor data. We should not do + * this in a interrupt since it might take too long. Also we cannot lock the + * SPI bus from within an interrupt. + */ + + DEBUGASSERT(priv->work.worker == NULL); + ret = work_queue(HPWORK, &priv->work, lis3dsh_worker, priv, 0); + if (ret < 0) + { + snerr("ERROR: Failed to queue work: %d\n", ret); + return ret; + } + + return OK; +} + +/**************************************************************************** + * Name: lis3dsh_worker + ****************************************************************************/ + +static void lis3dsh_worker(FAR void *arg) +{ + FAR struct lis3dsh_dev_s *priv = (FAR struct lis3dsh_dev_s *)(arg); + DEBUGASSERT(priv != NULL); + + /* Read out the latest sensor data */ + + lis3dsh_read_measurement_data(priv); +} + +/**************************************************************************** + * Name: lis3dsh_open + ****************************************************************************/ + +static int lis3dsh_open(FAR struct file *filep) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct lis3dsh_dev_s *priv = inode->i_private; + + DEBUGASSERT(priv != NULL); + + /* Perform a reset */ + + lis3dsh_reset(priv); + + /* Enable - the full scale range (FS = +/- 16 g) */ + + lis3dsh_write_register(priv, + LIS3DSH_CTRL_REG_5, LIS3DSH_CTRL_REG_5_FSCALE_2_bm); + + /* Enable - Auto increment of address when reading multiple bytes */ + + lis3dsh_write_register(priv, + LIS3DSH_CTRL_REG_6, LIS3DSH_CTRL_REG_6_ADD_INC_bm); + + /* Enable - Measurement of X-, Y-, and Z-axis - Block data update for + * accelerating data This should prevent race conditions when reading sensor + * data - fastest output data rate (ODR = 1600 Hz) */ + + lis3dsh_write_register(priv, + LIS3DSH_CTRL_REG_4, + LIS3DSH_CTRL_REG_4_XEN_bm | LIS3DSH_CTRL_REG_4_YEN_bm | + LIS3DSH_CTRL_REG_4_ZEN_bm | LIS3DSH_CTRL_REG_4_BDU_bm | + LIS3DSH_CTRL_REG_4_ODR_3_bm | LIS3DSH_CTRL_REG_4_ODR_0_bm); + + /* Enable - DRDY signal enable to INT 1 */ + + lis3dsh_write_register(priv, + LIS3DSH_CTRL_REG_3, + LIS3DSH_CTRL_REG_3_DR_EN_bm | LIS3DSH_CTRL_REG_3_IEA_bm | + LIS3DSH_CTRL_REG_3_IEL_bm | LIS3DSH_CTRL_REG_3_INT1_EN_bm); + + /* Read back the content of all control registers for debug purposes */ + +#ifdef CONFIG_DEBUG_SENSORS_INFO + { + uint8_t reg_content = 0; + + lis3dsh_read_register(priv, LIS3DSH_CTRL_REG_1, ®_content); + sninfo("LIS3DSH_CTRL_REG_1 = %04x\n", reg_content); + lis3dsh_read_register(priv, LIS3DSH_CTRL_REG_2, ®_content); + sninfo("LIS3DSH_CTRL_REG_2 = %04x\n", reg_content); + lis3dsh_read_register(priv, LIS3DSH_CTRL_REG_3, ®_content); + sninfo("LIS3DSH_CTRL_REG_3 = %04x\n", reg_content); + lis3dsh_read_register(priv, LIS3DSH_CTRL_REG_4, ®_content); + sninfo("LIS3DSH_CTRL_REG_4 = %04x\n", reg_content); + lis3dsh_read_register(priv, LIS3DSH_CTRL_REG_5, ®_content); + sninfo("LIS3DSH_CTRL_REG_5 = %04x\n", reg_content); + lis3dsh_read_register(priv, LIS3DSH_CTRL_REG_6, ®_content); + sninfo("LIS3DSH_CTRL_REG_6 = %04x\n", reg_content); + lis3dsh_read_register(priv, LIS3DSH_STATUS_REG, ®_content); + sninfo("STATUS_REG = %04x\n", reg_content); + } +#endif + + return OK; +} + +/**************************************************************************** + * Name: lis3dsh_close + ****************************************************************************/ + +static int lis3dsh_close(FAR struct file *filep) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct lis3dsh_dev_s *priv = inode->i_private; + + DEBUGASSERT(priv != NULL); + + /* Perform a reset */ + + lis3dsh_reset(priv); + + return OK; +} + +/**************************************************************************** + * Name: lis3dsh_read + ****************************************************************************/ + +static ssize_t lis3dsh_read(FAR struct file *filep, FAR char *buffer, + size_t buflen) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct lis3dsh_dev_s *priv = inode->i_private; + FAR struct lis3dsh_sensor_data_s *data; + int ret; + + DEBUGASSERT(priv != NULL); + + /* Check if enough memory was provided for the read call */ + + if (buflen < sizeof(FAR struct lis3dsh_sensor_data_s)) + { + snerr("ERROR: Not enough memory for reading out a sensor data sample\n"); + return -ENOSYS; + } + + /* Aquire the semaphore before the data is copied */ + + ret = sem_wait(&priv->datasem); + if (ret < 0) + { + int errcode = errno; + snerr("ERROR: Could not aquire priv->datasem: %d\n", errcode); + return -errcode; + } + + /* Copy the sensor data into the buffer */ + + data = (FAR struct lis3dsh_sensor_data_s *)buffer; + memset(data, 0, sizeof(FAR struct lis3dsh_sensor_data_s)); + + data->x_acc = priv->data.x_acc; + data->y_acc = priv->data.y_acc; + data->z_acc = priv->data.z_acc; + + /* Give back the semaphore */ + + sem_post(&priv->datasem); + + return sizeof(FAR struct lis3dsh_sensor_data_s); +} + +/**************************************************************************** + * Name: lis3dsh_write + ****************************************************************************/ + +static ssize_t lis3dsh_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen) +{ + return -ENOSYS; +} + +/**************************************************************************** + * Name: lis3dsh_ioctl + ****************************************************************************/ + +static int lis3dsh_ioctl(FAR struct file *filep, int cmd, unsigned long arg) +{ + int ret = OK; + + switch (cmd) + { + /* Command was not recognized */ + + default: + snerr("ERROR: Unrecognized cmd: %d\n", cmd); + ret = -ENOTTY; + break; + } + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: lis3dsh_register + * + * Description: + * Register the LIS3DSH character device as 'devpath' + * + * Input Parameters: + * devpath - The full path to the driver to register. E.g., "/dev/acc0" + * spi - An instance of the SPI interface to use to communicate with + * LIS3DSH + * config - configuration for the LIS3DSH driver. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int lis3dsh_register(FAR const char *devpath, FAR struct spi_dev_s *spi, + FAR struct lis3dsh_config_s *config) +{ + FAR struct lis3dsh_dev_s *priv; + int ret; + + /* Sanity check */ + + DEBUGASSERT(spi != NULL); + DEBUGASSERT(config != NULL); + + /* Initialize the LIS3DSH device structure */ + + priv = (FAR struct lis3dsh_dev_s *)kmm_malloc(sizeof(struct lis3dsh_dev_s)); + if (priv == NULL) + { + snerr("ERROR: Failed to allocate instance\n"); + return -ENOMEM; + } + + priv->spi = spi; + priv->config = config; + priv->work.worker = NULL; + + sem_init(&priv->datasem, 0, 1); /* Initialize sensor data access + * semaphore */ + + /* Setup SPI frequency and mode */ + + SPI_SETFREQUENCY(spi, LIS3DSH_SPI_FREQUENCY); + SPI_SETMODE(spi, LIS3DSH_SPI_MODE); + + /* Register the character driver */ + + ret = register_driver(devpath, &g_lis3dsh_fops, 0666, priv); + if (ret < 0) + { + snerr("ERROR: Failed to register driver: %d\n", ret); + kmm_free(priv); + sem_destroy(&priv->datasem); + return ret; + } + + /* Since we support multiple LIS3DSH devices, we will need to add this new + * instance to a list of device instances so that it can be found by the + * interrupt handler based on the received IRQ number. + */ + + priv->flink = g_lis3dsh_list; + g_lis3dsh_list = priv; + + /* Attach the interrupt handler */ + + ret = priv->config->attach(priv->config, &lis3dsh_interrupt_handler); + if (ret < 0) + { + snerr("ERROR: Failed to attach interrupt: %d\n", ret); + return ret; + } + + return OK; +} + +#endif /* CONFIG_SPI && CONFIG_LIS3DSH */ diff --git a/drivers/sensors/lis3mdl.c b/drivers/sensors/lis3mdl.c new file mode 100644 index 0000000000000000000000000000000000000000..cdb04e776e70590d24ec20b784daf28e1cf70d19 --- /dev/null +++ b/drivers/sensors/lis3mdl.c @@ -0,0 +1,635 @@ +/**************************************************************************** + * drivers/sensors/lis3mdl.c + * Character driver for the LIS3MDL 3-Axis magnetometer. + * + * Copyright (C) 2016 DS-Automotion GmbH. All rights reserved. + * Author: Alexander Entinger + * + * 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 + +#if defined(CONFIG_SPI) && defined(CONFIG_LIS3MDL) + +/**************************************************************************** + * Private + ****************************************************************************/ + +struct lis3mdl_sensor_data_s +{ + int16_t x_mag; /* Measurement result for x axis */ + int16_t y_mag; /* Measurement result for y axis */ + int16_t z_mag; /* Measurement result for z axis */ + int16_t temperature; /* Measurement result for temperature sensor */ +}; + +struct lis3mdl_dev_s +{ + FAR struct lis3mdl_dev_s *flink; /* Supports a singly linked list of + * drivers */ + FAR struct spi_dev_s *spi; /* Pointer to the SPI instance */ + FAR struct lis3mdl_config_s *config; /* Pointer to the configuration + * of the LIS3MDL sensor */ + sem_t datasem; /* Manages exclusive access to this + * structure */ + struct lis3mdl_sensor_data_s data; /* The data as measured by the sensor */ + struct work_s work; /* The work queue is responsible for + * retrieving the data from the + * sensor after the arrival of new + * data was signalled in an interrupt */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static void lis3mdl_read_register(FAR struct lis3mdl_dev_s *dev, + uint8_t const reg_addr, uint8_t * reg_data); +static void lis3mdl_write_register(FAR struct lis3mdl_dev_s *dev, + uint8_t const reg_addr, + uint8_t const reg_data); +static void lis3mdl_reset(FAR struct lis3mdl_dev_s *dev); +static void lis3mdl_read_measurement_data(FAR struct lis3mdl_dev_s *dev); +static void lis3mdl_read_magnetic_data(FAR struct lis3mdl_dev_s *dev, + uint16_t * x_mag, uint16_t * y_mag, + uint16_t * z_mag); +static void lis3mdl_read_temperature(FAR struct lis3mdl_dev_s *dev, + uint16_t * temperature); +static int lis3mdl_interrupt_handler(int irq, FAR void *context); +static void lis3mdl_worker(FAR void *arg); + +static int lis3mdl_open(FAR struct file *filep); +static int lis3mdl_close(FAR struct file *filep); +static ssize_t lis3mdl_read(FAR struct file *, FAR char *, size_t); +static ssize_t lis3mdl_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen); +static int lis3mdl_ioctl(FAR struct file *filep, int cmd, unsigned long arg); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const struct file_operations g_lis3mdl_fops = +{ + lis3mdl_open, + lis3mdl_close, + lis3mdl_read, + lis3mdl_write, + NULL, + lis3mdl_ioctl +#ifndef CONFIG_DISABLE_POLL + , NULL +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL +#endif +}; + +/* Single linked list to store instances of drivers */ + +static struct lis3mdl_dev_s *g_lis3mdl_list = 0; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: lis3mdl_read_register + ****************************************************************************/ + +static void lis3mdl_read_register(FAR struct lis3mdl_dev_s *dev, + uint8_t const reg_addr, uint8_t * reg_data) +{ + /* Lock the SPI bus so that only one device can access it at the same time */ + + SPI_LOCK(dev->spi, true); + + /* Set CS to low which selects the LIS3MDL */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, true); + + /* Transmit the register address from where we want to read - the MSB needs + * to be set to indicate the read indication. + */ + + SPI_SEND(dev->spi, reg_addr | 0x80); + + /* Write an idle byte while receiving the required data */ + + *reg_data = (uint8_t) (SPI_SEND(dev->spi, 0)); + + /* Set CS to high which deselects the LIS3MDL */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, false); + + /* Unlock the SPI bus */ + + SPI_LOCK(dev->spi, false); +} + +/**************************************************************************** + * Name: lis3mdl_write_register + ****************************************************************************/ + +static void lis3mdl_write_register(FAR struct lis3mdl_dev_s *dev, + uint8_t const reg_addr, + uint8_t const reg_data) +{ + /* Lock the SPI bus so that only one device can access it at the same time */ + + SPI_LOCK(dev->spi, true); + + /* Set CS to low which selects the LIS3MDL */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, true); + + /* Transmit the register address from where we want to read */ + + SPI_SEND(dev->spi, reg_addr); + + /* Transmit the content which should be written in the register */ + + SPI_SEND(dev->spi, reg_data); + + /* Set CS to high which deselects the LIS3MDL */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, false); + + /* Unlock the SPI bus */ + + SPI_LOCK(dev->spi, false); +} + +/**************************************************************************** + * Name: lis3mdl_reset + ****************************************************************************/ + +static void lis3mdl_reset(FAR struct lis3mdl_dev_s *dev) +{ + lis3mdl_write_register(dev, + LIS3MDL_CTRL_REG_2, LIS3MDL_CTRL_REG_2_SOFT_RST_bm); + + up_mdelay(100); +} + +/**************************************************************************** + * Name: lis3mdl_interrupt_handler + ****************************************************************************/ + +static void lis3mdl_read_measurement_data(FAR struct lis3mdl_dev_s *dev) +{ + /* Magnetic data */ + + uint16_t x_mag = 0, y_mag = 0, z_mag = 0; + + lis3mdl_read_magnetic_data(dev, &x_mag, &y_mag, &z_mag); + + /* Temperature */ + + uint16_t temperature = 0; + + lis3mdl_read_temperature(dev, &temperature); + + /* Aquire the semaphore before the data is copied */ + + int ret = sem_wait(&dev->datasem); + if (ret != OK) + { + snerr("ERROR: Could not aquire dev->datasem: %d\n", ret); + return; + } + + /* Copy retrieve data to internal data structure */ + + dev->data.x_mag = (int16_t) (x_mag); + dev->data.y_mag = (int16_t) (y_mag); + dev->data.z_mag = (int16_t) (z_mag); + dev->data.temperature = (int16_t) (temperature); + + /* Give back the semaphore */ + + sem_post(&dev->datasem); +} + +/**************************************************************************** + * Name: lis3mdl_read_magnetic_data + ****************************************************************************/ + +static void lis3mdl_read_magnetic_data(FAR struct lis3mdl_dev_s *dev, + uint16_t * x_mag, uint16_t * y_mag, + uint16_t * z_mag) +{ + /* Lock the SPI bus so that only one device can access it at the same time */ + + SPI_LOCK(dev->spi, true); + + /* Set CS to low which selects the LIS3MDL */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, true); + + /* Transmit the register address from where we want to start reading 0x80 -> + * MSB is set -> Read Indication 0x40 -> MSB-1 (MS-Bit) is set -> auto + * increment of address when reading multiple bytes. + */ + + SPI_SEND(dev->spi, (LIS3MDL_OUT_X_L_REG | 0x80 | 0x40)); /* RX */ + *x_mag = ((uint16_t) (SPI_SEND(dev->spi, 0)) << 0); /* LSB */ + *x_mag |= ((uint16_t) (SPI_SEND(dev->spi, 0)) << 8); /* MSB */ + + *y_mag = ((uint16_t) (SPI_SEND(dev->spi, 0)) << 0); /* LSB */ + *y_mag |= ((uint16_t) (SPI_SEND(dev->spi, 0)) << 8); /* MSB */ + + *z_mag = ((uint16_t) (SPI_SEND(dev->spi, 0)) << 0); /* LSB */ + *z_mag |= ((uint16_t) (SPI_SEND(dev->spi, 0)) << 8); /* MSB */ + + /* Set CS to high which deselects the LIS3MDL */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, false); + + /* Unlock the SPI bus */ + + SPI_LOCK(dev->spi, false); +} + +/**************************************************************************** + * Name: lis3mdl_read_temperature + ****************************************************************************/ + +static void lis3mdl_read_temperature(FAR struct lis3mdl_dev_s *dev, + uint16_t * temperature) +{ + /* Lock the SPI bus so that only one device can access it at the same time */ + + SPI_LOCK(dev->spi, true); + + /* Set CS to low which selects the LIS3MDL */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, true); + + /* Transmit the register address from where we want to start reading 0x80 -> + * MSB is set -> Read Indication 0x40 -> MSB-1 (MS-Bit) is set -> auto + * increment of address when reading multiple bytes */ + + SPI_SEND(dev->spi, (LIS3MDL_TEMP_OUT_L_REG | 0x80 | 0x40)); + + /* RX */ + + *temperature = ((uint16_t) (SPI_SEND(dev->spi, 0)) << 0); /* LSB */ + *temperature |= ((uint16_t) (SPI_SEND(dev->spi, 0)) << 8); /* MSB */ + + /* Set CS to high which deselects the LIS3MDL */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, false); + + /* Unlock the SPI bus */ + + SPI_LOCK(dev->spi, false); +} + +/**************************************************************************** + * Name: lis3mdl_interrupt_handler + ****************************************************************************/ + +static int lis3mdl_interrupt_handler(int irq, FAR void *context) +{ + /* This function should be called upon a rising edge on the LIS3MDL DRDY pin + * since it signals that new data has been measured. */ + + FAR struct lis3mdl_dev_s *priv = 0; + int ret; + + /* Find out which LIS3MDL device caused the interrupt */ + + for (priv = g_lis3mdl_list; priv && priv->config->irq != irq; + priv = priv->flink); + DEBUGASSERT(priv != NULL); + + /* Task the worker with retrieving the latest sensor data. We should not do + * this in a interrupt since it might take too long. Also we cannot lock the + * SPI bus from within an interrupt. */ + + DEBUGASSERT(priv->work.worker == NULL); + ret = work_queue(HPWORK, &priv->work, lis3mdl_worker, priv, 0); + if (ret < 0) + { + snerr("ERROR: Failed to queue work: %d\n", ret); + return ret; + } + else + { + return OK; + } +} + +/**************************************************************************** + * Name: lis3mdl_worker + ****************************************************************************/ + +static void lis3mdl_worker(FAR void *arg) +{ + FAR struct lis3mdl_dev_s *priv = (FAR struct lis3mdl_dev_s *)(arg); + DEBUGASSERT(priv != NULL); + + /* Read out the latest sensor data */ + + lis3mdl_read_measurement_data(priv); +} + +/**************************************************************************** + * Name: lis3mdl_open + ****************************************************************************/ +static int lis3mdl_open(FAR struct file *filep) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct lis3mdl_dev_s *priv = inode->i_private; + uint8_t reg_content; + uint8_t reg_addr; + + DEBUGASSERT(priv != NULL); + + /* Perform a reset */ + + lis3mdl_reset(priv); + + /* Enable * - the maximum full scale mode. * Full scale = +/- 1.6 mT (16 + * Gauss) */ + + lis3mdl_write_register(priv, + LIS3MDL_CTRL_REG_2, + LIS3MDL_CTRL_REG_2_FS_1_bm | + LIS3MDL_CTRL_REG_2_FS_0_bm); + + /* Enable - temperature sensor - ultra high performance mode (UMP) for X and + * Y - fast output data rates This results in a output data rate of 155 Hz + * for X and Y */ + + lis3mdl_write_register(priv, + LIS3MDL_CTRL_REG_1, + LIS3MDL_CTRL_REG_1_TEMP_EN_bm | + LIS3MDL_CTRL_REG_1_OM_1_bm | LIS3MDL_CTRL_REG_1_OM_0_bm + | LIS3MDL_CTRL_REG_1_FAST_ODR_bm); + + /* Enable * - ultra high performance mode (UMP) for Z * This should result to + * the same output data rate as for X and Y. */ + + lis3mdl_write_register(priv, + LIS3MDL_CTRL_REG_4, + LIS3MDL_CTRL_REG_4_OMZ_1_bm | + LIS3MDL_CTRL_REG_4_OMZ_0_bm); + + /* Enable * - block data update for magnetic sensor data * This should + * prevent race conditions when reading sensor data. */ + + lis3mdl_write_register(priv, LIS3MDL_CTRL_REG_5, LIS3MDL_CTRL_REG_5_BDU_bm); + + /* Enable continous conversion mode - the device starts measuring now. */ + + lis3mdl_write_register(priv, LIS3MDL_CTRL_REG_3, 0); + + /* Read measurement data to ensure DRDY is low */ + + lis3mdl_read_measurement_data(priv); + + /* Read back the content of all control registers for debug purposes */ + + reg_content = 0; + for (reg_addr = LIS3MDL_CTRL_REG_1; + reg_addr <= LIS3MDL_CTRL_REG_5; + reg_addr++) + { + lis3mdl_read_register(priv, reg_addr, ®_content); + sninfo("R#%04x = %04x\n", reg_addr, reg_content); + } + + lis3mdl_read_register(priv, LIS3MDL_STATUS_REG, ®_content); + sninfo("STATUS_REG = %04x\n", reg_content); + + return OK; +} + +/**************************************************************************** + * Name: lis3mdl_close + ****************************************************************************/ + +static int lis3mdl_close(FAR struct file *filep) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct lis3mdl_dev_s *priv = inode->i_private; + + DEBUGASSERT(priv != NULL); + + /* Perform a reset */ + + lis3mdl_reset(priv); + + return OK; +} + +/**************************************************************************** + * Name: lis3mdl_read + ****************************************************************************/ + +static ssize_t lis3mdl_read(FAR struct file *filep, FAR char *buffer, + size_t buflen) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct lis3mdl_dev_s *priv = inode->i_private; + FAR struct lis3mdl_sensor_data_s *data; + int ret; + + DEBUGASSERT(priv != NULL); + + /* Check if enough memory was provided for the read call */ + + if (buflen < sizeof(FAR struct lis3mdl_sensor_data_s)) + { + snerr("ERROR: Not enough memory for reading out a sensor data sample\n"); + return -ENOSYS; + } + + /* Aquire the semaphore before the data is copied */ + + ret = sem_wait(&priv->datasem); + if (ret < 0) + { + int errcode = errno; + snerr("ERROR: Could not aquire priv->datasem: %d\n", errcode); + return -errcode; + } + + /* Copy the sensor data into the buffer */ + + data = (FAR struct lis3mdl_sensor_data_s *)buffer; + memset(data, 0, sizeof(FAR struct lis3mdl_sensor_data_s)); + + data->x_mag = priv->data.x_mag; + data->y_mag = priv->data.y_mag; + data->z_mag = priv->data.z_mag; + data->temperature = priv->data.temperature; + + /* Give back the semaphore */ + + sem_post(&priv->datasem); + + return sizeof(FAR struct lis3mdl_sensor_data_s); +} + +/**************************************************************************** + * Name: lis3mdl_write + ****************************************************************************/ + +static ssize_t lis3mdl_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen) +{ + return -ENOSYS; +} + +/**************************************************************************** + * Name: lis3mdl_ioctl + ****************************************************************************/ + +static int lis3mdl_ioctl(FAR struct file *filep, int cmd, unsigned long arg) +{ + int ret = OK; + + switch (cmd) + { + /* Command was not recognized */ + + default: + snerr("ERROR: Unrecognized cmd: %d\n", cmd); + ret = -ENOTTY; + break; + } + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: lis3mdl_register + * + * Description: + * Register the LIS3MDL character device as 'devpath' + * + * Input Parameters: + * devpath - The full path to the driver to register. E.g., "/dev/mag0" + * spi - An instance of the SPI interface to use to communicate with + * LIS3MDL + * config - configuration for the LIS3MDL driver. For details see + * description above. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int lis3mdl_register(FAR const char *devpath, FAR struct spi_dev_s *spi, + FAR struct lis3mdl_config_s const *config) +{ + FAR struct lis3mdl_dev_s *priv; + int ret; + + /* Sanity check */ + + DEBUGASSERT(spi != NULL); + DEBUGASSERT(config != NULL); + + /* Initialize the LIS3MDL device structure */ + + priv = (FAR struct lis3mdl_dev_s *)kmm_malloc(sizeof(struct lis3mdl_dev_s)); + if (priv == NULL) + { + snerr("ERROR: Failed to allocate instance\n"); + return -ENOMEM; + } + + priv->spi = spi; + priv->config = config; + + priv->work.worker = NULL; + + sem_init(&priv->datasem, 0, 1); /* Initialize sensor data access + * semaphore */ + + /* Setup SPI frequency and mode */ + + SPI_SETFREQUENCY(spi, LIS3MDL_SPI_FREQUENCY); + SPI_SETMODE(spi, LIS3MDL_SPI_MODE); + + /* Attach the interrupt handler */ + + ret = priv->config->attach(priv->config, &lis3mdl_interrupt_handler); + if (ret < 0) + { + snerr("ERROR: Failed to attach interrupt\n"); + return -ENODEV; + } + + /* Register the character driver */ + + ret = register_driver(devpath, &g_lis3mdl_fops, 0666, priv); + if (ret < 0) + { + snerr("ERROR: Failed to register driver: %d\n", ret); + kmm_free(priv); + sem_destroy(&priv->datasem); + return -ENODEV; + } + + /* Since we support multiple LIS3MDL devices are supported, we will need to + * add this new instance to a list of device instances so that it can be + * found by the interrupt handler based on the received IRQ number. */ + + priv->flink = g_lis3mdl_list; + g_lis3mdl_list = priv; + + return OK; +} + +#endif /* CONFIG_SPI && CONFIG_LIS3MDL */ diff --git a/drivers/sensors/mlx90393.c b/drivers/sensors/mlx90393.c new file mode 100644 index 0000000000000000000000000000000000000000..93a53ef871c7e50cdfad5cad88e7097ae3393df9 --- /dev/null +++ b/drivers/sensors/mlx90393.c @@ -0,0 +1,624 @@ +/**************************************************************************** + * drivers/sensors/mlx90393.c + * Character driver for the MLX90393 3-Axis magnetometer. + * + * Copyright (C) 2016 DS-Automotion GmbH. All rights reserved. + * Author: Alexander Entinger + * + * 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 + +#if defined(CONFIG_SPI) && defined(CONFIG_MLX90393) + +/**************************************************************************** + * Private + ****************************************************************************/ + +struct mlx90393_sensor_data_s +{ + int16_t x_mag; /* Measurement result for x axis */ + int16_t y_mag; /* Measurement result for y axis */ + int16_t z_mag; /* Measurement result for z axis */ + uint16_t temperature; /* Measurement result for temperature sensor */ +}; + +struct mlx90393_dev_s +{ + FAR struct mlx90393_dev_s *flink; /* Supports a singly linked list + * of drivers */ + FAR struct spi_dev_s *spi; /* Pointer to the SPI instance */ + FAR struct mlx90393_config_s *config; /* Pointer to the configuration of + * the MLX90393 sensor */ + + sem_t datasem; /* Manages exclusive access to + * this structure */ + struct mlx90393_sensor_data_s data; /* The data as measured by the + * sensor */ + struct work_s work; /* The work queue is responsible + * for retrieving the data from + * the sensor after the arrival of + * new data was signalled in an + * interrupt */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static void mlx90393_start_burst_mode(FAR struct mlx90393_dev_s *dev); +static void mlx90393_read_measurement_data(FAR struct mlx90393_dev_s *dev); +static void mlx90393_read_register(FAR struct mlx90393_dev_s *dev, + uint8_t const reg_addr, uint16_t *reg_data); +static void mlx90393_write_register(FAR struct mlx90393_dev_s *dev, + uint8_t const reg_addr, + uint16_t const reg_data); +static void mlx90393_reset(FAR struct mlx90393_dev_s *dev); +static int mlx90393_interrupt_handler(int irq, FAR void *context); +static void mlx90393_worker(FAR void *arg); + +static int mlx90393_open(FAR struct file *filep); +static int mlx90393_close(FAR struct file *filep); +static ssize_t mlx90393_read(FAR struct file *, FAR char *, size_t); +static ssize_t mlx90393_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen); +static int mlx90393_ioctl(FAR struct file *filep, int cmd, unsigned long arg); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const struct file_operations g_mlx90393_fops = +{ + mlx90393_open, + mlx90393_close, + mlx90393_read, + mlx90393_write, + NULL, + mlx90393_ioctl +#ifndef CONFIG_DISABLE_POLL + , NULL +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL +#endif +}; + +/* Single linked list to store instances of drivers */ + +static struct mlx90393_dev_s *g_mlx90393_list = NULL; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: mlx90393_start_burst_mode + ****************************************************************************/ + +static void mlx90393_start_burst_mode(FAR struct mlx90393_dev_s *dev) +{ + /* Lock the SPI bus so that only one device can access it at the same time */ + + SPI_LOCK(dev->spi, true); + + /* Set CS to low which selects the MLX90393 */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, true); + + /* Start Burst Mode (Continous Measurement on all channels) */ + + SPI_SEND(dev->spi, MLX90393_SB | MLX90393_ZYXT_bm); + + /* Write an idle byte to retrieve the status byte */ + + SPI_SEND(dev->spi, 0); + + /* Set CS to high which deselects the MLX90393 */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, false); + + /* Unlock the SPI bus */ + + SPI_LOCK(dev->spi, false); +} + +/**************************************************************************** + * Name: mlx90393_read_measurement_data + ****************************************************************************/ + +static void mlx90393_read_measurement_data(FAR struct mlx90393_dev_s *dev) +{ + int ret; + + /* Lock the SPI bus so that only one device can access it at the same time */ + + SPI_LOCK(dev->spi, true); + + /* Set CS to low which selects the MLX90393 */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, true); + + /* Issue command to read measurement data on all channels */ + + SPI_SEND(dev->spi, MLX90393_RM | MLX90393_ZYXT_bm); + + /* Write an idle byte to retrieve the status byte */ + + SPI_SEND(dev->spi, 0); + + /* The data is output in the following order: T (MSB), T (LSB), X (MSB), X + * (LSB), Y (MSB), Y (LSB), Z (MSB), Z (LSB) + */ + + uint16_t temperature = ((uint16_t) (SPI_SEND(dev->spi, 0)) << 8); /* MSB */ + temperature |= ((uint16_t) (SPI_SEND(dev->spi, 0)) << 0); /* LSB */ + + uint16_t x_mag = ((uint16_t) (SPI_SEND(dev->spi, 0)) << 8); /* MSB */ + x_mag |= ((uint16_t) (SPI_SEND(dev->spi, 0)) << 0); /* LSB */ + + uint16_t y_mag = ((uint16_t) (SPI_SEND(dev->spi, 0)) << 8); /* MSB */ + y_mag |= ((uint16_t) (SPI_SEND(dev->spi, 0)) << 0); /* LSB */ + + uint16_t z_mag = ((uint16_t) (SPI_SEND(dev->spi, 0)) << 8); /* MSB */ + z_mag |= ((uint16_t) (SPI_SEND(dev->spi, 0)) << 0); /* LSB */ + + /* Set CS to high which deselects the MLX90393 */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, false); + + /* Unlock the SPI bus */ + + SPI_LOCK(dev->spi, false); + + /* Aquire the semaphore before the data is copied */ + + ret = sem_wait(&dev->datasem); + if (ret != OK) + { + snerr("ERROR: Could not aquire dev->datasem: %d\n", ret); + return; + } + + /* Copy retrieve data to internal data structure */ + + dev->data.temperature = temperature; + dev->data.x_mag = (int16_t) (x_mag); + dev->data.y_mag = (int16_t) (y_mag); + dev->data.z_mag = (int16_t) (z_mag); + + /* Give back the semaphore */ + + sem_post(&dev->datasem); +} + +/**************************************************************************** + * Name: mlx90393_start_burst_mode + ****************************************************************************/ + +static void mlx90393_reset(FAR struct mlx90393_dev_s *dev) +{ + /* Lock the SPI bus so that only one device can access it at the same time */ + + SPI_LOCK(dev->spi, true); + + /* Set CS to low which selects the MLX90393 */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, true); + + /* Issue reset command */ + + SPI_SEND(dev->spi, MLX90393_RT); + + /* Write an idle byte to retrieve the status byte */ + + SPI_SEND(dev->spi, 0); + + /* Set CS to high which deselects the MLX90393 */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, false); + + /* Unlock the SPI bus */ + + SPI_LOCK(dev->spi, false); + + /* Wait a little so the device has time to perform a proper reset */ + + up_mdelay(100); +} + +/**************************************************************************** + * Name: mlx90393_read_register + ****************************************************************************/ + +static void mlx90393_read_register(FAR struct mlx90393_dev_s *dev, + uint8_t const reg_addr, uint16_t *reg_data) +{ + /* Lock the SPI bus so that only one device can access it at the same time */ + + SPI_LOCK(dev->spi, true); + + /* Set CS to low which selects the MLX90393 */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, true); + + /* Issue a read register command */ + + SPI_SEND(dev->spi, MLX90393_RR); + + /* Send the register address which needs to be left shifted by 2 */ + + SPI_SEND(dev->spi, (reg_addr << 2)); + + /* Write an idle byte to retrieve the status byte */ + + SPI_SEND(dev->spi, 0); + + *reg_data = ((uint16_t) (SPI_SEND(dev->spi, 0)) << 8); /* MSB */ + *reg_data |= ((uint16_t) (SPI_SEND(dev->spi, 0)) << 0); /* LSB */ + + /* Set CS to high which deselects the MLX90393 */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, false); + + /* Unlock the SPI bus */ + + SPI_LOCK(dev->spi, false); +} + +/**************************************************************************** + * Name: mlx90393_write_register + ****************************************************************************/ + +static void mlx90393_write_register(FAR struct mlx90393_dev_s *dev, + uint8_t const reg_addr, + uint16_t const reg_data) +{ + /* Lock the SPI bus so that only one device can access it at the same time */ + + SPI_LOCK(dev->spi, true); + + /* Set CS to low which selects the MLX90393 */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, true); + + /* Issue a write register command */ + + SPI_SEND(dev->spi, MLX90393_WR); + + /* Send the data high byte of the register */ + + SPI_SEND(dev->spi, (uint8_t) ((reg_data & 0xFF00) >> 8)); + + /* Send the data low byte of the register */ + + SPI_SEND(dev->spi, (uint8_t) (reg_data & 0x00FF)); + + /* Send the register address which needs to be left shifted by 2 */ + + SPI_SEND(dev->spi, (uint8_t) (reg_addr << 2)); + + /* Write an idle byte to retrieve the status byte */ + + SPI_SEND(dev->spi, 0); + + /* Set CS to high which deselects the MLX90393 */ + + SPI_SELECT(dev->spi, dev->config->spi_devid, false); + + /* Unlock the SPI bus */ + + SPI_LOCK(dev->spi, false); +} + +/**************************************************************************** + * Name: mlx90393_interrupt_handler + ****************************************************************************/ + +static int mlx90393_interrupt_handler(int irq, FAR void *context) +{ + /* This function should be called upon a rising edge on the MLX90393 INT pin + * since it signals that new data has been measured. (INT = DRDY). + */ + + FAR struct mlx90393_dev_s *priv = 0; + int ret; + + /* Find out which MLX90396 device caused the interrupt */ + + for (priv = g_mlx90393_list; priv && priv->config->irq != irq; + priv = priv->flink); + DEBUGASSERT(priv != NULL); + + /* Task the worker with retrieving the latest sensor data. We should not do + * this in a interrupt since it might take too long. Also we cannot lock the + * SPI bus from within an interrupt. + */ + + DEBUGASSERT(priv->work.worker == NULL); + ret = work_queue(HPWORK, &priv->work, mlx90393_worker, priv, 0); + if (ret < 0) + { + snerr("ERROR: Failed to queue work: %d\n", ret); + return ret; + } + else + { + return OK; + } +} + +/**************************************************************************** + * Name: mlx90393_worker + ****************************************************************************/ + +static void mlx90393_worker(FAR void *arg) +{ + FAR struct mlx90393_dev_s *priv = (FAR struct mlx90393_dev_s *)(arg); + DEBUGASSERT(priv != NULL); + + /* Read out the latest sensor data */ + + mlx90393_read_measurement_data(priv); +} + +/**************************************************************************** + * Name: mlx90393_open + ****************************************************************************/ + +static int mlx90393_open(FAR struct file *filep) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct mlx90393_dev_s *priv = inode->i_private; + static int const NUM_REGS = 10; + int reg_addr; + + DEBUGASSERT(priv != NULL); + + /* Reset the device */ + + mlx90393_reset(priv); + +#ifdef CONFIG_DEBUG_SENSORS_INFO + /* Read the content of ALL registers for debug purposes */ + + for (reg_addr = 0; reg_addr < NUM_REGS; reg_addr++) + { + uint16_t reg_content = 0; + mlx90393_read_register(priv, reg_addr, ®_content); + sninfo("R%d = %x\n", reg_addr, reg_content); + } +#endif + + /* Start the burst mode */ + + mlx90393_start_burst_mode(priv); + + return OK; +} + +/**************************************************************************** + * Name: mlx90393_close + ****************************************************************************/ + +static int mlx90393_close(FAR struct file *filep) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct mlx90393_dev_s *priv = inode->i_private; + + DEBUGASSERT(priv != NULL); + + /* Reset the device */ + + mlx90393_reset(priv); + + return OK; +} + +/**************************************************************************** + * Name: mlx90393_read + ****************************************************************************/ + +static ssize_t mlx90393_read(FAR struct file *filep, FAR char *buffer, + size_t buflen) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct mlx90393_dev_s *priv = inode->i_private; + FAR struct mlx90393_sensor_data_s *data; + int ret; + + DEBUGASSERT(priv != NULL); + + /* Check if enough memory was provided for the read call */ + + if (buflen < sizeof(FAR struct mlx90393_sensor_data_s)) + { + snerr("ERROR: Not enough memory for reading out a sensor data sample\n"); + return -ENOSYS; + } + + /* Copy the sensor data into the buffer */ + + /* Aquire the semaphore before the data is copied */ + + ret = sem_wait(&priv->datasem); + if (ret < 0) + { + int errcode = errno; + snerr("ERROR: Could not aquire priv->datasem: %d\n", errcode); + return -errcode; + } + + data = (FAR struct mlx90393_sensor_data_s *)buffer; + memset(data, 0, sizeof(FAR struct mlx90393_sensor_data_s)); + + data->x_mag = priv->data.x_mag; + data->y_mag = priv->data.y_mag; + data->z_mag = priv->data.z_mag; + data->temperature = priv->data.temperature; + + /* Give back the semaphore */ + + sem_post(&priv->datasem); + + return sizeof(FAR struct mlx90393_sensor_data_s); +} + +/**************************************************************************** + * Name: mlx90393_write + ****************************************************************************/ + +static ssize_t mlx90393_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen) +{ + return -ENOSYS; +} + +/**************************************************************************** + * Name: mlx90393_ioctl + ****************************************************************************/ + +static int mlx90393_ioctl(FAR struct file *filep, int cmd, unsigned long arg) +{ + int ret = OK; + + switch (cmd) + { + /* Command was not recognized */ + + default: + snerr("ERROR: Unrecognized cmd: %d\n", cmd); + ret = -ENOTTY; + break; + } + + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: mlx90393_register + * + * Description: + * Register the MLX90393 character device as 'devpath' + * + * Input Parameters: + * devpath - The full path to the driver to register. E.g., "/dev/mag0" + * spi - An instance of the SPI interface to use to communicate with + * MLX90393 + * config - Describes the configuration of the MLX90393 part. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int mlx90393_register(FAR const char *devpath, FAR struct spi_dev_s *spi, + FAR struct mlx90393_config_s *config) +{ + FAR struct mlx90393_dev_s *priv; + int ret; + + /* Sanity check */ + + DEBUGASSERT(spi != NULL); + DEBUGASSERT(config != NULL); + + /* Initialize the MLX90393 device structure */ + + priv = (FAR struct mlx90393_dev_s *)kmm_malloc(sizeof(struct mlx90393_dev_s)); + if (priv == NULL) + { + snerr("ERROR: Failed to allocate instance\n"); + return -ENOMEM; + } + + priv->spi = spi; + priv->config = config; + + priv->work.worker = NULL; + + sem_init(&priv->datasem, 0, 1); /* Initialize sensor data access + * semaphore */ + + /* Setup SPI frequency and mode */ + + SPI_SETFREQUENCY(spi, MLX90393_SPI_FREQUENCY); + SPI_SETMODE(spi, MLX90393_SPI_MODE); + + /* Attach the interrupt handler */ + + ret = priv->config->attach(priv->config, &mlx90393_interrupt_handler); + if (ret < 0) + { + snerr("ERROR: Failed to attach interrupt\n"); + return -ENODEV; + } + + /* Register the character driver */ + + ret = register_driver(devpath, &g_mlx90393_fops, 0666, priv); + if (ret < 0) + { + snerr("ERROR: Failed to register driver: %d\n", ret); + kmm_free(priv); + sem_destroy(&priv->datasem); + return -ENODEV; + } + + /* Since we support multiple MLX90393 devices are supported, we will need to + * add this new instance to a list of device instances so that it can be + * found by the interrupt handler based on the received IRQ number. */ + + priv->flink = g_mlx90393_list; + g_mlx90393_list = priv; + + return OK; +} + +#endif /* CONFIG_SPI && CONFIG_MLX90393 */ diff --git a/drivers/sensors/zerocross.c b/drivers/sensors/zerocross.c index d7bc19e381ae94febb95f9e393066ca1e57458c1..0140b9ba7287978678e52bf6b94e1dd7b3d8c04d 100644 --- a/drivers/sensors/zerocross.c +++ b/drivers/sensors/zerocross.c @@ -33,10 +33,6 @@ * ****************************************************************************/ -/**************************************************************************** - * Compilation Switches - ****************************************************************************/ - /**************************************************************************** * Included Files ****************************************************************************/ @@ -64,14 +60,13 @@ #ifdef CONFIG_ZEROCROSS -#ifdef CONFIG_DISABLE_SIGNALS -#error "This driver needs SIGNAL support, remove CONFIG_DISABLE_SIGNALS" -#endif - /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/* Debug ********************************************************************/ + +#ifdef CONFIG_DISABLE_SIGNALS +# error "This driver needs SIGNAL support, remove CONFIG_DISABLE_SIGNALS" +#endif /**************************************************************************** * Private Type Definitions @@ -132,15 +127,18 @@ static void zerocross_interrupt(FAR const struct zc_lowerhalf_s *lower, static const struct file_operations g_zcops = { - zc_open, /* open */ - zc_close, /* close */ - zc_read, /* read */ - zc_write, /* write */ + zc_open, /* open */ + zc_close, /* close */ + zc_read, /* read */ + zc_write, /* write */ 0, /* seek */ - zc_ioctl /* ioctl */ + zc_ioctl /* ioctl */ #ifndef CONFIG_DISABLE_POLL , 0 /* poll */ #endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , 0 /* unlink */ +#endif }; volatile int sample = 0; @@ -467,7 +465,7 @@ static int zc_ioctl(FAR struct file *filep, int cmd, unsigned long arg) default: { - sninfo("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg); + snerr("ERROR: Unrecognized cmd: %d arg: %ld\n", cmd, arg); ret = -ENOTTY; } break; @@ -485,7 +483,7 @@ static int zc_ioctl(FAR struct file *filep, int cmd, unsigned long arg) * Name: zc_register * * Description: - * Register the Zero Cross lower half device as 'devpath' + * Register the Zero Cross character device as 'devpath' * * Input Parameters: * devpath - The full path to the driver to register. E.g., "/dev/zc0" diff --git a/drivers/serial/pty.c b/drivers/serial/pty.c index 29b752fac90625574c9b9b1a126dcebe3c9f73c7..03c844b5f9c7e015cf97a6a2b2f358142f1e74c0 100644 --- a/drivers/serial/pty.c +++ b/drivers/serial/pty.c @@ -33,6 +33,50 @@ * ****************************************************************************/ +/* TODO: O_NONBLOCK is not yet supported. Currently, the source and sink + * pipes are opened in blocking mode on both the slave and master so only + * blocking behavior is supported. This driver must be able to support + * multiple slave as well as master clients that may have the PTY device + * opened in blocking and non-blocking modes simultaneously. + * + * There are two different possible implementations under consideration: + * + * 1. Keep the pipes in blocking mode, but use a test based on FIONREAD (for + * the source pipe) or FIONSPACE (for the sink pipe) to determine if the + * read or write would block. There is existing logic like this in + * pty_read() to handle the case of a single byte reads which must never + * block in any case: Essentially, this logic uses FIONREAD to determine + * if there is anything to read before calling file_read(). Similar + * logic could be replicated for all read cases. + * + * Analogous logic could be added for all writes using FIONSPACE to + * assure that there is sufficient free space in the sink pipe to write + * without blocking. The write length could be adjusted, in necceary, + * to assure that there is no blocking. + * + * Locking, perhaps via sched_lock(), would be required to assure the + * test via FIONREAD or FIONWRITE is atomic with respect to the + * file_read() or file_write() operation. + * + * 2. An alternative that appeals to me is to modify the contained source + * or sink pipe file structures before each file_read() or file_write() + * operation to assure that the O_NONBLOCK is set correctly when the + * pipe read or write operation is performed. This might be done with + * file_vfcntl() (there is no file_fcntl(), yet) or directly into the + * source/sink file structure oflags mode settings. + * + * This would require (1) the ability to lock each pipe individually, + * setting the blocking mode for the source or sink pipe to match the + * mode in the open flags of the PTY device file structure, and (2) + * logic to restore the default pipe mode after the file_read/write() + * operation and before the pipe is unlocked. + * + * There are existing locks to support (1) destruction of the driver + * (pp_exclsem) and (2) slave PTY locking (pp_slavesem), as well as (3) + * locks within the pipe implementation. Care must be taken with any new + * source/sink pipe locking to assure that deadlocks are not possible. + */ + /**************************************************************************** * Included Files ****************************************************************************/ @@ -67,25 +111,6 @@ #undef CONFIG_PSEUDOTERM_FULLBLOCKS -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -static int pty_open(FAR struct file *filep); -static int pty_close(FAR struct file *filep); -static ssize_t pty_read(FAR struct file *filep, FAR char *buffer, - size_t buflen); -static ssize_t pty_write(FAR struct file *filep, FAR const char *buffer, - size_t buflen); -static int pty_ioctl(FAR struct file *filep, int cmd, unsigned long arg); -#ifndef CONFIG_DISABLE_POLL -static int pty_poll(FAR struct file *filep, FAR struct pollfd *fds, - bool setup); -#endif -#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS -static int pty_unlink(FAR struct inode *inode); -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -125,6 +150,30 @@ struct pty_devpair_s sem_t pp_exclsem; /* Mutual exclusion */ }; +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static void pty_semtake(FAR struct pty_devpair_s *devpair); +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS +static void pty_destroy(FAR struct pty_devpair_s *devpair); +#endif + +static int pty_open(FAR struct file *filep); +static int pty_close(FAR struct file *filep); +static ssize_t pty_read(FAR struct file *filep, FAR char *buffer, + size_t buflen); +static ssize_t pty_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen); +static int pty_ioctl(FAR struct file *filep, int cmd, unsigned long arg); +#ifndef CONFIG_DISABLE_POLL +static int pty_poll(FAR struct file *filep, FAR struct pollfd *fds, + bool setup); +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS +static int pty_unlink(FAR struct inode *inode); +#endif + /**************************************************************************** * Private Data ****************************************************************************/ @@ -249,12 +298,6 @@ static int pty_open(FAR struct file *filep) sched_lock(); while (devpair->pp_locked) { - /* REVISIT: Should no block if the oflags include O_NONBLOCK. - * Also, how wouldwbe ripple the O_NONBLOCK characteristic - * to the contained drivers? And how would we change the - * O_NONBLOCK characteristic if it is changed via fcntl? - */ - /* Wait until unlocked. We will also most certainly suspend here. */ sem_wait(&devpair->pp_slavesem); @@ -490,6 +533,11 @@ static ssize_t pty_read(FAR struct file *filep, FAR char *buffer, size_t len) { /* Read one byte from the source the byte. This call will * block if the source pipe is empty. + * + * REVISIT: Should not block if the oflags include O_NONBLOCK. + * How would we ripple the O_NONBLOCK characteristic to the + * contained soruce pipe? file_vfcntl()? Or FIONREAD? See the + * TODO comment at the top of this file. */ nread = file_read(&dev->pd_src, &ch, 1); @@ -538,6 +586,11 @@ static ssize_t pty_read(FAR struct file *filep, FAR char *buffer, size_t len) * the pipe. Otherwise, it will return data from the pipe. If * there are fewer than 'len' bytes in the, it will return with * ntotal < len. + * + * REVISIT: Should not block if the oflags include O_NONBLOCK. + * How would we ripple the O_NONBLOCK characteristic to the + * contained source pipe? file_vfcntl()? Or FIONREAD? See the + * TODO comment at the top of this file. */ ntotal = file_read(&dev->pd_src, buffer, len); @@ -598,7 +651,14 @@ static ssize_t pty_write(FAR struct file *filep, FAR const char *buffer, size_t { char cr = '\r'; - /* Transfer the carriage return */ + /* Transfer the carriage return. This will block if the + * sink pipe is full. + * + * REVISIT: Should not block if the oflags include O_NONBLOCK. + * How would we ripple the O_NONBLOCK characteristic to the + * contained sink pipe? file_vfcntl()? Or FIONSPACE? See the + * TODO comment at the top of this file. + */ nwritten = file_write(&dev->pd_sink, &cr, 1); if (nwritten < 0) @@ -612,7 +672,14 @@ static ssize_t pty_write(FAR struct file *filep, FAR const char *buffer, size_t ntotal++; } - /* Transfer the (possibly translated) character. */ + /* Transfer the (possibly translated) character.. This will block + * if the sink pipe is full + * + * REVISIT: Should not block if the oflags include O_NONBLOCK. + * How would we ripple the O_NONBLOCK characteristic to the + * contained sink pipe? file_vfcntl()? Or FIONSPACe? See the + * TODO comment at the top of this file. + */ nwritten = file_write(&dev->pd_sink, &ch, 1); if (nwritten < 0) @@ -629,6 +696,15 @@ static ssize_t pty_write(FAR struct file *filep, FAR const char *buffer, size_t else #endif { + /* Write the 'len' bytes to the sink pipe. This will block until all + * 'len' bytes have been written to the pipe. + * + * REVISIT: Should not block if the oflags include O_NONBLOCK. + * How would we ripple the O_NONBLOCK characteristic to the + * contained sink pipe? file_vfcntl()? Or FIONSPACE? See the + * TODO comment at the top of this file. + */ + ntotal = file_write(&dev->pd_sink, buffer, len); } @@ -774,17 +850,48 @@ static int pty_ioctl(FAR struct file *filep, int cmd, unsigned long arg) } break; #endif + + /* Get the number of bytes that are immediately available for reading + * from the source pipe. + */ + + case FIONREAD: + { + ret = file_ioctl(&dev->pd_src, cmd, arg); + } + break; + + /* Get the number of bytes waiting in the sink pipe (FIONWRITE) or the + * number of unused bytes in the sink pipe (FIONSPACE). + */ + + case FIONWRITE: + case FIONSPACE: + { + ret = file_ioctl(&dev->pd_sink, cmd, arg); + } + break; + /* Any unrecognized IOCTL commands will be passed to the contained * pipe driver. + * + * REVISIT: We know for a fact that the pipe driver only supports + * FIONREAD, FIONWRITE, FIONSPACE and PIPEIOC_POLICY. The first two + * are handled above and PIPEIOC_POLICY should not be managed by + * applications -- it can break the PTY! */ default: { +#if 0 ret = file_ioctl(&dev->pd_src, cmd, arg); if (ret >= 0 || ret == -ENOTTY) { ret = file_ioctl(&dev->pd_sink, cmd, arg); } +#else + ret = ENOTTY; +#endif } break; } diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index 566cf834e6f5b0d9d4bc01ca890dca7b633da76e..2b6d7ec8e5361534ba6dd7d98a5dd89522bb2b1e 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -910,12 +910,16 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { switch (cmd) { + /* Get the number of bytes that may be read from the RX buffer + * (without waiting) + */ + case FIONREAD: { int count; irqstate_t flags = enter_critical_section(); - /* Determine the number of bytes available in the buffer */ + /* Determine the number of bytes available in the RX buffer */ if (dev->recv.tail <= dev->recv.head) { @@ -933,12 +937,39 @@ static int uart_ioctl(FAR struct file *filep, int cmd, unsigned long arg) } break; + /* Get the number of bytes that have been written to the TX buffer. */ + case FIONWRITE: { int count; irqstate_t flags = enter_critical_section(); - /* Determine the number of bytes free in the buffer */ + /* Determine the number of bytes waiting in the TX buffer */ + + if (dev->xmit.tail <= dev->xmit.head) + { + count = dev->xmit.head - dev->xmit.tail; + } + else + { + count = dev->xmit.size - (dev->xmit.tail - dev->xmit.head); + } + + leave_critical_section(flags); + + *(FAR int *)((uintptr_t)arg) = count; + ret = 0; + } + break; + + /* Get the number of free bytes in the TX buffer */ + + case FIONSPACE: + { + int count; + irqstate_t flags = enter_critical_section(); + + /* Determine the number of bytes free in the TX buffer */ if (dev->xmit.head < dev->xmit.tail) { diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index ff38027e39e1cb99614c17a280fb2f180e51f59a..ea8b8ac9abc5fd1611207583172c3046a0f18c08 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -47,13 +47,6 @@ config SPI_CALLBACK the SPI-based MMC/SD driver to get a notification of changes in the card status when an SD card is inserted or removed. -config SPI_BITBANG - bool "SPI bit-bang device" - default n - ---help--- - Enable support for a generic SPI bit-bang device. - See include/nuttx/spi/spi_bitbang.h for further information. - config SPI_HWFEATURES bool default n @@ -62,23 +55,46 @@ config SPI_HWFEATURES basically the OR of any specific hardware feature and eanbles the SPI hwfeatures() interface method. +config ARCH_HAVE_SPI_CRCGENERATION + bool + default n + config SPI_CRCGENERATION bool default n select SPI_HWFEATURES + depends on ARCH_HAVE_SPI_CRCGENERATION ---help--- Selected by MCU Kconfig logic if implementation supports automatic generation of SPI CRCs. Enables the HWFEAT_CRCGENERATION option as well as the hwfeartures() interface method. +config ARCH_HAVE_SPI_CS_CONTROL + bool + default n + config SPI_CS_CONTROL bool "SPI CS Behavior Control" default n select SPI_HWFEATURES + depends on ARCH_HAVE_SPI_CS_CONTROL ---help--- Enables possibilities to define the behavior of CS. Also enables the hwfeatures() interface method. +config ARCH_HAVE_SPI_BITORDER + bool + default n + +config SPI_BITORDER + bool "SPI Bit Order Control" + default n + select SPI_HWFEATURES + depends on ARCH_HAVE_SPI_BITORDER + ---help--- + Enables capability to select MSB- or LSB-first hardware feature for + data transfers. + config SPI_CS_DELAY_CONTROL bool "SPI CS Delay Control" default n @@ -90,6 +106,23 @@ config SPI_CS_DELAY_CONTROL This option enables the setdelay() interface method. +config SPI_DRIVER + bool "SPI character driver" + default n + depends on SPI_EXCHANGE + ---help--- + Build in support for a character driver at /dev/spi[N] that may be + used to perform SPI bus transfers from applications. The intent of + this driver is to support SPI testing. It is not suitable for use + in any real driver application. + +config SPI_BITBANG + bool "SPI bit-bang device" + default n + ---help--- + Enable support for a generic SPI bit-bang device. + See include/nuttx/spi/spi_bitbang.h for further information. + if SPI_BITBANG config SPI_BITBANG_VARWIDTH diff --git a/drivers/spi/Make.defs b/drivers/spi/Make.defs index 43e5654faa84acceaabb64527b4ef096c98b482d..e489bd600e47e4113571536e6807f81c4cb07b85 100644 --- a/drivers/spi/Make.defs +++ b/drivers/spi/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # drivers/spi/Make.defs # -# 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 @@ -37,6 +37,13 @@ ifeq ($(CONFIG_SPI),y) +ifeq ($(CONFIG_SPI_EXCHANGE),y) + CSRCS += spi_transfer.c + ifeq ($(CONFIG_SPI_DRIVER),y) + CSRCS += spi_driver.c + endif +endif + # Include the selected SPI drivers ifeq ($(CONFIG_SPI_BITBANG),y) diff --git a/drivers/spi/spi_driver.c b/drivers/spi/spi_driver.c new file mode 100644 index 0000000000000000000000000000000000000000..5f14827c03c3b3874983fec0bb4d80212ba1b2a0 --- /dev/null +++ b/drivers/spi/spi_driver.c @@ -0,0 +1,411 @@ +/**************************************************************************** + * drivers/spi/spi_driver.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#ifdef CONFIG_SPI_DRIVER + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Device naming ************************************************************/ + +#define DEVNAME_FMT "/dev/spi%d" +#define DEVNAME_FMTLEN (8 + 3 + 1) + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* Driver state structure */ + +struct spi_driver_s +{ + FAR struct spi_dev_s *spi; /* Contained SPI lower half driver */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + sem_t exclsem; /* Mutual exclusion */ + int16_t crefs; /* Number of open references */ + bool unlinked; /* True, driver has been unlinked */ +#endif +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static int spidrvr_open(FAR struct file *filep); +static int spidrvr_close(FAR struct file *filep); +static ssize_t spidrvr_read(FAR struct file *filep, FAR char *buffer, + size_t buflen); +static ssize_t spidrvr_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen); +static int spidrvr_ioctl(FAR struct file *filep, int cmd, + unsigned long arg); +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS +static int spidrvr_unlink(FAR struct inode *inode); +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const struct file_operations spidrvr_fops = +{ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + spidrvr_open, /* open */ + spidrvr_close, /* close */ +#else + 0, /* open */ + 0, /* close */ +#endif + spidrvr_read, /* read */ + spidrvr_write, /* write */ + 0, /* seek */ + spidrvr_ioctl /* ioctl */ +#ifndef CONFIG_DISABLE_POLL + , 0 /* poll */ +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , spidrvr_unlink /* unlink */ +#endif +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: spidrvr_open + ****************************************************************************/ + +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS +static int spidrvr_open(FAR struct file *filep) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct spi_driver_s *priv; + int ret; + + /* Get our private data structure */ + + DEBUGASSERT(filep != NULL && filep->f_inode != NULL); + inode = filep->f_inode; + + priv = (FAR struct spi_driver_s *)inode->i_private; + DEBUGASSERT(priv); + + /* Get exclusive access to the SPI driver state structure */ + + ret = sem_wait(&priv->exclsem); + if (ret < 0) + { + int errcode = errno; + DEBUGASSERT(errcode < 0); + return -errcode; + } + + /* Increment the count of open references on the RTC driver */ + + priv->crefs++; + DEBUGASSERT(priv->crefs > 0); + + sem_post(&priv->exclsem); + return OK; +} +#endif + +/**************************************************************************** + * Name: spidrvr_close + ****************************************************************************/ + +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS +static int spidrvr_close(FAR struct file *filep) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct spi_driver_s *priv; + int ret; + + /* Get our private data structure */ + + DEBUGASSERT(filep != NULL && filep->f_inode != NULL); + inode = filep->f_inode; + + priv = (FAR struct spi_driver_s *)inode->i_private; + DEBUGASSERT(priv); + + /* Get exclusive access to the SPI driver state structure */ + + ret = sem_wait(&priv->exclsem); + if (ret < 0) + { + int errcode = errno; + DEBUGASSERT(errcode < 0); + return -errcode; + } + + /* Decrement the count of open references on the RTC driver */ + + DEBUGASSERT(priv->crefs > 0); + priv->crefs--; + + /* If the count has decremented to zero and the driver has been unlinked, + * then commit Hara-Kiri now. + */ + + if (priv->crefs <= 0 && priv->unlinked) + { + sem_destroy(&priv->exclsem); + kmm_free(priv); + return OK; + } + + sem_post(&priv->exclsem); + return OK; +} +#endif + +/**************************************************************************** + * Name: spidrvr_read + ****************************************************************************/ + +static ssize_t spidrvr_read(FAR struct file *filep, FAR char *buffer, + size_t len) +{ + return 0; /* Return EOF */ +} + +/**************************************************************************** + * Name: spidrvr_write + ****************************************************************************/ + +static ssize_t spidrvr_write(FAR struct file *filep, FAR const char *buffer, + size_t len) +{ + return len; /* Say that everything was written */ +} + +/**************************************************************************** + * Name: spidrvr_ioctl + ****************************************************************************/ + +static int spidrvr_ioctl(FAR struct file *filep, int cmd, unsigned long arg) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct spi_driver_s *priv; + FAR struct spi_sequence_s *seq; + int ret; + + spiinfo("cmd=%d arg=%lu\n", cmd, arg); + + /* Get our private data structure */ + + DEBUGASSERT(filep != NULL && filep->f_inode != NULL); + inode = filep->f_inode; + + priv = (FAR struct spi_driver_s *)inode->i_private; + DEBUGASSERT(priv); + + /* Get exclusive access to the SPI driver state structure */ + + ret = sem_wait(&priv->exclsem); + if (ret < 0) + { + int errcode = errno; + DEBUGASSERT(errcode < 0); + return -errcode; + } + + /* Process the IOCTL command */ + + switch (cmd) + { + /* Command: SPIIOC_TRANSFER + * Description: Perform a sequence of SPI transfers + * Argument: A reference to an instance of struct spi_sequence_s. + * Dependencies: CONFIG_SPI_DRIVER + */ + + case SPIIOC_TRANSFER: + { + /* Get the reference to the spi_transfer_s structure */ + + seq = (FAR struct spi_sequence_s *)((uintptr_t)arg); + DEBUGASSERT(seq != NULL); + + /* Perform the transfer */ + + ret = spi_transfer(priv->spi, seq); + } + break; + + default: + ret = -ENOTTY; + break; + } + + sem_post(&priv->exclsem); + return ret; +} + +/**************************************************************************** + * Name: spidrvr_unlink + ****************************************************************************/ + +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS +static int spidrvr_unlink(FAR struct inode *inode) +{ + FAR struct spi_driver_s *priv; + int ret; + + /* Get our private data structure */ + + DEBUGASSERT(inode != NULL && inode->i_private != NULL); + priv = (FAR struct spi_driver_s *)inode->i_private; + + /* Get exclusive access to the SPI driver state structure */ + + ret = sem_wait(&priv->exclsem); + if (ret < 0) + { + int errcode = errno; + DEBUGASSERT(errcode < 0); + return -errcode; + } + + /* Are there open references to the driver data structure? */ + + if (priv->crefs <= 0) + { + sem_destroy(&priv->exclsem); + kmm_free(priv); + return OK; + } + + /* No... just mark the driver as unlinked and free the resouces when the + * last client closes their reference to the driver. + */ + + priv->unlinked = true; + sem_post(&priv->exclsem); + return ret; +} +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: spi_register + * + * Description: + * Create and register the SPI character driver. + * + * The SPI character driver is a simple character driver that supports SPI + * transfers. The intent of this driver is to support SPI testing. It is + * not suitable for use in any real driver application. + * + * Input Parameters: + * spi - An instance of the lower half SPI driver + * bus - The SPI bus number. This will be used as the SPI device minor + * number. The SPI character device will be registered as /dev/spiN + * where N is the minor number + * + * Returned Value: + * OK if the driver was successfully register; A negated errno value is + * returned on any failure. + * + ****************************************************************************/ + +int spi_register(FAR struct spi_dev_s *spi, int bus) +{ + FAR struct spi_driver_s *priv; + char devname[DEVNAME_FMTLEN]; + int ret; + + /* Sanity check */ + + DEBUGASSERT(spi != NULL && (unsigned)bus < 1000); + + /* Allocate a SPI character device structure */ + + priv = (FAR struct spi_driver_s *)kmm_zalloc(sizeof(struct spi_driver_s)); + if (priv) + { + /* Initialize the SPI character device structure */ + + priv->spi = spi; +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + sem_init(&priv->exclsem, 0, 1); +#endif + + /* Create the character device name */ + + snprintf(devname, DEVNAME_FMTLEN, DEVNAME_FMT, bus); + ret = register_driver(devname, &spidrvr_fops, 0666, priv); + if (ret < 0) + { + /* Free the device structure if we failed to create the character + * device. + */ + + kmm_free(priv); + } + + /* Return the result of the registration */ + + return ret; + } + + return -ENOMEM; +} + +#endif /* CONFIG_SPI_DRIVER */ diff --git a/drivers/spi/spi_transfer.c b/drivers/spi/spi_transfer.c new file mode 100644 index 0000000000000000000000000000000000000000..5746e4c8aae8b01b284fbb47dd0d7b4c7a0f9205 --- /dev/null +++ b/drivers/spi/spi_transfer.c @@ -0,0 +1,160 @@ +/**************************************************************************** + * drivers/spi/spi_transfer.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_SPI_EXCHANGE + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: spi_transfer + * + * Description: + * This is a helper function that can be used to encapsulate and manage + * a sequence of SPI transfers. The SPI bus will be locked and the + * SPI device selected for the duration of the transfers. + * + * Input Parameters: + * spi - An instance of the SPI device to use for the transfer + * seq - Describes the sequence of transfers. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int spi_transfer(FAR struct spi_dev_s *spi, FAR struct spi_sequence_s *seq) +{ + FAR struct spi_trans_s *trans; + int ret = OK; + int i; + + DEBUGASSERT(spi != NULL && seq != NULL && seq->trans != NULL); + + /* Get exclusive access to the SPI bus */ + + SPI_LOCK(spi, true); + + /* Establish the fixed SPI attributes for all transfers in the sequence */ + + (void)SPI_SETFREQUENCY(spi, seq->frequency); + +#ifdef CONFIG_SPI_CS_DELAY_CONTROL + ret = SPI_SETDELAY(spi, seq->a, seq->b, seq->c); + if (ret < 0) + { + spierr("ERROR: SPI_SETDELAY failed: %d\n", ret) + SPI_LOCK(spi, false); + return ret; + } +#endif + + SPI_SETMODE(spi, seq->mode); + SPI_SETBITS(spi, seq->nbits); + + /* Select the SPI device in preparation for the transfer. + * REVISIT: This is redundant. + */ + + SPI_SELECT(spi, seq->dev, true); + + /* Then perform each transfer is the sequence */ + + for (i = 0, trans = seq->trans; i < (int)seq->ntrans; i++, trans++) + { + /* Establish the fixed SPI attributes for unique to this transaction */ + +#ifdef CONFIG_SPI_HWFEATURES + ret = SPI_HWFEATURES(spi, trans->hwfeat); + if (ret < 0) + { + spierr("ERROR: SPI_HWFEATURES failed: %d\n", ret) + break; + } +#endif + +#ifdef CONFIG_SPI_CMDDATA + ret = SPI_CMDDATA(spi, seq->dev, trans->cmd); + if (ret < 0) + { + spierr("ERROR: SPI_CMDDATA failed: %d\n", ret) + break; + } +#endif + + /* [Re-]select the SPI device in preparation for the transfer */ + + SPI_SELECT(spi, seq->dev, true); + + /* Perform the transfer */ + + SPI_EXCHANGE(spi, trans->txbuffer, trans->rxbuffer, trans->nwords); + + /* Possibly de-select the SPI device after the transfer */ + + if (trans->deselect) + { + SPI_SELECT(spi, seq->dev, false); + } + + /* Perform any requested inter-transfer delay */ + + if (trans->delay > 0) + { + usleep(trans->delay); + } + } + + SPI_SELECT(spi, seq->dev, false); + SPI_LOCK(spi, false); + return ret; +} + +#endif /* CONFIG_SPI_EXCHANGE */ diff --git a/drivers/syslog/syslog_device.c b/drivers/syslog/syslog_device.c index c3bf74834a7e0930d1a33aaf13c866625470e74d..862a3d2b5dcc6176e301ce6d7b6b554961a54cd7 100644 --- a/drivers/syslog/syslog_device.c +++ b/drivers/syslog/syslog_device.c @@ -1,5 +1,5 @@ /**************************************************************************** - * driver/syslog/syslog_device.c + * drivers/syslog/syslog_device.c * * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/drivers/timers/Kconfig b/drivers/timers/Kconfig index 076cc43c8bfc12873ace4288cf5f10d6f3a4b349..a7f204408d392a5f29f0df944e41a0bd61071352 100644 --- a/drivers/timers/Kconfig +++ b/drivers/timers/Kconfig @@ -5,7 +5,7 @@ menu "Timer Driver Support" -menuconfig TIMER +config TIMER bool "Timer Support" default n ---help--- @@ -13,6 +13,14 @@ menuconfig TIMER driver. See include/nuttx/timers/timer.h for further timer driver information. +config ONESHOT + bool "Oneshot timer driver" + default n + ---help--- + This selection enables building of the "upper-half" oneshot timer + driver. See include/nuttx/timers/oneshot.h for further oneshot timer + driver information. + menuconfig RTC bool "RTC Driver Support" default n diff --git a/drivers/timers/Make.defs b/drivers/timers/Make.defs index 61c7a9764fae2f04690dfadc9b80331f62fe2f62..64940c43bb2e4f09f3290b6e8cc5345074751b61 100644 --- a/drivers/timers/Make.defs +++ b/drivers/timers/Make.defs @@ -51,6 +51,12 @@ ifeq ($(CONFIG_TIMER),y) TMRVPATH = :timers endif +ifeq ($(CONFIG_ONESHOT),y) + CSRCS += oneshot.c + TMRDEPPATH = --dep-path timers + TMRVPATH = :timers +endif + ifeq ($(CONFIG_RTC_DSXXXX),y) CSRCS += ds3231.c TMRDEPPATH = --dep-path timers diff --git a/drivers/timers/oneshot.c b/drivers/timers/oneshot.c new file mode 100644 index 0000000000000000000000000000000000000000..518071d19dbc5e9692c3e6683d8a3db25d6cccf0 --- /dev/null +++ b/drivers/timers/oneshot.c @@ -0,0 +1,383 @@ +/**************************************************************************** + * drivers/timers/oneshot.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#ifdef CONFIG_ONESHOT + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#ifdef CONFIG_DISABLE_SIGNALS +# error "This driver needs SIGNAL support, remove CONFIG_DISABLE_SIGNALS" +#endif + +/**************************************************************************** + * Private Type Definitions + ****************************************************************************/ + +/* This structure describes the state of the upper half driver */ + +struct oneshot_dev_s +{ + FAR struct oneshot_lowerhalf_s *od_lower; /* Lower-half driver state */ + sem_t od_exclsem; /* Supports mutual exclusion */ + + /* Oneshot timer expiration notification information */ + + uint8_t od_signo; /* Signal number for notification */ + pid_t od_pid; /* PID to be notified */ + FAR void *od_arg; /* Signal value argument */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static int oneshot_open(FAR struct file *filep); +static int oneshot_close(FAR struct file *filep); +static ssize_t oneshot_read(FAR struct file *filep, FAR char *buffer, + size_t buflen); +static ssize_t oneshot_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen); +static int oneshot_ioctl(FAR struct file *filep, int cmd, + unsigned long arg); + +static void oneshot_callback(FAR struct oneshot_lowerhalf_s *lower, + FAR void *arg); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const struct file_operations g_oneshot_ops = +{ + oneshot_open, /* open */ + oneshot_close, /* close */ + oneshot_read, /* read */ + oneshot_write, /* write */ + 0, /* seek */ + oneshot_ioctl /* ioctl */ +#ifndef CONFIG_DISABLE_POLL + , 0 /* poll */ +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , 0 /* unlink */ +#endif +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: oneshot_callback + ****************************************************************************/ + +static void oneshot_callback(FAR struct oneshot_lowerhalf_s *lower, + FAR void *arg) +{ + FAR struct oneshot_dev_s *priv = (FAR struct oneshot_dev_s *)arg; +#ifdef CONFIG_CAN_PASS_STRUCTS + union sigval value; +#endif + + DEBUGASSERT(priv != NULL); + + /* Signal the waiter.. if there is one */ + +#ifdef CONFIG_CAN_PASS_STRUCTS + value.sival_ptr = priv->od_arg; + (void)sigqueue(priv->od_pid, priv->od_signo, value); +#else + (void)sigqueue(priv->od_pid, priv->od_signo, priv->od_arg); +#endif +} + +/************************************************************************************ + * Name: oneshot_open + * + * Description: + * This function is called whenever the PWM device is opened. + * + ************************************************************************************/ + +static int oneshot_open(FAR struct file *filep) +{ + tmrinfo("Opening...\n"); + DEBUGASSERT(filep != NULL && filep->f_inode != NULL); + return OK; +} + +/************************************************************************************ + * Name: oneshot_close + * + * Description: + * This function is called when the PWM device is closed. + * + ************************************************************************************/ + +static int oneshot_close(FAR struct file *filep) +{ + tmrinfo("Closing...\n"); + DEBUGASSERT(filep != NULL && filep->f_inode != NULL); + return OK; +} + +/************************************************************************************ + * Name: oneshot_read + * + * Description:O + * A dummy read method. This is provided only to satsify the VFS layer. + * + ************************************************************************************/ + +static ssize_t oneshot_read(FAR struct file *filep, FAR char *buffer, size_t buflen) +{ + /* Return zero -- usually meaning end-of-file */ + + tmrinfo("buflen=%ld\n", (unsigned long)buflen); + DEBUGASSERT(filep != NULL && filep->f_inode != NULL); + return 0; +} + +/************************************************************************************ + * Name: oneshot_write + * + * Description: + * A dummy write method. This is provided only to satsify the VFS layer. + * + ************************************************************************************/ + +static ssize_t oneshot_write(FAR struct file *filep, FAR const char *buffer, + size_t buflen) +{ + /* Return a failure */ + + tmrinfo("buflen=%ld\n", (unsigned long)buflen); + DEBUGASSERT(filep != NULL && filep->f_inode != NULL); + return -EPERM; +} + +/************************************************************************************ + * Name: oneshot_ioctl + * + * Description: + * The standard ioctl method. This is where ALL of the PWM work is done. + * + ************************************************************************************/ + +static int oneshot_ioctl(FAR struct file *filep, int cmd, unsigned long arg) +{ + FAR struct inode *inode; + FAR struct oneshot_dev_s *priv; + int ret; + + tmrinfo("cmd=%d arg=%08lx\n", cmd, (unsigned long)arg); + + DEBUGASSERT(filep != NULL && filep->f_inode != NULL); + inode = filep->f_inode; + priv = (FAR struct oneshot_dev_s *)inode->i_private; + DEBUGASSERT(priv != NULL); + + /* Get exclusive access to the device structures */ + + ret = sem_wait(&priv->od_exclsem); + if (ret < 0) + { + return ret; + } + + /* Handle oneshot timer ioctl commands */ + + switch (cmd) + { + /* OSIOC_MAXDELAY - Return the maximum delay that can be supported + * by this timer. + * Argument: A referenct to a struct timespec in + * which the maximum time will be returned. + */ + + case OSIOC_MAXDELAY: + { + FAR struct timespec *ts = (FAR struct timespec *)((uintptr_t)arg); + DEBUGASSERT(ts != NULL); + + ret = ONESHOT_MAX_DELAY(priv->od_lower, ts); + } + break; + + /* OSIOC_START - Start the oneshot timer + * Argument: A reference to struct oneshot_start_s + */ + + case OSIOC_START: + { + FAR struct oneshot_start_s *start; + pid_t pid; + + start = (FAR struct oneshot_start_s *)((uintptr_t)arg); + DEBUGASSERT(start != NULL); + + /* Save signalling information */ + + priv->od_signo = start->signo; + priv->od_arg = start->arg; + + pid = start->pid; + if (pid == 0) + { + pid = getpid(); + } + + priv->od_pid = pid; + + /* Start the oneshot timer */ + + ret = ONESHOT_START(priv->od_lower, oneshot_callback, priv, + &start->ts); + } + break; + + /* OSIOC_CANCEL - Stop the timer + * Argument: A reference to a struct timespec in + * which the time remaining will be returned. + */ + + case OSIOC_CANCEL: + { + FAR struct timespec *ts = (FAR struct timespec *)((uintptr_t)arg); + + /* Cancel the oneshot timer */ + + ret = ONESHOT_CANCEL(priv->od_lower, ts); + } + break; + + default: + { + tmrerr("ERROR: Unrecognized cmd: %d arg: %ld\n", cmd, arg); + ret = -ENOTTY; + } + break; + } + + sem_post(&priv->od_exclsem); + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: oneshot_register + * + * Description: + * Register the oneshot device as 'devpath' + * + * Input Parameters: + * devpath - The full path to the driver to register. E.g., "/dev/oneshot0" + * lower - An instance of the lower half interface + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. The following + * possible error values may be returned (most are returned by + * register_driver()): + * + * EINVAL - 'path' is invalid for this operation + * EEXIST - An inode already exists at 'path' + * ENOMEM - Failed to allocate in-memory resources for the operation + * + ****************************************************************************/ + +int oneshot_register(FAR const char *devname, + FAR struct oneshot_lowerhalf_s *lower) +{ + FAR struct oneshot_dev_s *priv; + int ret; + + sninfo("devname=%s lower=%p\n", devname, lower); + DEBUGASSERT(devname != NULL && lower != NULL); + + /* Allocate a new oneshot timer driver instance */ + + priv = (FAR struct oneshot_dev_s *) + kmm_zalloc(sizeof(struct oneshot_dev_s)); + + if (!priv) + { + snerr("ERROR: Failed to allocate device structure\n"); + return -ENOMEM; + } + + /* Initialize the new oneshot timer driver instance */ + + priv->od_lower = lower; + sem_init(&priv->od_exclsem, 0, 1); + + /* And register the oneshot timer driver */ + + ret = register_driver(devname, &g_oneshot_ops, 0666, priv); + if (ret < 0) + { + snerr("ERROR: register_driver failed: %d\n", ret); + sem_destroy(&priv->od_exclsem); + kmm_free(priv); + } + + return ret; +} + +#endif /* CONFIG_ONESHOT */ diff --git a/drivers/usbdev/cdcacm.c b/drivers/usbdev/cdcacm.c index 28d498363b06014a11d2a49d7b300618d8dcaddb..64e2e68075db49776f77c7efcf83d813eda5fca9 100644 --- a/drivers/usbdev/cdcacm.c +++ b/drivers/usbdev/cdcacm.c @@ -1982,12 +1982,16 @@ static int cdcuart_ioctl(FAR struct file *filep, int cmd, unsigned long arg) break; #endif + /* Get the number of bytes that may be read from the RX buffer (without + * waiting) + */ + case FIONREAD: { int count; irqstate_t flags = enter_critical_section(); - /* Determine the number of bytes available in the buffer. */ + /* Determine the number of bytes available in the RX buffer. */ if (serdev->recv.tail <= serdev->recv.head) { @@ -2005,12 +2009,39 @@ static int cdcuart_ioctl(FAR struct file *filep, int cmd, unsigned long arg) } break; + /* Get the number of bytes that have been written to the TX buffer. */ + case FIONWRITE: { int count; irqstate_t flags = enter_critical_section(); - /* Determine the number of bytes free in the buffer. */ + /* Determine the number of bytes waiting in the TX buffer. */ + + if (serdev->xmit.tail <= serdev->xmit.head) + { + count = serdev->xmit.head - serdev->xmit.tail; + } + else + { + count = serdev->xmit.size - (serdev->xmit.tail - serdev->xmit.head); + } + + leave_critical_section(flags); + + *(int *)arg = count; + ret = 0; + } + break; + + /* Get the number of free bytes in the TX buffer */ + + case FIONSPACE: + { + int count; + irqstate_t flags = enter_critical_section(); + + /* Determine the number of bytes free in the TX buffer */ if (serdev->xmit.head < serdev->xmit.tail) { diff --git a/drivers/usbhost/Kconfig b/drivers/usbhost/Kconfig index e8768896901df874d1b744441bb271ecbd3a0ac5..334e393f51c586d6c37710097090204fd1e439e8 100644 --- a/drivers/usbhost/Kconfig +++ b/drivers/usbhost/Kconfig @@ -77,6 +77,22 @@ config USBHOST_HUB_POLLMSEC endif # USBHOST_HUB +config USBHOST_COMPOSITE + bool "Composite device support" + default n + ---help--- + Build in USB host support for connected composite devices + +config USBHOST_COMPOSITE_STRICT + bool "Strict composite membership" + default n + depends on USBHOST_COMPOSITE + ---help--- + If selected, then the composite device will not be enumerated unless + every member class in the composite is supported. If not selected + then, for example, you could use the CDC/ACM interface of the device + with no support for the other interfaces. + config USBHOST_MSC bool "Mass Storage Class Support" default n diff --git a/drivers/usbhost/Make.defs b/drivers/usbhost/Make.defs index 0391dd33390fd42805b9792d5ca87add7bec7d21..fd28be8766fca6759fdd9fb0774e40c709b5dbd9 100644 --- a/drivers/usbhost/Make.defs +++ b/drivers/usbhost/Make.defs @@ -46,6 +46,10 @@ ifeq ($(CONFIG_USBHOST_HUB),y) CSRCS += usbhost_hub.c endif +ifeq ($(CONFIG_USBHOST_COMPOSITE),y) +CSRCS += usbhost_composite.c +endif + ifeq ($(CONFIG_USBHOST_MSC),y) CSRCS += usbhost_storage.c endif diff --git a/drivers/usbhost/usbhost_composite.c b/drivers/usbhost/usbhost_composite.c new file mode 100644 index 0000000000000000000000000000000000000000..42ad0bf03015697dc694f067cda054d09f15931e --- /dev/null +++ b/drivers/usbhost/usbhost_composite.c @@ -0,0 +1,856 @@ +/**************************************************************************** + * drivers/usbhost/usbhost_composite.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 "usbhost_composite.h" + +#ifdef CONFIG_USBHOST_COMPOSITE + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* This is the size of a large, allocated temporary buffer that we will use + * to constuct custom configuration descriptors for each member class. + */ + +#define CUSTOM_CONFIG_BUFSIZE \ + (USB_SIZEOF_CFGDESC + 3 * USB_SIZEOF_IFDESC + 9 * USB_SIZEOF_EPDESC) + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* This structure describes one component class of the composite */ + +struct usbhost_member_s +{ + /* This the the classobject returned by each contained class */ + + FAR struct usbhost_class_s *usbclass; + + /* This is the information that we need to do the registry lookup for this + * class member. + */ + + struct usbhost_id_s id; + + /* This information will be needed to construct a meaningful configuration + * for CLASS_CONNSET() + */ + + uint8_t firstif; /* First interface */ + uint8_t nifs; /* Number of interfaces */ +}; + +/* This structure contains the internal, private state of the USB host + * CDC/ACM class. + */ + +struct usbhost_composite_s +{ + /* This is the externally visible portion of the state. The usbclass must + * the first element of the structure. It is then cast compatible with + * struct usbhost_composite_s. + */ + + struct usbhost_class_s usbclass; + + /* Class specific data follows */ + + uint16_t nclasses; /* Number of component classes in the composite */ + + /* The following points to an allocated array of type struct + * usbhost_member_s. Element element of the array corresponds to one + * component class in the composite. + */ + + FAR struct usbhost_member_s *members; +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/* struct usbhost_class_s methods */ + +static int usbhost_connect(FAR struct usbhost_class_s *usbclass, + FAR const uint8_t *configdesc, int desclen); +static int usbhost_disconnected(FAR struct usbhost_class_s *usbclass); + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbhost_disconnect_all + * + * Description: + * Disconnect all contained class instances. + * + * Input Parameters: + * priv - Reference to private, composite container state stucture. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void usbhost_disconnect_all(FAR struct usbhost_composite_s *priv) +{ + FAR struct usbhost_member_s *member; + int i; + + /* Loop, processing each class that has been included into the composite */ + + for (i = 0; i < priv->nclasses; i++) + { + member = &priv->members[i]; + + /* Has this member been included to the composite? */ + + if (member->usbclass != NULL) + { + /* Yes.. disconnect it, freeing all of the class resources */ + + CLASS_DISCONNECTED(member->usbclass); + member->usbclass = NULL; + } + } +} + +/**************************************************************************** + * Name: usbhost_connect + * + * Description: + * This function implements the connect() method of struct + * usbhost_class_s. This method is a callback into the class + * implementation from the common enumeration logic. It is normally used + * to provide the device's configuration descriptor to the class so that + * the class may initialize properly. That calling sequence is: + * + * 1. usbhost_enumerate() + * 2. usbhost_classbind() + * 3. CLASS_CONNECT() + * + * However, that applies only to the Non-composite device. + * usbhost_classbind() is not called for the composite device and, hence, + * this method is never called. Rather, the composite logic calls + * CLASS_CONNECT() for each member of the composite in a calling sequence + * like: + * + * 1. usbhost_enumerate() + * 2. usbhost_composite() + * 3. Call CLASS_CONNECT() for each composite member + * + * Input Parameters: + * usbclass - The USB host class entry previously obtained from a call to + * create(). + * configdesc - A pointer to a uint8_t buffer container the configuration + * descriptor. + * desclen - The length in bytes of the configuration descriptor. + * + * Returned Value: + * On success, zero (OK) is returned. On a failure, a negated errno value is + * returned indicating the nature of the failure + * + * NOTE that the class instance remains valid upon return with a failure. It is + * the responsibility of the higher level enumeration logic to call + * CLASS_DISCONNECTED to free up the class driver resources. + * + * Assumptions: + * - This function will *not* be called from an interrupt handler. + * - If this function returns an error, the USB host controller driver + * must call to DISCONNECTED method to recover from the error + * + ****************************************************************************/ + +static int usbhost_connect(FAR struct usbhost_class_s *usbclass, + FAR const uint8_t *configdesc, int desclen) +{ + return -ENOSYS; +} + +/**************************************************************************** + * Name: usbhost_disconnected + * + * Description: + * This function implements the disconnected() method of struct + * usbhost_class_s. This method is a callback into the class + * implementation. It is used to inform the class that the USB device has + * been disconnected. + * + * Input Parameters: + * usbclass - The USB host class entry previously obtained from a call to + * create(). + * + * Returned Value: + * On success, zero (OK) is returned. On a failure, a negated errno value + * is returned indicating the nature of the failure + * + * Assumptions: + * This function may be called from an interrupt handler. + * + ****************************************************************************/ + +static int usbhost_disconnected(struct usbhost_class_s *usbclass) +{ + FAR struct usbhost_composite_s *priv = (FAR struct usbhost_composite_s *)usbclass; + + DEBUGASSERT(priv != NULL); + + /* Forward the disconnect event to each contained class in the composite. */ + + usbhost_disconnect_all(priv); + + /* Free the allocate array of composite members */ + + if (priv->members != NULL) + { + kmm_free(priv->members); + } + + /* The destroy the composite container itself */ + + kmm_free(priv); + return OK; +} + +/**************************************************************************** + * Name: usbhost_copyinterface + * + * Description: + * Find an interface descriptor and copy it along with all of its + * following encpoint descriptors. + * + * Input Parameters: + * ifno - The interface ID to find. + * configdesc - The original configuration descriptor that contains the + * the interface descriptor. + * desclen - the length of configdesc. + * buffer - The buffer in which to return the descriptors + * buflen - The length of buffer + * + * Returned Value: + * On success, the number of bytes copied is returned. On a failure, a + * negated errno value is returned indicating the nature of the failure: + * + * -ENOENT: Did not find interface descriptor + * -EINVAL: Did not find all endpoint descriptors + * + ****************************************************************************/ + +static int usbhost_copyinterface(uint8_t ifno, FAR const uint8_t *configdesc, + int desclen, FAR uint8_t *buffer, int buflen) +{ + FAR struct usb_ifdesc_s *ifdesc; + FAR struct usb_epdesc_s *epdesc; + int retsize; + int offset; + int neps; + int len; + + /* Make sure that the buffer will hold at least the interface descriptor */ + + if (buflen < USB_SIZEOF_IFDESC) + { + return -ENOSPC; + } + + /* Search for the interface */ + + for (offset = 0, retsize = 0; + offset < desclen - sizeof(struct usb_ifdesc_s); + offset += len) + { + ifdesc = (FAR struct usb_ifdesc_s *)&configdesc[offset]; + len = ifdesc->len; + + /* Is this an interface descriptor? Is it the one we are looking for? */ + + if (ifdesc->type == USB_DESC_TYPE_INTERFACE && ifdesc->ifno == ifno) + { + /* Yes.. return the interface descriptor */ + + memcpy(buffer, ifdesc, len); + buffer += len; + buflen -= len; + retsize += len; + + /* Make sure that the buffer will hold at least the endpoint + * descriptors. + */ + + neps = ifdesc->neps; + if (buflen < neps * USB_SIZEOF_EPDESC) + { + return -ENOSPC; + } + + /* The endpoint descriptors should immediately follow the + * interface descriptor. + */ + + for (offset += len; + offset < desclen - sizeof(struct usb_ifdesc_s); + offset += len) + { + epdesc = (FAR struct usb_epdesc_s *)&configdesc[offset]; + len = epdesc->len; + + /* Is this an endpoint descriptor? */ + + if (epdesc->type == USB_DESC_TYPE_ENDPOINT) + { + /* Yes.. return the endpoint descriptor */ + + memcpy(buffer, epdesc, len); + buffer += len; + buflen -= len; + retsize += len; + + /* And reduce the number of endpoints we are looking for */ + + if (--neps <= 0) + { + /* That is all of them!. Return the total size copied */ + + return retsize; + } + } + + /* The endpoint descriptors following the interface descriptor + * should all be contiguous. But we will complain only if another + * interface descriptor is encountered before all of the endpoint + * descriptors have been found. + */ + + else if (epdesc->type == USB_DESC_TYPE_INTERFACE) + { + break; + } + } + + /* Did not find all of the interface descriptors */ + + return -EINVAL; + } + } + + /* Could not find the interface descriptor */ + + return -ENOENT; +} + +/**************************************************************************** + * Name: usbhost_createconfig + * + * Description: + * Create a custom configuration for a member class. + * + * Input Parameters: + * configdesc - The original configuration descriptor that contains the + * the interface descriptor. + * desclen - the length of configdesc. + * buffer - The buffer in which to return the descriptors + * buflen - The length of buffer + * + * Returned Value: + * On success, the size of the new configuration descriptor is returned. + * On a failure, a negated errno value is returned indicating the nature + * of the failure: + * + * -ENOENT: Did not find interface descriptor + * -EINVAL: Did not find all endpoint descriptors + * + ****************************************************************************/ + +static int usbhost_createconfig(FAR struct usbhost_member_s *member, + FAR const uint8_t *configdesc, int desclen, + FAR uint8_t *buffer, int buflen) +{ + FAR struct usb_cfgdesc_s *cfgdesc; + int cfgsize; + int ifsize; + int ifno; + int nifs; + + /* Copy and modify the original configuration descriptor */ + + if (buflen < USB_SIZEOF_CFGDESC) + { + return -ENOSPC; + } + + memcpy(buffer, configdesc, USB_SIZEOF_CFGDESC); + cfgsize = USB_SIZEOF_CFGDESC; + buffer += USB_SIZEOF_CFGDESC; + buflen -= USB_SIZEOF_CFGDESC; + + /* Modify the copied configuration descriptor */ + + cfgdesc = (FAR struct usb_cfgdesc_s *)buffer; + cfgdesc->len = USB_SIZEOF_CFGDESC; + cfgdesc->ninterfaces = member->nifs; + + /* Then copy all of the interfaces to the configuration buffer */ + + for (nifs = 0, ifno = member->firstif; nifs < member->nifs; nifs++, ifno++) + { + ifsize = usbhost_copyinterface(ifno, configdesc, desclen, + buffer, buflen); + if (ifsize < 0) + { + uerr("ERROR: Failed to copy inteface: %d\n", ifsize); + return ifsize; + } + + /* Update sizes and pointers */ + + cfgsize += ifsize; + buffer += ifsize; + buflen -= ifsize; + } + + /* Set the totallen of the configuration descriptor and return success */ + + cfgdesc->totallen[0] = cfgsize & 0xff; /* Little endian always */ + cfgdesc->totallen[1] = cfgsize >> 8; + return cfgsize; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbhost_composite + * + * Description: + * As the final steps in the device enumeration sequence this function + * will be called in order to determine (1) determine if the device is + * a composite device, and if so, (2) create the composite class which + * contains all of the individual class instances making up the composite. + * + * Input Parameters: + * hport - The downstream port to which the (potential) composite + * device has been connected. + * configdesc - The full configuration descriptor + * desclen - The length of the configuration descriptor + * id - Lookup information extracted from the device descriptor. + * for the case of the composite devices, we need only the + * vid and pid. + * usbclass - If the class driver for the device is successful located + * and bound to the hub port, the allocated class instance + * is returned into this caller-provided memory location. + * + * Returned Value: + * Zero (OK) is returned if (1) the device was determined to be a + * composite device and (2) the composite class wrapper was sucessfully + * created and bound to the HCD. A negated errno value is returned on + * any failure. The value -ENOENT, in particular means that the attached + * device is not a composite device. Other values would indicate other + * various, unexpected failures. + * + ****************************************************************************/ + +int usbhost_composite(FAR struct usbhost_hubport_s *hport, + FAR const uint8_t *configdesc, int desclen, + FAR struct usbhost_id_s *id, + FAR struct usbhost_class_s **usbclass) +{ + FAR struct usbhost_composite_s *priv; + FAR struct usbhost_member_s *member; + FAR const struct usbhost_registry_s *reg; + FAR struct usb_desc_s *desc; + FAR uint8_t *cfgbuffer; + uint32_t mergeset; + uint16_t nintfs; + uint16_t nmerged; + uint16_t nclasses; + int cfgsize; + int offset; + int ret; + int i; + + /* Determine if this a composite device has been connected to the + * downstream port. + * + * First look at there device descriptor information. A composite + * device is only possible if: + * + * 1. Manufacturers of composite devices typically assign a value of zero + * to the device class (bDeviceClass), subclass (bDeviceSubClass), and + * protocol (bDeviceProtocol) fields in the device descriptor, as + * specified by the Universal Serial Bus Specification. This allows + * the manufacturer to associate each individual interface with a + * different device class and protocol. + * + * 2. The USB-IF core team has devised a special class and protocol code + * set that notifies the operating system that one or more IADs are + * present in device firmware. A device's device descriptor must have + * the values that appear in the following table: + * + * bDeviceClass 0xEF + * bDeviceSubClass 0x02 + * bDeviceProtocol 0x01 + */ + + if (id->base != USB_CLASS_PER_INTERFACE && id->base != USB_CLASS_MISC) + { + return -ENOENT; + } + + /* First, count the number of interface descriptors (nintfs) and the + * number of interfaces that are assocated to one device via IAD + * descriptor (nmerged). + */ + + mergeset = 0; + nintfs = 0; + nmerged = 0; + + for (offset = 0; offset < desclen - sizeof(struct usb_desc_s); ) + { + desc = (FAR struct usb_desc_s *)&configdesc[offset]; + int len = desc->len; + + if (offset + len <= desclen) + { + /* Is this an interface descriptor? */ + + if (desc->type == USB_DESC_TYPE_INTERFACE) + { +#ifdef CONFIG_DEBUG_ASSERTIONS + FAR struct usb_ifdesc_s *ifdesc = + (FAR struct usb_ifdesc_s *)desc; + + DEBUGASSERT(ifdesc->ifno < 32); +#endif + /* Increment the count of interfaces */ + + nintfs++; + } + + /* Check for IAD descriptors that will be used when it is + * necessary to associate multiple interfaces with a single + * class driver. + */ + + else if (desc->type == USB_DESC_TYPE_INTERFACEASSOCIATION) + { + FAR struct usb_iaddesc_s *iad = (FAR struct usb_iaddesc_s *)desc; + uint32_t mask; + + /* Keep count of the number of interfaces that will be merged */ + + nmerged += (iad->nifs - 1); + + /* Keep track of which interfaces will be merged */ + + DEBUGASSERT(iad->firstif + iad->nifs < 32); + mask = (1 << iad->nifs) - 1; + mergeset |= mask << iad->firstif; + } + } + + offset += len; + } + + if (nintfs < 2) + { + /* Only one interface descriptor. Can't be a composite device */ + + return -ENOENT; + } + +#if 0 /* I think not needed, the device descriptor classid check should handle this */ + /* Special case: Some NON-composite device have more than on interface: CDC/ACM + * and MSC both may have two interfaces. + */ + + if (nintfs < 3 && nmerged == 0) + { + /* Do the special case checks */ +#warning Missing logic + } +#endif + + /* The total number of classes is then the number of interfaces minus the + * number of interfaces merged via the IAD descriptor. + */ + + if (nintfs <= nmerged) + { + /* Should not happen. Means a bug. */ + + return -EINVAL; + } + + nclasses = nintfs - nmerged; + + /* Allocate the composite class container */ + + priv = (FAR struct usbhost_composite_s *) + kmm_zalloc(sizeof(struct usbhost_composite_s)); + + if (priv == NULL) + { + uerr("ERROR: Failed to allocate class container\n") + return -ENOMEM; + } + + priv->members = (FAR struct usbhost_member_s *) + kmm_zalloc(nclasses * sizeof(struct usbhost_member_s)); + + if (priv->members == NULL) + { + uerr("ERROR: Failed to allocate class members\n") + ret = -ENOMEM; + goto errout_with_container; + } + + /* Initialize the non-zero elements of the class container */ + + priv->usbclass.hport = hport; + priv->usbclass.connect = usbhost_connect; + priv->usbclass.disconnected = usbhost_disconnected; + priv->nclasses = nclasses; + + /* Re-parse the configuration descriptor and save the CLASS ID information + * in the member structure: If the interface is defined by an interface + * descriptor, then we have to use the info in the interface descriptor; + * If the interface has a IAD, we have to use info in the IAD. + */ + + for (i = 0, offset = 0; offset < desclen - sizeof(struct usb_desc_s); ) + { + desc = (FAR struct usb_desc_s *)&configdesc[offset]; + int len = desc->len; + + if (offset + len <= desclen) + { + /* Is this an interface descriptor? */ + + if (desc->type == USB_DESC_TYPE_INTERFACE) + { + FAR struct usb_ifdesc_s *ifdesc = + (FAR struct usb_ifdesc_s *)desc; + + /* Was the interface merged via an IAD descriptor? */ + + DEBUGASSERT(ifdesc->ifno < 32); + if ((mergeset & (1 << ifdesc->ifno)) == 0) + { + /* No, this interface was not merged. Save the registry + * lookup information from the interface descriptor. + */ + + member = (FAR struct usbhost_member_s *)&priv->members[i]; + member->id.base = ifdesc->classid; + member->id.subclass = ifdesc->subclass; + member->id.proto = ifdesc->protocol; + member->id.vid = id->vid; + member->id.pid = id->pid; + + member->firstif = ifdesc->ifno; + member->nifs = 1; + + /* Increment the member index */ + + i++; + } + } + + /* Check for IAD descriptors that will be used when it is + * necessary to associate multiple interfaces with a single + * device. + */ + + else if (desc->type == USB_DESC_TYPE_INTERFACEASSOCIATION) + { + FAR struct usb_iaddesc_s *iad = (FAR struct usb_iaddesc_s *)desc; + + /* Yes.. Save the registry lookup information from the IAD. */ + + member = (FAR struct usbhost_member_s *)&priv->members[i]; + member->id.base = iad->classid; + member->id.subclass = iad->subclass; + member->id.proto = iad->protocol; + member->id.vid = id->vid; + member->id.pid = id->pid; + + member->firstif = iad->firstif; + member->nifs = iad->nifs; + + /* Increment the member index */ + + i++; + } + } + + offset += len; + } + + /* If everything worked, the final index must be the same as the pre- + * calculated number of member classes. + */ + + DEBUGASSERT(i == nclasses); + + /* Allocate a temporary buffer in which we can construct a custom + * configuration descriptor for each member class. + */ + + cfgbuffer = (FAR uint8_t *)malloc(CUSTOM_CONFIG_BUFSIZE); + if (cfgbuffer == NULL) + { + uerr("ERROR: Failed to allocate configuration buffer"); + ret = -ENOMEM; + goto errout_with_members; + } + + /* Now loop, performing the registry lookup and initialization of each + * member class in the composite. + */ + + for (i = 0; i < nclasses; i++) + { + member = &priv->members[i]; + + /* Is there is a class implementation registered to support this + * device. + */ + + reg = usbhost_findclass(&member->id); + if (reg == NULL) + { + uerr("ERROR: usbhost_findclass failed\n"); +#ifdef CONFIG_USBHOST_COMPOSITE_STRICT + ret = -EINVAL; + goto errout_with_cfgbuffer; +#else + continue; +#endif + } + + /* Yes.. there is a class for this device. Get an instance of its + * interface. + */ + + member->usbclass = CLASS_CREATE(reg, hport, id); + if (member->usbclass == NULL) + { + uerr("ERROR: CLASS_CREATE failed\n"); + ret = -ENOMEM; + goto errout_with_cfgbuffer; + } + + /* Construct a custom configuration descriptor for this member */ + + cfgsize = usbhost_createconfig(member, configdesc, desclen, + cfgbuffer, CUSTOM_CONFIG_BUFSIZE); + if (cfgsize < 0) + { + uerr("ERROR: Failed to create the custom configuration: %d\n", + cfgsize); + ret = cfgsize; + goto errout_with_cfgbuffer; + } + + /* Call the newly instantiated classes connect() method provide it + * with the configuration information that it needs to initialize + * properly. + */ + + ret = CLASS_CONNECT(member->usbclass, cfgbuffer, cfgsize); + if (ret < 0) + { + /* On failure, call the class disconnect method of each contained + * class which should then free the allocated usbclass instance. + */ + + uerr("ERROR: CLASS_CONNECT failed: %d\n", ret); + goto errout_with_cfgbuffer; + } + } + + /* Free the temporary buffer */ + + kmm_free(cfgbuffer); + + /* Return our USB class structure */ + + *usbclass = &priv->usbclass; + return OK; + +errout_with_cfgbuffer: + kmm_free(cfgbuffer); + +errout_with_members: + /* On an failure, call the class disconnect method of each contained + * class which should then free the allocated usbclass instance. + */ + + usbhost_disconnect_all(priv); + + /* Free the allocate array of composite members */ + + if (priv->members != NULL) + { + kmm_free(priv->members); + } + +errout_with_container: + /* Then free the composite container itself */ + + kmm_free(priv); + return ret; +} + +#endif /* CONFIG_USBHOST_COMPOSITE */ diff --git a/drivers/usbhost/usbhost_composite.h b/drivers/usbhost/usbhost_composite.h new file mode 100644 index 0000000000000000000000000000000000000000..4d1e35d0d1d7df6c89bd97621ccf59ef2a52c972 --- /dev/null +++ b/drivers/usbhost/usbhost_composite.h @@ -0,0 +1,93 @@ +/**************************************************************************** + * drivers/usbhost/usbdev_composite.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_USBHOST_USBHOST_COMPOSITE_H +#define __DRIVERS_USBHOST_USBHOST_COMPOSITE_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include + +#ifdef CONFIG_USBHOST_COMPOSITE + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Name: usbhost_composite + * + * Description: + * As the final steps in the device enumeration sequence this function + * will be called in order to determine (1) determine if the device is + * a composite device, and if so, (2) create the composite class which + * contains all of the individual class instances making up the composite. + * + * Input Parameters: + * hport - The downstream port to which the (potential) composite + * device has been connected. + * configdesc - The full configuration descriptor + * desclen - The length of the configuration descriptor + * usbclass - If the class driver for the device is successful located + * and bound to the hub port, the allocated class instance + * is returned into this caller-provided memory location. + * + * Returned Value: + * Zero (OK) is returned if (1) the device was determined to be a + * composite device and (2) the composite class wrapper was sucessfully + * created and bound to the HCD. A negated errno value is returned on + * any failure. The value -ENOENT, in particular means that the attached + * device is not a composite device. Other values would indicate other + * various, unexpected failures. + * + ****************************************************************************/ + +int usbhost_composite(FAR struct usbhost_hubport_s *hport, + FAR const uint8_t *configdesc, int desclen, + FAR struct usbhost_id_s *id, + FAR struct usbhost_class_s **usbclass); + +#undef EXTERN +#if defined(__cplusplus) +} +#endif + +#endif /* CONFIG_USBHOST_COMPOSITE */ +#endif /* #define __DRIVERS_USBHOST_USBHOST_COMPOSITE_H */ diff --git a/drivers/usbhost/usbhost_enumerate.c b/drivers/usbhost/usbhost_enumerate.c index b92c0e6fc92ff31c505ee7200ae84cad31316dc3..80b6d48ff331395978e31f505f3ba2f6d1dd671b 100644 --- a/drivers/usbhost/usbhost_enumerate.c +++ b/drivers/usbhost/usbhost_enumerate.c @@ -53,13 +53,7 @@ #include #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ +#include "usbhost_composite.h" /**************************************************************************** * Private Function Prototypes @@ -77,14 +71,6 @@ static inline int usbhost_classbind(FAR struct usbhost_hubport_s *hport, FAR struct usbhost_id_s *id, FAR struct usbhost_class_s **devclass); -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -539,15 +525,38 @@ int usbhost_enumerate(FAR struct usbhost_hubport_s *hport, usleep(100*1000); - /* Parse the configuration descriptor and bind to the class instance for the - * device. This needs to be the last thing done because the class driver - * will begin configuring the device. +#ifdef CONFIG_USBHOST_COMPOSITE + /* Check if the device attached to the downstream port if a USB composite + * device and, if so, create the composite device wrapper and bind it to + * the HCD. + * + * usbhost_composite() will return a negated errno value is on any + * failure. The value -ENOENT, in particular means that the attached + * device is not a composite device. Other values would indicate other + * various, unexpected failures. We make no real distinction here. */ - ret = usbhost_classbind(hport, buffer, cfglen, &id, devclass); - if (ret < 0) + ret = usbhost_composite(hport, buffer, cfglen, &id, devclass); + if (ret >= 0) + { + uinfo("usbhost_composite has bound the composite device\n"); + } + + /* Apparently this is not a composite device */ + + else +#endif { - uerr("ERROR: usbhost_classbind failed %d\n", ret); + /* Parse the configuration descriptor and bind to the class instance + * for the device. This needs to be the last thing done because the + * class driver will begin configuring the device. + */ + + ret = usbhost_classbind(hport, buffer, cfglen, &id, devclass); + if (ret < 0) + { + uerr("ERROR: usbhost_classbind failed %d\n", ret); + } } errout: diff --git a/drivers/wireless/Kconfig b/drivers/wireless/Kconfig index e978ef6e8213b07d3f4e2e0722722870447de384..a3537b85cf1b0e49476709062b8ee7d1733bfda9 100644 --- a/drivers/wireless/Kconfig +++ b/drivers/wireless/Kconfig @@ -72,35 +72,4 @@ config WL_NRF24L01_RXFIFO_LEN endif # WL_NRF24L01_RXSUPPORT endif # WL_NRF24L01 - -config WL_PN532 - bool "pn532 NFC-chip support" - default n - select SPI - ---help--- - This options adds driver support for the PN532 NFC chip. - -if WL_PN532 - -config PN532_SPI_FREQ - int "SPI frequency for PN532" - default 1000000 - depends on WL_PN532 - -config WL_PN532_DEBUG - bool "Enable PN532 debug" - default n - depends on WL_PN532 - -config WL_PN532_DEBUG_TX - bool "trace TX frames" - default n - depends on WL_PN532_DEBUG - -config WL_PN532_DEBUG_RX - bool "trace RX frames" - default n - depends on WL_PN532_DEBUG - -endif # WL_PN532 endif # DRIVERS_WIRELESS diff --git a/drivers/wireless/Make.defs b/drivers/wireless/Make.defs index 6322a5c0b0379a7fb7d224dad6e304cc6296a576..14ffb31208393d2a38cf19f492555c0926246857 100644 --- a/drivers/wireless/Make.defs +++ b/drivers/wireless/Make.defs @@ -55,10 +55,6 @@ ifeq ($(CONFIG_WL_CC3000),y) include wireless$(DELIM)cc3000$(DELIM)Make.defs endif -ifeq ($(CONFIG_WL_PN532),y) -CSRCS += pn532.c -endif - # Include wireless devices build support DEPPATH += --dep-path wireless diff --git a/drivers/wireless/cc3000/cc3000_common.c b/drivers/wireless/cc3000/cc3000_common.c index cca794a079c5c516c6f40d5d4d47b299768df587..acbb1c4ea613279e7e84cab6885eb453321bfa3d 100644 --- a/drivers/wireless/cc3000/cc3000_common.c +++ b/drivers/wireless/cc3000/cc3000_common.c @@ -1,6 +1,7 @@ /**************************************************************************** - * cc3000_common.c.c - CC3000 Host Driver Implementation. - * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ + * drivers/wireless/cc3000/cc3000_common.c.c - CC3000 Host Driver Implementation. + * + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/drivers/wireless/cc3000/evnt_handler.c b/drivers/wireless/cc3000/evnt_handler.c index b53fd24db37985ebdee3da1b4de9e5d11ac62301..b2ec2b016a17a6d622dc47d9c11c1aaef5b40d89 100644 --- a/drivers/wireless/cc3000/evnt_handler.c +++ b/drivers/wireless/cc3000/evnt_handler.c @@ -1,6 +1,7 @@ /**************************************************************************** - * evnt_handler.c - CC3000 Host Driver Implementation. - * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ + * drivers/wireless/cc3000/evnt_handler.c - CC3000 Host Driver Implementation. + * + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/drivers/wireless/cc3000/hci.c b/drivers/wireless/cc3000/hci.c index 7555290640d9057d7606b70891755d6305027625..9d07450943e14618ae29d9cbd0d7d94e497ee4b6 100644 --- a/drivers/wireless/cc3000/hci.c +++ b/drivers/wireless/cc3000/hci.c @@ -1,6 +1,7 @@ /**************************************************************************** - * hci.c - CC3000 Host Driver Implementation. - * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ + * drivers/wireless/cc3000/hci.c - CC3000 Host Driver Implementation. + * + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/drivers/wireless/cc3000/netapp.c b/drivers/wireless/cc3000/netapp.c index f6ac0aa0426ed98d7c140c8e04937ec7fc299720..648ecb1b891bebb3a3c806a99acf475a408e8c92 100644 --- a/drivers/wireless/cc3000/netapp.c +++ b/drivers/wireless/cc3000/netapp.c @@ -1,6 +1,7 @@ /**************************************************************************** - * netapp.c - CC3000 Host Driver Implementation. - * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ + * drivers/wireless/cc3000/netapp.c - CC3000 Host Driver Implementation. + * + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/drivers/wireless/cc3000/nvmem.c b/drivers/wireless/cc3000/nvmem.c index 8009e4802044f4e7f0dbc4fbfafe83d2439e8525..01c4b5a897b4d0fc04997d92436aa9a9d0c49a42 100644 --- a/drivers/wireless/cc3000/nvmem.c +++ b/drivers/wireless/cc3000/nvmem.c @@ -1,6 +1,7 @@ /**************************************************************************** - * nvmem.c - CC3000 Host Driver Implementation. - * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ + * drivers/wireless/cc3000/nvmem.c - CC3000 Host Driver Implementation. + * + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/drivers/wireless/cc3000/socket.c b/drivers/wireless/cc3000/socket.c index a1d238365c28e196a9807d7551b3391d39605299..10699a70899075c41ea86b055a21146184a9a19c 100644 --- a/drivers/wireless/cc3000/socket.c +++ b/drivers/wireless/cc3000/socket.c @@ -1,6 +1,7 @@ /**************************************************************************** - * socket.c - CC3000 Host Driver Implementation. - * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ + * drivers/wireless/cc3000/socket.c - CC3000 Host Driver Implementation. + * + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/drivers/wireless/cc3000/socket_imp.c b/drivers/wireless/cc3000/socket_imp.c index 780a085eb8ce8d59649233997a1ab0b49bef6f38..38341b2939b0c1d6cb11bc62ca99d4e4cef9af20 100644 --- a/drivers/wireless/cc3000/socket_imp.c +++ b/drivers/wireless/cc3000/socket_imp.c @@ -1,6 +1,7 @@ /**************************************************************************** - * drivers/wireless/socket_imp.c - CC3000 Host Driver Implementation. - * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ + * drivers/wireless/cc3000/socket_imp.c - CC3000 Host Driver Implementation. + * + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * * Port to nuttx: * David Sidrane diff --git a/drivers/wireless/cc3000/wlan.c b/drivers/wireless/cc3000/wlan.c index 23d853a6819b6053186c7baa77f08daeb6300e94..c77488bcf43fba8c067bfca4442db90d4ebf0d74 100644 --- a/drivers/wireless/cc3000/wlan.c +++ b/drivers/wireless/cc3000/wlan.c @@ -1,6 +1,7 @@ /**************************************************************************** - * wlan.c - CC3000 Host Driver Implementation. - * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ + * drivers/wireless/cc3000/wlan.c - CC3000 Host Driver Implementation. + * + * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/fs/aio/aioc_contain.c b/fs/aio/aioc_contain.c index 05b03c776cbd9b51048676c1c479172c0fd93b8f..88d3deddb6879947bd74830138190ffc6fc388a9 100644 --- a/fs/aio/aioc_contain.c +++ b/fs/aio/aioc_contain.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/aio/aioc_contain.c + * fs/aio/aioc_contain.c * * Copyright (C) 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/fs/fat/fs_fat32.c b/fs/fat/fs_fat32.c index 618aa22e2f3dadc6a6023fdd528bde66a1cffd33..774db3c276d16c585efa65ab8a7642984af19b2f 100644 --- a/fs/fat/fs_fat32.c +++ b/fs/fat/fs_fat32.c @@ -1054,6 +1054,18 @@ static off_t fat_seek(FAR struct file *filep, off_t offset, int whence) return -EINVAL; } + /* Special case: We are seeking to the current position. This would + * happen normally with ftell() which does lseek(fd, 0, SEEK_CUR) but can + * also happen in other situation such as when SEEK_SET is used to assure + * assure sequential access in a multi-threaded environment where there + * may be are multiple users to the file descriptor. + */ + + if (position == filep->f_pos) + { + return OK; + } + /* Make sure that the mount is still healthy */ fat_semtake(fs); diff --git a/fs/procfs/fs_procfsproc.c b/fs/procfs/fs_procfsproc.c index 79abd759ef0fbf264f0aa6d3d92a6913fc21e2f6..fc15018a032318d994dbc0a51557143605fa7d62 100644 --- a/fs/procfs/fs_procfsproc.c +++ b/fs/procfs/fs_procfsproc.c @@ -447,7 +447,7 @@ static ssize_t proc_status(FAR struct proc_file_s *procfile, group->tg_pgid); #else linesize = snprintf(procfile->line, STATUS_LINELEN, "%-12s%d\n", "PPID:", - tcb->ppid); + group->tg_ppid); #endif copysize = procfs_memcpy(procfile->line, linesize, buffer, remaining, &offset); diff --git a/include/cxx/csignal b/include/cxx/csignal index c66473bb57fd4d2e3ea2e13b44bacea618a05544..b5ccdbf8ddcee8438ea36836c784fa9e84f001cd 100644 --- a/include/cxx/csignal +++ b/include/cxx/csignal @@ -49,6 +49,7 @@ namespace std { using ::sigset_t; + using ::sig_atomic_t; using ::sigval; using ::sigevent; using ::siginfo; @@ -56,18 +57,24 @@ namespace std using ::sigaction; using ::kill; using ::raise; - using ::sigemptyset; - using ::sigfillset; + using ::sigaction; using ::sigaddset; using ::sigdelset; + using ::sigemptyset; + using ::sigfillset; + using ::sighold; using ::sigismember; - using ::sigaction; - using ::sigprocmask; + using ::sigignore; + using ::signal; + using ::sigpause; using ::sigpending; + using ::sigprocmask; + using ::sigqueue; + using ::sigrelse; + using ::sigset; + using ::sigtimedwait; using ::sigsuspend; using ::sigwaitinfo; - using ::sigtimedwait; - using ::sigqueue; } #endif // CSIGNAL_HEADER diff --git a/include/cxx/cstdlib b/include/cxx/cstdlib index 419291c789b2135fbc18f0cc579945471a785435..65c200672a589225d758dfbd4ff19f1be9963cc0 100644 --- a/include/cxx/cstdlib +++ b/include/cxx/cstdlib @@ -1,7 +1,7 @@ //*************************************************************************** // include/cxx/cstdlib // -// Copyright (C) 2009, 2012, 2015 Gregory Nutt. All rights reserved. +// Copyright (C) 2009, 2012, 2015-2016 Gregory Nutt. All rights reserved. // Author: Gregory Nutt // // Redistribution and use in source and binary forms, with or without @@ -54,9 +54,9 @@ namespace std using ::srand; using ::rand; +#ifndef CONFIG_DISABLE_ENVIRON // Environment variable support -#ifndef CONFIG_DISABLE_ENVIRON using ::get_environ_ptr; using ::getenv; using ::putenv; @@ -76,6 +76,12 @@ namespace std using ::on_exit; #endif +#ifndef __KERNEL__ + // System command + + using ::system; +#endif + // String to binary conversions using ::strtol; @@ -100,6 +106,16 @@ namespace std using ::calloc; using ::mallinfo; +#ifdef CONFIG_PSEUDOTERM + // Pseudo-Terminals + +#ifdef CONFIG_PSEUDOTERM_SUSV1 + using ::ptsname; + using ::ptsname_r; +#endif + using ::unlockpt; +#endif + // Arithmetic using ::abs; @@ -124,6 +140,10 @@ namespace std // Sorting using ::qsort; + + // Binary search + + using ::bsearch; } #endif // __INCLUDE_CXX_CSTDLIB diff --git a/include/netinet/in.h b/include/netinet/in.h index 219f15119455dccab65295e254cfc845f2ea0128..53e0706b5b87a745163ffc13fb2d857f7ed55f65 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -80,6 +80,7 @@ #define IPPROTO_COMP 108 /* Compression Header protocol */ #define IPPROTO_SCTP 132 /* Stream Control Transport Protocol */ #define IPPROTO_UDPLITE 136 /* UDP-Lite (RFC 3828) */ +#define IPPROTO_MPLS 137 /* MPLS in IP (RFC 4023) */ #define IPPROTO_RAW 255 /* Raw IP packets */ /* Values used with SIOCSIFMCFILTER and SIOCGIFMCFILTER ioctl's */ diff --git a/include/nuttx/analog/ads1242.h b/include/nuttx/analog/ads1242.h index b74b2a28b264e581e6c9fe48f09342575d9b6fb5..d8a630bd207e9e93670db10b46c8b96ec34e14eb 100644 --- a/include/nuttx/analog/ads1242.h +++ b/include/nuttx/analog/ads1242.h @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef NUTTX_INCLUDE_NUTTX_ANALOG_ADS1242_H_ -#define NUTTX_INCLUDE_NUTTX_ANALOG_ADS1242_H_ +#ifndef __INCLUDE_NUTTX_ANALOG_ADS1242_H +#define __INCLUDE_NUTTX_ANALOG_ADS1242_H /**************************************************************************** * Included Files @@ -51,13 +51,20 @@ ****************************************************************************/ /* IOCTL Commands ***********************************************************/ +/* Cmd: ANIOC_ADS2142_READ Arg: uint32_t *value + * Cmd: ANIOC_ADS2142_SET_GAIN Arg: uint8_t value + * Cmd: ANIOC_ADS2142_SET_POSITIVE_INPUT Arg: uint8_t value + * Cmd: ANIOC_ADS2142_SET_NEGATIVE_INPUT Arg: uint8_t value + * Cmd: ANIOC_ADS2142_IS_DATA_READY Arg: bool *value + * Cmd: ANIOC_ADS2142_DO_SYSTEM_OFFSET_CALIB Arg: None + */ -#define ANIOC_ADS2142_READ _ANIOC(0x0001) /* Arg: uint32_t *value */ -#define ANIOC_ADS2142_SET_GAIN _ANIOC(0x0002) /* Arg: uint8_t value */ -#define ANIOC_ADS2142_SET_POSITIVE_INPUT _ANIOC(0x0003) /* Arg: uint8_t value */ -#define ANIOC_ADS2142_SET_NEGATIVE_INPUT _ANIOC(0x0004) /* Arg: uint8_t value */ -#define ANIOC_ADS2142_IS_DATA_READY _ANIOC(0x0005) /* Arg: bool *value */ -#define ANIOC_ADS2142_DO_SYSTEM_OFFSET_CALIB _ANIOC(0x0006) /* Arg: None */ +#define ANIOC_ADS2142_READ _ANIOC(ANIOC_USER + 0) +#define ANIOC_ADS2142_SET_GAIN _ANIOC(ANIOC_USER + 1) +#define ANIOC_ADS2142_SET_POSITIVE_INPUT _ANIOC(ANIOC_USER + 2) +#define ANIOC_ADS2142_SET_NEGATIVE_INPUT _ANIOC(ANIOC_USER + 3) +#define ANIOC_ADS2142_IS_DATA_READY _ANIOC(ANIOC_USER + 4) +#define ANIOC_ADS2142_DO_SYSTEM_OFFSET_CALIB _ANIOC(ANIOC_USER + 5) /* ADS1242 REGISTER *********************************************************/ @@ -199,4 +206,4 @@ int ads1242_register(FAR const char *devpath, FAR struct spi_dev_s *spi, #endif #endif /* CONFIG_SPI && CONFIG_ADC_ADS1242 */ -#endif /* NUTTX_INCLUDE_NUTTX_ANALOG_ADS1242_H_ */ +#endif /* __INCLUDE_NUTTX_ANALOG_ADS1242_H */ diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h index 24925c05ec64c1656ef39e92cf40118f1b7827ec..93a595a44aebb93bb491d525c57f34d83d17627e 100644 --- a/include/nuttx/arch.h +++ b/include/nuttx/arch.h @@ -1496,10 +1496,15 @@ void up_timer_initialize(void); * ****************************************************************************/ -#ifdef CONFIG_SCHED_TICKLESS +#if defined(CONFIG_SCHED_TICKLESS) && !defined(CONFIG_CLOCK_TIMEKEEPING) int up_timer_gettime(FAR struct timespec *ts); #endif +#ifdef CONFIG_CLOCK_TIMEKEEPING +int up_timer_getcounter(FAR uint64_t *cycles); +void up_timer_getmask(FAR uint64_t *mask); +#endif + /**************************************************************************** * Name: up_alarm_cancel * diff --git a/include/nuttx/audio/tone.h b/include/nuttx/audio/tone.h new file mode 100644 index 0000000000000000000000000000000000000000..7f15dc6954821694fb0805d7e0c412134a21dbab --- /dev/null +++ b/include/nuttx/audio/tone.h @@ -0,0 +1,97 @@ +/**************************************************************************** + * include/nuttx/audio/tone.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: 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. + * + ****************************************************************************/ + +#ifndef __INCLUDE_NUTTX_AUDIO_TONE_H +#define __INCLUDE_NUTTX_AUDIO_TONE_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +#include + +#include +#include + +#ifdef CONFIG_AUDIO_TONE + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Name: tone_register + * + * Description: + * This function binds an instance of a "lower half" PWM driver with + * the "upper half" Audio Tone device and registers that device so that can + * be used by application code. + * + * + * Input parameters: + * path - The full path to the driver to be registers in the NuttX pseudo- + * filesystem. The recommended convention is to name all PWM drivers + * as "/dev/tone0", "/dev/tone1", etc. where the driver path + * differs only in the "minor" number at the end of the device name. + * tone - A pointer to an instance of lower half PWM driver tone. This + * instance will be bound to the Audio Tone driver and must persists as + * long as that driver persists. + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +int tone_register(FAR const char *path, FAR struct pwm_lowerhalf_s *tone, + FAR struct oneshot_lowerhalf_s *oneshot); + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* CONFIG_AUDIO_TONE */ +#endif /* __INCLUDE_NUTTX_AUDIO_TONE_H */ diff --git a/include/nuttx/clock.h b/include/nuttx/clock.h index a844396b30c62f2a422b740cd34229237215924c..5684fef938c3f2ed7b35f6f94aedf24ab4ec9e20 100644 --- a/include/nuttx/clock.h +++ b/include/nuttx/clock.h @@ -34,8 +34,8 @@ * ****************************************************************************/ -#ifndef _INCLUDE_NUTTX_CLOCK_H -#define _INCLUDE_NUTTX_CLOCK_H +#ifndef __INCLUDE_NUTTX_CLOCK_H +#define __INCLUDE_NUTTX_CLOCK_H /**************************************************************************** * Included Files @@ -329,9 +329,31 @@ int clock_systimespec(FAR struct timespec *ts); int clock_cpuload(int pid, FAR struct cpuload_s *cpuload); #endif +/**************************************************************************** + * Name: sched_oneshot_extclk + * + * Description: + * Configure to use a oneshot timer as described in + * include/nuttx/timers/oneshot.h to provid external clocking to assess + * the CPU load. + * + * Input Parameters: + * lower - An instance of the oneshot timer interface as defined in + * include/nuttx/timers/oneshot.h + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef CONFIG_CPULOAD_ONESHOT +struct oneshot_lowerhalf_s; +void sched_oneshot_extclk(FAR struct oneshot_lowerhalf_s *lower); +#endif + #undef EXTERN #ifdef __cplusplus } #endif -#endif /* _INCLUDE_NUTTX_CLOCK_H */ +#endif /* __INCLUDE_NUTTX_CLOCK_H */ diff --git a/include/nuttx/contactless/ioctl.h b/include/nuttx/contactless/ioctl.h new file mode 100644 index 0000000000000000000000000000000000000000..7c7916c1c79ac094850ef49ef3d03b1da8f453b8 --- /dev/null +++ b/include/nuttx/contactless/ioctl.h @@ -0,0 +1,89 @@ +/**************************************************************************** + * include/contactless/ioctl.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 __INCLUDE_NUTTX_CONTACTLESS_IOCTL_H +#define __INCLUDE_NUTTX_CONTACTLESS_IOCTL_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* MFRC522 IOCTL Commands ***************************************************/ + +#define MFRC522IOC_GET_PICC_UID _CLIOC(0x0001) +#define MFRC522IOC_GET_STATE _CLIOC(0x0002) + +/* PN532 IOCTL Commands *****************************************************/ + +#define PN532IOC_SET_SAM_CONF _CLIOC(0x0003) +#define PN532IOC_READ_PASSIVE _CLIOC(0x0004) +#define PN532IOC_SET_RF_CONF _CLIOC(0x0005) +#define PN532IOC_SEND_CMD_READ_PASSIVE _CLIOC(0x0006) +#define PN532IOC_GET_DATA_READY _CLIOC(0x0007) +#define PN532IOC_GET_TAG_ID _CLIOC(0x0008) +#define PN532IOC_GET_STATE _CLIOC(0x0009) +#define PN532IOC_READ_TAG_DATA _CLIOC(0x000a) +#define PN532IOC_WRITE_TAG_DATA _CLIOC(0x000b) + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __INCLUDE_NUTTX_CONTACTLESS_IOCTL_H */ diff --git a/include/nuttx/contactless/mfrc522.h b/include/nuttx/contactless/mfrc522.h new file mode 100644 index 0000000000000000000000000000000000000000..982ed17c8ca2db682d6c9e1fb71158c68a9edc57 --- /dev/null +++ b/include/nuttx/contactless/mfrc522.h @@ -0,0 +1,112 @@ +/**************************************************************************** + * include/contactless/mfrc522.h + * + * Copyright(C) 2016 Uniquix Ltda. All rights reserved. + * Author: 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. + * + ****************************************************************************/ + +#ifndef __INCLUDE_NUTTX_CONTACTLESS_MFRC522_H +#define __INCLUDE_NUTTX_CONTACTLESS_MFRC522_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +#include +#include +#include + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +#define MFRC522_MIFARE_ISO14443A (0x00) + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +enum mfrc522_state_e +{ + MFRC522_STATE_NOT_INIT, + MFRC522_STATE_IDLE, + MFRC522_STATE_CMD_SENT, + MFRC522_STATE_DATA_READY, +}; + +struct mfrc522_dev_s; + +struct picc_uid_s +{ + uint8_t size; /* Number of bytes in the UID. 4, 7 or 10 */ + uint8_t uid_data[10]; + uint8_t sak; /* The SAK (Select Acknowledge) return by the PICC */ +}; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Name: mfrc522_register + * + * Description: + * Register the MFRC522 character device as 'devpath' + * + * Input Parameters: + * devpath - The full path to the driver to register. E.g., "/dev/rfid0" + * spi - An instance of the SPI interface to use to communicate with MFRC522 + * config - Device persistent board data + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int mfrc522_register(FAR const char *devpath, FAR struct spi_dev_s *spi); + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __INCLUDE_NUTTX_CONTACTLESS_MFRC522_H */ diff --git a/include/nuttx/wireless/pn532.h b/include/nuttx/contactless/pn532.h similarity index 85% rename from include/nuttx/wireless/pn532.h rename to include/nuttx/contactless/pn532.h index 450b7c7ba3edc250ba8b1f07b0324e73ed3fa4c2..c4bf82d8b24b0fda61b984563e0e8b0e56489326 100644 --- a/include/nuttx/wireless/pn532.h +++ b/include/nuttx/contactless/pn532.h @@ -1,5 +1,5 @@ /**************************************************************************** - * include/wireless/pn532.h + * include/contactless/pn532.h * * Copyright(C) 2012, 2013, 2016 Offcode Ltd. All rights reserved. * Authors: Janne Rosberg @@ -35,8 +35,8 @@ * ****************************************************************************/ -#ifndef __NUTTX_WIRELESS_PN532_H -#define __NUTTX_WIRELESS_PN532_H +#ifndef __INCLUDE_NUTTX_CONTACTLESS_PN532_H +#define __INCLUDE_NUTTX_CONTACTLESS_PN532_H /**************************************************************************** * Included Files @@ -46,7 +46,8 @@ #include #include #include -#include + +#include /**************************************************************************** * Pre-Processor Definitions @@ -54,23 +55,11 @@ #define PN532_MIFARE_ISO14443A (0x00) -/* IOCTL Commands ***********************************************************/ - -#define PN532IOC_SET_SAM_CONF _WLIOC_USER(0x0001) -#define PN532IOC_READ_PASSIVE _WLIOC_USER(0x0002) -#define PN532IOC_SET_RF_CONF _WLIOC_USER(0x0003) -#define PN532IOC_SEND_CMD_READ_PASSIVE _WLIOC_USER(0x0004) -#define PN532IOC_GET_DATA_READY _WLIOC_USER(0x0005) -#define PN532IOC_GET_TAG_ID _WLIOC_USER(0x0006) -#define PN532IOC_GET_STATE _WLIOC_USER(0x0007) -#define PN532IOC_READ_TAG_DATA _WLIOC_USER(0x0008) -#define PN532IOC_WRITE_TAG_DATA _WLIOC_USER(0x0009) - /**************************************************************************** * Public Types ****************************************************************************/ -enum pn532_state_E +enum pn532_state_e { PN532_STATE_NOT_INIT, PN532_STATE_IDLE, @@ -162,4 +151,4 @@ int pn532_register(FAR const char *devpath, FAR struct spi_dev_s *spi, } #endif -#endif /* __NUTTX_WIRELESS_PN532_H */ +#endif /* __INCLUDE_NUTTX_CONTACTLESS_PN532_H */ diff --git a/include/nuttx/drivers/can.h b/include/nuttx/drivers/can.h index ed570097fc4186ccf7f093efb9fc9350528b17a6..725a9180f6d572532d2ff1d7d4d94ef53f87e9db 100644 --- a/include/nuttx/drivers/can.h +++ b/include/nuttx/drivers/can.h @@ -33,8 +33,8 @@ * ************************************************************************************/ -#ifndef _INCLUDE_NUTTX_DRVERS_CAN_H -#define _INCLUDE_NUTTX_DRVERS_CAN_H +#ifndef __INCLUDE_NUTTX_DRVERS_CAN_H +#define __INCLUDE_NUTTX_DRVERS_CAN_H /************************************************************************************ * Included Files @@ -796,4 +796,4 @@ int can_txready(FAR struct can_dev_s *dev); #endif #endif /* CONFIG_CAN */ -#endif /* _INCLUDE_NUTTX_DRVERS_CAN_H */ +#endif /* __INCLUDE_NUTTX_DRVERS_CAN_H */ diff --git a/include/nuttx/fs/ioctl.h b/include/nuttx/fs/ioctl.h index ba7586e3da60f3dc60506b2ac318e8519d05c67f..29f6f71a90d93b527e9dae6831dae81045c364ec 100644 --- a/include/nuttx/fs/ioctl.h +++ b/include/nuttx/fs/ioctl.h @@ -83,9 +83,11 @@ #define _LOOPBASE (0x1e00) /* Loop device commands */ #define _MODEMBASE (0x1f00) /* Modem ioctl commands */ #define _I2CBASE (0x2000) /* I2C driver commands */ -#define _GPIOBASE (0x2100) /* GPIO driver commands */ +#define _SPIBASE (0x2100) /* SPI driver commands */ +#define _GPIOBASE (0x2200) /* GPIO driver commands */ +#define _CLIOCBASE (0x1200) /* Contactless modules ioctl commands */ -/* boardctl commands share the same number space */ +/* boardctl() commands share the same number space */ #define _BOARDBASE (0xff00) /* boardctl commands */ @@ -137,7 +139,10 @@ * OUT: Bytes readable from this fd */ #define FIONWRITE _FIOC(0x0006) /* IN: Location to return value (int *) - * OUT: Bytes writable to this fd + * OUT: Number bytes in send queue + */ +#define FIONSPACE _FIOC(0x0007) /* IN: Location to return value (int *) + * OUT: Free space in send queue. */ /* NuttX file system ioctl definitions **************************************/ @@ -250,8 +255,9 @@ #define ANIOC_TRIGGER _ANIOC(0x0001) /* Trigger one conversion * IN: None * OUT: None */ - -/* NuttX PWM ioctl definitions (see nuttx/drivers/pwm.h) ****************************/ +#define ANIOC_USER 0x0002 /* Device specific IOCTL commands + * may follow */ +/* NuttX PWM ioctl definitions (see nuttx/drivers/pwm.h) ********************/ #define _PWMIOCVALID(c) (_IOC_TYPE(c)==_PWMIOCBASE) #define _PWMIOC(nr) _IOC(_PWMIOCBASE,nr) @@ -355,8 +361,8 @@ /* User LED driver ioctl definitions ****************************************/ /* (see nuttx/leds/usersled.h */ -#define _ULEDIOCVALID(c) (_IOC_TYPE(c)==_ULEDBASE) -#define _ULEDIOC(nr) _IOC(_ULEDBASE,nr) +#define _ULEDIOCVALID(c) (_IOC_TYPE(c)==_ULEDBASE) +#define _ULEDIOC(nr) _IOC(_ULEDBASE,nr) /* Zero Cross driver ioctl definitions **************************************/ /* (see nuttx/include/sensor/zerocross.h */ @@ -373,19 +379,32 @@ /* Modem driver ioctl definitions ********************************************/ /* see nuttx/include/modem/*.h */ -#define _MODEMIOCVALID(c) (_IOC_TYPE(c)==_MODEMBASE) -#define _MODEMIOC(nr) _IOC(_MODEMBASE,nr) +#define _MODEMIOCVALID(c) (_IOC_TYPE(c)==_MODEMBASE) +#define _MODEMIOC(nr) _IOC(_MODEMBASE,nr) /* I2C driver ioctl definitions **********************************************/ /* see nuttx/include/i2c/i2c_master.h */ -#define _I2CIOCVALID(c) (_IOC_TYPE(c)==_I2CBASE) -#define _I2CIOC(nr) _IOC(_I2CBASE,nr) +#define _I2CIOCVALID(c) (_IOC_TYPE(c)==_I2CBASE) +#define _I2CIOC(nr) _IOC(_I2CBASE,nr) + +/* SPI driver ioctl definitions **********************************************/ +/* see nuttx/include/spi/spi_transfer.h */ + +#define _SPIIOCVALID(c) (_IOC_TYPE(c)==_SPIBASE) +#define _SPIIOC(nr) _IOC(_SPIBASE,nr) /* GPIO driver command definitions ******************************************/ +/* see nuttx/include/ioexpander/gpio.h */ + +#define _GPIOCVALID(c) (_IOC_TYPE(c)==_GPIOBASE) +#define _GPIOC(nr) _IOC(_GPIOBASE,nr) + +/* Contactless driver ioctl definitions ****************************************/ +/* (see nuttx/include/contactless/ioctl.h */ -#define _GPIOCVALID(c) (_IOC_TYPE(c)==_GPIOBASE) -#define _GPIOC(nr) _IOC(_GPIOBASE,nr) +#define _CLIOCVALID(c) (_IOC_TYPE(c)==_CLIOCBASE) +#define _CLIOC(nr) _IOC(_CLIOCBASE,nr) /* boardctl() command definitions *******************************************/ diff --git a/include/nuttx/fs/nfs.h b/include/nuttx/fs/nfs.h index f2980d2407664658762d420abb2a7ec088ed1189..f5bb1e730fd0cc85c8f7ced694e5c31594381c55 100644 --- a/include/nuttx/fs/nfs.h +++ b/include/nuttx/fs/nfs.h @@ -106,4 +106,4 @@ extern "C" } #endif -#endif /* _NFS_NFS_H */ +#endif /* __INCLUDE_NUTTX_FS_NFS_H */ diff --git a/include/nuttx/i2c/i2c_master.h b/include/nuttx/i2c/i2c_master.h index c3684398ee6f83b85319c06dfafb6425e6c44680..da759de19ae3ac31ff5dac06922667cc9a142d83 100644 --- a/include/nuttx/i2c/i2c_master.h +++ b/include/nuttx/i2c/i2c_master.h @@ -205,7 +205,7 @@ struct i2c_master_s struct i2c_transfer_s { FAR struct i2c_msg_s *msgv; /* Array of I2C messages for the transfer */ - size_t msgc; /* Number of messges in the array. */ + size_t msgc; /* Number of messages in the array. */ }; /**************************************************************************** diff --git a/include/nuttx/input/buttons.h b/include/nuttx/input/buttons.h index ee0785ef95c634d6c3cf2b22c17781847fff0c3c..901480bc8eea7ab904a49a38fd74f56a89822720 100644 --- a/include/nuttx/input/buttons.h +++ b/include/nuttx/input/buttons.h @@ -200,6 +200,19 @@ extern "C" int btn_register(FAR const char *devname, FAR const struct btn_lowerhalf_s *lower); +/**************************************************************************** + * Name: btn_lower_initialize + * + * Description: + * Initialize the generic button lower half driver, bind it and register + * it with the upper half button driver as devname. + * + ****************************************************************************/ + +#if CONFIG_BUTTONS_LOWER +int btn_lower_initialize(FAR const char *devname); +#endif + #undef EXTERN #ifdef __cplusplus } diff --git a/include/nuttx/ioexpander/gpio.h b/include/nuttx/ioexpander/gpio.h index c4c044e6a89af8dec330ab297669f2cbc6f29bc7..c0d091753c1a4e17e9c1f14e7b087337d75ac0bf 100644 --- a/include/nuttx/ioexpander/gpio.h +++ b/include/nuttx/ioexpander/gpio.h @@ -41,6 +41,11 @@ ****************************************************************************/ #include + +#include +#include +#include + #include /**************************************************************************** @@ -49,12 +54,16 @@ /* Command: GPIOC_WRITE * Description: Set the value of an output GPIO - * Argument: 0=output a low value; 1=outut a high value + * Argument: T0=output a low value; 1=outut a high value * * Command: GPIOC_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. + * Argument: A pointer to an bool value to receive the result: + * false=low value; true=high value. + * + * Command: GPIOC_PINTYPE + * Description: Return the GPIO pin type. + * Argument: A pointer to an instance of type enum gpio_pintype_e * * Command: GPIOC_REGISTER * Description: Register to receive a signal whenever there an interrupt @@ -62,11 +71,17 @@ * depends upon interrupt GPIO support from the platform. * Argument: The number of signal to be generated when the interrupt * occurs. + * + * Command: GPIOC_UNREGISTER + * Description: Stop receiving signals for pin interrupts. + * Argument: None. */ -#define GPIOC_WRITE _GPIOC(1) -#define GPIOC_READ _GPIOC(2) -#define GPIOC_REGISTER _GPIOC(3) +#define GPIOC_WRITE _GPIOC(1) +#define GPIOC_READ _GPIOC(2) +#define GPIOC_PINTYPE _GPIOC(3) +#define GPIOC_REGISTER _GPIOC(4) +#define GPIOC_UNREGISTER _GPIOC(5) /**************************************************************************** * Public Types @@ -78,11 +93,13 @@ enum gpio_pintype_e { GPIO_INPUT_PIN = 0, GPIO_OUTPUT_PIN, - GPIO_INTERRUPT_PIN + GPIO_INTERRUPT_PIN, + GPIO_NPINTYPES }; /* Interrupt callback */ +struct gpio_dev_s; typedef CODE int (*pin_interrupt_t)(FAR struct gpio_dev_s *dev); /* Pin interface vtable definition. Instances of this vtable are read-only @@ -100,8 +117,8 @@ struct gpio_operations_s { /* Interface methods */ - CODE int (*go_read)(FAR struct gpio_dev_s *dev, FAR int *value); - CODE int (*go_write)(FAR struct gpio_dev_s *dev, int value); + CODE int (*go_read)(FAR struct gpio_dev_s *dev, FAR bool *value); + CODE int (*go_write)(FAR struct gpio_dev_s *dev, bool value); CODE int (*go_attach)(FAR struct gpio_dev_s *dev, pin_interrupt_t callback); CODE int (*go_enable)(FAR struct gpio_dev_s *dev, bool enable); @@ -160,6 +177,31 @@ extern "C" int gpio_pin_register(FAR struct gpio_dev_s *dev, int minor); +/**************************************************************************** + * Name: gpio_lower_half + * + * Description: + * Create a GPIO pin device driver instance for an I/O expander pin. + * The I/O expander pin must have already been configured by the caller + * for the particular pintype. + * + * Input Parameters: + * ioe - An instance of the I/O expander interface + * pin - The I/O expander pin number for the driver + * pintype - See enum gpio_pintype_e + * minor - The minor device number to use when registering the device + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +#ifdef CONFIG_GPIO_LOWER_HALF +struct ioexpander_dev_s; +int gpio_lower_half(FAR struct ioexpander_dev_s *ioe, unsigned int pin, + enum gpio_pintype_e pintype, int minor); +#endif + #ifdef __cplusplus } #endif diff --git a/include/nuttx/ioexpander/ioexpander.h b/include/nuttx/ioexpander/ioexpander.h index ce95d6d4914c1706ea04cc43bddf650c8b0d6a50..f149b7dfa79ff2e6ee68db77721ea1b04ab79589 100644 --- a/include/nuttx/ioexpander/ioexpander.h +++ b/include/nuttx/ioexpander/ioexpander.h @@ -41,26 +41,47 @@ ****************************************************************************/ #include -#include +#include -#if defined(CONFIG_IOEXPANDER) - -#ifndef CONFIG_PCA9555_INT_DISABLE -#ifndef CONFIG_SCHED_WORKQUEUE -# error "Work queue support required. CONFIG_SCHED_WORKQUEUE must be selected." -#endif -#endif +#ifdef CONFIG_IOEXPANDER /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -#define IOEXPANDER_DIRECTION_IN 0 -#define IOEXPANDER_DIRECTION_OUT 1 +/* Configuration ************************************************************/ + +#ifndef CONFIG_IOEXPANDER_NPINS +# define CONFIG_IOEXPANDER_NPINS 16 +#endif + +#if CONFIG_IOEXPANDER_NPINS > 64 +# error No support for devices with more than 64 pins +#endif + +/* Pin definitions **********************************************************/ + +#define IOEXPANDER_DIRECTION_IN 0 +#define IOEXPANDER_DIRECTION_OUT 1 + +#define IOEXPANDER_PINMASK (((ioe_pinset_t)1 << CONFIG_IOEXPANDER_NPINS) - 1) +#define PINSET_ALL (~((ioe_pinset_t)0)) /* Pin options */ -#define IOEXPANDER_OPTION_INVERT 1 /* set the "active" level for the line */ +#define IOEXPANDER_OPTION_INVERT 1 /* Set the "active" level for a pin */ +# define IOEXPANDER_VAL_NORMAL 0 /* Normal, no inversion */ +# define IOEXPANDER_VAL_INVERT 1 /* Inverted */ + +#define IOEXPANDER_OPTION_INTCFG 2 /* Configure interrupt for a pin */ +# define IOEXPANDER_VAL_DISABLE 0 /* 0000 Disable pin interrupts */ +# define IOEXPANDER_VAL_LEVEL 1 /* xx01 Interrupt on level (vs. edge) */ +# define IOEXPANDER_VAL_HIGH 5 /* 0101 Interrupt on high level */ +# define IOEXPANDER_VAL_LOW 9 /* 1001 Interrupt on low level */ +# define IOEXPANDER_VAL_EDGE 2 /* xx10 Interrupt on edge (vs. level) */ +# define IOEXPANDER_VAL_RISING 6 /* 0110 Interrupt on rising edge */ +# define IOEXPANDER_VAL_FALLING 10 /* 1010 Interrupt on falling edge */ +# define IOEXPANDER_VAL_BOTH 14 /* 1110 Interrupt on both edges */ /* Access macros ************************************************************/ @@ -221,46 +242,121 @@ ****************************************************************************/ #define IOEXP_MULTIREADBUF(dev,pins,vals,count) \ - ((dev)->ops->ioe_multireadbuf(dev,pin,vals,count)) + ((dev)->ops->ioe_multireadbuf(dev,pins,vals,count)) #endif /* CONFIG_IOEXPANDER_MULTIPIN */ +/**************************************************************************** + * Name: IOEP_ATTACH + * + * Description: + * Attach and enable a pin interrupt callback function. + * + * Input Parameters: + * dev - Device-specific state data + * pinset - The set of pin events that will generate the callback + * callback - The pointer to callback function. NULL will detach the + * callback. + * arg - User-provided callback argument + * + * Returned Value: + * A non-NULL handle value is returned on success. This handle may be + * used later to detach and disable the pin interrupt. + * + ****************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +#define IOEP_ATTACH(dev,pinset,callback,arg) \ + ((dev)->ops->ioe_attach(dev,pinset,callback,arg)) +#endif + +/**************************************************************************** + * Name: IOEP_DETACH + * + * Description: + * Detach and disable a pin interrupt callback function. + * + * Input Parameters: + * dev - Device-specific state data + * handle - The non-NULL opaque value return by IOEP_ATTACH + * + * Returned Value: + * 0 on success, else a negative error code + * + ****************************************************************************/ + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +#define IOEP_DETACH(dev,handle) ((dev)->ops->ioe_detach(dev,handle)) +#endif + /**************************************************************************** * Public Types ****************************************************************************/ +/* This type represents a bitmap of pins */ + +#if CONFIG_IOEXPANDER_NPINS <= 8 +typedef uint8_t ioe_pinset_t; +#elif CONFIG_IOEXPANDER_NPINS <= 16 +typedef uint16_t ioe_pinset_t; +#elif CONFIG_IOEXPANDER_NPINS <= 32 +typedef uint32_t ioe_pinset_t; +#else /* if CONFIG_IOEXPANDER_NPINS <= 64 */ +typedef uint64_t ioe_pinset_t; +#endif + +#ifdef CONFIG_IOEXPANDER_INT_ENABLE +/* This type represents a pin interrupt callback function */ + struct ioexpander_dev_s; +typedef int (*ioe_callback_t)(FAR struct ioexpander_dev_s *dev, + ioe_pinset_t pinset, FAR void *arg); +#endif /* CONFIG_IOEXPANDER_INT_ENABLE */ + +/* I/O expander interface methods */ +struct ioexpander_dev_s; struct ioexpander_ops_s { CODE int (*ioe_direction)(FAR struct ioexpander_dev_s *dev, uint8_t pin, int direction); CODE int (*ioe_option)(FAR struct ioexpander_dev_s *dev, uint8_t pin, - int opt, void *val); + int opt, FAR void *val); CODE int (*ioe_writepin)(FAR struct ioexpander_dev_s *dev, uint8_t pin, bool value); CODE int (*ioe_readpin)(FAR struct ioexpander_dev_s *dev, uint8_t pin, - bool *value); + FAR bool *value); CODE int (*ioe_readbuf)(FAR struct ioexpander_dev_s *dev, uint8_t pin, - bool *value); + FAR bool *value); #ifdef CONFIG_IOEXPANDER_MULTIPIN CODE int (*ioe_multiwritepin)(FAR struct ioexpander_dev_s *dev, - uint8_t *pins, bool *values, int count); + FAR uint8_t *pins, FAR bool *values, + int count); CODE int (*ioe_multireadpin)(FAR struct ioexpander_dev_s *dev, - uint8_t *pins, bool *values, int count); + FAR uint8_t *pins, FAR bool *values, + int count); CODE int (*ioe_multireadbuf)(FAR struct ioexpander_dev_s *dev, - uint8_t *pins, bool *values, int count); + FAR uint8_t *pins, FAR bool *values, + int count); +#endif +#ifdef CONFIG_IOEXPANDER_INT_ENABLE + CODE FAR void *(*ioe_attach)(FAR struct ioexpander_dev_s *dev, + ioe_pinset_t pinset, + ioe_callback_t callback, FAR void *arg); + CODE int (*ioe_detach)(FAR struct ioexpander_dev_s *dev, + FAR void *handle); #endif }; struct ioexpander_dev_s { + /* "Lower half" operations provided by the I/O expander lower half */ + FAR const struct ioexpander_ops_s *ops; -#ifdef CONFIG_IOEXPANDER_INT_ENABLE - struct work_s work; /* Supports the interrupt handling "bottom half" */ - int sigpid; /* PID to be signaled in case of interrupt */ - int sigval; /* Signal to be sent in case of interrupt */ -#endif + + /* Internal storage used by the I/O expander may (internal to the I/O + * expander implementation). + */ }; #endif /* CONFIG_IOEXPANDER */ diff --git a/include/nuttx/ioexpander/pca9555.h b/include/nuttx/ioexpander/pca9555.h index 3a99a7def32b877c0f63a3770e5cd4c67a09e734..151b9fed36a3e7639d7162023fbc5a146a5fc221 100644 --- a/include/nuttx/ioexpander/pca9555.h +++ b/include/nuttx/ioexpander/pca9555.h @@ -69,12 +69,11 @@ struct pca9555_config_s uint8_t address; /* 7-bit I2C address (only bits 0-6 used) */ uint32_t frequency; /* I2C or SPI frequency */ +#ifdef CONFIG_IOEXPANDER_INT_ENABLE /* If multiple PCA9555 devices are supported, then an IRQ number must * be provided for each so that their interrupts can be distinguished. */ -#ifndef CONFIG_PCA9555_INT_DISABLE - #ifdef CONFIG_PCA9555_MULTIPLE int irq; /* IRQ number received by interrupt handler. */ #endif diff --git a/include/nuttx/ioexpander/pcf8574.h b/include/nuttx/ioexpander/pcf8574.h new file mode 100644 index 0000000000000000000000000000000000000000..f8d9bf506589b7e0bff2869954059fb0d3bc75a3 --- /dev/null +++ b/include/nuttx/ioexpander/pcf8574.h @@ -0,0 +1,114 @@ +/**************************************************************************** + * include/nuttx/ioexpander/pcf8574.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 __INCLUDE_NUTTX_IOEXPANDER_PCF8574_H +#define __INCLUDE_NUTTX_IOEXPANDER_PCF8574_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +#ifdef CONFIG_PCF8574_INT_ENABLE +/* This is the type of the PCF8574xx interrupt handler */ + +typedef CODE void (*pcf8574_handler_t)(FAR void *arg); +#endif + +/* A reference to a structure of this type must be passed to the PCF8574xx + * driver when the driver is instantiated. This structure provides + * information about the configuration of the PCF8574xx 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. + */ + +struct pcf8574_config_s +{ + /* Device characterization */ + + uint8_t address; /* 7-bit I2C address (only bits 0-6 used) */ + uint32_t frequency; /* I2C frequency */ + +#ifdef CONFIG_PCF8574_INT_ENABLE + /* IRQ/GPIO access callbacks. These operations all hidden behind + * callbacks to isolate the PCF8574xx driver from differences in GPIO + * interrupt handling by varying boards and MCUs. + * + * attach - Attach the PCF8574xx interrupt handler to the GPIO interrupt + * enable - Enable or disable the GPIO interrupt + */ + + CODE int (*attach)(FAR struct pcf8574_config_s *state, + pcf8574_handler_t handler, FAR void *arg); + CODE void (*enable)(FAR struct pcf8574_config_s *state, bool enable); +#endif +}; + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Name: pcf8574_initialize + * + * Description: + * Instantiate and configure the PCF8574xx device driver to use the provided + * I2C device instance. + * + * Input Parameters: + * i2c - An I2C driver instance + * minor - The device i2c address + * config - Persistent board configuration data + * + * Returned Value: + * an ioexpander_dev_s instance on success, NULL on failure. + * + ****************************************************************************/ + +struct i2c_master_s; +FAR struct ioexpander_dev_s *pcf8574_initialize(FAR struct i2c_master_s *i2c, + FAR struct pcf8574_config_s *config); + +#endif /* __INCLUDE_NUTTX_IOEXPANDER_PCF8574_H */ diff --git a/include/nuttx/ioexpander/tca64xx.h b/include/nuttx/ioexpander/tca64xx.h new file mode 100644 index 0000000000000000000000000000000000000000..077d12d6994db0963e84281c97bea1ae93725b17 --- /dev/null +++ b/include/nuttx/ioexpander/tca64xx.h @@ -0,0 +1,130 @@ +/**************************************************************************** + * include/nuttx/ioexpander/tca64xx.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * This header file derives, in part, from the Project Ara TCA64xx driver + * which has this copyright: + * + * Copyright (c) 2014-2015 Google Inc. + * 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 of the copyright holder 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 HOLDER 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_IOEXPANDER_TCA64XX_H +#define __INCLUDE_NUTTX_IOEXPANDER_TCA64XX_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/* Identifies supported TCA64xx parts (as well as the number of supported + * parts). + */ + +enum tca64xx_part_e +{ + TCA6408_PART = 0, + TCA6416_PART, + TCA6424_PART, + TCA64_NPARTS +}; + +#ifdef CONFIG_TCA64XX_INT_ENABLE +/* This is the type of the TCA64xx interrupt handler */ + +typedef CODE void (*tca64_handler_t)(FAR void *arg); +#endif + +/* A reference to a structure of this type must be passed to the TCA64xx + * driver when the driver is instantiated. This structure provides + * information about the configuration of the TCA64xx 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. + */ + +struct tca64_config_s +{ + /* Device characterization */ + + uint8_t address; /* 7-bit I2C address (only bits 0-6 used) */ + uint8_t part; /* See enum tca64xx_part_e */ + uint32_t frequency; /* I2C or SPI frequency */ + +#ifdef CONFIG_TCA64XX_INT_ENABLE + /* IRQ/GPIO access callbacks. These operations all hidden behind + * callbacks to isolate the TCA64xx driver from differences in GPIO + * interrupt handling by varying boards and MCUs. + * + * attach - Attach the TCA64xx interrupt handler to the GPIO interrupt + * enable - Enable or disable the GPIO interrupt + */ + + CODE int (*attach)(FAR struct tca64_config_s *state, + tca64_handler_t handler, FAR void *arg); + CODE void (*enable)(FAR struct tca64_config_s *state, bool enable); +#endif +}; + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Name: tca64_initialize + * + * Description: + * Instantiate and configure the TCA64xx device driver to use the provided + * I2C device instance. + * + * Input Parameters: + * i2c - An I2C driver instance + * minor - The device i2c address + * config - Persistent board configuration data + * + * Returned Value: + * an ioexpander_dev_s instance on success, NULL on failure. + * + ****************************************************************************/ + +struct i2c_master_s; +FAR struct ioexpander_dev_s *tca64_initialize(FAR struct i2c_master_s *i2c, + FAR struct tca64_config_s *config); + +#endif /* __INCLUDE_NUTTX_IOEXPANDER_TCA64XX_H */ diff --git a/include/nuttx/lib/xorshift128.h b/include/nuttx/lib/xorshift128.h new file mode 100644 index 0000000000000000000000000000000000000000..b2eec4fc2b8e821c2190c96554f049ed9a4c8ee1 --- /dev/null +++ b/include/nuttx/lib/xorshift128.h @@ -0,0 +1,110 @@ +/**************************************************************************** + * include/nuttx/lib/xorshift128.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: David S. Alessio + * + * 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 random number generator is simple, fast and portable. + * Ref: https://en.wikipedia.org/wiki/Xorshift + */ + +#ifndef __INCLUDE_NUTTX_LIB_XORSHIFT128_H +#define __INCLUDE_NUTTX_LIB_XORSHIFT128_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Default XorShift128 state initializer */ + +#define XORSHIFT128_INITIALIZER { 97, 101, 97 << 17, 101 << 25 } + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/* Provides the state of the XorShift128 PRNG */ + +struct xorshift128_state_s +{ + uint32_t x; + uint32_t y; + uint32_t z; + uint32_t w; +}; + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Name: xorshift128 + * + * Description: + * Generate one 32-bit pseudo-random number. + * + * NOTE: Because the PRNG state is passed as a parameter, this function is + * fully re-entrant and may be called from an interrupt handler. + * + * The downside to this is that users of the PRNG might not get as much + * entropy as if it were a common state structure. + * + * Input Parameters: + * state - The current XorShift128 state. + * + * Returned Value: + * The generated pseudo-random number + * + ****************************************************************************/ + +uint32_t xorshift128(FAR struct xorshift128_state_s *state); + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __INCLUDE_NUTTX_LIB_XORSHIFT128_H */ diff --git a/include/nuttx/mtd/mtd.h b/include/nuttx/mtd/mtd.h index 566f75b314104c17340df333d8caba9e486c792a..d0b8ab3ed73ec1ec91455ac2c2a391d4bfca712f 100644 --- a/include/nuttx/mtd/mtd.h +++ b/include/nuttx/mtd/mtd.h @@ -515,7 +515,7 @@ FAR struct mtd_dev_s *w25_initialize(FAR struct spi_dev_s *dev); * Name: s25fl1_initialize * * Description: - * Create an initialize MTD device instance for the QuadSPI-based ST24FL1 + * Create an initialized MTD device instance for the QuadSPI-based ST24FL1 * FLASH part. * ****************************************************************************/ @@ -524,11 +524,22 @@ struct qspi_dev_s; /* Forward reference */ FAR struct mtd_dev_s *s25fl1_initialize(FAR struct qspi_dev_s *qspi, bool unprotect); +/**************************************************************************** + * Name: mx25l_initialize_spi + * + * Description: + * Create an initialized MTD device instance for the SPI-based MX25Lx + * FLASH part. + * + ****************************************************************************/ + +FAR struct mtd_dev_s *mx25l_initialize_spi(FAR struct spi_dev_s *dev); + /**************************************************************************** * Name: n25qxxx_initialize * * Description: - * Create an initialize MTD device instance for the QuadSPI-based N25Qxxx + * Create an initialized MTD device instance for the QuadSPI-based N25Qxxx * FLASH part from Micron. * ****************************************************************************/ diff --git a/include/nuttx/poff.h b/include/nuttx/poff.h index cda48805e4d41f19879593c34f65bb6d4d28c8e1..8b689df7fd2e9092b75061a09b7600c061f6c6b9 100644 --- a/include/nuttx/poff.h +++ b/include/nuttx/poff.h @@ -34,8 +34,8 @@ * ****************************************************************************/ -#ifndef __INCLUDE_NUXX_POFF_H -#define __INCLUDE_NUXX_POFF_H +#ifndef __INCLUDE_NUTTX_POFF_H +#define __INCLUDE_NUTTX_POFF_H /**************************************************************************** * Included Files @@ -432,4 +432,4 @@ struct poff_debugarginfo_s typedef struct poff_debugarginfo_s poff_debugarginfo_t; -#endif /* __INCLUDE_NUXX_POFF_H */ +#endif /* __INCLUDE_NUTTX_POFF_H */ diff --git a/include/nuttx/power/relay.h b/include/nuttx/power/relay.h index b1c32028b6ce5a200e7a9610a0efd2973b5b0442..8b450ea012447b94b99be2fe87bd5c5819b4c562 100644 --- a/include/nuttx/power/relay.h +++ b/include/nuttx/power/relay.h @@ -34,8 +34,8 @@ * ****************************************************************************/ -#ifndef __CONFIGS_NUTTX_INCLUDE_RELAY_H -#define __CONFIGS_NUTTX_INCLUDE_RELAY_H +#ifndef __INCLUDE_NUTTX_POWER_RELAY_H +#define __INCLUDE_NUTTX_POWER_RELAY_H /**************************************************************************** * Included Files @@ -62,4 +62,4 @@ * Public Types ****************************************************************************/ -#endif /* __CONFIGS_NUTTX_INCLUDE_RELAY_H */ +#endif /* __INCLUDE_NUTTX_POWER_RELAY_H */ diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h index 724be425cad13d26132babeebf741c0428924335..4d7bb88f11f00aff1c8369aa0916d55c10b70d3c 100644 --- a/include/nuttx/sched.h +++ b/include/nuttx/sched.h @@ -422,12 +422,23 @@ struct task_group_s # endif #endif -#if defined(CONFIG_SCHED_HAVE_PARENT) && defined(CONFIG_SCHED_CHILD_STATUS) +#ifdef CONFIG_SCHED_HAVE_PARENT /* Child exit status **********************************************************/ +#ifdef CONFIG_SCHED_CHILD_STATUS FAR struct child_status_s *tg_children; /* Head of a list of child status */ #endif +#ifndef HAVE_GROUP_MEMBERS + /* REVISIT: What if parent thread exits? Should use tg_pgid. */ + + pid_t tg_ppid; /* This is the ID of the parent thread */ +#ifndef CONFIG_SCHED_CHILD_STATUS + uint16_t tg_nchildren; /* This is the number active children */ +#endif +#endif /* HAVE_GROUP_MEMBERS */ +#endif /* CONFIG_SCHED_HAVE_PARENT */ + #if defined(CONFIG_SCHED_WAITPID) && !defined(CONFIG_SCHED_HAVE_PARENT) /* waitpid support ************************************************************/ /* Simple mechanism used only when there is no support for SIGCHLD */ @@ -537,16 +548,6 @@ struct tcb_s /* Task Management Fields *****************************************************/ pid_t pid; /* This is the ID of the thread */ - -#ifdef CONFIG_SCHED_HAVE_PARENT /* Support parent-child relationship */ -#ifndef HAVE_GROUP_MEMBERS /* Don't know pids of group members */ - pid_t ppid; /* This is the ID of the parent thread */ -#ifndef CONFIG_SCHED_CHILD_STATUS /* Retain child thread status */ - uint16_t nchildren; /* This is the number active children */ -#endif -#endif -#endif /* CONFIG_SCHED_HAVE_PARENT */ - start_t start; /* Thread start function */ entry_t entry; /* Entry Point into the thread */ uint8_t sched_priority; /* Current priority of the thread */ diff --git a/include/nuttx/sensors/bh1750fvi.h b/include/nuttx/sensors/bh1750fvi.h index 4d5ae017c937e6e482e02f9f90ee5b8c75e464db..d7722ea209a9bc7adf9385bfdc5c41cc2a83f6fb 100644 --- a/include/nuttx/sensors/bh1750fvi.h +++ b/include/nuttx/sensors/bh1750fvi.h @@ -43,6 +43,7 @@ #include #include +#include #if defined(CONFIG_BH1750FVI) @@ -50,17 +51,7 @@ * Pre-processor Definitions ****************************************************************************/ -/* IOCTL Commands ***********************************************************/ - -#define SNIOC_CHRM _SNIOC(0x0001) /* Contin. H-Res Mode Arg: None */ -#define SNIOC_CHRM2 _SNIOC(0x0002) /* Contin. H-Res Mode2 Arg: None */ -#define SNIOC_CLRM _SNIOC(0x0003) /* Contin. L-Res Mode Arg: None */ -#define SNIOC_OTHRM _SNIOC(0x0004) /* One Time H-Res Mode Arg: None */ -#define SNIOC_OTHRM2 _SNIOC(0x0005) /* One Time H-Res Mode2 Arg: None */ -#define SNIOC_OTLRM _SNIOC(0x0006) /* One Time L-Res Mode Arg: None */ -#define SNIOC_CHMEATIME _SNIOC(0x0007) /* Change Meas. Time Arg: uint8_t */ - -/* Device I2C Address*/ +/* Device I2C Address */ #define BH1750FVI_I2C_ADDR 0x23 diff --git a/include/nuttx/sensors/bmg160.h b/include/nuttx/sensors/bmg160.h new file mode 100644 index 0000000000000000000000000000000000000000..a34c9e3ba0ffee9aac89e38840760f579de3b005 --- /dev/null +++ b/include/nuttx/sensors/bmg160.h @@ -0,0 +1,440 @@ +/******************************************************************************************** + * include/nuttx/sensors/bmg160.h + * + * Copyright (C) 2016 DS-Automotion GmbH. All rights reserved. + * Author: Alexander Entinger + * Thomas Ilk + * + * 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_SENSORS_BMG160_H +#define __INCLUDE_NUTTX_SENSORS_BMG160_H + +/******************************************************************************************** + * Included Files + ********************************************************************************************/ + +#include +#include +#include +#include + +#if defined(CONFIG_SPI) && defined(CONFIG_BMG160) + +/******************************************************************************************** + * Pre-processor Definitions + ********************************************************************************************/ + +/* BMG160 Register Definitions **************************************************************/ + +/* Chip ID */ + +#define BMG160_CHIP_ID_REG (0x00) /* Contains the chip identification code */ + +/* Data Register */ + +#define BMG160_RATE_X_LSB_REG (0x02) +#define BMG160_RATE_X_MSB_REG (0x03) +#define BMG160_RATE_Y_LSB_REG (0x04) +#define BMG160_RATE_Y_MSB_REG (0x05) +#define BMG160_RATE_Z_LSB_REG (0x06) +#define BMG160_RATE_Z_MSB_REG (0x07) +#define BMG160_TEMP_REG (0x08) + +/* Status Register */ + +#define BMG160_INT_STATUS_0_REG (0x09) /* Contains interrupt status bits */ +#define BMG160_INT_STATUS_1_REG (0x0A) /* Contains interrupt status bits */ +#define BMG160_INT_STATUS_2_REG (0x0B) /* Contains any motion interrupt status bits */ +#define BMG160_INT_STATUS_3_REG (0x0C) /* Contains high rate interrupt status bits */ +#define BMG160_FIFO_STATUS_REG (0x0E) /* Contains FIFO status flags */ + +/* Control Register */ + +#define BMG160_RANGE_REG (0x0F) /* enables to select FSR */ +#define BMG160_BW_REG (0x10) /* enables to select ODR */ +#define BMG160_LPM1_REG (0x11) /* Selection of the main power modes */ +#define BMG160_LPM2_REG (0x12) /* Configuration settings for fast power-up and external trigger */ +#define BMG160_RATE_HBW_REG (0x13) /* Angular rate data acquisition and data output format */ +#define BMG160_BGW_SOFTRESET_REG (0x14) /* Controls user triggered reset of the sensor */ + +/* Interrupt Status Register */ + +#define BMG160_INT_EN_0_REG (0x15) /* Controls which interrupts are enabled */ +#define BMG160_INT_EN_1_REG (0x16) /* Contains interrupt pin configuration */ +#define BMG160_INT_MAP_0_REG (0x17) /* Controls which interrupt signals are mapped to the INT1 pin */ +#define BMG160_INT_MAP_1_REG (0x18) /* Controls which interrupt signals are mapped to the INT1 pin and INT2 pin */ +#define BMG160_INT_MAP_2_REG (0x19) /* Controls which interrupt signals are mapped to the INT2 pin */ +#define BMG160_INT_ZERO_REG (0x1A) /* Contains the data source definition of those interrupts with selectable data source */ +#define BMG160_INT_ONE_REG (0x1B) /* Contains the data source definition of fast offset compensation and the any motion threshold */ +#define BMG160_INT_TWO_REG (0x1C) /* Contains the any motion configuration for x-, y- and z-axis */ +#define BMG160_INT_FOUR_REG (0x1E) +#define BMG160_INT_RST_LATCH_REG (0x21) /* Contains the interrupt reset bit and the interrupt mode selection */ + +/* Interrupt High Rate Configuration Register */ + +#define BMG160_HIGH_TH_X_REG (0x22) /* Contains the high rate threshold and high rate hysteresis setting for the x-axis */ +#define BMG160_HIGH_DUR_X_REG (0x23) /* Contains high rate duration setting for the x-axis */ +#define BMG160_HIGH_TH_Y_REG (0x24) /* Contains the high rate threshold and high rate hysteresis setting for the y-axis */ +#define BMG160_HIGH_DUR_Y_REG (0x25) /* Contains high rate duration setting for the y-axis */ +#define BMG160_HIGH_TH_Z_REG (0x26) /* Contains the high rate threshold and high rate hysteresis setting for the z-axis */ +#define BMG160_HIGH_DUR_Z_REG (0x27) /* Contains high rate duration setting for the z-axis */ + +/* Offset Register */ + +#define BMG160_SOC_REG (0x31) /* Contains the slow offset cancellation setting */ +#define BMG160_FOC_REG (0x32) /* Contains the fast offset cancellation setting */ + +/* NVM Control Register */ + +#define BMG160_TRIM_NVM_CTRL_REG (0x33) /* Contains the control settings for the few-time programmable non-volatile memory (NVM) */ + +/* Digital Interface Register */ + +#define BMG160_BGW_SPI3_WDT_REG (0x34) /* Contains settings for the digital interfaces */ + +/* Offset Configuration Register */ + +#define BMG160_OFC1_REG (0x36) /* Contains offset compensation values */ +#define BMG160_OFC2_REG (0x37) /* Contains offset compensation values for X-channel */ +#define BMG160_OFC3_REG (0x38) /* Contains offset compensation values for Y-channel */ +#define BMG160_OFC4_REG (0x39) /* Contains offset compensation values for Z-channel */ +#define BMG160_TRIM_GP0_REG (0x3A) /* Contains general purpose data register with NVM back-up */ +#define BMG160_TRIM_GP1_REG (0x3B) /* Contains general purpose data register with NVM back-up */ + +/* Self-test Register */ + +#define BMG160_BIST_REG (0x3C) /* Contains Built in Self-Test possibilities */ + +/* FIFO Register */ + +#define BMG160_FIFO_CONFIG_0_REG (0x3D) /* Contains the FIFO watermark level */ +#define BMG160_FIFO_CONFIG_1_REG (0x3E) /* Contains FIFO configuration settings. The FIFO buffer memory is cleared and + * the FIFO-full flag cleared when writing to FIFO_CONFIG_1 register */ +#define BMG160_FIFO_DATA_REG (0x3F) /* FIFO data readout register */ + +/* Control Register Definitions *************************************************************/ + +/* BMG160 RANGE_REG Definitions */ + +#define BMG160_RANGE_REG_FSR_0_bm (1 << 0) /* Full scale selection bit 0 */ +#define BMG160_RANGE_REG_FSR_1_bm (1 << 1) /* Full scale selection bit 1 */ +#define BMG160_RANGE_REG_FSR_2_bm (1 << 2) /* Full scale selection bit 2 */ +#define BMG160_RANGE_REG_FIX_VAL_bm (1 << 7) /* write 1 to 7th bit of Range Register */ + +/* BMG160 BW_REG Definitions */ + +#define BMG160_BW_REG_ODR_0_bm (1 << 0) /* Output data rate selection bit 0 */ +#define BMG160_BW_REG_ODR_1_bm (1 << 1) /* Output data rate selection bit 1 */ +#define BMG160_BW_REG_ODR_2_bm (1 << 2) /* Output data rate selection bit 2 */ + +/* BMG160 LPM1_REG Definitions */ + +#define BMG160_LPM1_REG_SP_bm (1 << 7) /* active suspend mode */ +#define BMG160_LPM1_REG_D_SP_bm (1 << 5) /* active deep suspend mode */ +#define BMG160_LPM1_REG_S_DUR_0_bm (1 << 1) /* Sleep duration selection bit 0 */ +#define BMG160_LPM1_REG_S_DUR_1_bm (1 << 2) /* Sleep duration selection bit 1 */ +#define BMG160_LPM1_REG_S_DUR_2_bm (1 << 3) /* Sleep duration selection bit 2 */ + +/* BMG160 LPM1_REG Definitions */ + +#define BMG160_LPM1_REG_AS_DUR_0_bm (1 << 0) /* Auto sleep duration selection bit 0 */ +#define BMG160_LPM1_REG_AS_DUR_1_bm (1 << 1) /* Auto sleep duration selection bit 1 */ +#define BMG160_LPM1_REG_AS_DUR_2_bm (1 << 2) /* Auto sleep duration selection bit 2 */ +#define BMG160_LPM1_REG_E_T_S_0_bm (1 << 4) /* External trigger selection bit 0 */ +#define BMG160_LPM1_REG_E_T_S_1_bm (1 << 5) /* External trigger selection bit 1 */ +#define BMG160_LPM1_REG_P_S_M_bm (1 << 6) /* Power save mode */ +#define BMG160_LPM1_REG_FAST_PU_bm (1 << 7) /* Fast power-up mode */ + +/* BMG160 RATE_HBW_REG Definitions */ + +#define BMG160_HBW_REG_DATA_HIGH_BW_bm (1 << 7) /* Enable unfiltered data reading */ +#define BMG160_HBW_REG_SHW_DIS_bm (1 << 6) /* Disable shadow mechanism for the rate data output register */ + + +/* Interrupt Status Register Definitions ****************************************************/ + +/* BMG160 INT_EN_0_REG Definitions */ + +#define BMG160_INT_EN_0_REG_DATA_EN_bm (1 << 7) /* Enable new data interrupt */ +#define BMG160_INT_EN_0_REG_FIFO_EN_bm (1 << 6) /* Enable FIFO interrupt */ +#define BMG160_INT_EN_0_REG_AUTO_OFF_EN_bm (1 << 1) /* Enable auto-offset compensation */ + +/* BMG160 INT_EN_1_REG Definitions */ + +#define BMG160_INT_EN_1_REG_INT2_OD_bm (1 << 3) /* Select open drive for INT2 */ +#define BMG160_INT_EN_1_REG_INT2_LVL_bm (1 << 2) /* Select active level '1' for INT2 */ +#define BMG160_INT_EN_1_REG_INT1_OD_bm (1 << 1) /* Select open drive for INT1 */ +#define BMG160_INT_EN_1_REG_INT1_LVL_bm (1 << 0) /* Select active level '1' for INT1 */ + +/* BMG160 INT_MAP_0_REG Definitions */ + +#define BMG160_INT_MAP_0_REG_INT1_HIGH_bm (1 << 3) /* Map high rate interrupt to INT1 pin */ +#define BMG160_INT_MAP_0_REG_INT1_ANY_bm (1 << 1) /* Map Any-Motion to INT1 pin */ + +/* BMG160 INT_MAP_1_REG Definitions */ + +#define BMG160_INT_MAP_1_REG_INT2_DATA_bm (1 << 7) /* Map new data interrupt to INT2 pin */ +#define BMG160_INT_MAP_1_REG_INT2_Fast_OFF_bm (1 << 6) /* Map Fast Offset interrupt to INT2 pin */ +#define BMG160_INT_MAP_1_REG_INT2_FIFO_bm (1 << 5) /* Map FIFO interrupt to INT2 pin */ +#define BMG160_INT_MAP_1_REG_INT2_AUTO_OFF_bm (1 << 4) /* Map Auto Offset tap interrupt to INT2 pin */ +#define BMG160_INT_MAP_1_REG_INT1_AUTO_OFF_bm (1 << 3) /* Map Auto Offset tap interrupt to INT1 pin */ +#define BMG160_INT_MAP_1_REG_INT1_FIFO_bm (1 << 2) /* Map FIFO interrupt to INT1 pin */ +#define BMG160_INT_MAP_1_REG_INT1_Fast_OFF_bm (1 << 1) /* Map Fast Offset interrupt to INT1 pin */ +#define BMG160_INT_MAP_1_REG_INT1_DATA_bm (1 << 0) /* Map new data interrupt to INT1 pin */ + +/* BMG160 INT_MAP_2_REG Definitions */ + +#define BMG160_INT_MAP_0_REG_INT2_HIGH_bm (1 << 3) /* Map high rate interrupt to INT2 pin */ +#define BMG160_INT_MAP_0_REG_INT2_ANY_bm (1 << 1) /* Map Any-Motion to INT2 pin */ + +/* BMG160 INT_ZERO_REG Definitions */ + +#define BMG160_INT_ZERO_REG_SLOW_OFF_UN_bm (1 << 5) /* Selects unfiltered data for slow offset compensation */ +#define BMG160_INT_ZERO_REG_HIGH_UN_D_bm (1 << 3) /* Selects unfiltered data for high rate interrupt */ +#define BMG160_INT_ZERO_REG_ANY_UN_D_bm (1 << 1) /* Selects unfiltered data for any motion interrupt + +/* BMG160 INT_ONE_REG Definitions */ + +#define BMG160_INT_ONE_REG_FAST_OFF_UN_bm (1 << 7) /* Selects unfiltered data for fast offset compensation */ + +/* BMG160 INT_TWO_REG Definitions */ + +#define BMG160_INT_TWO_REG_ANY_EN_Z_bm (1 << 2) /* Enables any motion interrupt for z-axis */ +#define BMG160_INT_TWO_REG_ANY_EN_Y_bm (1 << 1) /* Enables any motion interrupt for y-axis */ +#define BMG160_INT_TWO_REG_ANY_EN_X_bm (1 << 0) /* Enables any motion interrupt for x-axis */ + +/* BMG160 INT_FOUR_REG Definitions */ + +#define BMG160_INT_FOUR_REG_FIFO_WM_EN_bm (1 << 2) /* Enables fifo water mark level interrupt + +/* BMG160 INT_RST_LATCH_REG Definitions */ + +#define BMG160_INT_RST_LATCH_REG_RST_INT_bm (1 << 7) /* Clears any latched interrupts */ +#define BMG160_INT_RST_LATCH_REG_OFF_RST_bm (1 << 6) /* Resets the Offset value calculated with Fast-, Slow- and AutoOffset */ +#define BMG160_INT_RST_LATCH_REG_LATCH_STAT_bm (1 << 4) +#define BMG160_INT_RST_LATCH_REG_LATCH_INT_3_bm (1 << 3) /* Latch mode selection bit 3 */ +#define BMG160_INT_RST_LATCH_REG_LATCH_INT_2_bm (1 << 2) /* Latch mode selection bit 2 */ +#define BMG160_INT_RST_LATCH_REG_LATCH_INT_1_bm (1 << 1) /* Latch mode selection bit 1 */ +#define BMG160_INT_RST_LATCH_REG_LATCH_INT_0_bm (1 << 0) /* Latch mode selection bit 0 */ + +/* Interupt High Rate Configuration Register Definitions ************************************/ + +/* BMG160 HIGH_TH_X_REG Definitions */ + +#define BMG160_HIGH_TH_X_REG_HY_X_1_bm (1 << 7) +#define BMG160_HIGH_TH_X_REG_HY_X_0_bm (1 << 6) +#define BMG160_HIGH_TH_X_REG_TH_X_4_bm (1 << 5) +#define BMG160_HIGH_TH_X_REG_TH_X_3_bm (1 << 4) +#define BMG160_HIGH_TH_X_REG_TH_X_2_bm (1 << 3) +#define BMG160_HIGH_TH_X_REG_TH_X_1_bm (1 << 2) +#define BMG160_HIGH_TH_X_REG_TH_X_0_bm (1 << 1) +#define BMG160_HIGH_TH_X_REG_EN_X_1_bm (1 << 0) /* Enables high rate interrupt for x-axis */ + +/* BMG160 HIGH_DUR_X_REG Definitions */ + +#define BMG160_HIGH_DUR_X_REG_7_bm (1 << 7) +#define BMG160_HIGH_DUR_X_REG_6_bm (1 << 6) +#define BMG160_HIGH_DUR_X_REG_5_bm (1 << 5) +#define BMG160_HIGH_DUR_X_REG_4_bm (1 << 4) +#define BMG160_HIGH_DUR_X_REG_3_bm (1 << 3) +#define BMG160_HIGH_DUR_X_REG_2_bm (1 << 2) +#define BMG160_HIGH_DUR_X_REG_1_bm (1 << 1) +#define BMG160_HIGH_DUR_X_REG_0_bm (1 << 0) + +/* BMG160 HIGH_TH_Y_REG Definitions */ + +#define BMG160_HIGH_TH_Y_REG_HY_Y_1_bm (1 << 7) +#define BMG160_HIGH_TH_Y_REG_HY_Y_0_bm (1 << 6) +#define BMG160_HIGH_TH_Y_REG_TH_Y_4_bm (1 << 5) +#define BMG160_HIGH_TH_Y_REG_TH_Y_3_bm (1 << 4) +#define BMG160_HIGH_TH_Y_REG_TH_Y_2_bm (1 << 3) +#define BMG160_HIGH_TH_Y_REG_TH_Y_1_bm (1 << 2) +#define BMG160_HIGH_TH_Y_REG_TH_Y_0_bm (1 << 1) +#define BMG160_HIGH_TH_Y_REG_EN_Y_1_bm (1 << 0) /* Enables high rate interrupt for Y-axis */ + +/* BMG160 HIGH_DUR_Y_REG Definitions */ + +#define BMG160_HIGH_DUR_Y_REG_7_bm (1 << 7) +#define BMG160_HIGH_DUR_Y_REG_6_bm (1 << 6) +#define BMG160_HIGH_DUR_Y_REG_5_bm (1 << 5) +#define BMG160_HIGH_DUR_Y_REG_4_bm (1 << 4) +#define BMG160_HIGH_DUR_Y_REG_3_bm (1 << 3) +#define BMG160_HIGH_DUR_Y_REG_2_bm (1 << 2) +#define BMG160_HIGH_DUR_Y_REG_1_bm (1 << 1) +#define BMG160_HIGH_DUR_Y_REG_0_bm (1 << 0) + +/* BMG160 HIGH_TH_Z_REG Definitions */ + +#define BMG160_HIGH_TH_Z_REG_HY_Z_1_bm (1 << 7) +#define BMG160_HIGH_TH_Z_REG_HY_Z_0_bm (1 << 6) +#define BMG160_HIGH_TH_Z_REG_TH_Z_4_bm (1 << 5) +#define BMG160_HIGH_TH_Z_REG_TH_Z_3_bm (1 << 4) +#define BMG160_HIGH_TH_Z_REG_TH_Z_2_bm (1 << 3) +#define BMG160_HIGH_TH_Z_REG_TH_Z_1_bm (1 << 2) +#define BMG160_HIGH_TH_Z_REG_TH_Z_0_bm (1 << 1) +#define BMG160_HIGH_TH_Z_REG_EN_Z_1_bm (1 << 0) /* Enables high rate interrupt for Z-axis */ + +/* BMG160 HIGH_DUR_Z_REG Definitions */ + +#define BMG160_HIGH_DUR_Z_REG_7_bm (1 << 7) +#define BMG160_HIGH_DUR_Z_REG_6_bm (1 << 6) +#define BMG160_HIGH_DUR_Z_REG_5_bm (1 << 5) +#define BMG160_HIGH_DUR_Z_REG_4_bm (1 << 4) +#define BMG160_HIGH_DUR_Z_REG_3_bm (1 << 3) +#define BMG160_HIGH_DUR_Z_REG_2_bm (1 << 2) +#define BMG160_HIGH_DUR_Z_REG_1_bm (1 << 1) +#define BMG160_HIGH_DUR_Z_REG_0_bm (1 << 0) + +/* Offset Register Definitions **************************************************************/ + +/* BMG160 SOC_REG */ + +#define BMG160_SOC_REG_SLOW_OFF_EN_Z_bm (1 << 2) /* Enables slow offset compensation for z-axis */ +#define BMG160_SOC_REG_SLOW_OFF_EN_Y_bm (1 << 1) /* Enables slow offset compensation for y-axis */ +#define BMG160_SOC_REG_SLOW_OFF_EN_X_bm (1 << 0) /* Enables slow offset compensation for x-axis */ + +/* BMG160 FOC_REG */ + +#define BMG160_FOC_REG_FAST_OFF_EN_bm (1 << 2) /* Triggers the fast offset compensation for the enabled axes */ +#define BMG160_FOC_REG_FAST_OFF_EN_Z_bm (1 << 2) /* Enables fast offset compensation for z-axis */ +#define BMG160_FOC_REG_FAST_OFF_EN_Y_bm (1 << 1) /* Enables fast offset compensation for y-axis */ +#define BMG160_FOC_REG_FAST_OFF_EN_X_bm (1 << 0) /* Enables fast offset compensation for x-axis */ + +/* NVM Control Register Definitions *********************************************************/ + +/* BMG160 TRIM_NVM_CTRL_REG */ + +#define BMG160_TRIM_NVM_CTRL_REG_NVM_LOAD_bm (1 << 3) /* Triggers an update of all config registers form NVM, + * the NVM_RDY flag must be '1' prior to triggering the update */ +#define BMG160_TRIM_NVM_CTRL_REG_NVM_PROG_TRIG_bm (1 << 1) /* Triggers an NVM write operation; (see page 59, data sheet) + * the NVM_RDY flag must be '1' prior to triggering the update */ +#define BMG160_TRIM_NVM_CTRL_REG_NVM_PROG_MODE_bm (1 << 0) /* unlock NVM write operation */ + +/* Digital Interface Register Definitions ***************************************************/ + +/* BMG160 BGW_SPI3_WDT_REG */ + +#define BMG160_BGW_SPI3_WDT_REG_I2C_WDT_EN_bm (1 << 2) /* Enables watchdog at the SDA pin if I2C mode is selected */ +#define BMG160_BGW_SPI3_WDT_REG_I2C_WDT_SEL_bm (1 << 1) /* Select an I2C watchdog timer period of 50ms */ +#define BMG160_BGW_SPI3_WDT_REG_SPI3_bm (1 << 0) /* Enable 3-wire SPI mode */ + +/* Offset Configuration Register Definitions ************************************************/ + +/* FIFO Register Definitions ****************************************************************/ + +/* BMG160 FIFO_CONFIG_0_REG */ + +#define BMG160_FIFO_CONFIG_0_REG_TAG_bm (1 << 7) /* Enables FIFO tag (interrupt) */ + +/* BMG160 FIFO_CONFIG_1_REG */ + +#define BMG160_FIFO_CONFIG_1_REG_MODE_1_bm (1 << 7) /* FIFO mode selection bit 1 */ +#define BMG160_FIFO_CONFIG_1_REG_MODE_0_bm (1 << 6) /* FIFO mode selection bit 0 */ +#define BMG160_FIFO_CONFIG_1_REG_DATA_SEL_1_bm (1 << 1) /* FIFO data selection bit 1 */ +#define BMG160_FIFO_CONFIG_1_REG_DATA_SEL_0_bm (1 << 0) /* FIFO data selection bit 0 */ + +/* SPI BUS PARAMETERS ***********************************************************************/ + +#define BMG160_SPI_FREQUENCY (4000000) /* 4 MHz */ +#define BMG160_SPI_MODE (SPIDEV_MODE3) /* Device uses SPI Mode 3: CPOL=1, CPHA=1 */ + +/******************************************************************************************** + * Public Types + ********************************************************************************************/ + +/* A reference to a structure of this type must be passed to the BMG160 + * driver. This structure provides information about the configuration + * of the sensor 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. + */ + +struct bmg160_config_s +{ + /* Since multiple BMG160 can be connected to the same SPI bus we need + * to use multiple spi device ids which are employed by NuttX to select/ + * deselect the desired BMG160 chip via their chip select inputs. + */ + + int spi_devid; + + /* The IRQ number must be provided for each BMG160 device so that + * their interrupts can be distinguished. + */ + + int irq; + + /* Attach the BMG160 interrupt handler to the GPIO interrupt of the + * concrete BMG160 instance. + */ + + int (*attach)(FAR struct bmg160_config_s *, xcpt_t); +}; + +/******************************************************************************************** + * Public Function Prototypes + ********************************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/******************************************************************************************** + * Name: bmg160_register + * + * Description: + * Register the BMG160 character device as 'devpath' + * + * Input Parameters: + * devpath - The full path to the driver to register. E.g., "/dev/gyr0" + * spi - An instance of the SPI interface to use to communicate with BMG160 + * config - configuration for the BMG160 driver. For details see description above. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ********************************************************************************************/ + +int bmg160_register(FAR const char *devpath, FAR struct spi_dev_s *spi, + FAR struct bmg160_config_s *config); + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* CONFIG_SPI && CONFIG_BMG160 */ +#endif /* __INCLUDE_NUTTX_SENSORS_BMG160_H */ diff --git a/include/nuttx/sensors/bmp180.h b/include/nuttx/sensors/bmp180.h index 9a2d21d839d5b059c2399ca0cd7b59c744054383..5bdb86fe21233981f59b6ee14f667c7b606665f5 100644 --- a/include/nuttx/sensors/bmp180.h +++ b/include/nuttx/sensors/bmp180.h @@ -33,8 +33,8 @@ * ********************************************************************************************/ -#ifndef __DRIVERS_SENSORS_BMP180_H -#define __DRIVERS_SENSORS_BMP180_H +#ifndef __INCLUDE_NUTTX_SENSORS_BMP180_H +#define __INCLUDE_NUTTX_SENSORS_BMP180_H #include @@ -97,4 +97,4 @@ int bmp180_register(FAR const char *devpath, FAR struct i2c_master_s *i2c); #endif #endif /* CONFIG_I2C && CONFIG_BMP180 */ -#endif /* __DRIVERS_BMP180_H */ +#endif /* __INCLUDE_NUTTX_SENSORS_BMP180_H */ diff --git a/include/nuttx/sensors/ioctl.h b/include/nuttx/sensors/ioctl.h new file mode 100644 index 0000000000000000000000000000000000000000..036042a926b1f3afd3b5c6208e54859b65bfa105 --- /dev/null +++ b/include/nuttx/sensors/ioctl.h @@ -0,0 +1,118 @@ +/**************************************************************************** + * include/nuttx/input/ioctl.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: 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. + * + ****************************************************************************/ + +#ifndef __INCLUDE_NUTTX_SENSORS_IOCTL_H +#define __INCLUDE_NUTTX_SENSORS_IOCTL_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* IOCTL commands unique to the BH1750FVI */ + +#define SNIOC_CHRM _SNIOC(0x0001) /* Contin. H-Res Mode Arg: None */ +#define SNIOC_CHRM2 _SNIOC(0x0002) /* Contin. H-Res Mode2 Arg: None */ +#define SNIOC_CLRM _SNIOC(0x0003) /* Contin. L-Res Mode Arg: None */ +#define SNIOC_OTHRM _SNIOC(0x0004) /* One Time H-Res Mode Arg: None */ +#define SNIOC_OTHRM2 _SNIOC(0x0005) /* One Time H-Res Mode2 Arg: None */ +#define SNIOC_OTLRM _SNIOC(0x0006) /* One Time L-Res Mode Arg: None */ +#define SNIOC_CHMEATIME _SNIOC(0x0007) /* Change Meas. Time Arg: uint8_t */ + +/* IOCTL commands unique to the KXJT9 */ + +#define SNIOC_ENABLE _SNIOC(0x0008) /* Arg: None */ +#define SNIOC_DISABLE _SNIOC(0x0009) /* Arg: None */ +#define SNIOC_CONFIGURE _SNIOC(0x000a) /* Arg: enum kxtj9_odr_e value */ + +/* IOCTL commands common to the LM75, LM92 (and compatible parts) */ + +#define SNIOC_READCONF _SNIOC(0x000b) /* Arg: uint8_t* pointer */ +#define SNIOC_WRITECONF _SNIOC(0x000c) /* Arg: uint8_t value */ +#define SNIOC_SHUTDOWN _SNIOC(0x000d) /* Arg: None */ +#define SNIOC_POWERUP _SNIOC(0x000e) /* Arg: None */ +#define SNIOC_FAHRENHEIT _SNIOC(0x000f) /* Arg: None */ +#define SNIOC_CENTIGRADE _SNIOC(0x0010) /* Arg: None */ +#define SNIOC_READTHYS _SNIOC(0x0011) /* Arg: b16_t* pointer */ +#define SNIOC_WRITETHYS _SNIOC(0x0012) /* Arg: b16_t value */ + +/* IOCTL commands unique to the LM75 */ + +#define SNIOC_READTOS _SNIOC(0x0013) /* Arg: b16_t* pointer */ +#define SNIOC_WRITETOS _SNIOC(0x0014) /* Arg: b16_t value */ + +/* IOCTL commands unique to the LM92 */ + +#define SNIOC_READTCRIT _SNIOC(0x0015) /* Arg: b16_t* pointer */ +#define SNIOC_WRITETCRIT _SNIOC(0x0016) /* Arg: b16_t value */ +#define SNIOC_READTLOW _SNIOC(0x0017) /* Arg: b16_t* pointer */ +#define SNIOC_WRITETLOW _SNIOC(0x0018) /* Arg: b16_t value */ +#define SNIOC_READTHIGH _SNIOC(0x0019) /* Arg: b16_t* pointer */ +#define SNIOC_WRITETHIGH _SNIOC(0x001a) /* Arg: b16_t value */ +#define SNIOC_READID _SNIOC(0x001b) /* Arg: uint16_t* pointer */ + +/* IOCTL commands unique to the LSM9DS1 */ + +#define SNIOC_START _SNIOC(0x001c) /* Arg: None */ +#define SNIOC_STOP _SNIOC(0x001d) /* Arg: None */ +#define SNIOC_SETSAMPLERATE _SNIOC(0x001e) /* Arg: uint32_t value */ +#define SNIOC_SETFULLSCALE _SNIOC(0x001f) /* Arg: uint32_t value */ + +/* IOCTL commands unique to the MB7040 */ + +#define SNIOC_MEASURE _SNIOC(0x0020) /* Arg: None */ +#define SNIOC_RANGE _SNIOC(0x0021) /* Arg: int32_t* pointer */ +#define SNIOC_CHANGEADDR _SNIOC(0x0022) /* Arg: uint8_t value */ + +/* IOCTL commands unique to the MCP9844 */ + +#define SNIOC_READTEMP _SNIOC(0x0023) /* Arg: mcp9844_temp_arg_s* pointer */ +#define SNIOC_SETRESOLUTION _SNIOC(0x0024) /* Arg: uint16_t value */ + +/* IOCTL commands unique to the MS58XX */ + +#define SNIOC_MEASURE _SNIOC(0x0025) /* Arg: None */ +#define SNIOC_TEMPERATURE _SNIOC(0x0026) /* Arg: int32_t* pointer */ +#define SNIOC_PRESSURE _SNIOC(0x0027) /* Arg: int32_t* pointer */ +#define SNIOC_RESET _SNIOC(0x0028) /* Arg: None */ +#define SNIOC_OVERSAMPLING _SNIOC(0x0029) /* Arg: uint16_t value */ + +#endif /* __INCLUDE_NUTTX_SENSORS_IOCTL_H */ diff --git a/include/nuttx/sensors/kxjt9.h b/include/nuttx/sensors/kxjt9.h new file mode 100644 index 0000000000000000000000000000000000000000..9c4f234b1171e130ec2fe15a75b91ba0d72beef7 --- /dev/null +++ b/include/nuttx/sensors/kxjt9.h @@ -0,0 +1,119 @@ +/**************************************************************************** + * include/nuttx/sensors/kxjt9.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * This driver derives from the Motorola Moto Z MDK: + * + * Copyright (c) 2016 Motorola Mobility, LLC. + * 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 of the copyright holder 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 HOLDER 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_SENSORS_KXJT9_H +#define __INCLUDE_NUTTX_SENSORS_KXJT9_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include +#include + +#if defined(CONFIG_I2C) && defined(CONFIG_SENSOR_KXTJ9) + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/* Data control register bits */ + +enum kxtj9_odr_e +{ + ODR0_781F = 8, + ODR1_563F = 9, + ODR3_125F = 10, + ODR6_25F = 11, + ODR12_5F = 0, + ODR25F = 1, + ODR50F = 2, + ODR100F = 3, + ODR200F = 4, + ODR400F = 5, + ODR800F = 6 +}; + +/* Data returned by reading from the KXTJ9 is returned in this format. + * In order for the read to be successful, a buffer of size >= sizeof(struct + * kxtj9_sensor_data) must be provided with the read. + */ + +struct kxtj9_sensor_data +{ + uint16_t x; + uint16_t y; + uint16_t z; +}; + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#ifdef __cplusplus +extern "C" +{ +#endif + +/**************************************************************************** + * Name: kxjt9_register + * + * Description: + * Register the KXJT9 accelerometer device as 'devpath'. + * + * Input Parameters: + * devpath - The full path to the driver to register, e.g., "/dev/accel0". + * i2c - An I2C driver instance. + * addr - The I2C address of the KXJT9 accelerometer, gyroscope or + * magnetometer. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +struct i2c_master_s; +int kxjt9_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, + uint8_t address); + +#ifdef __cplusplus +} +#endif + +#endif /* CONFIG_I2C && CONFIG_SENSOR_KXTJ9 */ +#endif /* __INCLUDE_NUTTX_SENSORS_KXJT9_H */ diff --git a/include/nuttx/sensors/lis3dsh.h b/include/nuttx/sensors/lis3dsh.h new file mode 100644 index 0000000000000000000000000000000000000000..c059bb94332fc37eb44616057ea2d99059ced6c8 --- /dev/null +++ b/include/nuttx/sensors/lis3dsh.h @@ -0,0 +1,277 @@ +/**************************************************************************** + * include/nuttx/sensors/lis3dsh.h + * + * Copyright (C) 2016 DS-Automotion GmbH. All rights reserved. + * Author: Alexander Entinger + * Thomas Ilk + * + * 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_SENSORS_LIS3DSH_H +#define __INCLUDE_NUTTX_SENSORS_LIS3DSH_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include +#include +#include + +#if defined(CONFIG_SPI) && defined(CONFIG_LIS3DSH) + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* LIS3DSH Register Definitions **********************************************/ + +#define LIS3DSH_INFO_REG_1 (0x0D) +#define LIS3DSH_INFO_REG_2 (0x0E) +#define LIS3DSH_WHO_AM_I_REG (0x0F) +#define LIS3DSH_CTRL_REG_1 (0x21) +#define LIS3DSH_CTRL_REG_2 (0x22) +#define LIS3DSH_CTRL_REG_3 (0x23) +#define LIS3DSH_CTRL_REG_4 (0x20) +#define LIS3DSH_CTRL_REG_5 (0x24) +#define LIS3DSH_CTRL_REG_6 (0x25) +#define LIS3DSH_STATUS_REG (0x27) +#define LIS3DSH_OUT_T_REG (0x0C) +#define LIS3DSH_OFF_X_REG (0x10) +#define LIS3DSH_OFF_Y_REG (0x11) +#define LIS3DSH_OFF_Z_REG (0x12) +#define LIS3DSH_CS_X_REG (0x13) +#define LIS3DSH_CS_Y_REG (0x14) +#define LIS3DSH_CS_Z_REG (0x15) +#define LIS3DSH_LC_L_REG (0x16) +#define LIS3DSH_LC_H_REG (0x17) +#define LIS3DSH_STAT_REG (0x18) +#define LIS3DSH_PEAK1_REG (0x19) +#define LIS3DSH_PEAK2_REG (0x1A) +#define LIS3DSH_VFC_REG_1 (0x1B) +#define LIS3DSH_VFC_REG_2 (0x1C) +#define LIS3DSH_VFC_REG_3 (0x1D) +#define LIS3DSH_VFC_REG_4 (0x1E) +#define LIS3DSH_THRS3_REG (0x1F) +#define LIS3DSH_OUT_X_L_REG (0x28) +#define LIS3DSH_OUT_X_H_REG (0x29) +#define LIS3DSH_OUT_Y_L_REG (0x2A) +#define LIS3DSH_OUT_Y_H_REG (0x2B) +#define LIS3DSH_OUT_Z_L_REG (0x2C) +#define LIS3DSH_OUT_Z_H_REG (0x2D) +#define LIS3DSH_FIFO_CTRL_REG (0x2E) +#define LIS3DSH_FIFO_SRC_REG (0x2F) +#define LIS3DSH_FIFO_CTRL_REG (0x2E) +#define LIS3DSH_ST1_REG_1 (0x40) +#define LIS3DSH_ST1_REG_2 (0x41) +#define LIS3DSH_ST1_REG_3 (0x42) +#define LIS3DSH_ST1_REG_4 (0x43) +#define LIS3DSH_ST1_REG_5 (0x44) +#define LIS3DSH_ST1_REG_6 (0x45) +#define LIS3DSH_ST1_REG_7 (0x46) +#define LIS3DSH_ST1_REG_8 (0x47) +#define LIS3DSH_ST1_REG_9 (0x48) +#define LIS3DSH_ST1_REG_10 (0x49) +#define LIS3DSH_ST1_REG_11 (0x4A) +#define LIS3DSH_ST1_REG_12 (0x4B) +#define LIS3DSH_ST1_REG_13 (0x4C) +#define LIS3DSH_ST1_REG_14 (0x4D) +#define LIS3DSH_ST1_REG_15 (0x4E) +#define LIS3DSH_ST1_REG_16 (0x4F) +#define LIS3DSH_TIM4_1_REG (0x50) +#define LIS3DSH_TIM3_1_REG (0x51) +#define LIS3DSH_TIM2_1_REG_1 (0x52) +#define LIS3DSH_TIM2_1_REG_2 (0x53) +#define LIS3DSH_TIM1_1_REG_1 (0x54) +#define LIS3DSH_TIM1_1_REG_5 (0x55) +#define LIS3DSH_THRS2_1_REG (0x56) +#define LIS3DSH_THRS1_1_REG (0x57) +#define LIS3DSH_MASK1_B_REG (0x59) +#define LIS3DSH_MASK1_A_REG (0x5A) +#define LIS3DSH_SETT1_REG (0x5B) +#define LIS3DSH_PR1_REG (0x5C) +#define LIS3DSH_TC1_REG_1 (0x5D) +#define LIS3DSH_TC1_REG_2 (0x5E) +#define LIS3DSH_OUTS1_REG (0x5F) +#define LIS3DSH_ST2_REG_1 (0x60) +#define LIS3DSH_ST2_REG_2 (0x61) +#define LIS3DSH_ST2_REG_3 (0x62) +#define LIS3DSH_ST2_REG_4 (0x63) +#define LIS3DSH_ST2_REG_5 (0x64) +#define LIS3DSH_ST2_REG_6 (0x65) +#define LIS3DSH_ST2_REG_7 (0x66) +#define LIS3DSH_ST2_REG_8 (0x67) +#define LIS3DSH_ST2_REG_9 (0x68) +#define LIS3DSH_ST2_REG_10 (0x69) +#define LIS3DSH_ST2_REG_11 (0x6A) +#define LIS3DSH_ST2_REG_12 (0x6B) +#define LIS3DSH_ST2_REG_13 (0x6C) +#define LIS3DSH_ST2_REG_14 (0x6D) +#define LIS3DSH_ST2_REG_15 (0x6E) +#define LIS3DSH_ST2_REG_16 (0x6F) +#define LIS3DSH_TIM4_2_REG (0x70) +#define LIS3DSH_TIM3_2_REG (0x71) +#define LIS3DSH_TIM2_2_REG_1 (0x72) +#define LIS3DSH_TIM2_2_REG_2 (0x73) +#define LIS3DSH_TIM1_2_REG_1 (0x74) +#define LIS3DSH_TIM1_2_REG_5 (0x75) +#define LIS3DSH_THRS2_2_REG (0x76) +#define LIS3DSH_THRS1_2_REG (0x77) +#define LIS3DSH_DES2_REG (0x78) +#define LIS3DSH_MASK2_B_REG (0x79) +#define LIS3DSH_MASK2_A_REG (0x7A) +#define LIS3DSH_SETT2_REG (0x7B) +#define LIS3DSH_PR2_REG (0x7C) +#define LIS3DSH_TC2_REG_1 (0x7D) +#define LIS3DSH_TC2_REG_2 (0x7E) + +/* LIS3DSH CTRL_REG_3 Definitions **********************************************/ + +#define LIS3DSH_CTRL_REG_3_DR_EN_bm (1<<7) /* DRDY signal enable to INT 1 */ +#define LIS3DSH_CTRL_REG_3_IEA_bm (1<<6) /* Interrupt signal polarity */ +#define LIS3DSH_CTRL_REG_3_IEL_bm (1<<5) /* Interrupt signal latching */ +#define LIS3DSH_CTRL_REG_3_INT2_EN_bm (1<<4) /* Interrupt 2 enable / disable */ +#define LIS3DSH_CTRL_REG_3_INT1_EN_bm (1<<3) /* Interrupt 1 enable / disable */ +#define LIS3DSH_CTRL_REG_3_VFILT_bm (1<<2) /* Vector filter enable / disable */ +#define LIS3DSH_CTRL_REG_3_STRT_bm (1<<0) /* Enable soft reset */ + +/* LIS3DSH CTRL_REG_4 Definitions **********************************************/ + +#define LIS3DSH_CTRL_REG_4_ODR_3_bm (1<<7) /* Output data rate and power mode selection bit 3 */ +#define LIS3DSH_CTRL_REG_4_ODR_2_bm (1<<6) /* Output data rate and power mode selection bit 2 */ +#define LIS3DSH_CTRL_REG_4_ODR_1_bm (1<<5) /* Output data rate and power mode selection bit 1 */ +#define LIS3DSH_CTRL_REG_4_ODR_0_bm (1<<4) /* Output data rate and power mode selection bit 0 */ +#define LIS3DSH_CTRL_REG_4_BDU_bm (1<<3) /* Enable block data update for accelerating data */ +#define LIS3DSH_CTRL_REG_4_ZEN_bm (1<<2) /* Enable Z-axis */ +#define LIS3DSH_CTRL_REG_4_YEN_bm (1<<1) /* Enable Y-axis */ +#define LIS3DSH_CTRL_REG_4_XEN_bm (1<<0) /* Enable X-axis */ + +/* LIS3DSH CTRL_REG_5 Definitions **********************************************/ + +#define LIS3DSH_CTRL_REG_5_BW_2_bm (1<<7) /* Anti-aliasing filter bandwidth bit 2 */ +#define LIS3DSH_CTRL_REG_5_BW_1_bm (1<<6) /* Anti-aliasing filter bandwidth bit 1 */ +#define LIS3DSH_CTRL_REG_5_FSCALE_2_bm (1<<5) /* Full-scale selection bit 2 */ +#define LIS3DSH_CTRL_REG_5_FSCALE_1_bm (1<<4) /* Full-scale selection bit 1 */ +#define LIS3DSH_CTRL_REG_5_FSCALE_0_bm (1<<3) /* Full-scale selection bit 0 */ +#define LIS3DSH_CTRL_REG_5_ST_2_bm (1<<2) /* Enable self-test bit 2 */ +#define LIS3DSH_CTRL_REG_5_ST_1_bm (1<<1) /* Enable self-test bit 1 */ +#define LIS3DSH_CTRL_REG_5_SIM_bm (1<<0) /* Enable SPI 4-wire interface */ + +/* LIS3DSH CTRL_REG_6 Definitions **********************************************/ + +#define LIS3DSH_CTRL_REG_6_BOOT_bm (1<<7) /* Force reboot, cleared as soon as the reboot is finished. Active high */ +#define LIS3DSH_CTRL_REG_6_FIFO_EN_bm (1<<6) /* Enable FIFO */ +#define LIS3DSH_CTRL_REG_6_WTM_EN_bm (1<<5) /* Enable FIFO watermark level use */ +#define LIS3DSH_CTRL_REG_6_ADD_INC_bm (1<<4) /* Register address automatically incremented during a multiple byte access with a serial interface */ +#define LIS3DSH_CTRL_REG_6_P1_EMPTY_bm (1<<3) /* Enable FIFO empty indication on Int1 */ +#define LIS3DSH_CTRL_REG_6_P1_WTM_bm (1<<2) /* FIFO watermark interrupt Int1 */ +#define LIS3DSH_CTRL_REG_6_P1_OVERRUN_bm (1<<1) /* FIFO overrrun interrupt on Int1 */ +#define LIS3DSH_CTRL_REG_6_P2_BOOT_bm (1<<0) /* BOOT interrupt on Int2 */ + +/* SPI BUS PARAMETERS *******************************************************/ + +#define LIS3DSH_SPI_FREQUENCY (5000000) /* 5 MHz */ +#define LIS3DSH_SPI_MODE (SPIDEV_MODE3) /* Device uses SPI Mode 3: CPOL=1, CPHA=1 */ + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/* A reference to a structure of this type must be passed to the LIS3DSH + * driver. This structure provides information about the configuration + * of the sensor 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. + */ + +struct lis3dsh_config_s +{ + /* Since multiple sensors can be connected to the same SPI bus we need + * to use multiple spi device ids which are employed by NuttX to select/ + * deselect the desired LIS3DSH chip via their chip select inputs. + */ + + int spi_devid; + + /* The IRQ number must be provided for each LIS3DSH device so that + * their interrupts can be distinguished. + */ + + int irq; + + /* Attach the LIS3DSH interrupt handler to the GPIO interrupt of the + * concrete LIS3DSH instance. + */ + + int (*attach)(FAR struct lis3dsh_config_s *, xcpt_t); +}; + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Name: lis3dsh_register + * + * Description: + * Register the LIS3DSH character device as 'devpath' + * + * Input Parameters: + * devpath - The full path to the driver to register. E.g., "/dev/acc0" + * spi - An instance of the SPI interface to use to communicate with + * LIS3DSH + * config - configuration for the LIS3DSH driver. For details see + * description above. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int lis3dsh_register(FAR const char *devpath, FAR struct spi_dev_s *spi, + FAR struct lis3dsh_config_s *config); + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* CONFIG_SPI && CONFIG_LIS3DSH */ +#endif /* __INCLUDE_NUTTX_SENSORS_LIS3DSH_H */ diff --git a/include/nuttx/sensors/lis3mdl.h b/include/nuttx/sensors/lis3mdl.h new file mode 100644 index 0000000000000000000000000000000000000000..e5acba39404121491cffcf62703e42e4ec3c62e0 --- /dev/null +++ b/include/nuttx/sensors/lis3mdl.h @@ -0,0 +1,180 @@ +/**************************************************************************** + * include/nuttx/sensors/lis3mdl.h + * + * Copyright (C) 2016 DS-Automotion GmbH. All rights reserved. + * Author: Alexander Entinger + * + * 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_SENSORS_LIS3MDL_H +#define __INCLUDE_NUTTX_SENSORS_LIS3MDL_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include +#include +#include + +#if defined(CONFIG_SPI) && defined(CONFIG_LIS3MDL) + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* LIS3MDL Register Definitions *********************************************/ + +#define LIS3MDL_WHO_AM_I_REG (0x0F) +#define LIS3MDL_CTRL_REG_1 (0x20) +#define LIS3MDL_CTRL_REG_2 (0x21) +#define LIS3MDL_CTRL_REG_3 (0x22) +#define LIS3MDL_CTRL_REG_4 (0x23) +#define LIS3MDL_CTRL_REG_5 (0x24) +#define LIS3MDL_STATUS_REG (0x27) +#define LIS3MDL_OUT_X_L_REG (0x28) +#define LIS3MDL_OUT_X_H_REG (0x29) +#define LIS3MDL_OUT_Y_L_REG (0x2A) +#define LIS3MDL_OUT_Y_H_REG (0x2B) +#define LIS3MDL_OUT_Z_L_REG (0x2C) +#define LIS3MDL_OUT_Z_H_REG (0x2D) +#define LIS3MDL_TEMP_OUT_L_REG (0x2E) +#define LIS3MDL_TEMP_OUT_H_REG (0x2F) +#define LIS3MDL_INT_CFG_REG (0x30) +#define LIS3MDL_INT_SRC_REG (0x31) +#define LIS3MDL_INT_THS_L_REG (0x32) +#define LIS3MDL_INT_THS_H_REG (0x33) + +/* LIS3MDL CTRL_REG_1 Bit Definitions ***************************************/ + +#define LIS3MDL_CTRL_REG_1_TEMP_EN_bm (1<<7) /* Enable the temperature sensor */ +#define LIS3MDL_CTRL_REG_1_OM_1_bm (1<<6) /* Select the operating mode of X and Y axis bit 1 */ +#define LIS3MDL_CTRL_REG_1_OM_0_bm (1<<5) /* Select the operating mode of X and Y axis bit 0 */ +#define LIS3MDL_CTRL_REG_1_DO2_bm (1<<4) /* Output data rate selection bit 2 */ +#define LIS3MDL_CTRL_REG_1_DO1_bm (1<<3) /* Output data rate selection bit 1 */ +#define LIS3MDL_CTRL_REG_1_DO0_bm (1<<2) /* Output data rate selection bit 2 */ +#define LIS3MDL_CTRL_REG_1_FAST_ODR_bm (1<<1) /* Enable higher output data rates */ + +/* LIS3MDL CTRL_REG_2 Bit Definitions ***************************************/ + +#define LIS3MDL_CTRL_REG_2_FS_1_bm (1<<6) /* Full scale selection bit 1 */ +#define LIS3MDL_CTRL_REG_2_FS_0_bm (1<<5) /* Full scale selection bit 0 */ +#define LIS3MDL_CTRL_REG_2_REBOOT_bm (1<<3) /* Reboot Memory Content */ +#define LIS3MDL_CTRL_REG_2_SOFT_RST_bm (1<<2) /* Soft Reset */ + +/* LIS3MDL CTRL_REG_4 Bit Definitions ***************************************/ + +#define LIS3MDL_CTRL_REG_4_OMZ_1_bm (1<<3) /* Select the operating mode of Z axis bit 1 */ +#define LIS3MDL_CTRL_REG_4_OMZ_0_bm (1<<2) /* Select the operating mode of Z axis bit 0 */ + +/* LIS3MDL CTRL_REG_5 Bit Definitions ***************************************/ + +#define LIS3MDL_CTRL_REG_5_BDU_bm (1<<6) /* Enable block data update for magnetic data (prevent race conditions while reading) */ + +/* SPI BUS PARAMETERS *******************************************************/ + +#define LIS3MDL_SPI_FREQUENCY (1000000) /* 1 MHz */ +#define LIS3MDL_SPI_MODE (SPIDEV_MODE3) /* Device uses SPI Mode 3: CPOL=1, CPHA=1 */ + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/* A reference to a structure of this type must be passed to the LIS3MDL + * driver. This structure provides information about the configuration + * of the sensor 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. + */ + +struct lis3mdl_config_s +{ + /* Since multiple LIS3MDL can be connected to the same SPI bus we need + * to use multiple spi device ids which are employed by NuttX to select/ + * deselect the desired LIS3MDL chip via their chip select inputs. + */ + + int spi_devid; + + /* The IRQ number must be provided for each so LIS3MDL device so that + * their interrupts can be distinguished. + */ + + int irq; + + /* Attach the LIS3MDL interrupt handler to the GPIO interrupt of the + * concrete LIS3MDL instance. + */ + + int (*attach)(FAR struct lis3mdl_config_s *, xcpt_t); +}; + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Name: lis3mdl_register + * + * Description: + * Register the LIS3MDL character device as 'devpath' + * + * Input Parameters: + * devpath - The full path to the driver to register. E.g., "/dev/mag0" + * spi - An instance of the SPI interface to use to communicate with + * LIS3MDL + * config - configuration for the LIS3MDL driver. For details see + * description above. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int lis3mdl_register(FAR const char *devpath, FAR struct spi_dev_s *spi, + FAR struct lis3mdl_config_s const *config); + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* CONFIG_SPI && CONFIG_LIS3MDL */ +#endif /* __INCLUDE_NUTTX_SENSORS_LIS3MDL_H */ diff --git a/include/nuttx/sensors/lm75.h b/include/nuttx/sensors/lm75.h index 827620adab91089975dd3686c6b40f6de1d91557..f12e2120a17ecca1c4ae76d9c598e626a9cd209d 100644 --- a/include/nuttx/sensors/lm75.h +++ b/include/nuttx/sensors/lm75.h @@ -41,7 +41,7 @@ ****************************************************************************/ #include -#include +#include #if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75) @@ -63,19 +63,6 @@ #define CONFIG_LM75_ADDR6 (CONFIG_LM75_BASEADDR + 6) #define CONFIG_LM75_ADDR7 (CONFIG_LM75_BASEADDR + 7) -/* IOCTL Commands ***********************************************************/ - -#define SNIOC_READCONF _SNIOC(0x0001) /* Arg: uint8_t* pointer */ -#define SNIOC_WRITECONF _SNIOC(0x0002) /* Arg: uint8_t value */ -#define SNIOC_SHUTDOWN _SNIOC(0x0003) /* Arg: None */ -#define SNIOC_POWERUP _SNIOC(0x0004) /* Arg: None */ -#define SNIOC_FAHRENHEIT _SNIOC(0x0005) /* Arg: None */ -#define SNIOC_CENTIGRADE _SNIOC(0x0006) /* Arg: None */ -#define SNIOC_READTHYS _SNIOC(0x0007) /* Arg: b16_t* pointer */ -#define SNIOC_WRITETHYS _SNIOC(0x0008) /* Arg: b16_t value */ -#define SNIOC_READTOS _SNIOC(0x0009) /* Arg: b16_t* pointer */ -#define SNIOC_WRITETOS _SNIOC(0x000a) /* Arg: b16_t value */ - /* LM-75 Register Definitions ***********************************************/ /* LM-75 Registers addresses */ diff --git a/include/nuttx/sensors/lm92.h b/include/nuttx/sensors/lm92.h index 8b49a0da93603603a883dd1aea309110bcabb2d1..4bfa3423f0ff1c2594e478b128a202b82e9e57d5 100644 --- a/include/nuttx/sensors/lm92.h +++ b/include/nuttx/sensors/lm92.h @@ -43,7 +43,7 @@ ****************************************************************************/ #include -#include +#include #if defined(CONFIG_I2C) && defined(CONFIG_LM92) @@ -61,24 +61,6 @@ #define CONFIG_LM92_ADDR2 (CONFIG_LM92_BASEADDR + 2) #define CONFIG_LM92_ADDR3 (CONFIG_LM92_BASEADDR + 3) -/* IOCTL Commands ***********************************************************/ - -#define SNIOC_READCONF _SNIOC(0x0001) /* Arg: uint8_t* pointer */ -#define SNIOC_WRITECONF _SNIOC(0x0002) /* Arg: uint8_t value */ -#define SNIOC_SHUTDOWN _SNIOC(0x0003) /* Arg: None */ -#define SNIOC_POWERUP _SNIOC(0x0004) /* Arg: None */ -#define SNIOC_FAHRENHEIT _SNIOC(0x0005) /* Arg: None */ -#define SNIOC_CENTIGRADE _SNIOC(0x0006) /* Arg: None */ -#define SNIOC_READTHYS _SNIOC(0x0007) /* Arg: b16_t* pointer */ -#define SNIOC_WRITETHYS _SNIOC(0x0008) /* Arg: b16_t value */ -#define SNIOC_READTCRIT _SNIOC(0x0009) /* Arg: b16_t* pointer */ -#define SNIOC_WRITETCRIT _SNIOC(0x000a) /* Arg: b16_t value */ -#define SNIOC_READTLOW _SNIOC(0x000b) /* Arg: b16_t* pointer */ -#define SNIOC_WRITETLOW _SNIOC(0x000c) /* Arg: b16_t value */ -#define SNIOC_READTHIGH _SNIOC(0x000d) /* Arg: b16_t* pointer */ -#define SNIOC_WRITETHIGH _SNIOC(0x000e) /* Arg: b16_t value */ -#define SNIOC_READID _SNIOC(0x000f) /* Arg: uint16_t* pointer */ - /* LM92 Register Definitions ***********************************************/ /* LM92 Register Addresses */ diff --git a/include/nuttx/sensors/lsm9ds1.h b/include/nuttx/sensors/lsm9ds1.h index cf3ef1b3c7682d335585c926d373793e2857c384..dc7b103ef62e8f4601513ca0afb3a9d8efe2d644 100644 --- a/include/nuttx/sensors/lsm9ds1.h +++ b/include/nuttx/sensors/lsm9ds1.h @@ -41,19 +41,13 @@ ****************************************************************************/ #include -#include +#include #if defined(CONFIG_I2C) && defined(CONFIG_SN_LSM9DS1) /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/* IOCTL Commands ***********************************************************/ - -#define SNIOC_START _SNIOC(0x0001) /* Arg: None */ -#define SNIOC_STOP _SNIOC(0x0002) /* Arg: None */ -#define SNIOC_SETSAMPLERATE _SNIOC(0x0003) /* Arg: uint32_t value */ -#define SNIOC_SETFULLSCALE _SNIOC(0x0004) /* Arg: uint32_t value */ /* I2C Addresses ************************************************************/ /* Accelerometer addresses */ diff --git a/include/nuttx/sensors/mb7040.h b/include/nuttx/sensors/mb7040.h index 0280ecadb6fc01a0458d89f103fb8d336f642700..1c7ed9c51b8cff6f96663a594f82b16c272f39eb 100644 --- a/include/nuttx/sensors/mb7040.h +++ b/include/nuttx/sensors/mb7040.h @@ -41,7 +41,7 @@ ****************************************************************************/ #include -#include +#include #if defined(CONFIG_I2C) && defined(CONFIG_MB7040) @@ -57,12 +57,6 @@ * Enables support for the MB7040 driver */ -/* IOCTL Commands ***********************************************************/ - -#define SNIOC_MEASURE _SNIOC(0x0001) /* Arg: None */ -#define SNIOC_RANGE _SNIOC(0x0002) /* Arg: int32_t* pointer */ -#define SNIOC_CHANGEADDR _SNIOC(0x0003) /* Arg: uint8_t value */ - /* I2C Addresses ************************************************************/ #define MB7040_DEFAULTADDR 0x70 /* Default I2C Address */ diff --git a/include/nuttx/sensors/mcp9844.h b/include/nuttx/sensors/mcp9844.h index 97a8f2bda32e68d24cc83f19e7c0854cb6c881eb..2ef65702fd4f1810ca57e7973f40ececfec83712 100644 --- a/include/nuttx/sensors/mcp9844.h +++ b/include/nuttx/sensors/mcp9844.h @@ -33,15 +33,15 @@ * ****************************************************************************/ -#ifndef __NUTTX_INCLUDE_NUTTX_SENSORS_MCP9844_H -#define __NUTTX_INCLUDE_NUTTX_SENSORS_MCP9844_H +#ifndef __INCLUDE_NUTTX_SENSORS_MCP9844_H +#define __INCLUDE_NUTTX_SENSORS_MCP9844_H /**************************************************************************** * Included Files ****************************************************************************/ #include -#include +#include #if defined(CONFIG_I2C) && defined(CONFIG_MCP9844) @@ -49,11 +49,6 @@ * Pre-processor Definitions ****************************************************************************/ -/* IOCTL Commands ***********************************************************/ - -#define SNIOC_READTEMP _SNIOC(0x0001) /* Arg: mcp9844_temp_arg_s* pointer */ -#define SNIOC_SETRESOLUTION _SNIOC(0x0002) /* Arg: uint16_t value */ - /* MCP9844 Register Definitions *********************************************/ /* MCP9844 Registers addresses */ @@ -125,4 +120,4 @@ int mcp9844_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, #endif #endif /* CONFIG_I2C && CONFIG_MCP9844 */ -#endif /* __NUTTX_INCLUDE_NUTTX_SENSORS_MCP9844_H */ +#endif /* __INCLUDE_NUTTX_SENSORS_MCP9844_H */ diff --git a/include/nuttx/sensors/mlx90393.h b/include/nuttx/sensors/mlx90393.h new file mode 100644 index 0000000000000000000000000000000000000000..16ea5a73c68436f3b51781eac48b7cd3861fea8e --- /dev/null +++ b/include/nuttx/sensors/mlx90393.h @@ -0,0 +1,153 @@ +/**************************************************************************** + * include/nuttx/sensors/mlx90393.h + * + * Copyright (C) 2016 DS-Automotion GmbH. All rights reserved. + * Author: Alexander Entinger + * + * 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_SENSORS_MLX90393_H +#define __INCLUDE_NUTTX_SENSORS_MLX90393_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include +#include +#include + +#if defined(CONFIG_SPI) && defined(CONFIG_MLX90393) + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* MLX90393 Command Definitions *********************************************/ + +#define MLX90393_SB (0x10) /* SB = Start Burst Mode */ +#define MLX90393_SW (0x20) /* SW = Start Wake-up on Change Mode */ +#define MLX90393_SM (0x30) /* SB = Start Single Measurement Mode */ +#define MLX90393_RM (0x40) /* RM = Read Measurement */ +#define MLX90393_RR (0x50) /* RR = Read Register */ +#define MLX90393_WR (0x60) /* WR = Write Register */ +#define MLX90393_EX (0x80) /* EX = Exit Mode */ +#define MLX90393_HR (0xD0) /* HR = Memory Recall */ +#define MLX90393_HS (0xE0) /* HS = Memory Store */ +#define MLX90393_RT (0xF0) /* RT = Reset */ + +/* MLX90393 Sensor Selection Bit Definitions ********************************/ + +#define MLX90393_T_bm (1<<0) /* Temperature Sensor Bitmask */ +#define MLX90393_X_bm (1<<1) /* Magnetometer X-Axis Bitmask */ +#define MLX90393_Y_bm (1<<2) /* Magnetometer Y-Axis Bitmask */ +#define MLX90393_Z_bm (1<<3) /* Magnetometer Z-Axis Bitmask */ +#define MLX90393_ZYXT_bm (MLX90393_Z_bm | MLX90393_Y_bm | MLX90393_X_bm | MLX90393_T_bm) + +/* SPI BUS PARAMETERS *******************************************************/ + +#define MLX90393_SPI_FREQUENCY (1000000) /* 1 MHz */ +#define MLX90393_SPI_MODE (SPIDEV_MODE3) /* Device uses SPI Mode 3: CPOL=1, CPHA=1 */ + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/* A reference to a structure of this type must be passed to the MLX90393 + * driver. This structure provides information about the configuration + * of the sensor 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. + */ + +struct mlx90393_config_s +{ + /* Since multiple MLX90393 can be connected to the same SPI bus we need + * to use multiple spi device ids which are employed by NuttX to select/ + * deselect the desired MLX90393 chip via their chip select inputs. + */ + + int spi_devid; + + /* The IRQ number must be provided for each so MLX90393 device so that + * their interrupts can be distinguished. + */ + + int irq; + + /* Attach the MLX90393 interrupt handler to the GPIO interrupt of the + * concrete MLX90393 instance. + */ + + int (*attach)(FAR struct mlx90393_config_s *, xcpt_t); +}; + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Name: mlx90393_register + * + * Description: + * Register the MLX90393 character device as 'devpath' + * + * Input Parameters: + * devpath - The full path to the driver to register. E.g., "/dev/mag0" + * spi - An instance of the SPI interface to use to communicate with + * MLX90393 + * config - Describes the configuration of the MLX90393 part. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int mlx90393_register(FAR const char *devpath, FAR struct spi_dev_s *spi, + FAR struct mlx90393_config_s *config); + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* CONFIG_SPI && CONFIG_MLX90393 */ + +#endif /* __INCLUDE_NUTTX_SENSORS_MLX90393_H */ diff --git a/include/nuttx/sensors/mpl115a.h b/include/nuttx/sensors/mpl115a.h index 736922d968e1f73fd40870b265deb5718b64cb0d..4df7de55d13993916b76086006ac052618b45fa4 100644 --- a/include/nuttx/sensors/mpl115a.h +++ b/include/nuttx/sensors/mpl115a.h @@ -33,8 +33,8 @@ * ********************************************************************************************/ -#ifndef __DRIVERS_SENSORS_MPL115A_H -#define __DRIVERS_SENSORS_MPL115A_H +#ifndef __INCLUDE_NUTTX_SENSORS_MPL115A_H +#define __INCLUDE_NUTTX_SENSORS_MPL115A_H #include @@ -127,4 +127,4 @@ int mpl115a_register(FAR const char *devpath, FAR struct spi_dev_s *spi); #endif #endif /* CONFIG_SPI && CONFIG_MPL115A */ -#endif /* __DRIVERS_SENSORS_MPL115A_H */ +#endif /* __INCLUDE_NUTTX_SENSORS_MPL115A_H */ diff --git a/include/nuttx/sensors/ms58xx.h b/include/nuttx/sensors/ms58xx.h index 62525d31a6353a227fa7a0dc178b647c2c26b137..fc2bf1c2c3024b9fa3a3c678fcb677751f767298 100644 --- a/include/nuttx/sensors/ms58xx.h +++ b/include/nuttx/sensors/ms58xx.h @@ -41,7 +41,7 @@ ****************************************************************************/ #include -#include +#include #if defined(CONFIG_I2C) && defined(CONFIG_MS58XX) @@ -58,14 +58,6 @@ * CONFIG_MS58XX_VDD */ -/* IOCTL Commands ***********************************************************/ - -#define SNIOC_MEASURE _SNIOC(0x0001) /* Arg: None */ -#define SNIOC_TEMPERATURE _SNIOC(0x0002) /* Arg: int32_t* pointer */ -#define SNIOC_PRESSURE _SNIOC(0x0003) /* Arg: int32_t* pointer */ -#define SNIOC_RESET _SNIOC(0x0004) /* Arg: None */ -#define SNIOC_OVERSAMPLING _SNIOC(0x0005) /* Arg: uint16_t value */ - /* I2C Address **************************************************************/ #define MS58XX_ADDR0 0x76 diff --git a/include/nuttx/sensors/qencoder.h b/include/nuttx/sensors/qencoder.h index f765ee1956f1a66d2a19ce34c9f1ffeecbcb8ea6..8a240ad13141c44ecda90e1c4e2bf3d406a7566d 100644 --- a/include/nuttx/sensors/qencoder.h +++ b/include/nuttx/sensors/qencoder.h @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __NUTTX_SENSORS_QENCODER_H -#define __NUTTX_SENSORS_QENCODER_H +#ifndef __INCLUDE_NUTTX_SENSORS_QENCODER_H +#define __INCLUDE_NUTTX_SENSORS_QENCODER_H /**************************************************************************** * Included Files @@ -177,4 +177,4 @@ int qe_register(FAR const char *devpath, FAR struct qe_lowerhalf_s *lower); #endif #endif /* CONFIG_QENCODER */ -#endif /* __NUTTX_SENSORS_QENCODER_H */ +#endif /* __INCLUDE_NUTTX_SENSORS_QENCODER_H */ diff --git a/include/nuttx/sensors/zerocross.h b/include/nuttx/sensors/zerocross.h index 9b93c7c215274fc44bdd6b1ea8999b0815aa302d..6d7ce40b87e4c13abd42f9ffc5d2fc080bd620c7 100644 --- a/include/nuttx/sensors/zerocross.h +++ b/include/nuttx/sensors/zerocross.h @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __NUTTX_SENSORS_ZEROCROSS_H -#define __NUTTX_SENSORS_ZEROCROSS_H +#ifndef __INCLUDE_NUTTX_SENSORS_ZEROCROSS_H +#define __INCLUDE_NUTTX_SENSORS_ZEROCROSS_H /**************************************************************************** * Included Files @@ -148,4 +148,4 @@ int zc_register(FAR const char *devpath, FAR struct zc_lowerhalf_s *lower); #endif #endif /* CONFIG_ZEROCROSS */ -#endif /* __NUTTX_SENSORS_ZEROCROSS_H */ +#endif /* __INCLUDE_NUTTX_SENSORS_ZEROCROSS_H */ diff --git a/include/nuttx/sercomm/sercomm.h b/include/nuttx/sercomm/sercomm.h index 54256b5a7dc0abda146be135a52fe824fbeb3f5b..260f1be57b88ccc53ae0dcce2ecbc7ea44d4e58a 100644 --- a/include/nuttx/sercomm/sercomm.h +++ b/include/nuttx/sercomm/sercomm.h @@ -1,5 +1,5 @@ -#ifndef _SERCOMM_H -#define _SERCOMM_H +#ifndef __INCLUDE_NUTTX_SERCOMM_SERCOMM_H +#define __INCLUDE_NUTTX_SERCOMM_SERCOMM_H /* SERCOMM layer on UART1 (modem UART) */ @@ -54,4 +54,4 @@ static inline struct msgb *sercomm_alloc_msgb(unsigned int len) return msgb_alloc_headroom(len+4, 4, "sercomm_tx"); } -#endif /* _SERCOMM_H */ +#endif /* __INCLUDE_NUTTX_SERCOMM_SERCOMM_H */ diff --git a/include/nuttx/sercomm/sercomm_cons.h b/include/nuttx/sercomm/sercomm_cons.h index 11f66545c21b086e10354585ec25a0b343e0bf2d..eb8e7fa12bdac907a2ec8577f3deecde6f660729 100644 --- a/include/nuttx/sercomm/sercomm_cons.h +++ b/include/nuttx/sercomm/sercomm_cons.h @@ -1,5 +1,5 @@ -#ifndef _SERCOMM_CONS_H -#define _SERCOMM_CONS_H +#ifndef __INCLUDE_NUTTX_SERCOMM_SERCOMM_CONS_H +#define __INCLUDE_NUTTX_SERCOMM_SERCOMM_CONS_H /* how large buffers do we allocate? */ #define SERCOMM_CONS_ALLOC 256 @@ -7,4 +7,4 @@ int sercomm_puts(const char *s); int sercomm_putchar(int c); -#endif /* _SERCOMM_CONS_H */ +#endif /* __INCLUDE_NUTTX_SERCOMM_SERCOMM_CONS_H */ diff --git a/include/nuttx/spi/spi.h b/include/nuttx/spi/spi.h index 45b041ffba648d56eb4041b923774a2a06b0bb75..2a48bc92e390d8a9b4f3571efdb60076d3183cd5 100644 --- a/include/nuttx/spi/spi.h +++ b/include/nuttx/spi/spi.h @@ -140,7 +140,8 @@ * csdelay - The delay between CS inactive and CS active again * * Returned Value: - * Returns the actual frequency selected + * Returns zero (OK) on success; a negated errno value is return on any + * failure. * ****************************************************************************/ @@ -174,9 +175,7 @@ * * Input Parameters: * dev - Device-specific state data - * nbits - The number of bits requests. - * If value is greater > 0 then it implies MSB first - * If value is below < 0, then it implies LSB first with -nbits + * nbits - The number of bits in an SPI word. * * Returned Value: * none @@ -193,8 +192,8 @@ * Set hardware-specific feature flags. * * Input Parameters: - * dev - Device-specific state data - * flags - H/W feature flags + * dev - Device-specific state data + * features - H/W feature flags * * Returned Value: * Zero (OK) if the selected H/W features are enabled; A negated errno @@ -224,6 +223,8 @@ * 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) + * Bit 4: HWFEAT_LSBFIRST + * Data transferred LSB first (default is MSB first) */ # ifdef CONFIG_SPI_CRCGENERATION @@ -231,11 +232,17 @@ # endif # ifdef CONFIG_SPI_CS_CONTROL +# define HWFEAT_FORCE_CS_CONTROL_MASK (7 << 1) # 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 +# ifdef CONFIG_SPI_BITORDER +# define HWFEAT_MSBFIRST (0 << 4) +# define HWFEAT_LSBFIRST (1 << 4) +# endif + #else /* Any attempt to select hardware features with CONFIG_SPI_HWFEATURES * deselected will return an -ENOSYS error. @@ -444,6 +451,7 @@ enum spi_dev_e SPIDEV_BAROMETER, /* Select SPI Pressure/Barometer device */ SPIDEV_TEMPERATURE, /* Select SPI Temperature sensor device */ SPIDEV_IEEE802154, /* Select SPI IEEE 802.15.4 wireless device */ + SPIDEV_CONTACTLESS, /* Select SPI Contactless device */ SPIDEV_USER /* Board-specific values start here */ }; diff --git a/include/nuttx/spi/spi_transfer.h b/include/nuttx/spi/spi_transfer.h new file mode 100644 index 0000000000000000000000000000000000000000..ef31e842650003dd4793d37fa9383f9db7d81a59 --- /dev/null +++ b/include/nuttx/spi/spi_transfer.h @@ -0,0 +1,192 @@ +/**************************************************************************** + * include/nuttx/spi/spi_transfer.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 __INCLUDE_NUTTX_SPI_TRANSFER_H +#define __INCLUDE_NUTTX_SPI_TRANSFER_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#ifdef CONFIG_SPI_EXCHANGE + +/* SPI Character Driver IOCTL Commands **************************************/ +/* The SPI driver is intended to support application testing of the SPI bus. + * The SPI driver simply provides a user-accessible wrapper around the + * OS internal spi_transfer() function. The following IOCTL commands to + * supported by the SPI driver to perform SPI transfers + */ + +/* Command: SPIIOC_TRANSFER + * Description: Perform a sequence of SPI transfers + * Argument: A reference to an instance of struct spi_sequence_s. + * Dependencies: CONFIG_SPI_DRIVER + */ + +#define SPIIOC_TRANSFER _SPIIOC(0x0001) + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/* This describes one SPI transaction as handled by spi_transfer() */ + +struct spi_trans_s +{ + /* SPI attributes for unique to this transaction */ + + bool deselect; /* De-select after transfer */ +#ifdef CONFIG_SPI_CMDDATA + bool cmd; /* true=command; false=data */ +#endif +#ifdef CONFIG_SPI_HWFEATURES + spi_hwfeatures_t hwfeat; /* H/W features to enable on this transfer */ +#endif + useconds_t delay; /* Microsecond delay after transfer */ + + /* These describe the single data transfer */ + + size_t nwords; /* Number of words in transfer */ + FAR const void *txbuffer; /* Source buffer for TX transfer */ + FAR void *rxbuffer; /* Sink buffer for RX transfer */ +}; + +/* This describes a sequence of SPI transactions as handled by spi_transfer. + * + * Example usage: + * struct spi_trans_s mytrans[5]; + * struct spi_sequence_s myseq; + * ... + * myseq.ntrans = 5; + * myseq.trans = mytrans; + * ... + * int ret = spi_transfer(spi, myseq); + * ... + */ + +struct spi_sequence_s +{ + /* Properties that are fixed throughout the transfer */ + + uint8_t dev; /* See enum spi_dev_e */ + uint8_t mode; /* See enum spi_mode_e */ + uint8_t nbits; /* Number of bits */ + uint8_t ntrans; /* Number of transactions */ + uint32_t frequency; /* SPI frequency (Hz) */ +#ifdef CONFIG_SPI_CS_DELAY_CONTROL + uint32_t a; /* Arguments to setdelay() */ + uint32_t b; + uint32_t c; +#endif + + /* A pointer to the list of transfers to be be performed. */ + + FAR struct spi_trans_s *trans; +}; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: spi_transfer + * + * Description: + * This is a helper function that can be used to encapsulate and manage + * a sequence of SPI transfers. The SPI bus will be locked and the + * SPI device selected for the duration of the transfers. + * + * Input Parameters: + * spi - An instance of the SPI device to use for the transfer + * seq - Describes the sequence of transfers. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int spi_transfer(FAR struct spi_dev_s *spi, FAR struct spi_sequence_s *seq); + +/**************************************************************************** + * Name: spi_register + * + * Description: + * Create and register the SPI character driver. + * + * The SPI character driver is a simple character driver that supports SPI + * transfers. The intent of this driver is to support SPI testing. It is + * not suitable for use in any real driver application. + * + * Input Parameters: + * spi - An instance of the lower half SPI driver + * bus - The SPI bus number. This will be used as the SPI device minor + * number. The SPI character device will be registered as /dev/spiN + * where N is the minor number + * + * Returned Value: + * OK if the driver was successfully register; A negated errno value is + * returned on any failure. + * + ****************************************************************************/ + +#ifdef CONFIG_SPI_DRIVER +int spi_register(FAR struct spi_dev_s *spi, int bus); +#endif + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +#undef EXTERN +#if defined(__cplusplus) +} +#endif + +#endif /* CONFIG_SPI_EXCHANGE */ +#endif /* __INCLUDE_NUTTX_SPI_TRANSFER_H */ diff --git a/include/nuttx/streams.h b/include/nuttx/streams.h index 6ae6b8c943015be9a9e819b329682aec905b5b94..ffbcffc9ec58760bc3dfd19b2ad0e0774e3933c5 100644 --- a/include/nuttx/streams.h +++ b/include/nuttx/streams.h @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef _INCLUDE_NUTTX_STREAMS_H -#define _INCLUDE_NUTTX_STREAMS_H +#ifndef __INCLUDE_NUTTX_STREAMS_H +#define __INCLUDE_NUTTX_STREAMS_H /**************************************************************************** * Included Files @@ -440,4 +440,4 @@ int lib_vsprintf(FAR struct lib_outstream_s *obj, } #endif -#endif /* _INCLUDE_NUTTX_STREAMS_H */ +#endif /* __INCLUDE_NUTTX_STREAMS_H */ diff --git a/include/nuttx/timers/oneshot.h b/include/nuttx/timers/oneshot.h new file mode 100644 index 0000000000000000000000000000000000000000..2fd001758e73cd4658a2f11e2bf62d444bf721fa --- /dev/null +++ b/include/nuttx/timers/oneshot.h @@ -0,0 +1,275 @@ +/**************************************************************************** + * include/nuttx/timers/oneshot.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 __INCLUDE_NUTTX_TIMERS_ONESHOT_H +#define __INCLUDE_NUTTX_TIMERS_ONESHOT_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include + +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ +/* IOCTL commands ***********************************************************/ +/* These commands are used by applications to access the oneshot lower-half + * logic via the oneshot character driver IOCTL command. Since the oneshot + * driver is a device control interface and not a data transfer interface, + * the majority of the functionality is implemented in driver IOCTL calls. + * The oneshot IOCTL commands are listed below: + * + * These are detected and handled by the "upper half" timer driver. + * + * OSIOC_MAXDELAY - Return the maximum delay that can be supported by + * this timer. + * Argument: A referenct to a struct timespec in which + * the maximum time will be returned. + * OSIOC_START - Start the oneshot timer + * Argument: A reference to struct oneshot_start_s + * OSIOC_CANCEL - Stop the timer + * Argument: A reference to a struct timespec in which + * the time remaining will be returned. + * + * NOTE: _TCIOC(0x0020) througn _TCIOC(0x003f) are reserved for use by the + * oneshot driver to assure that the values are unique. Other timer drivers + * must not use IOCTL commands in this numeric range. + */ + +#define OSIOC_MAXDELAY _TCIOC(0x0020) +#define OSIOC_START _TCIOC(0x0021) +#define OSIOC_CANCEL _TCIOC(0x0022) + +/* Method access helper macros **********************************************/ + +/**************************************************************************** + * Name: ONESHOT_MAX_DELAY + * + * Description: + * Determine the maximum delay of the one-shot timer (in microseconds) + * + * Input Parameters: + * lower An instance of the lower-half oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * ts The location in which to return the maxumum delay. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +#define ONESHOT_MAX_DELAY(l,t) ((l)->ops->max_delay(l,t)) + +/**************************************************************************** + * Name: ONESHOT_START + * + * Description: + * Start the oneshot timer + * + * Input Parameters: + * lower An instance of the lower-half oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * handler The function to call when when the oneshot timer expires. + * arg An opaque argument that will accompany the callback. + * ts Provides the duration of the one shot timer. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned + * on failure. + * + ****************************************************************************/ + +#define ONESHOT_START(l,h,a,t) ((l)->ops->start(l,h,a,t)) + +/**************************************************************************** + * Name: ONESHOT_CANCEL + * + * Description: + * Cancel the oneshot timer and return the time remaining on the timer. + * + * NOTE: This function may execute at a high rate with no timer running (as + * when pre-emption is enabled and disabled). + * + * Input Parameters: + * lower Caller allocated instance of the oneshot state structure. This + * structure must have been previously initialized via a call to + * oneshot_initialize(); + * ts The location in which to return the time remaining on the + * oneshot timer. A time of zero is returned if the timer is + * not running. + * + * Returned Value: + * Zero (OK) is returned on success. A call to up_timer_cancel() when + * the timer is not active should also return success; a negated errno + * value is returned on any failure. + * + ****************************************************************************/ + +#define ONESHOT_CANCEL(l,t) ((l)->ops->cancel(l,t)) + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/* This describes the callback function that will be invoked when the oneshot + * timer expires. The oneshot fires, the client will receive: + * + * lower - An instance of the lower half driver + * arg - The opaque argument provided when the interrupt was registered + */ + +struct oneshot_lowerhalf_s; +typedef void (*oneshot_callback_t)(FAR struct oneshot_lowerhalf_s *lower, + FAR void *arg); + +/* The one short operations supported by the lower half driver */ + +struct timespec; +struct oneshot_operations_s +{ + CODE int (*max_delay)(FAR struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts); + CODE int (*start)(FAR struct oneshot_lowerhalf_s *lower, + oneshot_callback_t callback, FAR void *arg, + FAR const struct timespec *ts); + CODE int (*cancel)(struct oneshot_lowerhalf_s *lower, + FAR struct timespec *ts); +}; + +/* This structure describes the state of the oneshot timer lower-half driver */ + +struct oneshot_lowerhalf_s +{ + /* This is the part of the lower half driver that is visible to the upper- + * half client of the driver. + */ + + FAR const struct oneshot_operations_s *ops; + + /* Private lower half data may follow */ +}; + +#ifdef CONFIG_ONESHOT +/* Argument to OSIOC_START IOCTL command */ + +struct oneshot_start_s +{ + pid_t pid; /* PID of task to be signalled (0 means calling task) */ + int signo; /* Signal number to use */ + FAR void *arg; /* Signal value argument */ + struct timespec ts; /* Delay until time expiration */ +}; +#endif + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Name: oneshot_initialize + * + * Description: + * Initialize the oneshot timer and return a oneshot lower half driver + * instance. + * + * Input Parameters: + * chan Timer counter channel to be used. + * resolution The required resolution of the timer in units of + * microseconds. NOTE that the range is restricted to the + * range of uint16_t (excluding zero). + * + * Returned Value: + * On success, a non-NULL instance of the oneshot lower-half driver is + * returned. NULL is return on any failure. + * + ****************************************************************************/ + +FAR struct oneshot_lowerhalf_s *oneshot_initialize(int chan, + uint16_t resolution); + +/**************************************************************************** + * Name: oneshot_register + * + * Description: + * Register the oneshot device as 'devpath' + * + * Input Parameters: + * devpath - The full path to the driver to register. E.g., "/dev/oneshot0" + * lower - An instance of the lower half interface + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. The following + * possible error values may be returned (most are returned by + * register_driver()): + * + * EINVAL - 'path' is invalid for this operation + * EEXIST - An inode already exists at 'path' + * ENOMEM - Failed to allocate in-memory resources for the operation + * + ****************************************************************************/ + +#ifdef CONFIG_ONESHOT +int oneshot_register(FAR const char *devname, + FAR struct oneshot_lowerhalf_s *lower); +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __INCLUDE_NUTTX_TIMERS_ONESHOT_H */ diff --git a/include/nuttx/timers/timer.h b/include/nuttx/timers/timer.h index 5d11498e71e844f1d4b584a359f08e22ff0f7841..8df658376ae3454d61598f7429c44434f6369346 100644 --- a/include/nuttx/timers/timer.h +++ b/include/nuttx/timers/timer.h @@ -77,13 +77,18 @@ * NOTE: The TCIOC_SETHANDLER ioctl cannot be supported in the kernel build * mode. In that case direct callbacks from kernel space into user space is * forbidden. + * + * NOTE: _TCIOC(0x0001) througn _TCIOC(0x001f) are reserved for use by the + * timer driver to assure that the values are unique. Other timer drivers, + * such as the oneshot timer, must not use IOCTL commands in this numeric + * range. */ -#define TCIOC_START _TCIOC(0x001) -#define TCIOC_STOP _TCIOC(0x002) -#define TCIOC_GETSTATUS _TCIOC(0x003) -#define TCIOC_SETTIMEOUT _TCIOC(0x004) -#define TCIOC_SETHANDLER _TCIOC(0x005) +#define TCIOC_START _TCIOC(0x0001) +#define TCIOC_STOP _TCIOC(0x0002) +#define TCIOC_GETSTATUS _TCIOC(0x0003) +#define TCIOC_SETTIMEOUT _TCIOC(0x0004) +#define TCIOC_SETHANDLER _TCIOC(0x0005) /* Bit Settings *************************************************************/ /* Bit settings for the struct timer_status_s flags field */ diff --git a/include/nuttx/usb/pl2303.h b/include/nuttx/usb/pl2303.h index 925010db0273ce8d351e11316ea61cb3ff6fcc31..2f4ef137163148836d92a4d7953a62494684f09c 100644 --- a/include/nuttx/usb/pl2303.h +++ b/include/nuttx/usb/pl2303.h @@ -39,8 +39,8 @@ * ************************************************************************************/ -#ifndef _INCLUDE_NUTTX_USB_PL2303_H -#define _INCLUDE_NUTTX_USB_PL2303_H +#ifndef __INCLUDE_NUTTX_USB_PL2303_H +#define __INCLUDE_NUTTX_USB_PL2303_H /************************************************************************************ * Included Files @@ -88,4 +88,4 @@ int usbdev_serialinitialize(int minor); } #endif -#endif /* _INCLUDE_NUTTX_USB_PL2303_H */ +#endif /* __INCLUDE_NUTTX_USB_PL2303_H */ diff --git a/include/nuttx/usb/usb.h b/include/nuttx/usb/usb.h index d3c537bbcd6a1a0e211da9663c393d25d287e839..5195c114b4d584b9b30c6440e8404020d1ee2cd1 100644 --- a/include/nuttx/usb/usb.h +++ b/include/nuttx/usb/usb.h @@ -425,4 +425,5 @@ struct usb_iaddesc_s * Public Functions ************************************************************************************/ -#endif // __INCLUDE_NUTTX_USB_USB_H +#endif /* __INCLUDE_NUTTX_USB_USB_H */ + diff --git a/include/nuttx/usb/usbdev.h b/include/nuttx/usb/usbdev.h index 1e36963f75f2fe821501aea2ab294419bf8dc60b..ed7fe433ee51170bc0646745fe694f45e8cb327d 100644 --- a/include/nuttx/usb/usbdev.h +++ b/include/nuttx/usb/usbdev.h @@ -39,8 +39,8 @@ * ************************************************************************************/ -#ifndef _INCLUDE_NUTTX_USB_USBDEV_H -#define _INCLUDE_NUTTX_USB_USBDEV_H +#ifndef __INCLUDE_NUTTX_USB_USBDEV_H +#define __INCLUDE_NUTTX_USB_USBDEV_H /************************************************************************************ * Included Files @@ -386,4 +386,4 @@ void usbdev_dma_free(FAR void *memory); } #endif -#endif /* _INCLUDE_NUTTX_USB_USBDEV_H */ +#endif /* __INCLUDE_NUTTX_USB_USBDEV_H */ diff --git a/include/nuttx/usb/usbhost_devaddr.h b/include/nuttx/usb/usbhost_devaddr.h index df4514f3954196778a65b5af46689aba2be07ebf..378196b7d3a340e1a986786499d3c977ec31612a 100644 --- a/include/nuttx/usb/usbhost_devaddr.h +++ b/include/nuttx/usb/usbhost_devaddr.h @@ -40,8 +40,8 @@ * ****************************************************************************/ -#ifndef _INCLUDE_NUTTX_USB_USBHOST_DEVADDR_H -#define _INCLUDE_NUTTX_USB_USBHOST_DEVADDR_H +#ifndef __INCLUDE_NUTTX_USB_USBHOST_DEVADDR_H +#define __INCLUDE_NUTTX_USB_USBHOST_DEVADDR_H /**************************************************************************** * Included Files @@ -151,4 +151,4 @@ void usbhost_devaddr_destroy(FAR struct usbhost_hubport_s *hport, } #endif -#endif /* _INCLUDE_NUTTX_USB_USBHOST_DEVADDR_H */ +#endif /* __INCLUDE_NUTTX_USB_USBHOST_DEVADDR_H */ diff --git a/include/nuttx/usb/usbmsc.h b/include/nuttx/usb/usbmsc.h index 140d2907ff8fe3d9b836a1f50b07aadd73ed60c9..270fac0da3e512d5749e9c5d39660d6b106569b9 100644 --- a/include/nuttx/usb/usbmsc.h +++ b/include/nuttx/usb/usbmsc.h @@ -39,8 +39,8 @@ * ************************************************************************************/ -#ifndef _INCLUDE_NUTTX_USB_USBMSC_H -#define _INCLUDE_NUTTX_USB_USBMSC_H +#ifndef __INCLUDE_NUTTX_USB_USBMSC_H +#define __INCLUDE_NUTTX_USB_USBMSC_H /************************************************************************************ * Included Files @@ -255,4 +255,4 @@ void usbmsc_uninitialize(FAR void *handle); } #endif -#endif /* _INCLUDE_NUTTX_USB_USBMSC_H */ +#endif /* __INCLUDE_NUTTX_USB_USBMSC_H */ diff --git a/include/nuttx/video/fb.h b/include/nuttx/video/fb.h index 1264515adeede1e67cdb9bd2144b1efcba2b7bb0..fec81822ca90f5b012a1ccfdc8179e5e39963b59 100644 --- a/include/nuttx/video/fb.h +++ b/include/nuttx/video/fb.h @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef _INCLUDE_NUTTX_VIDEO_FB_H -#define _INCLUDE_NUTTX_VIDEO_FB_H +#ifndef __INCLUDE_NUTTX_VIDIO_FB_H +#define __INCLUDE_NUTTX_VIDIO_FB_H /**************************************************************************** * Included Files @@ -426,4 +426,4 @@ void up_fbuninitialize(int display); } #endif -#endif /* _INCLUDE_NUTTX_VIDEO_FB_H */ +#endif /* __INCLUDE_NUTTX_VIDIO_FB_H */ diff --git a/include/nuttx/wireless/cc3000/cc3000_common.h b/include/nuttx/wireless/cc3000/cc3000_common.h index 4a11f74591b4545c6957e8a65c4d2f5c2b891d77..857c6560b33583a967fd65dcfd142297379e692c 100644 --- a/include/nuttx/wireless/cc3000/cc3000_common.h +++ b/include/nuttx/wireless/cc3000/cc3000_common.h @@ -32,8 +32,8 @@ * ****************************************************************************/ -#ifndef _INCLUDE_NUTTX_WIRELESS_CC3000_CC3000_COMMON_H -#define _INCLUDE_NUTTX_WIRELESS_CC3000_CC3000_COMMON_H +#ifndef __INCLUDE_NUTTX_WIRELESS_CC3000_CC3300_COMMON_H +#define __INCLUDE_NUTTX_WIRELESS_CC3000_CC3300_COMMON_H /**************************************************************************** * Included files @@ -391,4 +391,4 @@ unsigned long STREAM_TO_UINT32_f(char* p, uint16_t offset); } #endif // __cplusplus -#endif // _INCLUDE_NUTTX_WIRELESS_CC3000_CC3000_COMMON_H +#endif // __INCLUDE_NUTTX_WIRELESS_CC3000_CC3300_COMMON_H diff --git a/include/nuttx/wireless/cc3000/hci.h b/include/nuttx/wireless/cc3000/hci.h index 409fd9d1e94dbaaa0254b1f949d5febd3a4608ec..8b4c3e67ab53dd8e9ad88eec25f4d25bf3cc1343 100644 --- a/include/nuttx/wireless/cc3000/hci.h +++ b/include/nuttx/wireless/cc3000/hci.h @@ -32,8 +32,8 @@ * ****************************************************************************/ -#ifndef _INCLUDE_NUTTX_WIRELESS_CC3000_HCI_H -#define _INCLUDE_NUTTX_WIRELESS_CC3000_HCI_H +#ifndef __INCLUDE_NUTTX_WIRELESS_CC3000_HCI_H +#define __INCLUDE_NUTTX_WIRELESS_CC3000_HCI_H /**************************************************************************** * Included Files @@ -296,4 +296,4 @@ void hci_patch_send(uint8_t ucOpcode, uint8_t *pucBuff, char *patch, } #endif // __cplusplus -#endif // _INCLUDE_NUTTX_WIRELESS_CC3000_HCI_H +#endif // __INCLUDE_NUTTX_WIRELESS_CC3000_HCI_H diff --git a/include/nuttx/wireless/cc3000/netapp.h b/include/nuttx/wireless/cc3000/netapp.h index e42b5876a4039b4f15b62dbcb0ebcfd3a08cebf4..8a0bcf4acb50d3ea19e0b5fb4835fb4f9e979cea 100644 --- a/include/nuttx/wireless/cc3000/netapp.h +++ b/include/nuttx/wireless/cc3000/netapp.h @@ -32,8 +32,8 @@ * ****************************************************************************/ -#ifndef _INCLUDE_NUTTX_WIRELESS_CC3000_NETAPP_H -#define _INCLUDE_NUTTX_WIRELESS_CC3000_NETAPP_H +#ifndef __INCLUDE_NUTTX_WIRELESS_CC3000_NETAPP_H +#define __INCLUDE_NUTTX_WIRELESS_CC3000_NETAPP_H /**************************************************************************** * Included Files @@ -354,4 +354,4 @@ long netapp_set_debug_level(unsigned long ulLevel); } #endif // __cplusplus -#endif // _INCLUDE_NUTTX_WIRELESS_CC3000_NETAPP_H +#endif // __INCLUDE_NUTTX_WIRELESS_CC3000_NETAPP_H diff --git a/include/nuttx/wireless/cc3000/nvmem.h b/include/nuttx/wireless/cc3000/nvmem.h index f9b3b48695c353d69841a9da78bfbe82dccd9028..afc6aec8905391b2616e5b5537686c309561f8d2 100644 --- a/include/nuttx/wireless/cc3000/nvmem.h +++ b/include/nuttx/wireless/cc3000/nvmem.h @@ -32,8 +32,8 @@ * ****************************************************************************/ -#ifndef _INCLUDE_NUTTX_WIRELESS_CC3000_NVMEM_H -#define _INCLUDE_NUTTX_WIRELESS_CC3000_NVMEM_H +#ifndef __INCLUDE_NUTTX_WIRELESS_CC3000_NVMEM_H +#define __INCLUDE_NUTTX_WIRELESS_CC3000_NVMEM_H /**************************************************************************** * Included Files @@ -241,4 +241,4 @@ signed long nvmem_create_entry(unsigned long ulFileId, unsigned long ulNewLen); } #endif // __cplusplus -#endif // _INCLUDE_NUTTX_WIRELESS_CC3000_NVMEM_H +#endif // __INCLUDE_NUTTX_WIRELESS_CC3000_NVMEM_H diff --git a/include/signal.h b/include/signal.h index bd8ee9f31760c2157898394187b10a9e8c5de5b3..a4060fe33163f21040b998a600c40c34ba0fdaf6 100644 --- a/include/signal.h +++ b/include/signal.h @@ -194,6 +194,12 @@ typedef uint32_t sigset_t; /* Bit set of 32 signals */ #define __SIGSET_T_DEFINED 1 +/* Possibly volatile-qualified integer type of an object that can be accessed + * as an atomic entity, even in the presence of asynchronous interrupts. + */ + +typedef volatile int sig_atomic_t; + /* This defines the type of the siginfo si_value field */ union sigval @@ -292,9 +298,9 @@ int sighold(int signo); int sigismember(FAR const sigset_t *set, int signo); int sigignore(int signo); CODE void (*signal(int signo, CODE void (*func)(int signo)))(int signo); -int sigprocmask(int how, FAR const sigset_t *set, FAR sigset_t *oset); int sigpause(int signo); int sigpending(FAR sigset_t *set); +int sigprocmask(int how, FAR const sigset_t *set, FAR sigset_t *oset); #ifdef CONFIG_CAN_PASS_STRUCTS int sigqueue(int pid, int signo, union sigval value); #else diff --git a/include/stdio.h b/include/stdio.h index 20994e22ffdcc9ccae542d7f0c2921ce80c0d36f..d2ab907c0cae4c3de5d6ee7ed6faf00ba876aaf1 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -194,6 +194,7 @@ int vdprintf(int fd, FAR const IPTR char *fmt, va_list ap); FAR char *tmpnam(FAR char *s); FAR char *tempnam(FAR const char *dir, FAR const char *pfx); +int remove(FAR const char *path); #undef EXTERN #if defined(__cplusplus) diff --git a/include/stdlib.h b/include/stdlib.h index d08db9d557041b373815f5c7a4bdf4e9561b69a3..6b4498ebea3d9023bd875119e2d501bf5f0c4ffe 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/stdlib.h * - * Copyright (C) 2007-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -143,9 +143,9 @@ extern "C" void srand(unsigned int seed); int rand(void); +#ifndef CONFIG_DISABLE_ENVIRON /* Environment variable support */ -#ifndef CONFIG_DISABLE_ENVIRON FAR char **get_environ_ptr(void); FAR char *getenv(FAR const char *name); int putenv(FAR const char *string); @@ -170,6 +170,16 @@ int on_exit(CODE void (*func)(int, FAR void *), FAR void *arg); void _exit(int status); /* See unistd.h */ #define _Exit(s) _exit(s) +/* System() command is not implemented in the NuttX libc because it is so + * entangled with shell logic. There is an experimental version at + * apps/system/system. system() is prototyped here, however, for + * standards compatibility. + */ + +#ifndef __KERNEL__ +int system(FAR char *cmd); +#endif + /* String to binary conversions */ long strtol(FAR const char *nptr, FAR char **endptr, int base); diff --git a/include/sys/epoll.h b/include/sys/epoll.h index 01aecdd69efd3e53b2bd266212b23884b2861ae0..672dc1901a2e534cce2351d7f0269e9134dca906 100644 --- a/include/sys/epoll.h +++ b/include/sys/epoll.h @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __INCLUDE_NUTTX_SYS_EPOLL_H -#define __INCLUDE_NUTTX_SYS_EPOLL_H +#ifndef __INCLUDE_SYS_EPOLL_H +#define __INCLUDE_SYS_EPOLL_H /**************************************************************************** * Included Files @@ -107,4 +107,4 @@ int epoll_wait(int epfd, struct epoll_event *evs, int maxevents, int timeout); void epoll_close(int epfd); -#endif /* __INCLUDE_NUTTX_SYS_EPOLL_H */ +#endif /* __INCLUDE_SYS_EPOLL_H */ diff --git a/include/sys/syscall.h b/include/sys/syscall.h index 5f36242b619d862493401035bdee6871c8f51229..2fba44de34fd69ba93290c2c06a1a8069613175b 100644 --- a/include/sys/syscall.h +++ b/include/sys/syscall.h @@ -215,7 +215,12 @@ #define SYS_clock_getres (__SYS_clock+1) #define SYS_clock_gettime (__SYS_clock+2) #define SYS_clock_settime (__SYS_clock+3) -#define __SYS_timers (__SYS_clock+4) +#ifdef CONFIG_CLOCK_TIMEKEEPING +# define SYS_adjtime (__SYS_clock+4) +# define __SYS_timers (__SYS_clock+5) +#else +# define __SYS_timers (__SYS_clock+4) +#endif /* The following are defined only if POSIX timers are supported */ diff --git a/include/sys/time.h b/include/sys/time.h index b36e30fca9a46e4c65775feb8b6200f6e5d10159..7b1e15e9b5faae38120bc92820856808601626c0 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -1,7 +1,7 @@ /**************************************************************************** * include/sys/time.h * - * Copyright (C) 2009, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -112,6 +112,7 @@ /**************************************************************************** * Public Type Definitions ****************************************************************************/ + /* struct timeval represents time as seconds plus microseconds */ struct timeval @@ -190,6 +191,46 @@ int gettimeofday(FAR struct timeval *tv, FAR struct timezone *tz); int settimeofday(FAR const struct timeval *tv, FAR struct timezone *tz); +/**************************************************************************** + * Name: adjtime + * + * Description: + * The adjtime() function gradually adjusts the system clock (as returned + * by gettimeofday(2)). The amount of time by which the clock is to be + * adjusted is specified in the structure pointed to by delta. + * + * This structure has the following form: + * + * struct timeval + * { + * time_t tv_sec; (seconds) + * suseconds_t tv_usec; (microseconds) + * }; + * + * If the adjustment in delta is positive, then the system clock is + * speeded up by some small percentage (i.e., by adding a small amount of + * time to the clock value in each second) until the adjustment has been + * completed. If the adjustment in delta is negative, then the clock is + * slowed down in a similar fashion. + * + * If a clock adjustment from an earlier adjtime() call is already in + * progress at the time of a later adjtime() call, and delta is not NULL + * for the later call, then the earlier adjustment is stopped, but any + * already completed part of that adjustment is not undone. + * + * If olddelta is not NULL, then the buffer that it points to is used to + * return the amount of time remaining from any previous adjustment that + * has not yet been completed. + * + * NOTE: This is not a POSIX interface but derives from 4.3BSD, System V. + * It is also supported for Linux compatibility. + * + ****************************************************************************/ + +#ifdef CONFIG_CLOCK_TIMEKEEPING +int adjtime(FAR const struct timeval *delta, FAR struct timeval *olddelta); +#endif + #undef EXTERN #if defined(__cplusplus) } diff --git a/include/termios.h b/include/termios.h index 14cb8f656d8e2eb58cd243eab39e237d49becf2d..00ff32e5c6692dae245c78268f0fd978cc0137bf 100644 --- a/include/termios.h +++ b/include/termios.h @@ -298,9 +298,6 @@ int tcsendbreak(int fd, int duration); int tcsetattr(int fd, int options, FAR const struct termios *termiosp); -/* Check if a file descriptor corresponds to a terminal I/O file */ - -int isatty(int fd); #undef EXTERN #ifdef __cplusplus diff --git a/include/time.h b/include/time.h index 0fd4b7611bc8ca43f46d060c4d570e2dca34dbe0..f52435701374aa8700a2a12cda2dac637058b3a4 100644 --- a/include/time.h +++ b/include/time.h @@ -41,6 +41,7 @@ ********************************************************************************/ #include +#include #include #include @@ -103,6 +104,7 @@ /******************************************************************************** * Public Types ********************************************************************************/ + /* Scalar types */ typedef uint32_t time_t; /* Holds time in seconds */ @@ -214,6 +216,12 @@ FAR char *ctime_r(FAR const time_t *timep, FAR char *buf); time_t time(FAR time_t *timep); +#ifdef CONFIG_HAVE_DOUBLE +double difftime(time_t time1, time_t time0); +#else +float difftime(time_t time1, time_t time0); +#endif + int timer_create(clockid_t clockid, FAR struct sigevent *evp, FAR timer_t *timerid); int timer_delete(timer_t timerid); diff --git a/include/unistd.h b/include/unistd.h index 909df0b33835abf19a6ff7d25bc16166d4c75f63..7361b412eaec062507e53c2e91e9115258d64d55 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -165,6 +165,10 @@ ssize_t write(int fd, FAR const void *buf, size_t nbytes); ssize_t pread(int fd, FAR void *buf, size_t nbytes, off_t offset); ssize_t pwrite(int fd, FAR const void *buf, size_t nbytes, off_t offset); +/* Check if a file descriptor corresponds to a terminal I/O file */ + +int isatty(int fd); + /* Memory management */ #if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_MM_PGALLOC) && \ diff --git a/libc/math/lib_asin.c b/libc/math/lib_asin.c index 2f45a24a1d9ecf142176e2d1806cf0cf82dcde55..15bce7913a1b0fd263d0242a4c34abc816f07cd4 100644 --- a/libc/math/lib_asin.c +++ b/libc/math/lib_asin.c @@ -35,6 +35,8 @@ #include #include +#ifdef CONFIG_HAVE_DOUBLE + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -42,16 +44,40 @@ #undef DBL_EPSILON #define DBL_EPSILON 1e-12 +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/* This lib uses Newton's method to approximate asin(x). Newton's Method + * converges very slowly for x close to 1. We can accelerate convergence + * with the following identy: asin(x)=Sign(x)*(Pi/2-asin(sqrt(1-x^2))) + */ + +static double asin_aux(double x) +{ + long double y; + double y_cos, y_sin; + + y = 0.0; + y_sin = 0.0; + + while (fabs(y_sin - x) > DBL_EPSILON) + { + y_cos = cos(y); + y -= ((long double)y_sin - (long double)x) / (long double)y_cos; + y_sin = sin(y); + } + + return y; +} + /**************************************************************************** * Public Functions ****************************************************************************/ -#ifdef CONFIG_HAVE_DOUBLE double asin(double x) { - long double y; - long double y_sin; - long double y_cos; + double y; /* Verify that the input value is in the domain of the function */ @@ -60,26 +86,19 @@ double asin(double x) return NAN; } - y = 0; + /* if x is > sqrt(2), use identity for faster convergence */ - while (1) + if (fabs(x) > 0.71) { - y_sin = sin(y); - y_cos = cos(y); - - if (y > M_PI_2 || y < -M_PI_2) - { - y = fmod(y, M_PI); - } - - if (y_sin + DBL_EPSILON >= x && y_sin - DBL_EPSILON <= x) - { - break; - } - - y = y - (y_sin - x) / y_cos; + y = M_PI_2 - asin_aux(sqrt(1.0 - x * x)); + y = copysign(y, x); + } + else + { + y = asin_aux(x); } return y; } -#endif + +#endif /* CONFIG_HAVE_DOUBLE */ diff --git a/libc/math/lib_asinf.c b/libc/math/lib_asinf.c index ac17a53944187bf979dc75ece4d94fc89e65175b..e60f439f6e7f0039311bb5f2b8c9ec18ce6df42a 100644 --- a/libc/math/lib_asinf.c +++ b/libc/math/lib_asinf.c @@ -3,7 +3,7 @@ * * This file is a part of NuttX: * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Ported by: Darcy Gong * * It derives from the Rhombs OS math library by Nick Johnson which has @@ -33,33 +33,58 @@ #include /**************************************************************************** - * Public Functions + * Private Functions ****************************************************************************/ -float asinf(float x) +/* This lib uses Newton's method to approximate asin(x). Newton's Method + * converges very slowly for x close to 1. We can accelerate convergence + * with the following identy: asin(x)=Sign(x)*(Pi/2-asin(sqrt(1-x^2))) + */ + +static float asinf_aux(float x) { - long double y, y_sin, y_cos; + double y; + float y_sin, y_cos; - y = 0; + y = 0.0; + y_sin = 0.0F; - while (1) + while (fabsf(y_sin - x) > FLT_EPSILON) { - y_sin = sinf(y); y_cos = cosf(y); + y -= ((double)y_sin - (double)x) / (double)y_cos; + y_sin = sinf(y); + } - if (y > M_PI_2_F || y < -M_PI_2_F) - { - y = fmodf(y, M_PI_F); - } + return y; +} - if (y_sin + FLT_EPSILON >= x && y_sin - FLT_EPSILON <= x) - { - break; - } +/**************************************************************************** + * Public Functions + ****************************************************************************/ - y = y - (y_sin - x) / y_cos; +float asinf(float x) +{ + float y; + + /* Verify that the input value is in the domain of the function */ + + if (x < -1.0F || x > 1.0F || isnan(x)) + { + return NAN_F; + } + + /* if x is > sqrt(2), use identity for faster convergence */ + + if (fabsf(x) > 0.71F) + { + y = M_PI_2_F - asinf_aux(sqrtf(1.0F - x * x)); + y = copysignf(y, x); + } + else + { + y = asinf_aux(x); } return y; } - diff --git a/libc/math/lib_asinl.c b/libc/math/lib_asinl.c index 466910daf31318879f53e5c2ad334d005dce50da..088257a1e5f02a71bd073e9c024eb19a64088b5d 100644 --- a/libc/math/lib_asinl.c +++ b/libc/math/lib_asinl.c @@ -3,7 +3,7 @@ * * This file is a part of NuttX: * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Ported by: Darcy Gong * * It derives from the Rhombs OS math library by Nick Johnson which has @@ -35,35 +35,57 @@ #include #include +#ifdef CONFIG_HAVE_LONG_DOUBLE + /**************************************************************************** * Public Functions ****************************************************************************/ -#ifdef CONFIG_HAVE_LONG_DOUBLE -long double asinl(long double x) +static long double asinl_aux(long double x) { - long double y, y_sin, y_cos; + long double y, y_cos, y_sin; - y = 0; + y = 0.0; + y_sin = 0.0; - while (1) + while (fabsl(y_sin - x) > DBL_EPSILON) { - y_sin = sinl(y); y_cos = cosl(y); + y -= (y_sin - x) / y_cos; + y_sin = sinl(y); + } + + return y; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +long double asinl(long double x) +{ + long double y; + + /* Verify that the input value is in the domain of the function */ - if (y > M_PI_2 || y < -M_PI_2) - { - y = fmodl(y, M_PI); - } + if (x < -1.0 || x > 1.0 || isnan(x)) + { + return NAN; + } - if (y_sin + LDBL_EPSILON >= x && y_sin - LDBL_EPSILON <= x) - { - break; - } + /* if x is > sqrt(2), use identity for faster convergence */ - y = y - (y_sin - x) / y_cos; + if (fabsl(x) > 0.71) + { + y = M_PI_2 - asinl_aux(sqrtl(1.0 - x * x)); + y = copysignl(y, x); + } + else + { + y = asinl_aux(x); } return y; } -#endif + +#endif /* CONFIG_HAVE_LONG_DOUBLE */ diff --git a/libc/math/lib_copysignf.c b/libc/math/lib_copysignf.c index 9684f68a746131509aaea2385ad88cae79823284..c438e7d43ae2779350b837923943b6182b44afad 100644 --- a/libc/math/lib_copysignf.c +++ b/libc/math/lib_copysignf.c @@ -1,10 +1,20 @@ /**************************************************************************** * libc/math/lib_copysignf.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015, 2016 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Dave Marples * + * Replaced on 2016-07-30 by David Alession with a faster version of + * copysignf() from NetBSD with the following Copyright: + * + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunPro, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -42,6 +52,44 @@ #include #include +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Get a 32 bit int from a float. */ + +#define GET_FLOAT_WORD(i,d) \ + do \ + { \ + ieee_float_shape_type gf_u; \ + gf_u.value = (d); \ + (i) = gf_u.word; \ + } while (0) + +/* Set a float from a 32 bit int. */ + +#define SET_FLOAT_WORD(d,i) \ + do \ + { \ + ieee_float_shape_type sf_u; \ + sf_u.word = (i); \ + (d) = sf_u.value; \ + } while (0) + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* union which permits us to convert between a float and a 32 bit int. */ + +typedef union +{ + float value; + uint32_t word; +} +ieee_float_shape_type; /**************************************************************************** * Public Functions @@ -49,10 +97,12 @@ float copysignf(float x, float y) { - if (y < 0) - { - return -fabsf(x); - } + uint32_t ix; + uint32_t iy; + + GET_FLOAT_WORD(ix, x); + GET_FLOAT_WORD(iy, y); + SET_FLOAT_WORD(x, (ix & 0x7fffffff) | (iy & 0x80000000)); - return fabsf(x); + return x; } diff --git a/libc/math/lib_erf.c b/libc/math/lib_erf.c index 215c1017204aeb1746f3396bb0b17373f64bf86f..28f266196f09c3c989cf7171c0afce977ebb1502 100644 --- a/libc/math/lib_erf.c +++ b/libc/math/lib_erf.c @@ -1,6 +1,7 @@ /**************************************************************************** * libc/math/lib_erf.c * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Copyright (C) 2015 Brennan Ashton. All rights reserved. * Author: Brennan Ashton * @@ -42,32 +43,42 @@ #include +#ifdef CONFIG_HAVE_DOUBLE + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define A1 0.254829592 +#define A2 (-0.284496736) +#define A3 1.421413741 +#define A4 (-1.453152027) +#define A5 1.061405429 +#define P 0.3275911 + /**************************************************************************** * Public Functions ****************************************************************************/ -#ifdef CONFIG_HAVE_DOUBLE +/**************************************************************************** + * Name: erf + * + * Description: + * This implementation comes from the Handbook of Mathmatical Functions + * The implementations in this book are not protected by copyright. + * erf comes from formula 7.1.26 + * + ****************************************************************************/ + double erf(double x) { - /* This implementation comes from the Handbook of Mathmatical Functions - * The implementations in this book are not protected by copyright. - * erf comes from formula 7.1.26 - */ - - char sign; double t; - double a1, a2, a3, a4, a5, p; - - a1 = 0.254829592; - a2 = -0.284496736; - a3 = 1.421413741; - a4 = -1.453152027; - a5 = 1.061405429; - p = 0.3275911; + double z; - sign = (x >= 0 ? 1 : -1); - t = 1.0/(1.0 + p*x); - return sign * (1.0 - (((((a5 * t + a4) * t) + a3) * t + a2) * t + a1) * t * - (double)expf(-x * x)); + z = fabs(x); + t = 1.0 / (1.0 + P * z); + t = 1.0 - (((((A5 * t + A4) * t) + A3) * t + A2) * t + A1) * t * exp(-z * z); + return copysign(t, x); } -#endif + +#endif /* CONFIG_HAVE_DOUBLE */ diff --git a/libc/math/lib_erff.c b/libc/math/lib_erff.c index 364b7fe03c00c66342703289b52ddc356efc0238..8ca0fefb0fef47e64dd7aafa2c70db977c617e0e 100644 --- a/libc/math/lib_erff.c +++ b/libc/math/lib_erff.c @@ -1,6 +1,7 @@ /**************************************************************************** * libc/math/lib_erff.c * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Copyright (C) 2015 Brennan Ashton. All rights reserved. * Author: Brennan Ashton * @@ -42,29 +43,38 @@ #include +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define A1 0.254829592F +#define A2 (-0.284496736F) +#define A3 1.421413741F +#define A4 (-1.453152027F) +#define A5 1.061405429F +#define P 0.3275911F + /**************************************************************************** * Public Functions ****************************************************************************/ +/**************************************************************************** + * Name: erff + * + * Description: + * This implementation comes from the Handbook of Mathmatical Functions + * The implementations in this book are not protected by copyright. + * erf comes from formula 7.1.26 + * + ****************************************************************************/ + float erff(float x) { - /* This implementation comes from the Handbook of Mathmatical Functions - * The implementations in this book are not protected by copyright. - * erf comes from formula 7.1.26 - */ - - char sign; float t; - float a1, a2, a3, a4, a5, p; - - a1 = 0.254829592F; - a2 = -0.284496736F; - a3 = 1.421413741F; - a4 = -1.453152027F; - a5 = 1.061405429F; - p = 0.3275911F; + float z; - sign = (x >= 0 ? 1 : -1); - t = 1.0F/(1.0F + p*x); - return sign * (1.0F - (((((a5 * t + a4) * t) + a3) * t + a2) * t + a1) * t * expf(-x * x)); + z = fabsf(x); + t = 1.0F / (1.0F + P * z); + t = 1.0F - (((((A5 * t + A4) * t) + A3) * t + A2) * t + A1) * t * expf(-z * z); + return copysignf(t, x); } diff --git a/libc/math/lib_erfl.c b/libc/math/lib_erfl.c index 44d62389808f4b86d7ef57dd3d8924a104ec86bf..2e674bb14973f993a8ef80cf6aa8ed9570bbb7d4 100644 --- a/libc/math/lib_erfl.c +++ b/libc/math/lib_erfl.c @@ -46,6 +46,13 @@ * Public Functions ****************************************************************************/ +#define A1 0.254829592 +#define A2 (-0.284496736) +#define A3 1.421413741 +#define A4 (-1.453152027) +#define A5 1.061405429 +#define P 0.3275911 + #ifdef CONFIG_HAVE_LONG_DOUBLE long double erfl(long double x) { @@ -54,19 +61,11 @@ long double erfl(long double x) * erf comes from formula 7.1.26 */ - char sign; - long double t; - long double a1, a2, a3, a4, a5, p; - - a1 = 0.254829592; - a2 = -0.284496736; - a3 = 1.421413741; - a4 = -1.453152027; - a5 = 1.061405429; - p = 0.3275911; + long double t, z; - sign = (x >= 0 ? 1 : -1); - t = 1.0/(1.0 + p*x); - return sign * (1.0 - (((((a5 * t + a4) * t) + a3) * t + a2) * t + a1) * t * expf(-x * x)); + z = fabsl(x); + t = 1.0 / (1.0 + P * z); + t = 1.0 - (((((A5 * t + A4) * t) + A3) * t + A2) * t + A1) * t * expl(-z * z); + return copysignl(t, x); } #endif diff --git a/libc/math/lib_floor.c b/libc/math/lib_floor.c index f583dfa6b72f8f1478a59297957cc7337b117ba5..7a8cc7a1109db1ddf411a6dd36c6e2d4afd0f729 100644 --- a/libc/math/lib_floor.c +++ b/libc/math/lib_floor.c @@ -41,12 +41,26 @@ #ifdef CONFIG_HAVE_DOUBLE double floor(double x) { - modf(x, &x); - if (x < 0.0) + double modx; + + /* modf() will return the integer part of X. The return value of floor + * differs for non-integer, negative values. + * + * x modf floor + * ---- ----- ----- + * 2.0 2.0 2.0 + * 2.4 2.0 2.0 + * 2.9 2.0 2.0 + * -2.7 -2.0 -3.0 + * -2.0 -2.0 -2.0 + */ + + (void)modf(x, &modx); + if (x < 0.0 && x < modx) { - x -= 1.0; + modx -= 1.0; } - return x; + return modx; } #endif diff --git a/libc/math/lib_floorf.c b/libc/math/lib_floorf.c index d2fac02d2d56eb0e59ee0bb6fc9a25a5bf275b03..deefcf9407f26537f6ea156a070024951803e6dc 100644 --- a/libc/math/lib_floorf.c +++ b/libc/math/lib_floorf.c @@ -37,11 +37,25 @@ float floorf(float x) { - modff(x, &x); - if (x < 0.0F) + float modx; + + /* modf() will return the integer part of X. The return value of floor + * differs for non-integer, negative values. + * + * x modff floor + * ---- ----- ----- + * 2.0 2.0 2.0 + * 2.4 2.0 2.0 + * 2.9 2.0 2.0 + * -2.7 -2.0 -3.0 + * -2.0 -2.0 -2.0 + */ + + (void)modff(x, &modx); + if (x < 0.0F && x < modx) { - x -= 1.0F; + modx -= 1.0F; } - return x; + return modx; } diff --git a/libc/math/lib_floorl.c b/libc/math/lib_floorl.c index 214ade8ee28ea0b658b4c3e8b5c97e29d604ffee..f1328e9a72be082fdd798ef4c7e71b1094891d24 100644 --- a/libc/math/lib_floorl.c +++ b/libc/math/lib_floorl.c @@ -41,12 +41,27 @@ #ifdef CONFIG_HAVE_LONG_DOUBLE long double floorl(long double x) { - modfl(x, &x); - if (x < 0.0) + long double modx; + + /* modf() will return the integer part of X. The return value of floor + * differs for non-integer, negative values. + * + * x modfl floor + * ---- ----- ----- + * 2.0 2.0 2.0 + * 2.4 2.0 2.0 + * 2.9 2.0 2.0 + * -2.7 -2.0 -3.0 + * -2.0 -2.0 -2.0 + */ + + (void)modfl(x, &modx); + if (x < 0.0 && x < modx) { - x -= 1.0; + modx -= 1.0; } - return x; + return modx; + } #endif diff --git a/libc/misc/Make.defs b/libc/misc/Make.defs index dbdb3495471dae688f3cfd7d8a937b0c15e40871..ec3c76b94da407f2ec08b3b3d5638d38e8aae2e4 100644 --- a/libc/misc/Make.defs +++ b/libc/misc/Make.defs @@ -36,7 +36,7 @@ # Add the internal C files to the build CSRCS += lib_stream.c lib_filesem.c lib_utsname.c -CSRCS += lib_tea_encrypt.c lib_tea_decrypt.c +CSRCS += lib_xorshift128.c lib_tea_encrypt.c lib_tea_decrypt.c # Support for platforms that do not have long long types diff --git a/libc/misc/lib_dumpbuffer.c b/libc/misc/lib_dumpbuffer.c index b1024d00b730d8c33e5d2e79d78381711736779c..f535a23b857f7203d06dc085d2788b7016f3f108 100644 --- a/libc/misc/lib_dumpbuffer.c +++ b/libc/misc/lib_dumpbuffer.c @@ -1,7 +1,7 @@ /**************************************************************************** * libc/misc/lib_dumpbuffer.c * - * Copyright (C) 2009, 2011, 2014 Gregory Nutt. All rights reserved. + * 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 @@ -47,6 +47,33 @@ * Pre-processor definitions ****************************************************************************/ +#define _NITEMS 32 /* 32 bytes displayed per line */ +#define _LINESIZE (3 * _NITEMS + 4) /* 2 hex chars, ASCII char, 3 spaces, NUL */ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: lib_nibble + * + * Description: + * Convert a binary nibble to a hexadecimal character. + * + ****************************************************************************/ + +static char lib_nibble(unsigned char nibble) +{ + if (nibble < 10) + { + return '0' + nibble; + } + else + { + return 'a' + nibble - 10; + } +} + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -55,63 +82,76 @@ * Name: lib_dumpbuffer * * Description: - * Do a pretty buffer dump + * Do a pretty buffer dump. + * + * A fairly large on-stack buffer is used for the case where timestamps are + * applied to each line. * ****************************************************************************/ void lib_dumpbuffer(FAR const char *msg, FAR const uint8_t *buffer, unsigned int buflen) { + char buf[_LINESIZE]; unsigned int i; unsigned int j; unsigned int k; syslog(LOG_INFO, "%s (%p):\n", msg, buffer); - for (i = 0; i < buflen; i += 32) + for (i = 0; i < buflen; i += _NITEMS) { - syslog(LOG_INFO, "%04x: ", i); - for (j = 0; j < 32; j++) + FAR char *ptr = buf; + + /* Generate hex values: 2 * _NITEMS + 1 bytes */ + + for (j = 0; j < _NITEMS; j++) { k = i + j; - if (j == 16) + if (j == (_NITEMS / 2)) { - syslog(LOG_INFO, " "); + *ptr++ = ' '; } if (k < buflen) { - syslog(LOG_INFO, "%02x", buffer[k]); + *ptr++ = lib_nibble((buffer[k] >> 4) & 0xf); + *ptr++ = lib_nibble(buffer[k] & 0xf); } else { - syslog(LOG_INFO, " "); + *ptr++ = ' '; + *ptr++ = ' '; } } - syslog(LOG_INFO, " "); - for (j = 0; j < 32; j++) + *ptr++ = ' '; /* Plus 1 byte */ + + /* Generate printable characters: Plus 1 * _NITEMS + 1 bytes */ + + for (j = 0; j < _NITEMS; j++) { k = i + j; - if (j == 16) + if (j == (_NITEMS / 2)) { - syslog(LOG_INFO, " "); + *ptr++ = ' '; } if (k < buflen) { if (buffer[k] >= 0x20 && buffer[k] < 0x7f) { - syslog(LOG_INFO, "%c", buffer[k]); + *ptr++ = buffer[k]; } else { - syslog(LOG_INFO, "."); + *ptr++ = '.'; } } } - syslog(LOG_INFO, "\n"); + *ptr = '\0'; /* Plus 1 byte */ + syslog(LOG_INFO, "%04x: %s\n", i, buf); } } diff --git a/libc/misc/lib_xorshift128.c b/libc/misc/lib_xorshift128.c new file mode 100644 index 0000000000000000000000000000000000000000..b74c04f4ef5e979bfe868dd85b7a117623c524c4 --- /dev/null +++ b/libc/misc/lib_xorshift128.c @@ -0,0 +1,94 @@ +/**************************************************************************** + * libc/misc/lib_xorshift.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: David S. Alessio + * + * 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 random number generator is simple, fast and portable. + * Ref: https://en.wikipedia.org/wiki/Xorshift + */ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: xorshift128 + * + * Description: + * Generate one 32-bit pseudo-random number. + * + * NOTE: Because the PRNG state is passed as a parameter, this function is + * fully re-entrant and may be called from an interrupt handler. + * + * The downside to this is that users of the PRNG might not get as much + * entropy as if it were a common state structure. + * + * Input Parameters: + * state - The current XorShift128 state. + * + * Returned Value: + * The generated pseudo-random number + * + ****************************************************************************/ + +uint32_t xorshift128(FAR struct xorshift128_state_s *state) +{ + uint32_t t; + + DEBUGASSERT(state != NULL); + + t = state->x; + t ^= t << 11; + t ^= t >> 8; + + state->x = state->y; + state->y = state->z; + state->z = state->w; + + state->w ^= state->w >> 19; + state->w ^= t; + + return state->w; +} diff --git a/libc/stdio/Make.defs b/libc/stdio/Make.defs index 595a222b27741886f0b24b0cfb90ca183877235e..f308266d65627a81d639eaa4a5758212969abe03 100644 --- a/libc/stdio/Make.defs +++ b/libc/stdio/Make.defs @@ -51,6 +51,7 @@ ifneq ($(CONFIG_NFILE_DESCRIPTORS),0) CSRCS += lib_rawinstream.c lib_rawoutstream.c lib_rawsistream.c CSRCS += lib_rawsostream.c +CSRCS += lib_remove.c # And these depend upon both file descriptors and C streams diff --git a/libc/stdio/lib_remove.c b/libc/stdio/lib_remove.c new file mode 100644 index 0000000000000000000000000000000000000000..3c2c8e6d3f0b34703145590a4055c3a9975dbe51 --- /dev/null +++ b/libc/stdio/lib_remove.c @@ -0,0 +1,89 @@ +/**************************************************************************** + * libc/stdio/lib_remove.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Sebastien Lorquet + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: remove + * + * Description: + * The remove() function causes the object denoted by path to be removed. + * The function is equivalent to unlink() or rmdir(). + * + * Input Parmeters: + * path - A pointer to a file or directory to be removed. + * + * Returned Value: + * 0(OK) on success; -1(ERROR) on failure with errno set appropriately: + * + * For returned errno values, see unlink or rmdir. + * + ****************************************************************************/ + +int remove(FAR const char *path) +{ + struct stat buf; + int ret; + + /* Check the kind of object pointed by path */ + + ret = stat(path, &buf); + if (ret != 0) + { + return ret; + } + + /* Act according to the kind of object */ + + if (S_ISDIR(buf.st_mode)) + { + return rmdir(path); + } + else + { + return unlink(path); + } +} diff --git a/libc/stdio/lib_sscanf.c b/libc/stdio/lib_sscanf.c index cc6714530666e180557388d84879c0050021334c..ae8774cc57e3fdd793656c9ef1d48f5c651e36c7 100644 --- a/libc/stdio/lib_sscanf.c +++ b/libc/stdio/lib_sscanf.c @@ -1,7 +1,7 @@ /**************************************************************************** * libc/stdio/lib_sscanf.c * - * Copyright (C) 2007, 2008, 2011-2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008, 2011-2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -64,14 +64,6 @@ # define MAX(a,b) (((a) > (b)) ? (a) : (b)) #endif -/**************************************************************************** - * Private Type Declarations - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - /**************************************************************************** * Public Function Prototypes ****************************************************************************/ @@ -79,15 +71,7 @@ int vsscanf(FAR const char *buf, FAR const char *fmt, va_list ap); /**************************************************************************** - * Public Constant Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Constant Data + * Private Data ****************************************************************************/ static const char spaces[] = " \t\n\r\f\v"; @@ -151,7 +135,7 @@ static int findwidth(FAR const char *buf, FAR const char *fmt) } /**************************************************************************** - * Private Data + * Public Functions ****************************************************************************/ /**************************************************************************** diff --git a/libc/stdlib/lib_strtod.c b/libc/stdlib/lib_strtod.c index 9b7462368bff7b09f5c0d81de814537da3452a85..bd2a55e996ef2bf16a9f23c241984803edfe8427 100644 --- a/libc/stdlib/lib_strtod.c +++ b/libc/stdlib/lib_strtod.c @@ -115,6 +115,8 @@ double_t strtod(FAR const char *str, FAR char **endptr) negative = 1; /* Fall through to increment position */ case '+': p++; + default: + break; } number = 0.; @@ -151,7 +153,8 @@ double_t strtod(FAR const char *str, FAR char **endptr) if (num_digits == 0) { set_errno(ERANGE); - return 0.0; + number = 0.0; + goto errout; } /* Correct for sign */ @@ -174,6 +177,8 @@ double_t strtod(FAR const char *str, FAR char **endptr) negative = 1; /* Fall through to increment pos */ case '+': p++; + default: + break; } /* Process string of digits */ @@ -199,7 +204,8 @@ double_t strtod(FAR const char *str, FAR char **endptr) exponent > __DBL_MAX_EXP__) { set_errno(ERANGE); - return infinite; + number = infinite; + goto errout; } /* Scale the result */ @@ -220,6 +226,7 @@ double_t strtod(FAR const char *str, FAR char **endptr) number *= p10; } } + n >>= 1; p10 *= p10; } @@ -229,6 +236,7 @@ double_t strtod(FAR const char *str, FAR char **endptr) set_errno(ERANGE); } +errout: if (endptr) { *endptr = p; diff --git a/libc/time/Make.defs b/libc/time/Make.defs index f5799c7dd21cda506b5facb893fe05bed8b63bd9..68e62436871cc2106c9b65a1f312e3f9e55c0a65 100644 --- a/libc/time/Make.defs +++ b/libc/time/Make.defs @@ -37,6 +37,7 @@ CSRCS += lib_strftime.c lib_calendar2utc.c lib_daysbeforemonth.c CSRCS += lib_gettimeofday.c lib_isleapyear.c lib_settimeofday.c lib_time.c +CSRCS += lib_difftime.c ifdef CONFIG_LIBC_LOCALTIME CSRCS += lib_localtime.c lib_asctime.c lib_asctimer.c lib_ctime.c diff --git a/libc/time/lib_difftime.c b/libc/time/lib_difftime.c new file mode 100644 index 0000000000000000000000000000000000000000..ee9a62ebb206fcf28962aaaf42afc68b25fe81b2 --- /dev/null +++ b/libc/time/lib_difftime.c @@ -0,0 +1,86 @@ +/**************************************************************************** + * libc/time/lib_difftime.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Sebastien Lorquet + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +#include +#include + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Function: difftime + * + * Description: + * The difftime() function returns the number of seconds elapsed + * between time time1 and time time0, represented as a double or a float. + * Float is used if the platform does not support double. However, when + * using a float, some precision may be lost for big differences. + * + ****************************************************************************/ + +#ifdef CONFIG_HAVE_DOUBLE +double difftime(time_t time1, time_t time0) +{ + return (double)time1 - (double)time0; +} +#else +float difftime(time_t time1, time_t time0) +{ + if (time1 >= time2) + { + /* Result will be positive (even though bit 31 may be set on very large + * differences!) + */ + + return (float)((uint32_t)(time1 - time0)) + } + else + { + /* Result will be negative. REVISIT: Am I missing any case where bit 31 + * might not be set? + */ + + return (float)((int32_t)(time1 - time0)) + } +} +#endif diff --git a/libc/tls/tls.h b/libc/tls/tls.h index c7d361a3f795d08aa5964b33f27ad71ae32cd5f1..6ec4d7447400c71ad09a200cdbd34451512bf872 100644 --- a/libc/tls/tls.h +++ b/libc/tls/tls.h @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/tls/tls.h + * libc/tls/tls.h * * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libxx/libxx_new.cxx b/libxx/libxx_new.cxx index 423ab833b55a2dddad987037808895dec428579a..863321e6738986522ed2babe319d6da0d087bf32 100644 --- a/libxx/libxx_new.cxx +++ b/libxx/libxx_new.cxx @@ -87,7 +87,7 @@ void *operator new(unsigned int nbytes) void *alloc = lib_malloc(nbytes); -#ifdef CONFIG_DEBUG_FEATURES +#ifdef CONFIG_DEBUG_ERROR if (alloc == 0) { // Oh my.. we are required to return a valid pointer and diff --git a/libxx/libxx_newa.cxx b/libxx/libxx_newa.cxx index a3b327eb63de951fb6ed985e8a5811f118a80bf7..826017ad9eaa1c044cbe067bd7bfa614107744a2 100644 --- a/libxx/libxx_newa.cxx +++ b/libxx/libxx_newa.cxx @@ -87,7 +87,7 @@ void *operator new[](unsigned int nbytes) void *alloc = lib_malloc(nbytes); -#ifdef CONFIG_DEBUG_FEATURES +#ifdef CONFIG_DEBUG_ERROR if (alloc == 0) { // Oh my.. we are required to return a valid pointer and diff --git a/net/tcp/tcp_conn.c b/net/tcp/tcp_conn.c index ac861c24d4e2d9b44fc45a1390aeae6547ce637a..12f7b332ea8bf7aea3a4c88982fdcfa1a231b554 100644 --- a/net/tcp/tcp_conn.c +++ b/net/tcp/tcp_conn.c @@ -273,7 +273,8 @@ static FAR struct tcp_conn_s *tcp_listener(uint16_t portno) * selected. * * Return: - * 0 on success, negated errno on failure: + * Selected or verified port number in host order on success, a negated + * errno on failure: * * EADDRINUSE * The given address is already in use. @@ -305,6 +306,7 @@ static int tcp_selectport(uint16_t portno) /* Guess that the next available port number will be the one after * the last port number assigned. */ + portno = ++g_last_tcp_port; /* Make sure that the port number is within range */ @@ -338,7 +340,7 @@ static int tcp_selectport(uint16_t portno) } } - /* Return the selected or verified port number */ + /* Return the selected or verified port number (host byte order) */ return portno; } @@ -520,7 +522,7 @@ static inline int tcp_ipv4_bind(FAR struct tcp_conn_s *conn, flags = net_lock(); - /* Verify or select a local port */ + /* Verify or select a local port (host byte order) */ #ifdef CONFIG_NETDEV_MULTINIC port = tcp_selectport(PF_INET, @@ -536,9 +538,9 @@ static inline int tcp_ipv4_bind(FAR struct tcp_conn_s *conn, return port; } - /* Save the local address in the connection structure. */ + /* Save the local address in the connection structure (network byte order). */ - conn->lport = addr->sin_port; + conn->lport = htons(port); #ifdef CONFIG_NETDEV_MULTINIC net_ipv4addr_copy(conn->u.ipv4.laddr, addr->sin_addr.s_addr); #endif @@ -595,7 +597,7 @@ static inline int tcp_ipv6_bind(FAR struct tcp_conn_s *conn, flags = net_lock(); - /* Verify or select a local port */ + /* Verify or select a local port (host byte order) */ #ifdef CONFIG_NETDEV_MULTINIC /* The port number must be unique for this address binding */ @@ -617,9 +619,9 @@ static inline int tcp_ipv6_bind(FAR struct tcp_conn_s *conn, return port; } - /* Save the local address in the connection structure. */ + /* Save the local address in the connection structure (network byte order). */ - conn->lport = addr->sin6_port; + conn->lport = htons(port); #ifdef CONFIG_NETDEV_MULTINIC net_ipv6addr_copy(conn->u.ipv6.laddr, addr->sin6_addr.in6_u.u6_addr16); #endif @@ -1217,7 +1219,9 @@ int tcp_connect(FAR struct tcp_conn_s *conn, FAR const struct sockaddr *addr) if (conn->domain == PF_INET) #endif { - /* Select a port that is unique for this IPv4 local address */ + /* Select a port that is unique for this IPv4 local address (host + * order). + */ port = tcp_selectport(PF_INET, (FAR const union ip_addr_u *)&conn->u.ipv4.laddr, @@ -1230,7 +1234,9 @@ int tcp_connect(FAR struct tcp_conn_s *conn, FAR const struct sockaddr *addr) else #endif { - /* Select a port that is unique for this IPv6 local address */ + /* Select a port that is unique for this IPv6 local address (host + * order). + */ port = tcp_selectport(PF_INET6, (FAR const union ip_addr_u *)conn->u.ipv6.laddr, diff --git a/sched/Kconfig b/sched/Kconfig index 864220286ab546b922350989bfacd0378a3b2b8b..bf40372785a39af7dd60a8b92f067cd41538acc4 100644 --- a/sched/Kconfig +++ b/sched/Kconfig @@ -167,6 +167,17 @@ config CLOCK_MONOTONIC The value of the CLOCK_MONOTONIC clock cannot be set via clock_settime(). +config ARCH_HAVE_TIMEKEEPING + bool + default n + +config CLOCK_TIMEKEEPING + bool "Support timekeeping algorithms" + default n + depends on EXPERIMENTAL && ARCH_HAVE_TIMEKEEPING + ---help--- + CLOCK_TIMEKEEPING enables experimental time management algorithms. + config JULIAN_TIME bool "Enables Julian time conversions" default n @@ -571,10 +582,11 @@ config SCHED_CPULOAD_EXTCLK sched_process_cpuload() at each timer expiration with interrupts disabled. +if SCHED_CPULOAD_EXTCLK + config SCHED_CPULOAD_TICKSPERSEC int "External clock rate" default 100 - depends on SCHED_CPULOAD_EXTCLK ---help--- If an external clock is used to drive the sampling for the CPU load calculations, then this value must be provided. This value provides @@ -583,6 +595,43 @@ config SCHED_CPULOAD_TICKSPERSEC is the default frequency of the system time and, hence, the worst possible choice in most cases. +config CPULOAD_ONESHOT + bool "Use Oneshot timer" + default n + ---help--- + Use an MCU-specific oneshot timer as the external clock. The + oneshot timer must be configured by board specific logic which must + then call: + + void sched_oneshot_extclk(FAR struct oneshot_lowerhalf_s *lower); + + To start the CPU load measurement. See include/nuttx/clock.h + +config CPULOAD_ONESHOT_ENTROPY + int "Bits of entropy" + default 6 + range 0 30 + ---help--- + This is the number of bits of entropy that will be applied. The + oneshot will be set to this interval: + + CPULOAD_ONESHOT_NOMINAL - (CPULOAD_ONESHOT_ENTROPY / 2) + + error + nrand(CPULOAD_ONESHOT_ENTROPY) + + Where + + CPULOAD_ONESHOT_NOMINAL is CONFIG_SCHED_CPULOAD_TICKSPERSEC in + units of microseconds. + CPULOAD_ONESHOT_ENTROPY is (1 << CONFIG_CPULOAD_ONESHOT_ENTROPY), + and + 'error' is an error value that is retained from interval to + interval so that although individual intervals are randomized, + the average will still be CONFIG_SCHED_CPULOAD_TICKSPERSEC. + + This special value of zero disables entropy. + +endif # SCHED_CPULOAD_EXTCLK + config SCHED_CPULOAD_TIMECONSTANT int "CPU load time constant" default 2 diff --git a/sched/clock/Make.defs b/sched/clock/Make.defs index c0bc23f51017f5b357b777e2efb80453a54d924b..20ddd3d03b39c9a24e8635d70fdb5820c0d9dc96 100644 --- a/sched/clock/Make.defs +++ b/sched/clock/Make.defs @@ -38,6 +38,10 @@ CSRCS += clock_time2ticks.c clock_abstime2ticks.c clock_ticks2time.c CSRCS += clock_systimer.c clock_systimespec.c clock_timespec_add.c CSRCS += clock_timespec_subtract.c +ifeq ($(CONFIG_CLOCK_TIMEKEEPING),y) +CSRCS += clock_timekeeping.c +endif + # Include clock build support DEPPATH += --dep-path clock diff --git a/sched/clock/clock.h b/sched/clock/clock.h index 8a5c55a3e767b162659a1ec3fea3b07c5660ff58..cd8066615b5858c925727320a09466a7606e9bb9 100644 --- a/sched/clock/clock.h +++ b/sched/clock/clock.h @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/clock/clock.h * * Copyright (C) 2007-2009, 2014 Gregory Nutt. All rights reserved. @@ -31,14 +31,14 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ #ifndef __SCHED_CLOCK_CLOCK_H #define __SCHED_CLOCK_CLOCK_H -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -47,9 +47,9 @@ #include #include -/******************************************************************************** +/**************************************************************************** * Pre-processor Definitions - ********************************************************************************/ + ****************************************************************************/ /* Configuration ************************************************************/ /* If CONFIG_SYSTEM_TIME64 is selected and the CPU supports long long types, * then a 64-bit system time will be used. @@ -59,13 +59,13 @@ # undef CONFIG_SYSTEM_TIME64 #endif -/******************************************************************************** +/**************************************************************************** * Public Type Definitions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Public Data - ********************************************************************************/ + ****************************************************************************/ #if !defined(CONFIG_SCHED_TICKLESS) && !defined(__HAVE_KERNEL_GLOBALS) /* The system clock exists (CONFIG_SCHED_TICKLESS), but it not prototyped @@ -79,11 +79,13 @@ extern volatile uint32_t g_system_timer; # endif #endif +#ifndef CONFIG_CLOCK_TIMEKEEPING extern struct timespec g_basetime; +#endif -/******************************************************************************** +/**************************************************************************** * Public Function Prototypes - ********************************************************************************/ + ****************************************************************************/ void weak_function clock_initialize(void); #ifndef CONFIG_SCHED_TICKLESS diff --git a/sched/clock/clock_abstime2ticks.c b/sched/clock/clock_abstime2ticks.c index 24213dd07b29a80acbf500791fd0caa79c178b3a..d21e706e393eac9de59db679e1bb46208a4e6540 100644 --- a/sched/clock/clock_abstime2ticks.c +++ b/sched/clock/clock_abstime2ticks.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/clock/clock_abstime2ticks.c * * Copyright (C) 2007, 2008, 2013-2014, 2016 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -44,11 +44,11 @@ #include #include "clock/clock.h" -/******************************************************************************** +/**************************************************************************** * Private Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: compare_timespec * * Description: @@ -56,7 +56,7 @@ * Return > 0 if time b is before time a * Return 0 if time a is the same as time b * - ********************************************************************************/ + ****************************************************************************/ static long compare_timespec(FAR const struct timespec *a, FAR const struct timespec *b) @@ -74,11 +74,11 @@ static long compare_timespec(FAR const struct timespec *a, return (long)a->tv_nsec -(long)b->tv_nsec; } -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: clock_abstime2ticks * * Description: @@ -93,10 +93,10 @@ static long compare_timespec(FAR const struct timespec *a, * OK on success; A non-zero error number on failure; * * Assumptions: - * Interrupts should be disabled so that the time is not changing during the - * calculation + * Interrupts should be disabled so that the time is not changing during + * the calculation * - ********************************************************************************/ + ****************************************************************************/ int clock_abstime2ticks(clockid_t clockid, FAR const struct timespec *abstime, FAR int *ticks) diff --git a/sched/clock/clock_gettime.c b/sched/clock/clock_gettime.c index e014984f491a6598ce5b7b262c722f660bc1d902..74ffea5be8bcc06fc717b73cc959c500f3be898e 100644 --- a/sched/clock/clock_gettime.c +++ b/sched/clock/clock_gettime.c @@ -49,6 +49,9 @@ #include #include "clock/clock.h" +#ifdef CONFIG_CLOCK_TIMEKEEPING +# include "clock/clock_timekeeping.h" +#endif /**************************************************************************** * Public Functions @@ -90,7 +93,9 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp) * reset. */ -#ifdef CONFIG_SCHED_TICKLESS +#if defined(CONFIG_CLOCK_TIMEKEEPING) + ret = clock_timekeeping_get_monotonic_time(tp); +#elif defined(CONFIG_SCHED_TICKLESS) ret = up_timer_gettime(tp); #else ret = clock_systimespec(tp); @@ -113,7 +118,15 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp) * last set. */ +#if defined(CONFIG_CLOCK_TIMEKEEPING) + ret = clock_timekeeping_get_wall_time(tp); +#elif defined(CONFIG_SCHED_TICKLESS) + ret = up_timer_gettime(&ts); +#else ret = clock_systimespec(&ts); +#endif + +#ifndef CONFIG_CLOCK_TIMEKEEPING if (ret == OK) { /* Add the base time to this. The base time is the time-of-day @@ -138,6 +151,7 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp) tp->tv_sec = ts.tv_sec; tp->tv_nsec = ts.tv_nsec; } +#endif /* CONFIG_CLOCK_TIMEKEEPING */ } else { diff --git a/sched/clock/clock_initialize.c b/sched/clock/clock_initialize.c index 6e653e78e7f71a2fdb0b339027ea33cc0b6e8f60..9e5d9f93f4baeb289fa6e30a238106425e95a40b 100644 --- a/sched/clock/clock_initialize.c +++ b/sched/clock/clock_initialize.c @@ -54,6 +54,9 @@ #include #include "clock/clock.h" +#ifdef CONFIG_CLOCK_TIMEKEEPING +# include "clock/clock_timekeeping.h" +#endif /**************************************************************************** * Pre-processor Definitions @@ -172,10 +175,16 @@ static void clock_inittime(void) { /* (Re-)initialize the time value to match the RTC */ - (void)clock_basetime(&g_basetime); +#ifndef CONFIG_CLOCK_TIMEKEEPING +#ifndef CONFIG_RTC_HIRES + clock_basetime(&g_basetime); +#endif #ifndef CONFIG_SCHED_TICKLESS g_system_timer = 0; #endif +#else + clock_inittimekeeping(); +#endif } /**************************************************************************** diff --git a/sched/clock/clock_settime.c b/sched/clock/clock_settime.c index 8f269079d89909c9ee6787a4fd1ea190c7f93d1e..ec0c1d85be9f70360087e9c40858e23d539ac34c 100644 --- a/sched/clock/clock_settime.c +++ b/sched/clock/clock_settime.c @@ -48,6 +48,9 @@ #include #include "clock/clock.h" +#ifdef CONFIG_CLOCK_TIMEKEEPING +# include "clock/clock_timekeeping.h" +#endif /**************************************************************************** * Public Functions @@ -76,6 +79,7 @@ int clock_settime(clockid_t clock_id, FAR const struct timespec *tp) if (clock_id == CLOCK_REALTIME) { +#ifndef CONFIG_CLOCK_TIMEKEEPING /* Interrupts are disabled here so that the in-memory time * representation and the RTC setting will be as close as * possible. @@ -123,6 +127,9 @@ int clock_settime(clockid_t clock_id, FAR const struct timespec *tp) 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 + ret = clock_timekeeping_set_wall_time(tp); +#endif } else { diff --git a/sched/clock/clock_systimer.c b/sched/clock/clock_systimer.c index 3e8e978ce994c16043f27d632f93788b29e6e8ca..6c9645fbf86faac3a2a6535be30744f32f876a89 100644 --- a/sched/clock/clock_systimer.c +++ b/sched/clock/clock_systimer.c @@ -83,7 +83,11 @@ systime_t clock_systimer(void) /* Get the time from the platform specific hardware */ +#ifndef CONFIG_CLOCK_TIMEKEEPING (void)up_timer_gettime(&ts); +#else + (void)clock_timekeeping_get_monotonic_time(&ts); +#endif /* Convert to a 64-bit value in microseconds, then in clock tick units */ @@ -96,7 +100,11 @@ systime_t clock_systimer(void) /* Get the time from the platform specific hardware */ +#ifndef CONFIG_CLOCK_TIMEKEEPING (void)up_timer_gettime(&ts); +#else + (void)clock_timekeeping_get_monotonic_time(&ts); +#endif /* Convert to a 64- then a 32-bit value */ diff --git a/sched/clock/clock_ticks2time.c b/sched/clock/clock_ticks2time.c index b69379d827543f1c675ad55fe1bb85febca07a1f..33353193a82933125ef7c5af2a2a6fadee01c062 100644 --- a/sched/clock/clock_ticks2time.c +++ b/sched/clock/clock_ticks2time.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/clock/clock_ticks2time.c * * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. @@ -31,22 +31,22 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include #include #include "clock/clock.h" -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: clock_ticks2time * * Description: @@ -61,7 +61,7 @@ * * Assumptions: * - ********************************************************************************/ + ****************************************************************************/ int clock_ticks2time(int ticks, FAR struct timespec *reltime) { diff --git a/sched/clock/clock_time2ticks.c b/sched/clock/clock_time2ticks.c index 8667e6bcd9dc1a94a5ff4413d7b26ba30608bfc5..5bb613b61de3db2a8600615a3e83a1a27910ed7d 100644 --- a/sched/clock/clock_time2ticks.c +++ b/sched/clock/clock_time2ticks.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/clock/clock_time2ticks.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -44,17 +44,17 @@ #include "clock/clock.h" -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: clock_time2ticks * * Description: - * Convert a timespec delay to system timer ticks. This function is suitable - * for calculating relative time delays and does not depend on the other - * clock_* logic. + * Convert a timespec delay to system timer ticks. This function is + * suitable for calculating relative time delays and does not depend on + * the other clock_* logic. * * Parameters: * reltime - Convert this relative time to system clock ticks. @@ -65,15 +65,15 @@ * * Assumptions: * - ********************************************************************************/ + ****************************************************************************/ int clock_time2ticks(FAR const struct timespec *reltime, FAR int *ticks) { #ifdef CONFIG_HAVE_LONG_LONG int64_t relnsec; - /* Convert the relative time into nanoseconds. The range of the int64_t is - * sufficiently large that there is no real need for range checking. + /* Convert the relative time into nanoseconds. The range of the int64_t + * is sufficiently large that there is no real need for range checking. */ relnsec = (int64_t)reltime->tv_sec * NSEC_PER_SEC + diff --git a/sched/clock/clock_timekeeping.c b/sched/clock/clock_timekeeping.c new file mode 100644 index 0000000000000000000000000000000000000000..be83688f0152a667f347497e8203339e2a207669 --- /dev/null +++ b/sched/clock/clock_timekeeping.c @@ -0,0 +1,331 @@ +/**************************************************************************** + * sched/clock/clock_timekeeping.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Max Neklyudov + * + * 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 + +#ifdef CONFIG_CLOCK_TIMEKEEPING + +#include +#include +#include +#include +#include + +#include +#include + +#include "clock/clock.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define NTP_MAX_ADJUST 500 + +/********************************************************************** + * Private Data + **********************************************************************/ + +static struct timespec g_clock_wall_time; +static struct timespec g_clock_monotonic_time; +static uint64_t g_clock_last_counter; +static uint64_t g_clock_mask; +static long g_clock_adjust; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: clock_get_current_time + ****************************************************************************/ + +static int clock_get_current_time(FAR struct timespec *ts, + FAR struct timespec *base) +{ + irqstate_t flags; + uint64_t counter; + uint64_t offset; + uint64_t nsec; + time_t sec; + int ret; + + flags = enter_critical_section(); + + ret = up_timer_getcounter(&counter); + if (ret < 0) + { + goto errout_in_critical_section; + } + + offset = (counter - g_clock_last_counter) & g_clock_mask; + nsec = offset * NSEC_PER_TICK; + sec = nsec / NSEC_PER_SEC; + nsec -= sec * NSEC_PER_SEC; + + nsec += base->tv_nsec; + if (nsec > NSEC_PER_SEC) + { + nsec -= NSEC_PER_SEC; + sec += 1; + } + + ts->tv_nsec = nsec; + ts->tv_sec = base->tv_sec + sec; + +errout_in_critical_section: + leave_critical_section(flags); + return ret; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: clock_timekeeping_get_monotonic_time + ****************************************************************************/ + +int clock_timekeeping_get_monotonic_time(FAR struct timespec *ts) +{ + return clock_get_current_time(ts, &g_clock_monotonic_time); +} + +/**************************************************************************** + * Name: clock_timekeeping_get_wall_time + ****************************************************************************/ + +int clock_timekeeping_get_wall_time(FAR struct timespec *ts) +{ + return clock_get_current_time(ts, &g_clock_wall_time); +} + +/**************************************************************************** + * Name: clock_timekeeping_set_wall_time + ****************************************************************************/ + +int clock_timekeeping_set_wall_time(FAR struct timespec *ts) +{ + irqstate_t flags; + uint64_t counter; + int ret; + + flags = enter_critical_section(); + + ret = up_timer_getcounter(&counter); + if (ret < 0) + { + goto errout_in_critical_section; + } + + g_clock_wall_time = *ts; + g_clock_adjust = 0; + g_clock_last_counter = counter; + +errout_in_critical_section: + leave_critical_section(flags); + return ret; +} + +/******************************************************************************** + * Name: adjtime + * + * Description: + * The adjtime() function gradually adjusts the system clock (as returned + * by gettimeofday(2)). The amount of time by which the clock is to be + * adjusted is specified in the structure pointed to by delta. + * + * This structure has the following form: + * + * struct timeval + * { + * time_t tv_sec; (seconds) + * suseconds_t tv_usec; (microseconds) + * }; + * + * If the adjustment in delta is positive, then the system clock is + * speeded up by some small percentage (i.e., by adding a small amount of + * time to the clock value in each second) until the adjustment has been + * completed. If the adjustment in delta is negative, then the clock is + * slowed down in a similar fashion. + * + * If a clock adjustment from an earlier adjtime() call is already in + * progress at the time of a later adjtime() call, and delta is not NULL + * for the later call, then the earlier adjustment is stopped, but any + * already completed part of that adjustment is not undone. + * + * If olddelta is not NULL, then the buffer that it points to is used to + * return the amount of time remaining from any previous adjustment that + * has not yet been completed. + * + * NOTE: This is not a POSIX interface but derives from 4.3BSD, System V. + * It is also supported for Linux compatibility. + * + ****************************************************************************/ + +int adjtime(FAR const struct timeval *delta, FAR struct timeval *olddelta) +{ + irqstate_t flags; + long adjust_usec; + + if (!delta) + { + set_errno(EINVAL); + return -1; + } + + flags = enter_critical_section(); + + adjust_usec = delta->tv_sec * USEC_PER_SEC + delta->tv_usec; + + if (olddelta) + { + olddelta->tv_usec = g_clock_adjust; + } + + g_clock_adjust = adjust_usec; + + leave_critical_section(flags); + + return OK; +} + +/**************************************************************************** + * Name: clock_update_wall_time + ****************************************************************************/ + +void clock_update_wall_time(void) +{ + irqstate_t flags; + uint64_t counter; + uint64_t offset; + int64_t nsec; + time_t sec; + int ret; + + flags = enter_critical_section(); + + ret = up_timer_getcounter(&counter); + if (ret < 0) + { + goto errout_in_critical_section; + } + + offset = (counter - g_clock_last_counter) & g_clock_mask; + if (offset == 0) + { + goto errout_in_critical_section; + } + + nsec = offset * NSEC_PER_TICK; + sec = nsec / NSEC_PER_SEC; + nsec -= sec * NSEC_PER_SEC; + + g_clock_monotonic_time.tv_sec += sec; + g_clock_monotonic_time.tv_nsec += nsec; + if (g_clock_monotonic_time.tv_nsec > NSEC_PER_SEC) + { + g_clock_monotonic_time.tv_nsec -= NSEC_PER_SEC; + g_clock_monotonic_time.tv_sec += 1; + } + + nsec += g_clock_wall_time.tv_nsec; + if (nsec > NSEC_PER_SEC) + { + nsec -= NSEC_PER_SEC; + sec += 1; + } + + if (g_clock_adjust != 0 && sec > 0) + { + long adjust = NTP_MAX_ADJUST * (long)sec; + if (g_clock_adjust < adjust && g_clock_adjust > -adjust) + { + adjust = g_clock_adjust; + } + + nsec += adjust * NSEC_PER_USEC; + + while (nsec < 0) + { + nsec += NSEC_PER_SEC; + sec -= 1; + } + + while (nsec > NSEC_PER_SEC) + { + nsec -= NSEC_PER_SEC; + sec += 1; + } + } + + g_clock_wall_time.tv_sec += sec; + g_clock_wall_time.tv_nsec = (long)nsec; + + g_clock_last_counter = counter; + +errout_in_critical_section: + leave_critical_section(flags); +} + +/**************************************************************************** + * Name: clock_inittimekeeping + ****************************************************************************/ + +void clock_inittimekeeping(void) +{ + struct tm rtctime; + + up_timer_getmask(&g_clock_mask); + + /* Get the broken-errout_in_critical_section time from the date/time RTC. */ + + (void)up_rtc_getdatetime(&rtctime); + + /* And use the broken-errout_in_critical_section time to initialize the + * system time. + */ + + g_clock_wall_time.tv_sec = mktime(&rtctime); + g_clock_wall_time.tv_nsec = 0; + + memset(&g_clock_monotonic_time, 0, sizeof(g_clock_monotonic_time)); +} + +#endif /* CONFIG_CLOCK_TIMEKEEPING */ diff --git a/sched/clock/clock_timekeeping.h b/sched/clock/clock_timekeeping.h new file mode 100644 index 0000000000000000000000000000000000000000..9bf21df743ca58d4711390f79c659a01969646fb --- /dev/null +++ b/sched/clock/clock_timekeeping.h @@ -0,0 +1,62 @@ +/**************************************************************************** + * sched/clock/clock_timekeeping.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Max Neklyudov + * + * 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 __SCHED_CLOCK_CLOCK_TIMEKEEPING_H +#define __SCHED_CLOCK_CLOCK_TIMEKEEPING_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +#include + +#include + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +int clock_timekeeping_get_monotonic_time(FAR struct timespec *ts); +int clock_timekeeping_get_wall_time(FAR struct timespec *ts); +int clock_timekeeping_set_wall_time(FAR struct timespec *ts); + +void clock_update_wall_time(void); + +void clock_inittimekeeping(void); + +#endif /* __SCHED_CLOCK_CLOCK_TIMEKEEPING_H */ diff --git a/sched/clock/clock_timespec_add.c b/sched/clock/clock_timespec_add.c index f2eae0dac26dccadfdb8ee579ef643da83e45d13..0e0fb931dbb8912473268393e0722d8e7a0780f5 100644 --- a/sched/clock/clock_timespec_add.c +++ b/sched/clock/clock_timespec_add.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/clock/clock_timespec_add.c * * Copyright (C) 2015 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -44,9 +44,9 @@ #include "clock/clock.h" -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ /**************************************************************************** * Name: clock_timespec_add diff --git a/sched/clock/clock_timespec_subtract.c b/sched/clock/clock_timespec_subtract.c index c02dc35538e57e8aa400676d9c6b5415e94fdba7..754c84d1cb57df1c4a0dbe75e11ca4dbca79a637 100644 --- a/sched/clock/clock_timespec_subtract.c +++ b/sched/clock/clock_timespec_subtract.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/clock/clock_timespec_subtract.c * * Copyright (C) 2015 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -44,9 +44,9 @@ #include "clock/clock.h" -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ /**************************************************************************** * Name: clock_timespec_subtract diff --git a/sched/environ/env_getenv.c b/sched/environ/env_getenv.c index e5309be325a2f7088dea3a83f87104b82c966e35..6e92f90d3f14bc5d5cb42a26b400e7889caa715f 100644 --- a/sched/environ/env_getenv.c +++ b/sched/environ/env_getenv.c @@ -1,5 +1,5 @@ /**************************************************************************** - * env_getenv.c + * sched/environ/env_getenv.c * * Copyright (C) 2007, 2008, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/sched/environ/env_getenvironptr.c b/sched/environ/env_getenvironptr.c index d392777392abcb7f4e13ee4f3241fe6f366d239a..11c4f5368e11328884ca5cf62d334bad70625520 100644 --- a/sched/environ/env_getenvironptr.c +++ b/sched/environ/env_getenvironptr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * env_getenvironptr.c + * sched/environ/env_getenvironptr.c * * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/sched/group/group_create.c b/sched/group/group_create.c index 3b3cb6be08e41d924f8d2c77c20ba159e35d0799..2aecb9c12b4e4d651b12f7734e18bf29d4c46f2c 100644 --- a/sched/group/group_create.c +++ b/sched/group/group_create.c @@ -241,12 +241,18 @@ int group_allocate(FAR struct task_tcb_s *tcb, uint8_t ttype) return ret; } +#ifndef CONFIG_DISABLE_PTHREAD /* Initialize the pthread join semaphore */ -#ifndef CONFIG_DISABLE_PTHREAD (void)sem_init(&group->tg_joinsem, 0, 1); #endif +#if defined(CONFIG_SCHED_WAITPID) && !defined(CONFIG_SCHED_HAVE_PARENT) + /* Initialize the exit/wait semaphores */ + + (void)sem_init(&group->tg_exitsem, 0, 0); +#endif + return OK; } diff --git a/sched/group/group_setupstreams.c b/sched/group/group_setupstreams.c index 63929de8e6f9ff10648be129b10f1422ced6ec9f..996b9cec7bf0dd932f4b15ae04ca7ece79b99ecc 100644 --- a/sched/group/group_setupstreams.c +++ b/sched/group/group_setupstreams.c @@ -1,5 +1,5 @@ /**************************************************************************** - * group_setupstreams.c + * sched/group/group_setupstreams.c * * Copyright (C) 2007-2008, 2010-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/sched/pthread/pthread_barrierdestroy.c b/sched/pthread/pthread_barrierdestroy.c index dbad57947a084be9314b11f405043fadc841da9e..6bf0270b13f214b8092b346dce7f5bdb09082b49 100644 --- a/sched/pthread/pthread_barrierdestroy.c +++ b/sched/pthread/pthread_barrierdestroy.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/pthread/pthread_barriedestroy.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -44,20 +44,21 @@ #include #include -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: pthread_barrier_destroy * * Description: - * The pthread_barrier_destroy() function destroys the barrier referenced by - * 'barrier' and releases any resources used by the barrier. The effect of - * subsequent use of the barrier is undefined until the barrier is - * reinitialized by another call to pthread_barrier_init(). The results are - * undefined if pthread_barrier_destroy() is called when any thread is blocked - * on the barrier, or if this function is called with an uninitialized barrier. + * The pthread_barrier_destroy() function destroys the barrier referenced + * by 'barrier' and releases any resources used by the barrier. The effect + * of subsequent use of the barrier is undefined until the barrier is + * reinitialized by another call to pthread_barrier_init(). The result + * are undefined if pthread_barrier_destroy() is called when any thread is + * blocked on the barrier, or if this function is called with an + * uninitialized barrier. * * Parameters: * barrier - barrier to be destroyed. @@ -65,13 +66,13 @@ * Return Value: * 0 (OK) on success or on of the following error numbers: * - * EBUSY The implementation has detected an attempt to destroy a barrier while - * it is in use. + * EBUSY The implementation has detected an attempt to destroy a barrier + * while it is in use. * EINVAL The value specified by barrier is invalid. * * Assumptions: * - ********************************************************************************/ + ****************************************************************************/ int pthread_barrier_destroy(FAR pthread_barrier_t *barrier) { diff --git a/sched/pthread/pthread_barrierinit.c b/sched/pthread/pthread_barrierinit.c index adaca2876c2c25a668ef96cca77b6ed07182c107..5051601417fe6ae3e47066c2036e0605cc39a541 100644 --- a/sched/pthread/pthread_barrierinit.c +++ b/sched/pthread/pthread_barrierinit.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/pthread/pthread_barrieinit.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -44,44 +44,45 @@ #include #include -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: pthread_barrier_init * * Description: - * The pthread_barrier_init() function allocates any resources required to use - * the barrier referenced by 'barrier' and initialized the barrier with the - * attributes referenced by attr. If attr is NULL, the default barrier - * attributes will be used. The results are undefined if pthread_barrier_init() - * is called when any thread is blocked on the barrier. The results are - * undefined if a barrier is used without first being initialized. The results - * are undefined if pthread_barrier_init() is called specifying an already - * initialized barrier. + * The pthread_barrier_init() function allocates any resources required to + * use the barrier referenced by 'barrier' and initialized the barrier + * with the attributes referenced by attr. If attr is NULL, the default + * barrier attributes will be used. The results are undefined if + * pthread_barrier_init() is called when any thread is blocked on the + * barrier. The results are undefined if a barrier is used without first + * being initialized. The results are undefined if pthread_barrier_init() + * is called specifying an already initialized barrier. * * Parameters: * barrier - the barrier to be initialized * attr - barrier attributes to be used in the initialization. - * count - the count to be associated with the barrier. The count argument - * specifies the number of threads that must call pthread_barrier_wait() before - * any of them successfully return from the call. The value specified by - * count must be greater than zero. + * count - the count to be associated with the barrier. The count + * argument specifies the number of threads that must call + * pthread_barrier_wait() before any of them successfully return from + * the call. The value specified by count must be greater than zero. * * Return Value: * 0 (OK) on success or on of the following error numbers: * - * EAGAIN The system lacks the necessary resources to initialize another barrier. - * EINVAL The barrier reference is invalid, or the values specified by attr are - * invalid, or the value specified by count is equal to zero. + * EAGAIN The system lacks the necessary resources to initialize another + * barrier. EINVAL The barrier reference is invalid, or the values + * specified by attr are invalid, or the value specified by count + * is equal to zero. * ENOMEM Insufficient memory exists to initialize the barrier. - * EBUSY The implementation has detected an attempt to reinitialize a barrier - * while it is in use. + * EBUSY The implementation has detected an attempt to reinitialize a + * barrier while it is in use. * * Assumptions: * - ********************************************************************************/ + ****************************************************************************/ int pthread_barrier_init(FAR pthread_barrier_t *barrier, FAR const pthread_barrierattr_t *attr, unsigned int count) diff --git a/sched/pthread/pthread_barrierwait.c b/sched/pthread/pthread_barrierwait.c index 2d5a306df0aee5024aa5d8bd881066e0fd58e9fa..cf2f959c4e5f8bb977b30d444c3f59d1abb9b780 100644 --- a/sched/pthread/pthread_barrierwait.c +++ b/sched/pthread/pthread_barrierwait.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/pthread/pthread_barrierwait.c * * Copyright (C) 2007, 2009, 2014 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -45,41 +45,43 @@ #include #include -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: pthread_barrier_wait * * Description: - * The pthread_barrier_wait() function synchronizse participating threads at - * the barrier referenced by 'barrier'. The calling thread is blocked until - * the required number of threads have called pthread_barrier_wait() specifying - * the same 'barrier'. When the required number of threads have called - * pthread_barrier_wait() specifying the 'barrier', the constant - * PTHREAD_BARRIER_SERIAL_THREAD will be returned to one unspecified thread - * and zero will be returned to each of the remaining threads. At this point, - * the barrier will be reset to the state it had as a result of the most recent - * pthread_barrier_init() function that referenced it. + * The pthread_barrier_wait() function synchronizse participating threads + * at the barrier referenced by 'barrier'. The calling thread is blocked + * until the required number of threads have called pthread_barrier_wait() + * specifying the same 'barrier'. When the required number of threads + * have called pthread_barrier_wait() specifying the 'barrier', the + * constant PTHREAD_BARRIER_SERIAL_THREAD will be returned to one + * unspecified thread and zero will be returned to each of the remaining + * threads. At this point, the barrier will be reset to the state it had + * as a result of the most recent pthread_barrier_init() function that + * referenced it. * - * The constant PTHREAD_BARRIER_SERIAL_THREAD is defined in pthread.h and its - * value must be distinct from any other value returned by pthread_barrier_wait(). + * The constant PTHREAD_BARRIER_SERIAL_THREAD is defined in pthread.h and + * its value must be distinct from any other value returned by + * pthread_barrier_wait(). * - * The results are undefined if this function is called with an uninitialized - * barrier. + * The results are undefined if this function is called with an + * uninitialized barrier. * - * If a signal is delivered to a thread blocked on a barrier, upon return from - * the signal handler the thread will resume waiting at the barrier if the barrier - * wait has not completed; otherwise, the thread will continue as normal from - * the completed barrier wait. Until the thread in the signal handler returns - * from it, it is unspecified whether other threads may proceed past the barrier - * once they have all reached it. + * If a signal is delivered to a thread blocked on a barrier, upon return + * from the signal handler the thread will resume waiting at the barrier + * if the barrier wait has not completed; otherwise, the thread will + * continue as normal from the completed barrier wait. Until the thread in + * the signal handler returns from it, it is unspecified whether other + * threads may proceed past the barrier once they have all reached it. * - * A thread that has blocked on a barrier will not prevent any unblocked thread - * that is eligible to use the same processing resources from eventually making - * forward progress in its execution. Eligibility for processing resources will - * be determined by the scheduling policy. + * A thread that has blocked on a barrier will not prevent any unblocked + * thread that is eligible to use the same processing resources from + * eventually making forward progress in its execution. Eligibility for + * processing resources will be determined by the scheduling policy. * * Parameters: * barrier - the barrier to wait on @@ -89,7 +91,7 @@ * * Assumptions: * - ********************************************************************************/ + ****************************************************************************/ int pthread_barrier_wait(FAR pthread_barrier_t *barrier) { diff --git a/sched/pthread/pthread_findjoininfo.c b/sched/pthread/pthread_findjoininfo.c index 60769bc16dd91de7ece6cacfc74e8bbce559906a..23fcc6a46d761e26e44bff7e7735aedc468cfd48 100644 --- a/sched/pthread/pthread_findjoininfo.c +++ b/sched/pthread/pthread_findjoininfo.c @@ -1,5 +1,5 @@ /**************************************************************************** - * pthread_findjoininfo.c + * sched/pthread/pthread_findjoininfo.c * * Copyright (C) 2007, 2009, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/sched/pthread/pthread_getaffinity.c b/sched/pthread/pthread_getaffinity.c index 817aa11a206ff0b556f72abdb4fa571f3d8be579..f4d46f1976a38e492d69179e48e6cf8fcd7feb1e 100644 --- a/sched/pthread/pthread_getaffinity.c +++ b/sched/pthread/pthread_getaffinity.c @@ -1,5 +1,5 @@ /**************************************************************************** - * pthread_getaffinity.c + * sched/pthread/pthread_getaffinity.c * * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/sched/pthread/pthread_getschedparam.c b/sched/pthread/pthread_getschedparam.c index a3fe352c0cfacfa97cda5733085a7b4f032aeb38..a71bc488cdb007aca78cd279a845c393311f0849 100644 --- a/sched/pthread/pthread_getschedparam.c +++ b/sched/pthread/pthread_getschedparam.c @@ -1,5 +1,5 @@ /**************************************************************************** - * pthread_getschedparam.c + * sched/pthread/pthread_getschedparam.c * * Copyright (C) 2007, 2008, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/sched/pthread/pthread_join.c b/sched/pthread/pthread_join.c index 90628bb444506d8c4289d60268510a12604bbc3c..9b73fd4268f8adb0eb9d12fb20812e5ce58b7247 100644 --- a/sched/pthread/pthread_join.c +++ b/sched/pthread/pthread_join.c @@ -1,5 +1,5 @@ /**************************************************************************** - * pthread_join.c + * sched/pthread/pthread_join.c * * Copyright (C) 2007, 2008, 2011, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/sched/pthread/pthread_once.c b/sched/pthread/pthread_once.c index b8afe81112a880d70bb233d46fcc20e901fcac89..cd778a02d230cd7194c6979154103d115339a893 100644 --- a/sched/pthread/pthread_once.c +++ b/sched/pthread/pthread_once.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/pthread/pthread_once.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -45,26 +45,26 @@ #include #include -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: pthread_once * * Description: - * The first call to pthread_once() by any thread with a given once_control, - * will call the init_routine with no arguments. Subsequent calls to - * pthread_once() with the same once_control will have no effect. On return - * from pthread_once(), init_routine will have completed. + * The first call to pthread_once() by any thread with a given + * once_control, will call the init_routine with no arguments. Subsequent + * calls to pthread_once() with the same once_control will have no effect. + * On return from pthread_once(), init_routine will have completed. * * Parameters: - * once_control - Determines if init_routine should be called. once_control - * should be declared and initializeed as follows: + * once_control - Determines if init_routine should be called. + * once_control should be declared and initializeed as follows: * * pthread_once_t once_control = PTHREAD_ONCE_INIT; * - * PTHREAD_ONCE_INIT is defined in pthread.h + * PTHREAD_ONCE_INIT is defined in pthread.h * init_routine - The initialization routine that will be called once. * * Return Value: @@ -73,7 +73,7 @@ * * Assumptions: * - ********************************************************************************/ + ****************************************************************************/ int pthread_once(FAR pthread_once_t *once_control, CODE void (*init_routine)(void)) diff --git a/sched/pthread/pthread_setcancelstate.c b/sched/pthread/pthread_setcancelstate.c index a17560224e93df5b65a6aafd1e0ea9b2783ba46a..b9aab9a7d122efbda7665adc0e17feb50b3246a9 100644 --- a/sched/pthread/pthread_setcancelstate.c +++ b/sched/pthread/pthread_setcancelstate.c @@ -1,4 +1,4 @@ -/****************************************************************************************** +/**************************************************************************** * sched/pthread/pthread_setcancelstate.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. @@ -31,23 +31,23 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ******************************************************************************************/ + ****************************************************************************/ -/****************************************************************************************** +/**************************************************************************** * Included Files - ******************************************************************************************/ + ****************************************************************************/ #include #include #include "sched/sched.h" -/****************************************************************************************** +/**************************************************************************** * Public Functions - ******************************************************************************************/ + ****************************************************************************/ -/****************************************************************************************** +/**************************************************************************** * Name: pthread_setcancelstate - ******************************************************************************************/ + ****************************************************************************/ int pthread_setcancelstate(int state, FAR int *oldstate) { diff --git a/sched/sched/Make.defs b/sched/sched/Make.defs index e690aeaa83a1c7e4b4372a68d5409443003a50b5..353f26bb272ba7456e72a5e1a5f7f4ee3e62ba7b 100644 --- a/sched/sched/Make.defs +++ b/sched/sched/Make.defs @@ -80,6 +80,9 @@ endif ifeq ($(CONFIG_SCHED_CPULOAD),y) CSRCS += sched_cpuload.c +ifeq ($(CONFIG_CPULOAD_ONESHOT),y) +CSRCS += sched_cpuload_oneshot.c +endif endif ifeq ($(CONFIG_SCHED_TICKLESS),y) diff --git a/sched/sched/sched_cpuload_oneshot.c b/sched/sched/sched_cpuload_oneshot.c new file mode 100644 index 0000000000000000000000000000000000000000..fba9e43f33ad127ffec483dc0b81f79aaadf8ed0 --- /dev/null +++ b/sched/sched/sched_cpuload_oneshot.c @@ -0,0 +1,286 @@ +/**************************************************************************** + * sched/sched/sched_cpuload_oneshot.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include "clock/clock.h" + +#ifdef CONFIG_CPULOAD_ONESHOT + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#if !defined(CONFIG_SCHED_CPULOAD) || !defined(CONFIG_SCHED_CPULOAD_EXTCLK) +# error CONFIG_SCHED_CPULOAD and CONFIG_SCHED_CPULOAD_EXTCLK must be defined +#endif + +#ifndef CONFIG_SCHED_CPULOAD_TICKSPERSEC +# error CONFIG_SCHED_CPULOAD_TICKSPERSEC not defined +#endif + +#define CPULOAD_ONESHOT_NOMINAL (CONFIG_SCHED_CPULOAD_TICKSPERSEC * 1000) + +#if CPULOAD_ONESHOT_NOMINAL < 1 || CPULOAD_ONESHOT_NOMINAL > 0x7fffffff +# error CPULOAD_ONESHOT_NOMINAL is out of range +#endif + +#ifndef CONFIG_CPULOAD_ONESHOT_ENTROPY +# warning CONFIG_CPULOAD_ONESHOT_ENTROPY not defined +# define CONFIG_CPULOAD_ONESHOT_ENTROPY 0 +#endif + +#define CPULOAD_ONESHOT_ENTROPY (1 << CONFIG_CPULOAD_ONESHOT_ENTROPY) + +#if CPULOAD_ONESHOT_NOMINAL < CPULOAD_ONESHOT_ENTROPY +# error CPULOAD_ONESHOT_NOMINAL too small for CONFIG_CPULOAD_ONESHOT_ENTROPY +#endif + +#define CPULOAD_ONESHOT_ENTROPY_MASK (CPULOAD_ONESHOT_ENTROPY - 1) + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +struct sched_oneshot_s +{ + FAR struct oneshot_lowerhalf_s *oneshot; +#if CONFIG_CPULOAD_ONESHOT_ENTROPY > 0 + struct xorshift128_state_s prng; + int32_t maxdelay; + int32_t error; +#endif +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static void sched_oneshot_start(void); +static void sched_oneshot_callback(FAR struct oneshot_lowerhalf_s *lower, + FAR void *arg); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static struct sched_oneshot_s g_sched_oneshot; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: sched_oneshot_start + * + * Description: + * [Re-]start the oneshot timer, applying entropy as configured + * + * Input Parameters: + * None + * lower - An instance of the lower half driver + * arg - The opaque argument provided when the interrupt was registered + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void sched_oneshot_start(void) +{ +#if CONFIG_CPULOAD_ONESHOT_ENTROPY > 0 + struct timespec ts; + uint32_t entropy; + int32_t secs; +#endif + int32_t usecs; + + /* Get the next delay */ + +#if CONFIG_CPULOAD_ONESHOT_ENTROPY > 0 + /* The one shot will be set to this interval: + * + * CPULOAD_ONESHOT_NOMINAL - (CPULOAD_ONESHOT_ENTROPY / 2) + error + * + nrand(CPULOAD_ONESHOT_ENTROPY) + */ + + usecs = (CPULOAD_ONESHOT_NOMINAL - CPULOAD_ONESHOT_ENTROPY / 2) + + g_sched_oneshot.error; + + /* Add the random value in the range 0..(CPULOAD_ONESHOT_ENTRY - 1) */ + + entropy = xorshift128(&g_sched_oneshot.prng); + usecs += (int32_t)(entropy & CPULOAD_ONESHOT_ENTROPY_MASK); + + DEBUGASSERT(usecs > 0); /* Check for overflow to negative or zero */ + + /* Make sure that the accumulated value does not exceed the maximum delay */ + + if (usecs > g_sched_oneshot.maxdelay) + { + tmrwarn("WARNING: Truncating\n"); + usecs = g_sched_oneshot.maxdelay; + } + + /* Save the new error value */ + + g_sched_oneshot.error = CPULOAD_ONESHOT_NOMINAL + + g_sched_oneshot.error - usecs; +#else + /* No entropy */ + + usecs = CPULOAD_ONESHOT_NOMINAL; +#endif + + /* Then re-start the oneshot timer */ + + secs = usecs / 1000000; + usecs -= 100000 * secs; + + ts.tv_sec = secs; + ts.tv_nsec = 1000 * usecs; + + DEBUGVERIFY(ONESHOT_START(g_sched_oneshot.oneshot, sched_oneshot_callback, + NULL, &ts)); +} + +/**************************************************************************** + * Name: sched_oneshot_callback + * + * Description: + * This is the callback function that will be invoked when the oneshot + * timer expires. + * + * Input Parameters: + * lower - An instance of the lower half driver + * arg - The opaque argument provided when the interrupt was registered + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void sched_oneshot_callback(FAR struct oneshot_lowerhalf_s *lower, + FAR void *arg) +{ + /* Perform CPU load measurements */ + +#ifdef CONFIG_HAVE_WEAKFUNCTIONS + if (sched_process_cpuload != NULL) +#endif + { + sched_process_cpuload(); + } +#endif + + /* Then restart the oneshot */ + + sched_oneshot_start(); +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: sched_oneshot_extclk + * + * Description: + * Configure to use a oneshot timer as described in + * include/nuttx/timers/oneshot.h to provid external clocking to assess + * the CPU load. + * + * Input Parameters: + * lower - An instance of the oneshot timer interface as defined in + * include/nuttx/timers/oneshot.h + * + * Returned Value: + * None + * + ****************************************************************************/ + +void sched_oneshot_extclk(FAR struct oneshot_lowerhalf_s *lower) +{ +#if CONFIG_CPULOAD_ONESHOT_ENTROPY > 0 + struct timespec ts; +#endif + + DEBUGASSERT(lower != NULL && lower->ops != NULL); + DEBUGASSERT(lower->ops->start != NULL); + +#if CONFIG_CPULOAD_ONESHOT_ENTROPY > 0 + DEBUGASSERT(lower->ops->max_delay != NULL); + + /* Get the maximum delay */ + + DEBUGVERIFY(ONESHOT_MAX_DELAY(lower, &ts)); + if (ts.tv_sec >= 0) + { + g_sched_oneshot.maxdelay = INT32_MAX; + } + else + { + g_sched_oneshot.maxdelay = ts.tv_nsec / 1000; + } + + tmrinfo("madelay = %ld usec\n", (long)g_sched_oneshot.maxdelay); + DEBUGASSERT(CPULOAD_ONESHOT_NOMINAL < g_sched_oneshot.maxdelay); + + /* Seed the PRNG */ + + g_sched_oneshot.prng.w = 97; + g_sched_oneshot.prng.x = 101; + g_sched_oneshot.prng.y = g_sched_oneshot.prng.w << 17; + g_sched_oneshot.prng.z = g_sched_oneshot.prng.x << 25; +#endif + + /* Then start the oneshot */ + + g_sched_oneshot.oneshot = lower; + sched_oneshot_start(); +} diff --git a/sched/sched/sched_processtimer.c b/sched/sched/sched_processtimer.c index 33c3f583ac87ea13e1efde53dc7c9a95d06003b5..62dce45b02f30d23d876eac607b96c401cec36c6 100644 --- a/sched/sched/sched_processtimer.c +++ b/sched/sched/sched_processtimer.c @@ -1,7 +1,7 @@ /**************************************************************************** * sched/sched/sched_processtimer.c * - * Copyright (C) 2007, 2009, 2014-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2014-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -50,14 +50,6 @@ #include "wdog/wdog.h" #include "clock/clock.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#ifndef CONFIG_SCHED_CPULOAD_TIMECONSTANT -# define CONFIG_SCHED_CPULOAD_TIMECONSTANT 2 -#endif - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -69,10 +61,10 @@ * Check for operations specific to scheduling policy of the currently * active task. * - * Inputs: + * Input Parameters: * None * - * Return Value: + * Returned Value: * None * ****************************************************************************/ @@ -134,16 +126,22 @@ static inline void sched_process_scheduler(void) * function periodically -- the calling interval must be * USEC_PER_TICK * - * Inputs: + * Input Parameters: * None * - * Return Value: + * Returned Value: * None * ****************************************************************************/ void sched_process_timer(void) { +#ifdef CONFIG_CLOCK_TIMEKEEPING + /* Process wall time */ + + clock_update_wall_time(); +#endif + /* Increment the system time (if in the link) */ #ifdef CONFIG_HAVE_WEAKFUNCTIONS diff --git a/sched/sched/sched_removereadytorun.c b/sched/sched/sched_removereadytorun.c index 354bbc20e499461b08283e2d41614eb472c15fc9..35543037ef4a4ab7f2a1c94dd93ef215cfb41937 100644 --- a/sched/sched/sched_removereadytorun.c +++ b/sched/sched/sched_removereadytorun.c @@ -1,5 +1,5 @@ /**************************************************************************** - * shced/sched_removereadytorun.c + * sched/sched_removereadytorun.c * * Copyright (C) 2007-2009, 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/sched/sched/sched_timerexpiration.c b/sched/sched/sched_timerexpiration.c index a0ebcff8c9ce21d8b1342c19f7d76cd51c1c73cb..309b1a705d1e87bf5a7ea36041569c5b8bcc6299 100644 --- a/sched/sched/sched_timerexpiration.c +++ b/sched/sched/sched_timerexpiration.c @@ -1,7 +1,7 @@ /**************************************************************************** * sched/sched/sched_timerexpiration.c * - * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -53,6 +53,10 @@ #include "wdog/wdog.h" #include "clock/clock.h" +#ifdef CONFIG_CLOCK_TIMEKEEPING +# include "clock/clock_timekeeping.h" +#endif + #ifdef CONFIG_SCHED_TICKLESS /**************************************************************************** @@ -262,6 +266,12 @@ static unsigned int sched_timer_process(unsigned int ticks, bool noswitches) unsigned int rettime = 0; unsigned int tmp; +#ifdef CONFIG_CLOCK_TIMEKEEPING + /* Process wall time */ + + clock_update_wall_time(); +#endif + /* Process watchdogs */ tmp = wd_timer(ticks); diff --git a/sched/sched/sched_waitid.c b/sched/sched/sched_waitid.c index 003f8b597f90766fddcfbc27708e551bddde9ef8..f4e48d5f649c9799608ab541067021b37da83938 100644 --- a/sched/sched/sched_waitid.c +++ b/sched/sched/sched_waitid.c @@ -210,13 +210,16 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) } else if (idtype == P_PID) { - /* Get the TCB corresponding to this PID and make sure it is our child. */ + /* Get the TCB corresponding to this PID and make sure that the + * thread it is our child. + */ ctcb = sched_gettcb((pid_t)id); + #ifdef HAVE_GROUP_MEMBERS - if (!ctcb || ctcb->group->tg_pgid != rtcb->group->tg_gid) + if (ctcb == NULL || ctcb->group->tg_pgid != rtcb->group->tg_gid) #else - if (!ctcb || ctcb->ppid != rtcb->pid) + if (ctcb == NULL || ctcb->group>tg_ppid != rtcb->pid) #endif { errcode = ECHILD; @@ -239,7 +242,9 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) } } #else - if (rtcb->nchildren == 0) + /* Child status is not retained. */ + + if (rtcb->group->tg_nchildren == 0) { /* There are no children */ @@ -248,13 +253,16 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) } else if (idtype == P_PID) { - /* Get the TCB corresponding to this PID and make sure it is our child. */ + /* Get the TCB corresponding to this PID and make sure that the + * thread is our child. + */ ctcb = sched_gettcb((pid_t)id); + #ifdef HAVE_GROUP_MEMBERS - if (!ctcb || ctcb->group->tg_pgid != rtcb->group->tg_gid) + if (ctcb == NULL || ctcb->group->tg_pgid != rtcb->group->tg_gid) #else - if (!ctcb || ctcb->ppid != rtcb->pid) + if (ctcb == NULL || ctcb->group->tg_ppid != rtcb->pid) #endif { errcode = ECHILD; @@ -338,7 +346,7 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) * instead). */ - if (rtcb->nchildren == 0 || + if (rtcb->group->tg_nchildren == 0 || (idtype == P_PID && (ret = kill((pid_t)id, 0)) < 0)) { /* We know that the child task was running okay we stared, diff --git a/sched/sched/sched_waitpid.c b/sched/sched/sched_waitpid.c index 0e3902342b13d142d79d0385e55d0d4064d2b1c6..a3ef50674f1cf8884cca1c9c5d422953db16862e 100644 --- a/sched/sched/sched_waitpid.c +++ b/sched/sched/sched_waitpid.c @@ -202,7 +202,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) /* Get the TCB corresponding to this PID */ ctcb = sched_gettcb(pid); - if (!ctcb) + if (ctcb == NULL) { errcode = ECHILD; goto errout_with_errno; @@ -342,13 +342,16 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) } else if (pid != (pid_t)-1) { - /* Get the TCB corresponding to this PID and make sure it is our child. */ + /* Get the TCB corresponding to this PID and make sure that the + * thread it is our child. + */ ctcb = sched_gettcb(pid); + #ifdef HAVE_GROUP_MEMBERS - if (!ctcb || ctcb->group->tg_pgid != rtcb->group->tg_gid) + if (ctcb == NULL || ctcb->group->tg_pgid != rtcb->group->tg_gid) #else - if (!ctcb || ctcb->ppid != rtcb->pid) + if (ctcb == NULL || ctcb->group->tg_ppid != rtcb->pid) #endif { errcode = ECHILD; @@ -371,7 +374,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) #else /* CONFIG_SCHED_CHILD_STATUS */ - if (rtcb->nchildren == 0) + if (rtcb->group->tg_nchildren == 0) { /* There are no children */ @@ -380,13 +383,16 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) } else if (pid != (pid_t)-1) { - /* Get the TCB corresponding to this PID and make sure it is our child. */ + /* Get the TCB corresponding to this PID and make sure that the + * thread it is our child. + */ ctcb = sched_gettcb(pid); + #ifdef HAVE_GROUP_MEMBERS - if (!ctcb || ctcb->group->tg_pgid != rtcb->group->tg_gid) + if (ctcb == NULL || ctcb->group->tg_pgid != rtcb->group->tg_gid) #else - if (!ctcb || ctcb->ppid != rtcb->pid) + if (ctcb == NULL || ctcb->group->tg_ppid != rtcb->pid) #endif { errcode = ECHILD; @@ -485,7 +491,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) * instead). */ - if (rtcb->nchildren == 0 || + if (rtcb->group->tg_nchildren == 0 || (pid != (pid_t)-1 && (ret = kill(pid, 0)) < 0)) { /* We know that the child task was running okay we stared, diff --git a/sched/signal/sig_nanosleep.c b/sched/signal/sig_nanosleep.c index 0ac8e7fadb70be37a561be07a7f54d8dc61e0420..4a492f0c853e25141a102d41d141068c699bb335 100644 --- a/sched/signal/sig_nanosleep.c +++ b/sched/signal/sig_nanosleep.c @@ -167,6 +167,11 @@ int nanosleep(FAR const struct timespec *rqtp, FAR struct timespec *rmtp) systime_t remaining; int ticks; + /* REVISIT: The conversion from time to ticks and back could + * be avoided. clock_timespec_subtract() would be used instead + * to get the time difference. + */ + /* First get the number of clock ticks that we were requested to * wait. */ diff --git a/sched/task/task_exithook.c b/sched/task/task_exithook.c index aee8dc4242fa4578a8a41779c9f681a807ed2750..cffae18e7d90ed2ffc0a32db93ea2a244baad199 100644 --- a/sched/task/task_exithook.c +++ b/sched/task/task_exithook.c @@ -360,11 +360,12 @@ static inline void task_sigchild(FAR struct tcb_s *ptcb, task_exitstatus(ptcb->group, status); #else /* CONFIG_SCHED_CHILD_STATUS */ + /* Exit status is not retained. Just decrement the number of + * children from this parent. + */ - /* Decrement the number of children from this parent */ - - DEBUGASSERT(ptcb->nchildren > 0); - ptcb->nchildren--; + DEBUGASSERT(ptcb->group != NULL && ptcb->group->tg_nchildren > 0); + ptcb->group->tg_nchildren--; #endif /* CONFIG_SCHED_CHILD_STATUS */ @@ -429,13 +430,13 @@ static inline void task_signalparent(FAR struct tcb_s *ctcb, int status) sched_lock(); /* Get the TCB of the receiving, parent task. We do this early to - * handle multiple calls to task_signalparent. ctcb->ppid is set to an - * invalid value below and the following call will fail if we are - * called again. + * handle multiple calls to task_signalparent. ctcb->group->tg_ppid is + * set to an invalid value below and the following call will fail if we + * are called again. */ - ptcb = sched_gettcb(ctcb->ppid); - if (!ptcb) + ptcb = sched_gettcb(ctcb->group->tg_ppid); + if (ptcb == NULL) { /* The parent no longer exists... bail */ @@ -449,7 +450,7 @@ static inline void task_signalparent(FAR struct tcb_s *ctcb, int status) /* Forget who our parent was */ - ctcb->ppid = INVALID_PROCESS_ID; + ctcb->group->tg_ppid = INVALID_PROCESS_ID; sched_unlock(); #endif } diff --git a/sched/task/task_reparent.c b/sched/task/task_reparent.c index 690294ec024d7f4f99a80a7ad77e62f8ce84e24c..b7fe508badcd0f0164f173d90b458f7b2ef06ccb 100644 --- a/sched/task/task_reparent.c +++ b/sched/task/task_reparent.c @@ -190,11 +190,12 @@ int task_reparent(pid_t ppid, pid_t chpid) } #else /* CONFIG_SCHED_CHILD_STATUS */ + /* Child task exit status is not retained */ - DEBUGASSERT(otcb->nchildren > 0); + DEBUGASSERT(ogrp->tg_nchildren > 0); - otcb->nchildren--; /* The orignal parent now has one few children */ - ptcb->nchildren++; /* The new parent has one additional child */ + ogrp->tg_nchildren--; /* The orignal parent now has one few children */ + pgrp->tg_nchildren++; /* The new parent has one additional child */ ret = OK; #endif /* CONFIG_SCHED_CHILD_STATUS */ @@ -233,7 +234,7 @@ int task_reparent(pid_t ppid, pid_t chpid) /* Get the PID of the child task's parent (opid) */ - opid = chtcb->ppid; + opid = chtcb->group->tg_ppid; /* Get the TCB of the child task's parent (otcb) */ @@ -244,14 +245,14 @@ int task_reparent(pid_t ppid, pid_t chpid) goto errout_with_ints; } - /* If new parent task's PID (ppid) is zero, then new parent is the + /* If new parent task's PID (tg_ppid) is zero, then new parent is the * grandparent will be the new parent, i.e., the parent of the current * parent task. */ if (ppid == 0) { - ppid = otcb->ppid; + ppid = otcb->group->tg_ppid; } /* Get the new parent task's TCB (ptcb) */ @@ -263,9 +264,9 @@ int task_reparent(pid_t ppid, pid_t chpid) goto errout_with_ints; } - /* Then reparent the child */ + /* Then reparent the child. The task specified by ppid is the new parent. */ - chtcb->ppid = ppid; /* The task specified by ppid is the new parent */ + chtcb->group->tg_ppid = ppid; #ifdef CONFIG_SCHED_CHILD_STATUS /* Remove the child status entry from old parent TCB */ @@ -302,11 +303,12 @@ int task_reparent(pid_t ppid, pid_t chpid) } #else /* CONFIG_SCHED_CHILD_STATUS */ + /* Child task exit status is not retained */ - DEBUGASSERT(otcb->nchildren > 0); + DEBUGASSERT(otcb->group != NULL && otcb->group->tg_nchildren > 0); - otcb->nchildren--; /* The orignal parent now has one few children */ - ptcb->nchildren++; /* The new parent has one additional child */ + otcb->group->tg_nchildren--; /* The orignal parent now has one few children */ + ptcb->group->tg_nchildren++; /* The new parent has one additional child */ ret = OK; #endif /* CONFIG_SCHED_CHILD_STATUS */ diff --git a/sched/task/task_setup.c b/sched/task/task_setup.c index 6d0ea9c2b2103511d505b4475cef055d850ff001..0819049785caac2ce35a536dbcebb588a2fcd4a6 100644 --- a/sched/task/task_setup.c +++ b/sched/task/task_setup.c @@ -182,7 +182,7 @@ static inline void task_inherit_affinity(FAR struct tcb_s *tcb) * Name: task_saveparent * * Description: - * Save the task ID of the parent task in the child task's TCB and allocate + * Save the task ID of the parent task in the child task's group and allocate * a child status structure to catch the child task's exit status. * * Parameters: @@ -201,83 +201,86 @@ static inline void task_inherit_affinity(FAR struct tcb_s *tcb) #ifdef CONFIG_SCHED_HAVE_PARENT static inline void task_saveparent(FAR struct tcb_s *tcb, uint8_t ttype) { - FAR struct tcb_s *rtcb = this_task(); - -#if defined(HAVE_GROUP_MEMBERS) || defined(CONFIG_SCHED_CHILD_STATUS) - DEBUGASSERT(tcb && tcb->group && rtcb->group); -#else -#endif + DEBUGASSERT(tcb != NULL && tcb->group != NULL); -#ifdef HAVE_GROUP_MEMBERS - /* Save the ID of the parent tasks' task group in the child's task group. - * Do nothing for pthreads. The parent and the child are both members of - * the same task group. + /* Only newly created tasks (and kernel threads) have parents. None of + * this logic applies to pthreads with reside in the same group as the + * parent and share that same child/parent relationships. */ #ifndef CONFIG_DISABLE_PTHREAD if ((tcb->flags & TCB_FLAG_TTYPE_MASK) != TCB_FLAG_TTYPE_PTHREAD) #endif { - /* This is a new task in a new task group, we have to copy the ID from - * the parent's task group structure to child's task group. + /* Get the TCB of the parent task. In this case, the calling task. */ + + FAR struct tcb_s *rtcb = this_task(); + + DEBUGASSERT(rtcb != NULL && rtcb->group != NULL); + +#ifdef HAVE_GROUP_MEMBERS + /* Save the ID of the parent tasks' task group in the child's task + * group. Copy the ID from the parent's task group structure to + * child's task group. */ tcb->group->tg_pgid = rtcb->group->tg_gid; - } #else - DEBUGASSERT(tcb); - - /* Save the parent task's ID in the child task's TCB. I am not sure if - * this makes sense for the case of pthreads or not, but I don't think it - * is harmful in any event. - */ + /* Save the parent task's ID in the child task's group. */ - tcb->ppid = rtcb->pid; + tcb->group->tg_ppid = rtcb->pid; #endif #ifdef CONFIG_SCHED_CHILD_STATUS - /* Tasks can also suppress retention of their child status by applying - * the SA_NOCLDWAIT flag with sigaction(). - */ - - if ((rtcb->group->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0) - { - FAR struct child_status_s *child; - - /* Make sure that there is not already a structure for this PID in the - * parent TCB. There should not be. + /* Tasks can also suppress retention of their child status by applying + * the SA_NOCLDWAIT flag with sigaction(). */ - child = group_findchild(rtcb->group, tcb->pid); - DEBUGASSERT(!child); - if (!child) + if ((rtcb->group->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0) { - /* Allocate a new status structure */ + FAR struct child_status_s *child; - child = group_allocchild(); - } + /* Make sure that there is not already a structure for this PID in + * the parent TCB. There should not be. + */ - /* Did we successfully find/allocate the child status structure? */ + child = group_findchild(rtcb->group, tcb->pid); + DEBUGASSERT(child == NULL); + if (child == NULL) + { + /* Allocate a new status structure */ - DEBUGASSERT(child); - if (child) - { - /* Yes.. Initialize the structure */ + child = group_allocchild(); + } + + /* Did we successfully find/allocate the child status structure? */ + + DEBUGASSERT(child != NULL); + if (child != NULL) + { + /* Yes.. Initialize the structure */ - child->ch_flags = ttype; - child->ch_pid = tcb->pid; - child->ch_status = 0; + child->ch_flags = ttype; + child->ch_pid = tcb->pid; + child->ch_status = 0; - /* Add the entry into the TCB list of children */ + /* Add the entry into the group's list of children */ - group_addchild(rtcb->group, child); + group_addchild(rtcb->group, child); + } } + +#else /* CONFIG_SCHED_CHILD_STATUS */ + /* Child status is not retained. Simply keep track of the number + * child tasks created. + */ + + DEBUGASSERT(rtcb->group->tg_nchildren < UINT16_MAX); + rtcb->group->tg_nchildren++; + +#endif /* CONFIG_SCHED_CHILD_STATUS */ } -#else - DEBUGASSERT(rtcb->nchildren < UINT16_MAX); - rtcb->nchildren++; -#endif } #else # define task_saveparent(tcb,ttype) diff --git a/sched/timer/timer.h b/sched/timer/timer.h index 6165d9e847b3d69aedc8c89535455141836c034a..a700320a390c71935753ce8a961ce17433b6011f 100644 --- a/sched/timer/timer.h +++ b/sched/timer/timer.h @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/timer/timer.h * * Copyright (C) 2007-2009, 2014-2015 Gregory Nutt. All rights reserved. @@ -31,14 +31,14 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ #ifndef __SCHED_TIMER_TIMER_H #define __SCHED_TIMER_TIMER_H -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -49,15 +49,15 @@ #include #include -/******************************************************************************** +/**************************************************************************** * Pre-processor Definitions - ********************************************************************************/ + ****************************************************************************/ #define PT_FLAGS_PREALLOCATED 0x01 /* Timer comes from a pool of preallocated timers */ -/******************************************************************************** +/**************************************************************************** * Public Types - ********************************************************************************/ + ****************************************************************************/ /* This structure represents one POSIX timer */ @@ -74,13 +74,13 @@ struct posix_timer_s struct sigevent pt_event; /* Notification information */ }; -/******************************************************************************** +/**************************************************************************** * Public Data - ********************************************************************************/ + ****************************************************************************/ +#if CONFIG_PREALLOC_TIMERS > 0 /* This is a list of free, preallocated timer structures */ -#if CONFIG_PREALLOC_TIMERS > 0 extern volatile sq_queue_t g_freetimers; #endif @@ -91,12 +91,12 @@ extern volatile sq_queue_t g_freetimers; extern volatile sq_queue_t g_alloctimers; -/******************************************************************************** +/**************************************************************************** * Public Function Prototypes - ********************************************************************************/ + ****************************************************************************/ void weak_function timer_initialize(void); void weak_function timer_deleteall(pid_t pid); -int timer_release(FAR struct posix_timer_s *timer); +int timer_release(FAR struct posix_timer_s *timer); #endif /* __SCHED_TIMER_TIMER_H */ diff --git a/sched/timer/timer_create.c b/sched/timer/timer_create.c index a573ff38ba2a07732ea61b63acb87562ed961e76..cff93c0a4bbaea299869210ad55dbb62c1bb172c 100644 --- a/sched/timer/timer_create.c +++ b/sched/timer/timer_create.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/timer/timer_create.c * * Copyright (C) 2007-2009, 2011, 2014-2016 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -53,17 +53,17 @@ #ifndef CONFIG_DISABLE_POSIX_TIMERS -/******************************************************************************** +/**************************************************************************** * Private Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: timer_allocate * * Description: * Allocate one POSIX timer and place it into the allocated timer list. * - ********************************************************************************/ + ****************************************************************************/ static FAR struct posix_timer_s *timer_allocate(void) { @@ -112,32 +112,33 @@ static FAR struct posix_timer_s *timer_allocate(void) return ret; } -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: timer_create * * Description: - * The timer_create() function creates per-thread timer using the specified - * clock, clock_id, as the timing base. The timer_create() function returns, in - * the location referenced by timerid, a timer ID of type timer_t used to identify - * the timer in timer requests. This timer ID is unique until the timer is - * deleted. The particular clock, clock_id, is defined in . The timer - * whose ID is returned will be in a disarmed state upon return from - * timer_create(). + * The timer_create() function creates per-thread timer using the + * specified clock, clock_id, as the timing base. The timer_create() + * function returns, in the location referenced by timerid, a timer ID of + * type timer_t used to identify the timer in timer requests. This timer + * ID is unique until the timer is deleted. The particular clock, clock_id, + * is defined in . The timer whose ID is returned will be in a + * disarmed state upon return from timer_create(). * - * The evp argument, if non-NULL, points to a sigevent structure. This structure - * is allocated by the called and defines the asynchronous notification to occur. - * If the evp argument is NULL, the effect is as if the evp argument pointed to - * a sigevent structure with the sigev_notify member having the value SIGEV_SIGNAL, - * the sigev_signo having a default signal number, and the sigev_value member - * having the value of the timer ID. + * The evp argument, if non-NULL, points to a sigevent structure. This + * structure is allocated by the called and defines the asynchronous + * notification to occur. If the evp argument is NULL, the effect is as + * if the evp argument pointed to a sigevent structure with the + * sigev_notify member having the value SIGEV_SIGNAL, the sigev_signo + * having a default signal number, and the sigev_value member having the + * value of the timer ID. * - * Each implementation defines a set of clocks that can be used as timing bases - * for per-thread timers. All implementations shall support a clock_id of - * CLOCK_REALTIME. + * Each implementation defines a set of clocks that can be used as timing + * bases for per-thread timers. All implementations shall support a + * clock_id of CLOCK_REALTIME. * * Parameters: * clockid - Specifies the clock to use as the timing base. @@ -148,30 +149,31 @@ static FAR struct posix_timer_s *timer_allocate(void) * Return Value: * If the call succeeds, timer_create() will return 0 (OK) and update the * location referenced by timerid to a timer_t, which can be passed to the - * other per-thread timer calls. If an error occurs, the function will return - * a value of -1 (ERROR) and set errno to indicate the error. + * other per-thread timer calls. If an error occurs, the function will + * return a value of -1 (ERROR) and set errno to indicate the error. * - * EAGAIN - The system lacks sufficient signal queuing resources to honor the - * request. - * EAGAIN - The calling process has already created all of the timers it is - * allowed by this implementation. + * EAGAIN - The system lacks sufficient signal queuing resources to honor + * the request. + * EAGAIN - The calling process has already created all of the timers it + * is allowed by this implementation. * EINVAL - The specified clock ID is not defined. - * ENOTSUP - The implementation does not support the creation of a timer attached - * to the CPU-time clock that is specified by clock_id and associated with a - * thread different thread invoking timer_create(). + * ENOTSUP - The implementation does not support the creation of a timer + * attached to the CPU-time clock that is specified by clock_id and + * associated with a thread different thread invoking timer_create(). * * Assumptions: * - ********************************************************************************/ + ****************************************************************************/ -int timer_create(clockid_t clockid, FAR struct sigevent *evp, FAR timer_t *timerid) +int timer_create(clockid_t clockid, FAR struct sigevent *evp, + FAR timer_t *timerid) { FAR struct posix_timer_s *ret; WDOG_ID wdog; /* Sanity checks. Also, we support only CLOCK_REALTIME */ - if (!timerid || clockid != CLOCK_REALTIME) + if (timerid == NULL || clockid != CLOCK_REALTIME) { set_errno(EINVAL); return ERROR; diff --git a/sched/timer/timer_delete.c b/sched/timer/timer_delete.c index 495db81dc1da285246edb59e4094f02fd98e0d72..6d6e5bebc12fefcf0932c522a7efc5e29242eff5 100644 --- a/sched/timer/timer_delete.c +++ b/sched/timer/timer_delete.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/timer/timer_delete.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -46,34 +46,34 @@ #ifndef CONFIG_DISABLE_POSIX_TIMERS -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: timer_delete * * Description: - * The timer_delete() function deletes the specified timer, timerid, previously - * created by the timer_create() function. If the timer is armed when - * timer_delete() is called, the timer will be automatically disarmed before - * removal. The disposition of pending signals for the deleted timer is - * unspecified. + * The timer_delete() function deletes the specified timer, timerid, + * previously created by the timer_create() function. If the timer is + * armed when timer_delete() is called, the timer will be automatically + * disarmed before removal. The disposition of pending signals for the + * deleted timer is unspecified. * * Parameters: * timerid - The per-thread timer, previously created by the call to * timer_create(), to be deleted. * * Return Value: - * If the call succeeds, timer_create() will return 0 (OK). Otherwise, the - * function will return a value of -1 (ERROR) and set errno to indicate the - * error. + * If the call succeeds, timer_create() will return 0 (OK). Otherwise, + * the function will return a value of -1 (ERROR) and set errno to + * indicate the error. * * EINVAL - The timer specified timerid is not valid. * * Assumptions: * - ********************************************************************************/ + ****************************************************************************/ int timer_delete(timer_t timerid) { diff --git a/sched/timer/timer_getoverrun.c b/sched/timer/timer_getoverrun.c index e92a81bef9b928925855a120eaa3928144c7f2e8..da07dcedcacc5936ebed171a04559cce88a8b443 100644 --- a/sched/timer/timer_getoverrun.c +++ b/sched/timer/timer_getoverrun.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/timer/timer_getoverrun.c * * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -46,30 +46,31 @@ #ifndef CONFIG_DISABLE_POSIX_TIMERS -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: timer_getoverrun * * Description: - * Only a single signal will be queued to the process for a given timer at any - * point in time. When a timer for which a signal is still pending expires, no - * signal will be queued, and a timer overrun will occur. When a timer - * expiration signal is delivered to or accepted by a process, if the - * implementation supports the Realtime Signals Extension, the - * timer_getoverrun() function will return the timer expiration overrun count for - * the specified timer. The overrun count returned contains the number of extra - * timer expirations that occurred between the time the signal was generated - * (queued) and when it was delivered or accepted, up to but not including an - * implementation-defined maximum of DELAYTIMER_MAX. If the number of such - * extra expirations is greater than or equal to DELAYTIMER_MAX, then the - * overrun count will be set to DELAYTIMER_MAX. The value returned by - * timer_getoverrun() will apply to the most recent expiration signal delivery - * or acceptance for the timer. If no expiration signal has been delivered - * for the timer, or if the Realtime Signals Extension is not supported, the - * return value of timer_getoverrun() is unspecified. + * Only a single signal will be queued to the process for a given timer at + * any point in time. When a timer for which a signal is still pending + * expires, no signal will be queued, and a timer overrun will occur. When + * a timer expiration signal is delivered to or accepted by a process, if + * the implementation supports the Realtime Signals Extension, the + * timer_getoverrun() function will return the timer expiration overrun + * count for the specified timer. The overrun count returned contains the + * number of extra timer expirations that occurred between the time the + * signal was generated (queued) and when it was delivered or accepted, up + * to but not including an implementation-defined maximum of + * DELAYTIMER_MAX. If the number of such extra expirations is greater than + * or equal to DELAYTIMER_MAX, then the overrun count will be set to + * DELAYTIMER_MAX. The value returned by timer_getoverrun() will apply to + * the most recent expiration signal delivery or acceptance for the timer. + * If no expiration signal has been delivered for the timer, or if the + * Realtime Signals Extension is not supported, the return value of + * timer_getoverrun() is unspecified. * * Parameters: * timerid - The pre-thread timer, previously created by the call to @@ -77,14 +78,15 @@ * * Return Value: * If the timer_getoverrun() function succeeds, it will return the timer - * expiration overrun count as explained above. timer_getoverrun() will fail if: + * expiration overrun count as explained above. timer_getoverrun() will + * fail if: * * EINVAL - The timerid argument does not correspond to an ID returned by * timer_create() but not yet deleted by timer_delete(). * * Assumptions: * - ********************************************************************************/ + ****************************************************************************/ int timer_getoverrun(timer_t timerid) { diff --git a/sched/timer/timer_gettime.c b/sched/timer/timer_gettime.c index 44bf877c9f3c1557a89e382747371691349f252f..c1e58899b452f98f1927c337f32c85c22e8642ba 100644 --- a/sched/timer/timer_gettime.c +++ b/sched/timer/timer_gettime.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/timer/timer_gettime.c * * Copyright (C) 2007 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -47,21 +47,22 @@ #ifndef CONFIG_DISABLE_POSIX_TIMERS -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: timer_gettime * * Description: - * The timer_gettime() function will store the amount of time until the - * specified timer, timerid, expires and the reload value of the timer into the - * space pointed to by the value argument. The it_value member of this structure - * will contain the amount of time before the timer expires, or zero if the timer - * is disarmed. This value is returned as the interval until timer expiration, - * even if the timer was armed with absolute time. The it_interval member of - * value will contain the reload value last set by timer_settime(). + * The timer_gettime() function will store the amount of time until the + * specified timer, timerid, expires and the reload value of the timer + * into the space pointed to by the value argument. The it_value member + * of this structure will contain the amount of time before the timer + * expires, or zero if the timer is disarmed. This value is returned as + * the interval until timer expiration, even if the timer was armed with + * absolute time. The it_interval member of value will contain the reload + * value last set by timer_settime(). * * Parameters: * timerid - The pre-thread timer, previously created by the call to @@ -69,8 +70,8 @@ * * Return Value: * If the timer_gettime() succeeds, a value of 0 (OK) will be returned. - * If an error occurs, the value -1 (ERROR) will be returned, and errno set to - * indicate the error. + * If an error occurs, the value -1 (ERROR) will be returned, and errno + * set to indicate the error. * * EINVAL - The timerid argument does not correspond to an ID returned by * timer_create() but not yet deleted by timer_delete(). @@ -80,7 +81,7 @@ * by this function could be significantly more than that actual time * remaining on the timer at any time. * - ********************************************************************************/ + ****************************************************************************/ int timer_gettime(timer_t timerid, FAR struct itimerspec *value) { diff --git a/sched/timer/timer_initialize.c b/sched/timer/timer_initialize.c index 2a215c605cfac5584048d5756f5ad99de05ad0e7..25a64b1a51afef22525b569370b96694350f320b 100644 --- a/sched/timer/timer_initialize.c +++ b/sched/timer/timer_initialize.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/timer/timer_initialize.c * * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include #include @@ -51,9 +51,9 @@ #ifndef CONFIG_DISABLE_POSIX_TIMERS -/******************************************************************************** +/**************************************************************************** * Private Data - ********************************************************************************/ + ****************************************************************************/ /* These are the preallocated times */ @@ -61,28 +61,28 @@ static struct posix_timer_s g_prealloctimers[CONFIG_PREALLOC_TIMERS]; #endif -/******************************************************************************** +/**************************************************************************** * Public Data - ********************************************************************************/ + ****************************************************************************/ +#if CONFIG_PREALLOC_TIMERS > 0 /* This is a list of free, preallocated timer structures */ -#if CONFIG_PREALLOC_TIMERS > 0 volatile sq_queue_t g_freetimers; #endif -/* This is a list of instantiated timer structures -- active and inactive. The - * timers are place on this list by timer_create() and removed from the list by - * timer_delete() or when the owning thread exits. +/* This is a list of instantiated timer structures -- active and inactive. + * The timers are place on this list by timer_create() and removed from the + * list by timer_delete() or when the owning thread exits. */ volatile sq_queue_t g_alloctimers; -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: timer_initialize * * Description: @@ -94,9 +94,7 @@ volatile sq_queue_t g_alloctimers; * Return Value: * None * - * Assumptions: - * - ********************************************************************************/ + ****************************************************************************/ void weak_function timer_initialize(void) { @@ -120,12 +118,12 @@ void weak_function timer_initialize(void) sq_init((FAR sq_queue_t *)&g_alloctimers); } -/******************************************************************************** +/**************************************************************************** * Name: timer_deleteall * * Description: - * This function is called whenever a thread exits. Any timers owned by that - * thread are deleted as though called by timer_delete(). + * This function is called whenever a thread exits. Any timers owned by + * that thread are deleted as though called by timer_delete(). * * It is provided in this file so that it can be weakly defined but also, * like timer_intitialize(), be brought into the link whenever the timer @@ -137,9 +135,7 @@ void weak_function timer_initialize(void) * Return Value: * None * - * Assumptions: - * - ********************************************************************************/ + ****************************************************************************/ void weak_function timer_deleteall(pid_t pid) { @@ -148,7 +144,9 @@ void weak_function timer_deleteall(pid_t pid) irqstate_t flags; flags = enter_critical_section(); - for (timer = (FAR struct posix_timer_s *)g_alloctimers.head; timer; timer = next) + for (timer = (FAR struct posix_timer_s *)g_alloctimers.head; + timer != NULL; + timer = next) { next = timer->flink; if (timer->pt_owner == pid) diff --git a/sched/timer/timer_release.c b/sched/timer/timer_release.c index 3ad62febbc11ab827d9df72892892262cb1688d1..2608092a16f9a2da6bd8f0bdca6eed5cdd9f99fc 100644 --- a/sched/timer/timer_release.c +++ b/sched/timer/timer_release.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/timer/timer_release.c * * Copyright (C) 2008 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -49,19 +49,19 @@ #ifndef CONFIG_DISABLE_POSIX_TIMERS -/******************************************************************************** +/**************************************************************************** * Private Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: timer_free * * Description: - * Remove the timer from the allocated timer list and free it or return it to - * the free list (depending on whether or not the timer is one of the + * Remove the timer from the allocated timer list and free it or return it + * to the free list (depending on whether or not the timer is one of the * preallocated timers) * - ********************************************************************************/ + ****************************************************************************/ static inline void timer_free(struct posix_timer_s *timer) { @@ -90,29 +90,30 @@ static inline void timer_free(struct posix_timer_s *timer) } } -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: timer_release * * Description: - * timer_release implements the heart of timer_delete. It is private to the - * the OS internals and differs only in that return value of 1 means that the - * timer was not actually deleted. + * timer_release implements the heart of timer_delete. It is private to + * the OS internals and differs only in that return value of 1 means that + * the timer was not actually deleted. * * Parameters: * timer - The per-thread timer, previously created by the call to * timer_create(), to be deleted. * * Return Value: - * If the call succeeds, timer_release() will return 0 (OK) or 1 (meaning that - * the timer is still valid). Otherwise, the function will return a negated errno: + * If the call succeeds, timer_release() will return 0 (OK) or 1 (meaning + * that the timer is still valid). Otherwise, the function will return a + * negated errno value: * * -EINVAL - The timer specified timerid is not valid. * - ********************************************************************************/ + ****************************************************************************/ int timer_release(FAR struct posix_timer_s *timer) { diff --git a/sched/timer/timer_settime.c b/sched/timer/timer_settime.c index d134441e3e8ed2d811b2a93dd989fe2efc236c0d..aa6007f95aa453df0967a4f7b59c2a12416b1654 100644 --- a/sched/timer/timer_settime.c +++ b/sched/timer/timer_settime.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/timer/timer_settime.c * * Copyright (C) 2007-2010, 2013-2016 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -53,19 +53,20 @@ #ifndef CONFIG_DISABLE_POSIX_TIMERS -/******************************************************************************** +/**************************************************************************** * Private Function Prototypes - ********************************************************************************/ + ****************************************************************************/ static inline void timer_signotify(FAR struct posix_timer_s *timer); -static inline void timer_restart(FAR struct posix_timer_s *timer, wdparm_t itimer); +static inline void timer_restart(FAR struct posix_timer_s *timer, + wdparm_t itimer); static void timer_timeout(int argc, wdparm_t itimer); -/******************************************************************************** +/**************************************************************************** * Private Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: timer_signotify * * Description: @@ -81,7 +82,7 @@ static void timer_timeout(int argc, wdparm_t itimer); * Assumptions: * This function executes in the context of the watchod timer interrupt. * - ********************************************************************************/ + ****************************************************************************/ static inline void timer_signotify(FAR struct posix_timer_s *timer) { @@ -121,7 +122,7 @@ static inline void timer_signotify(FAR struct posix_timer_s *timer) #endif } -/******************************************************************************** +/**************************************************************************** * Name: timer_restart * * Description: @@ -136,7 +137,7 @@ static inline void timer_signotify(FAR struct posix_timer_s *timer) * Assumptions: * This function executes in the context of the watchdog timer interrupt. * - ********************************************************************************/ + ****************************************************************************/ static inline void timer_restart(FAR struct posix_timer_s *timer, wdparm_t itimer) @@ -146,12 +147,12 @@ static inline void timer_restart(FAR struct posix_timer_s *timer, if (timer->pt_delay) { timer->pt_last = timer->pt_delay; - (void)wd_start(timer->pt_wdog, timer->pt_delay, (wdentry_t)timer_timeout, - 1, itimer); + (void)wd_start(timer->pt_wdog, timer->pt_delay, + (wdentry_t)timer_timeout, 1, itimer); } } -/******************************************************************************** +/**************************************************************************** * Name: timer_timeout * * Description: @@ -169,13 +170,14 @@ static inline void timer_restart(FAR struct posix_timer_s *timer, * Assumptions: * This function executes in the context of the watchod timer interrupt. * - ********************************************************************************/ + ****************************************************************************/ static void timer_timeout(int argc, wdparm_t itimer) { #ifndef CONFIG_CAN_PASS_STRUCTS - /* On many small machines, pointers are encoded and cannot be simply cast from - * wdparm_t to struct tcb_s *. The following union works around this (see wdogparm_t). + /* On many small machines, pointers are encoded and cannot be simply cast + * from wdparm_t to struct tcb_s *. The following union works around this + * (see wdogparm_t). */ union @@ -186,9 +188,9 @@ static void timer_timeout(int argc, wdparm_t itimer) u.itimer = itimer; - /* Send the specified signal to the specified task. Increment the reference - * count on the timer first so that will not be deleted until after the - * signal handler returns. + /* Send the specified signal to the specified task. Increment the + * reference count on the timer first so that will not be deleted until + * after the signal handler returns. */ u.timer->pt_crefs++; @@ -207,9 +209,9 @@ static void timer_timeout(int argc, wdparm_t itimer) #else FAR struct posix_timer_s *timer = (FAR struct posix_timer_s *)itimer; - /* Send the specified signal to the specified task. Increment the reference - * count on the timer first so that will not be deleted until after the - * signal handler returns. + /* Send the specified signal to the specified task. Increment the + * reference count on the timer first so that will not be deleted until + * after the signal handler returns. */ timer->pt_crefs++; @@ -228,62 +230,63 @@ static void timer_timeout(int argc, wdparm_t itimer) #endif } -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: timer_settime * * Description: - * The timer_settime() function sets the time until the next expiration of the - * timer specified by timerid from the it_value member of the value argument - * and arm the timer if the it_value member of value is non-zero. If the - * specified timer was already armed when timer_settime() is called, this call - * will reset the time until next expiration to the value specified. If the - * it_value member of value is zero, the timer will be disarmed. The effect - * of disarming or resetting a timer with pending expiration notifications is - * unspecified. + * The timer_settime() function sets the time until the next expiration of + * the timer specified by timerid from the it_value member of the value + * argument and arm the timer if the it_value member of value is non-zero. + * If the specified timer was already armed when timer_settime() is + * called, this call will reset the time until next expiration to the + * value specified. If the it_value member of value is zero, the timer + * will be disarmed. The effect of disarming or resetting a timer with + * pending expiration notifications is unspecified. * - * If the flag TIMER_ABSTIME is not set in the argument flags, timer_settime() - * will behave as if the time until next expiration is set to be equal to the - * interval specified by the it_value member of value. That is, the timer will - * expire in it_value nanoseconds from when the call is made. If the flag - * TIMER_ABSTIME is set in the argument flags, timer_settime() will behave as - * if the time until next expiration is set to be equal to the difference between - * the absolute time specified by the it_value member of value and the current - * value of the clock associated with timerid. That is, the timer will expire - * when the clock reaches the value specified by the it_value member of value. - * If the specified time has already passed, the function will succeed and the + * If the flag TIMER_ABSTIME is not set in the argument flags, + * timer_settime() will behave as if the time until next expiration is set + * to be equal to the interval specified by the it_value member of value. + * That is, the timer will expire in it_value nanoseconds from when the + * call is made. If the flag TIMER_ABSTIME is set in the argument flags, + * timer_settime() will behave as if the time until next expiration is set + * to be equal to the difference between the absolute time specified by + * the it_value member of value and the current value of the clock + * associated with timerid. That is, the timer will expire when the clock + * reaches the value specified by the it_value member of value. If the + * specified time has already passed, the function will succeed and the * expiration notification will be made. * * The reload value of the timer will be set to the value specified by the * it_interval member of value. When a timer is armed with a non-zero * it_interval, a periodic (or repetitive) timer is specified. * - * Time values that are between two consecutive non-negative integer multiples - * of the resolution of the specified timer will be rounded up to the larger - * multiple of the resolution. Quantization error will not cause the timer to - * expire earlier than the rounded time value. + * Time values that are between two consecutive non-negative integer + * multiples of the resolution of the specified timer will be rounded up + * to the larger multiple of the resolution. Quantization error will not + * cause the timer to expire earlier than the rounded time value. * - * If the argument ovalue is not NULL, the timer_settime() function will store, - * in the location referenced by ovalue, a value representing the previous - * amount of time before the timer would have expired, or zero if the timer was - * disarmed, together with the previous timer reload value. Timers will not - * expire before their scheduled time. + * If the argument ovalue is not NULL, the timer_settime() function will + * store, in the location referenced by ovalue, a value representing the + * previous amount of time before the timer would have expired, or zero if + * the timer was disarmed, together with the previous timer reload value. + * Timers will not expire before their scheduled time. * * Parameters: * timerid - The pre-thread timer, previously created by the call to * timer_create(), to be be set. * flags - Specifie characteristics of the timer (see above) * value - Specifies the timer value to set - * ovalue - A location in which to return the time remaining from the previous - * timer setting. (ignored) + * ovalue - A location in which to return the time remaining from the + * previous timer setting. (ignored) * * Return Value: * If the timer_settime() succeeds, a value of 0 (OK) will be returned. - * If an error occurs, the value -1 (ERROR) will be returned, and errno set to - * indicate the error. + * If an error occurs, the value -1 (ERROR) will be returned, and errno set + * to indicate the error. * * EINVAL - The timerid argument does not correspond to an ID returned by * timer_create() but not yet deleted by timer_delete(). @@ -293,9 +296,10 @@ static void timer_timeout(int argc, wdparm_t itimer) * * Assumptions: * - ********************************************************************************/ + ****************************************************************************/ -int timer_settime(timer_t timerid, int flags, FAR const struct itimerspec *value, +int timer_settime(timer_t timerid, int flags, + FAR const struct itimerspec *value, FAR struct itimerspec *ovalue) { FAR struct posix_timer_s *timer = (FAR struct posix_timer_s *)timerid; @@ -373,7 +377,6 @@ int timer_settime(timer_t timerid, int flags, FAR const struct itimerspec *value /* Then start the watchdog */ - if (delay > 0) { timer->pt_last = delay; diff --git a/sched/wdog/wd_gettime.c b/sched/wdog/wd_gettime.c index f533f42f1ec2868c9122887700ea01f83e89fdd4..3027b29636e3876dcf5dfdf6ef4044b4102fcd1c 100644 --- a/sched/wdog/wd_gettime.c +++ b/sched/wdog/wd_gettime.c @@ -1,4 +1,4 @@ -/******************************************************************************** +/**************************************************************************** * sched/wdog/wd_gettime.c * * Copyright (C) 2007, 2009, 2014-2016 Gregory Nutt. All rights reserved. @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Included Files - ********************************************************************************/ + ****************************************************************************/ #include @@ -44,11 +44,11 @@ #include "wdog/wdog.h" -/******************************************************************************** +/**************************************************************************** * Public Functions - ********************************************************************************/ + ****************************************************************************/ -/******************************************************************************** +/**************************************************************************** * Name: wd_gettime * * Description: @@ -59,12 +59,11 @@ * wdog = watchdog ID * * Return Value: - * The time in system ticks remaining until the watchdog time expires. Zero - * means either that wdog is not valid or that the wdog has already expired. + * The time in system ticks remaining until the watchdog time expires. + * Zero means either that wdog is not valid or that the wdog has already + * expired. * - * Assumptions: - * - ********************************************************************************/ + ****************************************************************************/ int wd_gettime(WDOG_ID wdog) { @@ -75,14 +74,16 @@ int wd_gettime(WDOG_ID wdog) flags = enter_critical_section(); if (wdog && WDOG_ISACTIVE(wdog)) { - /* Traverse the watchdog list accumulating lag times until we find the wdog - * that we are looking for + /* Traverse the watchdog list accumulating lag times until we find the + * wdog that we are looking for */ FAR struct wdog_s *curr; int delay = 0; - for (curr = (FAR struct wdog_s *)g_wdactivelist.head; curr; curr = curr->next) + for (curr = (FAR struct wdog_s *)g_wdactivelist.head; + curr != NULL; + curr = curr->next) { delay += curr->lag; if (curr == wdog) diff --git a/sched/wqueue/kwork_process.c b/sched/wqueue/kwork_process.c index f09735fd66529693a213d338a0eb8aead682dc33..8354a81fca1bb6e68aaff98c7f7ecef15b85540a 100644 --- a/sched/wqueue/kwork_process.c +++ b/sched/wqueue/kwork_process.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/wqueue/work_process.c + * sched/wqueue/work_process.c * * Copyright (C) 2009-2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/syscall/syscall.csv b/syscall/syscall.csv index 49842f3f304d377f33ffb2000072f7d79dacd066..c1fdd2e2916e3beb07d14778393d9ded22ef228c 100644 --- a/syscall/syscall.csv +++ b/syscall/syscall.csv @@ -1,4 +1,5 @@ "_exit","unistd.h","","void","int" +"adjtime","sys/time.h","defined(CONFIG_CLOCK_TIMEKEEPING)","int","FAR const struct timeval *","FAR struct timeval *" "aio_cancel","aio.h","defined(CONFIG_FS_AIO)","int","int","FAR struct aiocb *" "aio_fsync","aio.h","defined(CONFIG_FS_AIO)","int","int","FAR struct aiocb *" "aio_read","aio.h","defined(CONFIG_FS_AIO)","int","FAR struct aiocb *" diff --git a/syscall/syscall_lookup.h b/syscall/syscall_lookup.h index 58602a19ace2b2cf3c4d33a17e0df52216b7f986..d0f304fbadd19b56c2208f5ecfadacd8f88045a6 100644 --- a/syscall/syscall_lookup.h +++ b/syscall/syscall_lookup.h @@ -152,6 +152,9 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert) SYSCALL_LOOKUP(clock_getres, 2, STUB_clock_getres) SYSCALL_LOOKUP(clock_gettime, 2, STUB_clock_gettime) SYSCALL_LOOKUP(clock_settime, 2, STUB_clock_settime) +#ifdef CONFIG_CLOCK_TIMEKEEPING + SYSCALL_LOOKUP(adjtime, 2, STUB_adjtime) +#endif /* The following are defined only if POSIX timers are supported */ diff --git a/syscall/syscall_stublookup.c b/syscall/syscall_stublookup.c index a5cace0e37c7772c642fb17a68329323fa7de191..868eca6f13243dde5ccb8e89f4bbadb4e7fe8803 100644 --- a/syscall/syscall_stublookup.c +++ b/syscall/syscall_stublookup.c @@ -154,6 +154,7 @@ uintptr_t STUB_clock_systimer(int nbr); uintptr_t STUB_clock_getres(int nbr, uintptr_t parm1, uintptr_t parm2); uintptr_t STUB_clock_gettime(int nbr, uintptr_t parm1, uintptr_t parm2); uintptr_t STUB_clock_settime(int nbr, uintptr_t parm1, uintptr_t parm2); +uintptr_t STUB_adjtime(int nbr, uintptr_t parm1, uintptr_t parm2); /* The following are defined only if POSIX timers are supported */ diff --git a/tools/README.txt b/tools/README.txt index 408bccad7b35e9472a8dc0c723ce671f34d2d862..1fcac577c1003f227c7bdbab9ff16b7d82c2625c 100644 --- a/tools/README.txt +++ b/tools/README.txt @@ -104,6 +104,16 @@ kconfig2html.c is the directory containing the root Kconfig file. Default : . + NOTE: In order to use this tool, some configuration must be in-place will + all necessary symbolic links. You can establish the configured symbolic + links with: + + make context + + or more quickly with: + + make dirlinks + mkconfigvars.sh --------------- @@ -575,6 +585,46 @@ indent.sh -h Show this help message and exit +sethost.sh +---------- + + Saved configurations may run on Linux, Cygwin (32- or 64-bit), or other + platforms. The platform characteristics can be changed use 'make + menuconfig'. Sometimes this can be confusing due to the differences + between the platforms. Enter sethost.sh + + sethost.sh is a simple script that changes a configuration to your + host platform. This can greatly simplify life if you use many different + configurations. For example, if you are running on Linux and you + configure like this: + + $ cd tools + $ ./configure.sh board/configuration + $ cd .. + + The you can use the following command to both (1) make sure that the + configuration is up to date, AND (2) the configuration is set up + correctly for Linux: + + $ tools/sethost.sh -l + + Or, if you are on a Windows/Cygwin 64-bit platform: + + $ tools/sethost.sh -w + + Other options are available: + + $ tools/sethost.sh -h + + USAGE: tools/sethost.sh [-w|l] [-c|n] [-32|64] [] + tools/sethost.sh -h + + Where: + -w|l selects Windows (w) or Linux (l). Default: Linux + -c|n selects Windows native (n) or Cygwin (c). Default Cygwin + -32|64 selects 32- or 64-bit host (Only for Cygwin). Default 64 + -h will show this help test and terminate + refresh.sh ---------- diff --git a/tools/ide_exporter.py b/tools/ide_exporter.py index 2f139238dff6e4d9f806d6d185ab8578536a6814..f90da6f2e6e43da5de6783979b55839bab009055 100755 --- a/tools/ide_exporter.py +++ b/tools/ide_exporter.py @@ -130,7 +130,7 @@ UVISION_GCC_PRJ_SETTINGS = {'root_group':'', 'ext_remap' : UVISION_GCC_EXT_REMAP, 'uv_file_type' : UVISION_FILE_TYPE_MAP, 'c_misc' : ('.//Carm', '-fno-builtin -Wall -Wstrict-prototypes -Wshadow -Wundef -g'), - 'cxx_misc' : ('.//Carm', '-fno-builtin -fno-exceptions -fno-rtti -Wall -Wshadow -Wundef -g'), + 'cxx_misc' : ('.//Carm', '-fno-builtin -fno-exceptions -fcheck-new -fno-rtti -Wall -Wshadow -Wundef -g'), 'ld_misc' : ('.//LDarm', '--entry=__start -lgcc'), 'cxx_def' : ('.//Carm', ''),} diff --git a/tools/kconfig2html.c b/tools/kconfig2html.c index 295d4814e8117af9f70d6a1b9842f6c4b70b1930..d8ccef63b12a221036c5d71e57f43f5834e818f8 100644 --- a/tools/kconfig2html.c +++ b/tools/kconfig2html.c @@ -2245,33 +2245,44 @@ static char *parse_kconfigfile(FILE *stream, const char *kconfigdir) { /* Get the relative path from the Kconfig file line */ - char *relpath = get_token(); + char *source = get_token(); /* Remove optional quoting */ - relpath = dequote(relpath); - if (relpath) + source = dequote(source); + if (source) { - char *subdir = dirname(relpath); + char *subdir = dirname(source); char *dirpath; - /* Check if the directory path contains $APPSDIR */ + /* Check for an absolute path */ - char *appsdir = strstr(subdir, "$APPSDIR"); - if (appsdir) + if (source[0] == '/') { - char *tmp = appsdir + strlen("$APPSDIR"); - - *appsdir = '\0'; - asprintf(&dirpath, "%s/%s%s%s", g_kconfigroot, subdir, g_appsdir, tmp); + dirpath = strdup(subdir); } else { - asprintf(&dirpath, "%s/%s", g_kconfigroot, subdir); + /* Check if the directory path contains $APPSDIR */ + + char *appsdir = strstr(subdir, "$APPSDIR"); + if (appsdir) + { + char *tmp = appsdir + strlen("$APPSDIR"); + + *appsdir = '\0'; + asprintf(&dirpath, "%s/%s%s%s", + g_kconfigroot, subdir, g_appsdir, tmp); + } + else + { + asprintf(&dirpath, "%s/%s", g_kconfigroot, subdir); + } + } debug("parse_kconfigfile: Recursing for TOKEN_SOURCE\n"); - debug(" relpath: %s\n", relpath); + debug(" source: %s\n", source); debug(" subdir: %s\n", subdir); debug(" dirpath: %s\n", dirpath); diff --git a/tools/mkfsdata.pl b/tools/mkfsdata.pl index db4b61524ebc0e9bd765e1dbdbe54102325607b4..9a94f175c3cb3b63892b291b850fefa83e839e02 100755 --- a/tools/mkfsdata.pl +++ b/tools/mkfsdata.pl @@ -41,7 +41,7 @@ opendir(DIR, "."); @files = grep { !/^\./ && !/(CVS|~)/ } readdir(DIR); closedir(DIR); -print(OUTPUT "#include \n\n"); +print(OUTPUT "#include \"netutils/httpd.h\"\n\n"); print(OUTPUT "#ifndef NULL\n#define NULL 0\n#endif\n\n"); foreach $file (@files) { diff --git a/tools/refresh.sh b/tools/refresh.sh index 8e24fa0d90f14797941ced462c1b64b20db7a29b..47df783263896932b7856a6a1df377fb97308cef 100755 --- a/tools/refresh.sh +++ b/tools/refresh.sh @@ -1,7 +1,7 @@ #!/bin/bash # refresh.sh # -# 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 @@ -104,6 +104,7 @@ WD=${PWD} BOARDDIR=configs/$BOARDSUBDIR CONFIGDIR=$BOARDDIR/$CONFIGSUBDIR DEFCONFIG=$CONFIGDIR/defconfig +MAKEDEFS=$CONFIGDIR/Make.defs CMPCONFIG_TARGET=cmpconfig CMPCONFIG1=tools/cmpconfig @@ -124,7 +125,12 @@ if [ ! -d "$CONFIGDIR" ]; then fi if [ ! -r "$DEFCONFIG" ]; then - echo "No readable defconfig file in $DEFCONFIG" + echo "No readable defconfig file at $DEFCONFIG" + exit 1 +fi + +if [ ! -r "$MAKEDEFS" ]; then + echo "No readable Make.defs file at $MAKEDEFS" exit 1 fi @@ -152,7 +158,7 @@ else fi fi -# Copy the .config to the toplevel directory +# Copy the .config and Make.defs to the toplevel directory rm -f SAVEconfig if [ -e .config ]; then @@ -163,6 +169,15 @@ fi cp -a $DEFCONFIG .config || \ { echo "ERROR: Failed to copy $DEFCONFIG to .config"; exit 1; } +rm -f SAVEMake.defs +if [ -e Make.defs ]; then + mv Make.defs SAVEMake.defs || \ + { echo "ERROR: Failed to move Make.defs to SAVEMake.defs"; exit 1; } +fi + +cp -a $MAKEDEFS Make.defs || \ + { echo "ERROR: Failed to copy $MAKEDEFS to Make.defs"; exit 1; } + # Then run oldconfig or oldefconfig if [ "X${silent}" == "Xy" ]; then @@ -195,9 +210,14 @@ else fi fi -# Restore any previous .config file +# Restore any previous .config and Make.defs files if [ -e SAVEconfig ]; then mv SAVEconfig .config || \ { echo "ERROR: Failed to move SAVEconfig to .config"; exit 1; } fi + +if [ -e SAVEMake.defs ]; then + mv SAVEMake.defs Make.defs || \ + { echo "ERROR: Failed to move SAVEMake.defs to Make.defs"; exit 1; } +fi diff --git a/tools/sethost.sh b/tools/sethost.sh new file mode 100644 index 0000000000000000000000000000000000000000..085361f5b68e11111444c37d74c9d18a41d1f203 --- /dev/null +++ b/tools/sethost.sh @@ -0,0 +1,233 @@ +#!/bin/bash +# tools/sethost.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. +# + +WD=$PWD + +progname=$0 +host=linux +wenv=cygwin +hsize=64 +unset configfile + +function showusage { + echo "" + echo "USAGE: $progname [-w|l] [-c|n] [-32|64] []" + 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 " -32|64 selects 32- or 64-bit host (Only for Cygwin). Default 64" + echo " -h will show this help test and terminate" + echo " selects configuration file. Default: .config" + exit 1 +} + +# Parse command line + +while [ ! -z "$1" ]; do + case $1 in + -w ) + host=windows + ;; + -l ) + host=linux + ;; + -c ) + wenv=cygwin + ;; + -n ) + wenv=native + ;; + -32 ) + hsize=32 + ;; + -64 ) + hsize=32 + ;; + -h ) + showusage + ;; + * ) + configfile="$1" + shift + break; + ;; + esac + shift +done + +if [ ! -z "$1" ]; then + echo "ERROR: Garbage at the end of line" + showusage +fi + +if [ -x sethost.sh ]; then + nuttx=$PWD/.. +else + if [ -x tools/sethost.sh ]; then + nuttx=$PWD + else + echo "This script must be execute in nuttx/ or nutts/tools directories" + exit 1 + fi +fi + +rm -f $nuttx/SAVEconfig +rm -f $nuttx/SAVEMake.defs + +unset dotconfig +if [ -z "$configfile" ]; then + dotconfig=y +else + if [ "X$configfile" = "X.config" ]; then + dotconfig=y + else + if [ "X$configfile" = "X$nuttx/.config" ]; then + dotconfig=y + fi + fi +fi + +if [ "X$dotconfig" = "Xy" ]; then + unset configfile + if [ -r $nuttx/.config ]; then + configfile=$nuttx/.config + else + echo "There is no .config at $nuttx" + exit 1 + fi + + if [ ! -r $nuttx/Make.defs ]; then + echo "ERROR: No readable Make.defs file exists at $nuttx" + exit 1 + fi +else + if [ ! -r "$configfile" ]; then + echo "ERROR: No readable configuration file exists at $configfile" + exit 1 + fi + + configdir=`dirname $configfile` + makedefs=$configdir/Make.defs + + if [ ! -r $makedefs ]; then + echo "ERROR: No readable Make.defs file exists at $configdir" + exit 1 + fi + + if [ -f $nuttx/.config ]; then + mv $nuttx/.config $nuttx/SAVEconfig + fi + cp $configfile $nuttx/.config || \ + { echo "ERROR: cp to $nuttx/.config failed"; exit 1; } + + if [ -f $nuttx/Make.defs ]; then + mv $nuttx/Make.defs $nuttx/SAVEMake.defs + fi + cp $makedefs $nuttx/Make.defs || \ + { echo "ERROR: cp to $nuttx/Make.defs failed"; exit 1; } +fi + +# Modify the configuration + +if [ "X$host" == "Xlinux" ]; then + echo " Select CONFIG_HOST_LINUX=y" + + kconfig-tweak --file $nuttx/.config --enable CONFIG_HOST_LINUX + kconfig-tweak --file $nuttx/.config --disable CONFIG_HOST_WINDOWS + + kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_NATIVE + kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_CYGWIN + kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_MSYS + kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_OTHER + + kconfig-tweak --file $nuttx/.config --enable CONFIG_SIM_X8664_SYSTEMV + kconfig-tweak --file $nuttx/.config --disable CONFIG_SIM_X8664_MICROSOFT + kconfig-tweak --file $nuttx/.config --disable CONFIG_SIM_M32 +else + echo " Select CONFIG_HOST_WINDOWS=y" + kconfig-tweak --file $nuttx/.config --enable CONFIG_HOST_WINDOWS + kconfig-tweak --file $nuttx/.config --disable CONFIG_HOST_LINUX + + if [ "X$wenv" == "Xcygwin" ]; then + echo " Select CONFIG_WINDOWS_CYGWIN=y" + kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_CYGWIN + kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_NATIVE + else + echo " Select CONFIG_WINDOWS_NATIVE=y" + kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_NATIVE + kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_CYGWIN + fi + + kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_MSYS + kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_OTHER + + kconfig-tweak --file $nuttx/.config --enable CONFIG_SIM_X8664_MICROSOFT + kconfig-tweak --file $nuttx/.config --disable CONFIG_SIM_X8664_SYSTEMV + + if [ "X$hsize" == "X32" ]; then + kconfig-tweak --file $nuttx/.config --enable CONFIG_SIM_M32 + else + kconfig-tweak --file $nuttx/.config --disable CONFIG_SIM_M32 + fi +fi + +kconfig-tweak --file $nuttx/.config --disable CONFIG_HOST_OSX +kconfig-tweak --file $nuttx/.config --disable CONFIG_HOST_OTHER + +echo " Refreshing..." +cd $nuttx || { echo "ERROR: failed to cd to $nuttx"; exit 1; } +make clean_context 1>/dev/null 2>&1 +make olddefconfig 1>/dev/null 2>&1 + +# Move config file to correct location and restore any previous .config +# and Make.defs files + +if [ "X$dotconfig" != "Xy" ]; then + sed -i -e "s/^CONFIG_APPS_DIR/# CONFIG_APPS_DIR/g" .config + + mv .config $configfile || \ + { echo "ERROR: Failed to move .conig to $configfile"; exit 1; } + + if [ -e SAVEconfig ]; then + mv SAVEconfig .config || \ + { echo "ERROR: Failed to move SAVEconfig to .config"; exit 1; } + fi + + if [ -e SAVEMake.defs ]; then + mv SAVEMake.defs Make.defs || \ + { echo "ERROR: Failed to move SAVEMake.defs to Make.defs"; exit 1; } + fi +fi diff --git a/tools/testbuild.sh b/tools/testbuild.sh index 31b0f9b4eae7e59f018fc7fda37233d584d73cc6..775dcab3fb9af64b910e30e44b8b7561f2c25188 100755 --- a/tools/testbuild.sh +++ b/tools/testbuild.sh @@ -116,13 +116,11 @@ fi if [ ! -r "$testfile" ]; then echo "ERROR: No readable file exists at $testfile" - echo $USAGE showusage fi if [ ! -d "$nuttx" ]; then echo "ERROR: Expected to find nuttx/ at $nuttx" - echo $USAGE showusage fi