diff --git a/ChangeLog b/ChangeLog index b5567cf8f3a..3653cd3ec47 100755 --- a/ChangeLog +++ b/ChangeLog @@ -3130,7 +3130,7 @@ point numbers. * lib/stdio/lib_libdtoa.c and lib_libvsprintf.c: Correct some floating point options. - * arch/arm/lpc43xx/lpc32_usb0dev.c: Add framework for development of + * arch/arm/lpc43xx/lpc43_usb0dev.c: Add framework for development of an USB0, device-side driver for the LPC43XX. The initial check-in, however, is simply for the LPC31xx driver with name changes. The LPC31xx has the same USB IP, but will require some additional initialization @@ -4440,7 +4440,7 @@ * binfmt/binfmt_execmodule.c: Here is a place where I forget to update the call to sched_releasetcb() to pass the thread type as the second parameter (2013-03-23). - * arch/arm/src/lm, kinetis, lpc32, and nuc1xx: Add kernel build + * arch/arm/src/lm, kinetis, lpc43, and nuc1xx: Add kernel build support to all ARMv7-M and ARMv6-M chips. There are no configurations in place to to verify these additions! (2013-03-24). @@ -10964,7 +10964,7 @@ (2015-09-09). * configs/nucleo-f303re: Support for the STMicro Nucleo F303RE board from Paul Alexander Patience (2015-09-10). - * arch/arm/src/lpc43xx/lpc32_ehci.c and .h: LPC43xx EHCI driver from + * arch/arm/src/lpc43xx/lpc43_ehci.c and .h: LPC43xx EHCI driver from Ilya Averyanov (2015-09-10). * ARMv7-M, all "lazy" interrupt stack logic. Assembly instruction that fetches the saved value is incorrect; replace with more @@ -12348,7 +12348,7 @@ adds DEBUGASSERT for invalid geometry and additional memory debug logic. Also fixes the dangling pointer on error bug. From Ken Pettit (2016-07-14). - * arch/arm/src/lpc32xx: Extend LPC43xx EMC code to support SDRAM on a + * arch/arm/src/lpc43xx: Extend LPC43xx EMC code to support SDRAM on a dynamic memory interface. From Vytautas Lukenskas (2016-07-19). * arch/sim/src: Add the simulated QSPI (N25Q) flash to the simulation and modify sim up_spiflash.c to enable it to run with different MTD @@ -12772,6 +12772,9 @@ * STM32 DMA2D: fix an error in up_dma2dcreatelayer where an invalid pointer was returned when a certain underlying function failed. From Jens Gräf (2016-10-07). + +7.19 2016-12-26 Gregory Nutt + * include/nuttx/fs/nxffs.h: Needs forward reference to struct mtd_dev_s and needs to include stdbool.h (2016-10-09). * STM32F103 Minimum: Note in Kconfig that the board supports buttons. @@ -12844,16 +12847,16 @@ (2016-10-19). * libc/locale: Allows c++ code to compile with or without CONFIG_LIBC_LOCALE and will generate a link error if CONFIG_LIBC_LOCALE - is not defined and setlocale is referneced. With CONFIG_LIBC_LOCALE + is not defined and setlocale is referenced. With CONFIG_LIBC_LOCALE defined setlocale will act as if MB string is not supported and return "C" for POSIX. C and "". From David Sidrane (2016-10-19). - * Add vectors for interrupt levels 2-6 (2016-10-20). - * strtof: Add strtof() as simply a copy of strtod with types and + * Xtensa ESP32: Add vectors for interrupt levels 2-6 (2016-10-20). + * strtof(): Add strtof() as simply a copy of strtod with types and limits changed (2016-10-20). * arch/arm/src/stm32v7: Register the watchdog device at the configured device path CONFIG_WATCHDOG_DEVPATH vs. hard-coded /dev/wdt. From Frank Benkert (2016-10-21). - * configs/*/defdonf The buttons example was changed to archbuttons. As + * configs/*/defconfig: The buttons example was changed to archbuttons. As a result all of the button configurations are broken and need some renaming in the defconfig files. Noted by Frank Berkert (2016-10-21). * configs/stm32f103-minimum: Add support to PWM on STM32F103-Minimum @@ -12909,7 +12912,7 @@ found in the F4. From David Sidrane (2016-10-26). * arch/arm/src/stm32f7: stm32f76xx77xx_pinmap.h Missed one. From David Sidrane (2016-10-26). - * LPC32xx serial: Fix a typo in ioctl TIOCSRS485 ioctl. From Vytautas + * LPC43xx serial: Fix a typo in ioctl TIOCSRS485 ioctl. From Vytautas Lukenskas (2016-10-27). * sched/clock: Correct clock initialization. The correct range for the month is 0-11 but is entered as 1-12 in the .config file @@ -12919,7 +12922,7 @@ * sched/Kconfig: Add ranges to START_YEAR, MONTH, and DAY (2016-10-28). * configs/nucleo-f303re: Add STM32 F303RE hello configuration; remove duplicate setting from board.h. From Marc Rechté (2016-10-18). - * arch/arm/src/lpc32xx: Restore RS485 mode on serial port open (if + * arch/arm/src/lpc43xx: Restore RS485 mode on serial port open (if RS485 is enabled via menuconfig). From Vytautas Lukenskas (2016-10-28). * arch/arm/src/stm32f7: otgdev fixed typo. From David Sidrane (2016-10-28). @@ -12949,14 +12952,12 @@ From Paul A. Patience (2016-11-02). * drivers/ and drivers/spi: Fix Kconfig warning. This commit moves the ARCH_HAVE_SPI options outside the check for SPI. Those options don't - depend on SPI, and Kconfig files in arch/ enable them even if SPI isn't - enabled. - - Sourcing the driver's Kconfig in drivers/Kconfig only if support for - the driver is enabled prevents us from defining these ARCH_HAVE options - in the driver's Kconfig. We should probably remove the other checks in - drivers/Kconfig and check if the drivers are enabled only in their - Kconfig. From Paul A. Patience (2016-11-02). + depend on SPI, and Kconfig files in arch/ enable them even if SPI + isn't enabled. Source the driver's Kconfig in drivers/Kconfig only + if support for the driver is enabled prevents us from defining these + ARCH_HAVE options in the driver's Kconfig. We should probably remove + the other checks in drivers/Kconfig and check if the drivers are + enabled only in their Kconfig. From Paul A. Patience (2016-11-02). * Move protoypes for the non-standard include/semaphore.h file to the non-standard include/nuttx/semaphore.h with the other non-standard semaphore interfaces (2016-11-02). @@ -13100,7 +13101,7 @@ argument so that there can be additional usage. From Sebastien Lorquet (2016-11-17). * All timer lower half drivers. Port Sebastien's changes to all all - other implementations of the timer lower half. Very many just and + other implementations of the timer lower half. Many changes and untested. Expect some problems. (2016-11-17). * sched/irq: irq_csection() has a bad assumption in the SMP case. It assumed that the state of certain variables. That was true on entry @@ -13130,5 +13131,348 @@ So this change adds locking (via enter_critical section) to wdog expiration logic for the the case if the SMP configuration (2016-11-18). + * SAM3/4: Add delay between setting and clearing the endpoint RESET bit + in sam_ep_resume(). We need to add a delay between setting and + clearing the endpoint reset bit in SAM_UDP_RSTEP. Without the delay the + USB controller will (may?) not reset the endpoint. If the endpoint is + not being reset, the Data Toggle (DTGLE) bit will not to be cleared + which will cause the next transaction to fail if DTGLE is 1. If that + happens the host will time-out and reset the bus. Adding this delay + may also fix the USBMSC_STALL_RACEWAR in usbmsc_scsi.c, however this + has not been verified yet. From Wolfgang Reißnegger (2016-11-18). + * SAM3/4: Remove unused 'halted' flag in UDP driver. From Wolfgang + Reißnegger (2016-11-18). + * SAM3/4: Remove 'stalled' flag in UDP driver. The flag is not necessary. + The state of the endpoint can be determined using 'epstate' instead. + From Wolfgang Reißnegger (2016-11-18). + * USBMSC: Fix length of mode6 sense reply packet. From Wolfgang + Reißnegger (2016-11-18). + * configs/dk-tm4c129x: Typo fix. From Wolfgang Reißnegger (2016-11-18). + * Typo fix in sam_udp.c. From Wolfgang Reißnegger (2016-11-18). + * STM32: STM32F303xB and STM32F303xC chips have 4 ADCs. From Paul A. + Patience (2016-11-19). + * vfork(): Fix a race condition in the SMP case. Existing logic + depended on the fact that the child would not run until waitpid was + called because the child had the same priority as the parent. BUT + in the SMP case that is not true... the child may run immediately on + a different CPU (2016-11-19). + * arch/: Add option to use low-priority work queue to all Ethernet + drivers in arch that support CONFIG_NET_NOINTS (2016-11-19). + * sched/clock: Correct calculation for the case of Tickless mode with + a 32-bit timer. In that case, the calculation was returning + millisecond accuracy. That is not good when the timer accuracy is < 1 + msec. From Rajan Gill (2016-11-19). + * sched/task: task_restart() test not supported on SMP systems. This is + not fully implemented (2016-11-19). + * This commit adds a new internal interfaces and fixes a problem with + three APIs in the SMP configuration. The new internal interface is + sched_cpu_pause(tcb). This function will pause a CPU if the task + associated with 'tcb' is running on that CPU. This allows a different + CPU to modify that OS data stuctures associated with the CPU. When the + other CPU is resumed, those modifications can safely take place. The + three fixes are to handle cases in the SMP configuration where one CPU + does need to make modifications to TCB and data structures on a task + that could be running running on another CPU. Those three cases are + task_delete(), task_restart(), and execution of signal handles. In + all three cases the solutions is basically the same: (1) Call + sched_cpu_pause(tcb) to pause the CPU on which the task is running, + (2) perform the necessary operations, then (3) call up_cpu_resume() to + restart the paused CPU (2016-11-20). + * task_restart: Make sure new task starts with pre-emption disabled and + not in a critical section (2016-11-21). + * Fix a typo in a spinlock macro (2016-11-21). + * Spinlocks: Added capability to provide architecture-specific memory + barriers. This was for i.MX6 but does not help with the SMP problems. + It is still a good feature (2016-11-21). + * Remove a assertion condition that appears to rarely cause false-alarm + assertions. Teported by Petteri Aimonen (2016-11-21). + * The examples/qencoder app was trying to init the encoder by a direct + call into the board, cheating in a local header to declare the normally + unavailable function prototype. From Sebastien Lorquet (2016-11-22). + * configs: All QE encoder files. Last change made timer hard-coded to 3. + Make configurable (2016-11-22). + * configs: Remove all traces of the no-longer existent ARCHBUTTONS + example. Remove all button configurations that depended on the + obsoleted ARCHBUTTON example (2016-11-22). + * nucleo-l476rg: Add better selection of timer (2016-11-22). + * implementation of dumpgpio for stm32l4, was required for pwm debug. + From Sebastien Lorquet (2016-11-22). + * SMP: Add logic to avoid a deadlock condition when CPU1 is hung waiting + for g_cpu_irqlock and CPU0 is waitin for g_cpu_paused (2016-11-22). + * Misoc: Add timer driver. From Ramtin Amin (2016-11-22). + * Misoc: Add commits and warnings about missing caculation of the timer + reload value (2016-11-22). + * SAM3/4: Name of method is now setcallback, not sethandler (2016-11-22). + * sam4s-xplained-pro/nsh: Configuration uses old, improper timer interface. + CONFIG_TIMER disabled in configuration. (2016-11-22). + * sam4s-xplained-pro: Remove obsolete timer initialization logic + (2016-11-22). + * Misoc LM32: Make system timer configurable via CONFIG_USEC_PER_TICK. + From Ramtin Amin (2016-11-23). + * LPC43xx: Add timer driver; configs/bambino-200e: Add support for timer + driver. From Alan Carvalho de Assis (2016-11-23). + * SMP: Fix backward condition in test (2016-11-23). + * ARMv7-A SMP: Add a little logic to signal handling (2016-11-24). + * Misoc LM32: Add signal handling logic. From Ramtin Amin (2016-11-24). + * SMP: Add spin_trylock(). Use this in conditions where other CPUs need + to stopped but we cannot call enter_critical_section (2016-11-24). + * Fix for F1 RTC Clock, tested on F103. From Maciej Wójcik (2016-11-25). + * SMP: Fix yet another potential deadlock (2016-11-25). + * Enable CONFIG_RTC in the hymini-stm32v/nsh2 (kitchensink) config. + From Maciej Wójcik (2016-11-26). + * This adds support for keeping i.MX6 inter-processor communication data + in a non-cached address region (2016-11-26). + * i.MX6: Disable non-cached region support. Add SCU register definitions + (2016-11-26). + * i.MX6: Add some controls to enable SMP cache coherency in SMP mode + (2016-11-26). + * ARMv7-A: Fix some SCU SMP logic (2016-11-26). + * ARMv7-A/i.MX6: Modify handling of the SMP cache coherency + configuration so that it is identical to the steps from the TRM. + Makes no differenct, however (2016-11-27). + * The Smoothie project needs to compile C++ inside config/boardname/src/ + to use with High Priority Interruption, then I modified the board + configs Makefile to support it. It works fine for the first time + compilation, but if we execute "touch config/boardname/src/Pin.cxx" + and execute "make" it will not detect that Pin.cxx was modified. I + think there is some other place I should modify, but I didn't find + it. From Alan Carvalho de Assis (2016-11-27). + * ARMv7-A/i.MX6 SMP: Move SMP coherent cache setup to earlier in + initialization of CPUn, n>0 (2016-11-27). + * ARMv7 GIC: SGIs are non-maskable but go through the same path as other, + maskable interrupts. Added logic to serialize SGI processing when + necessary (2016-11-27). + * sched_note: Extend OS instrumentation to include some SMP events + (2016-11-27). + * sched_note: Add spinlock instrumentation; In SMP configurations, + select to log only notes from certain CPUs (2016-11-28). + * Misoc LM3: Add Misoc Ethernet driver. Integrate network support into + configs/misoc/hello. Remove configs/misoc/include/generated directory. + I suppose the the intent now is that this is a symbolic link? DANGER! + This means that you cannot compile this code with first generating + these files a providing a symbolic link to this location! From Ramtin + Amin (2016-11-28). + * Add tools/showsize.sh (2016-11-28). + * configs/misoc: Add a sample directory containing generated sources. + This is really only useful for performing test builds. You really + must generate the Misoc architecture for a real-life build. From + Ramtin Amin (2016-11-28). + * sched_note: Permit spinlock and critical section notes in in-memory + buffer iff sched_not_get() interfaces is disabled (2016-11-28). + * STM32 DAC: Fix shift value whenever there are is a DAC2 and, hence, + up to three interfaces. From Marc Rechté (2016-11-29). + * Back out a debug change that was included in commit (2016-11-29). + * i.MX6: Don't output the alphabet if CONFIG_DEBUG_FEATURES is not set + (2016-11-29). + * Misoc LM32: Add logic to flush/invalidate caches. From Ramtin Amin + (2016-11-29). + * drivers/net/: Adapt all Ethernet drivers to work as though + CONFIG_NET_MULTIBUFFER were set. Remove all references to + CONFIG_NET_MULTIBUFFER (2016-11-29). + * stm32_otghshost: if STM32F446 increase number of channels to 16. From + Janne Rosberg (2016-11-30). + * usbhost_composite: fix end offset in usbhost_copyinterface(). From + Janne Rosberg (2016-11-30). + * usbhost_cdcacm: add CDC_SUBCLASS_ACM and CDC_PROTO_ATM to supported + class and proto. From Janne Rosberg (2016-11-30). + * LPC43 SD/MMC: Correct some git definitions on SMMC control register + in lpc43_sdmmc.h. From Alan Carvalho de Assis (2016-11-30). + * STM32L4: Correct USART1/2 definitions. Use default mbed UART4 + settings. From Sebastien Lorquet (2016-12-01). + * boardctl: Add new boardctl() command ,BOARDIOC_NX_START, to start the + NX server as a kernel thread (2016-12-01). + * GPDMA driver for the LPC43xx. The GPDMA block is basically the same + as the LPC17xx. Only the clock configuration is different and LPC43xx + has four different DMA request sources, where LPC17xx has only two. + From Alan Carvalho de Assis (2016-12-01). + * Remove RGMP and RGMP drivers (2016-12-02). + * i.MX6: Add an untested SPI driver taken directly from the i.MX1 port + (2016-12-02). + * Eliminate CONFIG_NO_NOINTS. There is no longer any support for + interrupt level processing of the network stack. Lots of files changed + -> lots of testing needed (2016-12-03). + * Fix DEBUGASSERT() in group_signal.c. From Masayuki Ishikawa + (2016-12-04). + * Add support for the SAM5CMP-DB board. From Masayuki Ishikawa + (2016-12-04). + * SAM3/4: Add SMP support for the dual-core SAM4CM. From Masayuki + Ishikawa (2016-12-04). + * C Library: Allow option to enable IP address conversions even when the + IP address family is not supported (2016-12-04). + * SSD1306: Fix errors in SPI mode configuration. From Gong Darcy + (2016-12-04). + * SAMA5 does not build when executing from SDRAM before board + frequencies are not constant. Rather, the bootloader configures the + clocking and we must derive the clocking from the MCK left by the + bootloader. This means lots more computations. This is untested on + initial commit because I don't have a good PWM test setup right now + (2016-12-04). + * Olimex-LPC1766-STK: Enable procfs in NSH configuration. Automount + /proc on startup (2016-12-05). + * SAM4CMP-DB: Add hooks to auto-mount the procfs file system on startup + in board bring-up logic (2016-12-05). + * Remove all references to BOARDIOC_PWMSETUP and board_pwm_setup() + (2016-12-05). + * Remove all references to BOARDIOC_ADCSETUP and board_adc_setup() + (2016-12-05). + * Added Timers 2-5 and control of SAI and I2S PLLs. From David Sidrane + (2016-12-05). + * Added support for stmf469 SAI and I2S PLL configuration and STM446 + fixes. From David Sidrane (2016-12-05). + * Expanded otgfs support to stm32F469 and stm32f446. Added missing bits + definitions, Used stm32F469 and stm32f446 bit definitions, Removed + unsed header file. From David Sidrane (2016-12-05). + * Remove BOARDIOC_CAN_INITIALIZE. CAN initialization is now done in the + board initialization logic just like every other device driver + (2016-12-06). + * STM32F7: Allow the config to override the clock edge setting. From + David Sidrane (2016-12-06). + * For Cortex-A9, should also set ACTLR.FW in SMP mode to enble TLB and + cache broadcasts. Does not fix SMP cache problem (2016-12-07). + * sched notes: Add additional note to see if/when CPU is started in SMP + mode (2016-12-07). + * EFM32: Fix a compilation error. From Pierre-noel Bouteville + (2016-12-07). + * pthreads: Add pthread_cleanup_push() and pthread_cleanup_pop() + (2016-12-08). + * BUGFIX:STM32F427 was rebooting. Over reached family. From David + Sidrane (2016-12-08). + * Add pthread_setcanceltype() and pthread_testcancel() (2016-12-09). + * Added STM32F469 RAM size and deliberated STM32F446 size. From David + Sidrane (2016-12-09). + * Typo in stm32f76xx77xx_pinmap.h edited online with Bitbucket. From + David Sidrane (2016-12-09). + * stm32_allocateheap.c edited online with Bitbucket. From David Sidrane + (2016-12-09). + * LPC43xx SD card: Correct pin configuration options needed for SD card + pins. From Alan Carvalho de Assis (2016-12-09). + * pthread_mutex_destroy(): Fix an error in destroying a mutex which can + occur after a pthread has been canceled while holding the mutex + (2016-12-09). + * Add support for cancellation points (2016-12-09). + * Forgot to add some files in the last commit (2016-12-10). + * Correct some default font IDs. From Pierre-Noel Bouteville + (2016-12-10). + * task_delete() now obeys all cancellation point semantics (2016-12-10). + * Add task_setcancelstate(), task_setcanceltype(), and task_testcancel(). + These are non-standard interfaces analogous to the correponding pthread_ + interfaces that provide cancellation controls for tasks (2016-12-10). + * i.MX6 interrupt handling: Additional logic needed to handle nested + interrupts when an interrupt stack is used (2016-12-13). + * SAMV7 MCAN: Prevent Interrupt-Flooding of ACKE when not connected to + CAN-BUS. An Acknowledge-Error will occur every time no other CAN Node + acknowledges the message sent. This will also occur if the device is + not connected to the can-bus. The CAN-Standard declares, that the Chip + has to retry a given message as long as it is not sent successfully (or + it is not cancelled by the application). Every time the chip tries to + resend the message an Acknowledge-Error-Interrupt is generated. At high + baud rates this can lead in extremely high CPU load just for handling + the interrupts (and possibly the error handling in the application). To + prevent this Interrupt-Flooding we disable the ACKE once it is seen as + long we didn't transfer at least one message successfully. From Frank + Benkert (2016-12-13). + * i.MX6: Remove non-cached, inter-cpu memory region. Not a useful + concept (2016-12-13). + * minnsh Configurations: Remove minnsh configurations and support logic: + up_getc() and lowinstream. This was an interesting exercise to see + just how small you could get NuttX, but otherwise it was not useful: + (1) the NSH code violated the OS interface layer by callup up_getc and + up_putc directly, and (2) while waiting for character input, NSH would + call up_getc() which would hog all of the CPU. Not a reasonable + solution other than as a proof of concept (2016-12-13). + * Calypso Boards: Remove all Calypso board configurations (2016-12-13). + * Calypso: Remove Calypso architecture support and support for Calypso + SERCOMM driver (2016-12-13). + * ESP32 core v2: Two changes (1) flushes the UART TX buffer in the esp32 + serial shutdown routine. The ROM bootloader does not flush the FIFO + before handing over to user code, so some of this output is not + currently seen when the UART is reconfigured in early stages of + startup. And changes the openocd config file's default flash voltage + from 1.8V to 3.3V. This is not necessary right now, but may save some + hard-to-debug moments down the track (3.3V-only flash running at 1.8V + often half-works and does weird things...). From Angus Gratton + (2016-12-14). + * Xtensa ESP32: Add missing ENTRY() and RET() macros in C callable + assembly language. At one time I though the that the ESP32 support the + CALL0 ABI. I was mistaken so there may be a few more like this + (2016-12-14). + * Xtensa ESP32: Fix a couple of bugs associated with handling of CPU + interrupts (2016-12-14). + * Xtensa ESP32: Fix several build-related issues associated with vector + section (2016-12-15). + * Xtensa ESP32: Fix missing CALL0 ABI condition (2016-12-15). + * Xtensa EPS32: Make sure that all C callable assembly functions includes + ENTRY prologue and RET epilogue (2016-12-15). + * Xtensa ESP32: Fix windowspill register handling + Use r6, not r2 when + passing paramters with call4 (2016-12-16). + * Xtensa ESP32: Use r6, not r2 when passing paramters with call4 + (2016-12-16). + * Xtensa ESP32: Correct a logic problem the prevented dumping the IDLE + thread's stack on an assertion (2016-12-16). + * Xtensa ESP32: Fix some missing SMP logic (2016-12-16). + * Xtensa ESP32: Basically a redesign of the interrupt dispatch logic + (2016-12-16). + * Xtensa ESP32: Level 1 interrupts should return via RFE (2016-12-17). + * Xtensa ESP32: One register getting clobber on context save (2016-12-17). + * STM32 F7: Fix some STM32F7 copy paste errors. From David Sidrane + (2016-12-17). + * CDC/ACM Device Class: uart_ops_s portion of cdcacm will not be + initalized with correct functions if CONFIG_SERIAL_DMA is lit + (2016-12-17). + * Xtensa ESP32: Using wrong register to disable interrupts (2016-12-17). + * Xtensa ESP32: Fix clobbered a9 in co-processor context save/restore + (2016-12-17). + * Xtensa ESP32: Need to clone some logic for synchronous context switch. + Window spill logic in the conmon restores logic is inappropriate in + this context (2016-12-17). + * sscanf(): Add scansets to the scanf function. Enabled + CONFIG_LIBC_SCANSET option. From Aleksandr Vyhovanec (2016-12-17). + * Xtensa ESP32: Fix context save logic when called in window ABI + configuration. Add an IDLE stack. Don't depend on the mystery stack + received from the bootloader (2016-12-18). + * Xtensa ESP32: Need to spill registers to memory as the last dying + action before switching to a new thread (2016-12-18). + * ESP32 Serial: Add logic to prevent infinite loops in interrupt handler + (2016-12-18). + * Xtensa ESP32: Automatically mount /proc at start-up (2016-12-19). + * Xtensa ESP32: Corrects timer initialization and timer input frequency + (2016-12-19). + * Tiva PWM: Support PWM_PULSECOUNT feature for TI tiva. From Young.Mu + (2016-12-20). + * Xtensa ESP32: Missing prologue/epilogue macros on C callable function + (2016-12-20). + * Xtensa ESP32: Update APP CPU startup logic to match current Expressif + example code. Fix errors APP CPU startup (2016-12-20). + * fs/procfs: Fix procfs status for SMP case (2016-12-20). + * Xtensa ESP32: Clock frequency is different if running from IRAM or is + booting from FLASH. This is a booltloader issue (2016-12-20). + * Xtensa ESP32: Basic port is function in both single CPU and dual CPU + SMP configurations. There is an NSH configuration for each CPU + configuration (2016-12-21). + * STM32 F4: Merge in support for the Olimex STM32 P407 board (2016-12-21). + * Xtensa ESP32: Add an OS test to verify the port (2016-12-22). + * Xtensa ESP32: Corrects a problem with dispatching to signal handlers: + Cannot vector directly to the signal handling function as in other ABIs + under the Xtensa Window ABI. In that case, we need to go through a + tiny hook when performs the correct window call (call4) otherwise + registers will be scrambled in the signal handler (2016-12-22). + * SAMV7 CAN: Make delete_filter functions more robust. From Frank + Benkert (2016-12-23). + * Xtensa ESP32: Add stack checking logic (2016-12-23). + * sched note: record ID enumeration now results on constant values; ID + values do not change with configuration. This makes writing + post-processing software much easier (2016-12-24). + * STM32 F3: Forgot to update chip.h for STM32F303x[BC]'s 4 ADCs + (2016-12-24). + * STM32 F4: Allow dma in 1 bit mode in STM32F4xxx. From David Sidrane + (2016-12-24). + * termios.h: Fix CRTSCTS define to include input and output flow. + From Lorenz Meier (2016-12-26). + * SMP: Enforce this rule: Tasks which are normally restored when + sched_unlock() is called must remain pending (1) if we are in a + critical section, i.e., g_cpu_irqlock is locked , or (2) other CPUs + still have pre-emption disabled, i.e., g_cpu_schedlock is locked. In + those cases, the release of the pending tasks must be deferred until + those conditions are met (2016-12-26). -7.19 2016-xx-xx Gregory Nutt +7.20 2017-xx-xx Gregory Nutt diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index 7878f2fd250..decdfae6349 100644 --- a/Documentation/NuttX.html +++ b/Documentation/NuttX.html @@ -8,7 +8,7 @@

NuttX RTOS

-

Last Updated: October 8, 2016

+

Last Updated: December 26, 2016

@@ -317,7 +317,7 @@

-

  • POSIX/ANSI-like task controls, named message queues, counting semaphores, clocks/timers, signals, pthreads, environment variables, filesystem.
  • +
  • POSIX/ANSI-like task controls, named message queues, counting semaphores, clocks/timers, signals, pthreads, cancellation points, environment variables, filesystem.
  • @@ -1339,11 +1339,11 @@

    Released Versions

    In addition to the ever-changing GIT repository, there are frozen released versions of NuttX available. - The current release is NuttX 7.18. - NuttX 7.18 is the 118th release of NuttX. - It was released on October 8, 2016, and is available for download from the + The current release is NuttX 7.19. + NuttX 7.19 is the 119th release of NuttX. + It was released on December 26, 2016, and is available for download from the Bitbucket.org website. - Note that the release consists of two tarballs: nuttx-7.18.tar.gz and apps-7.18.tar.gz. + Note that the release consists of two tarballs: nuttx-7.19.tar.gz and apps-7.19.tar.gz. Both may be needed (see the top-level nuttx/README.txt file for build information).

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

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

    • apps.
    • +
    • Misoc +
    • Renesas/Hitachi:
      • Renesas/Hitachi SuperH (1/2)
      • @@ -1453,6 +1457,15 @@ +
      • RISC-V (1) +
          +
        +
      • +
      • Xtensa LX6: + +
      • ZiLOG
      • +
      • Expressif +
          +
        • ESP32 (Dual Xtensa LX6) +
        +
      • Freescale
      • - -
      • Moxa
      • + +
      • nuvoTon
        • nuvoTon NUC120 (ARM Cortex-M0)
        • @@ -1604,7 +1622,6 @@
        • Texas Instruments (some formerly Luminary)
          • TI TMS320-C5471 (ARM7TDMI)
          • -
          • TI Calypso (ARM7TDMI)
          • TI TMS320-DM320 (ARM9E6JS)
          • TI/Stellaris LM3S6432 (ARM Cortex-M3)
          • TI/Stellaris LM3S6432S2E (ARM Cortex-M3)
          • @@ -1695,31 +1712,6 @@

            - -
            - -

            - TI Calypso. - This port supports the TI "Calypso" MCU used in various cell phones (and, in particular, - by the Osmocom-bb project). - Like the c5471, NuttX operates on the ARM7 of this dual core processor. - Board support is available for the Motorola C139, C155 and W220 phones and for the Pirelli DP-L10 phone. -

            -
              -

              - STATUS: - This port was contributed by Denis Carilki and includes the work of Denis Carikli, Alan Carvalho de Assis, and Stefan Richter. - Calypso support first appeared in NuttX-6.17 with LCD drivers. - Support for the Calypso keyboard was added in NuttX-6.24 by Denis Carilki. - Refer to the NuttX board README files for the Compal E88, Compal E99 and Pirelli DP-L10 phones for further information. -

              -
            - - - -
            -
            -
            @@ -3160,7 +3152,7 @@ nsh>
          • Kamami STM32 Butterfly 2 - Support for the Kamami STM32 Butterfly 2 was contributed by Michał Łyszczek in NuttX-7/18. That port features the STMicro STM32F107VC MCU. + Support for the Kamami STM32 Butterfly 2 was contributed by Michał Łyszczek in NuttX-7.18. That port features the STMicro STM32F107VC MCU.

            STATUS: @@ -3743,11 +3735,14 @@ nsh>

          • NuttX-7.3 Support for the Olimex STM32 H405 board was added in NuttX-7.3.
          • -
          • - Refer to the NuttX board README file for further information. +
          • NuttX-7.19 + Support for the Olimex STM32 P405 board was added in NuttX-7.19.

          +

          + Refer to the STM3240G-EVAL board README file for further information. +

          STMicro STM32F4-Discovery. This port uses the STMicro STM32F4-Discovery board featuring the STM32F407VGT6 MCU. @@ -3817,6 +3812,11 @@ nsh> Networking configurations were added in NuttX-7.18. See the NuttX board README file for further information about the NuttX port.

          +

          + Olimex STM32 P407. + Support for the Olimex STM32 P407 development board appeared in NuttX-7.19. + See the NuttX board README file for further information about the NuttX port. +

          @@ -4332,7 +4332,7 @@ Mem: 29232 5920 23312 23312

          - Atmel SAM4C. + Atmel SAM4CM. General architectural support was provided for SAM4CM family in NuttX 7.3 This was architecture-only support, meaning that support for the boards with these chips is available, but no support for any publicly available boards was included. The SAM4CM port should be compatible with most of the SAM3/4 drivers (like HSMCI, DMAC, etc.) but those have not be verified on hardware as of this writing. @@ -4340,6 +4340,18 @@ Mem: 29232 5920 23312 23312

          + +
          + +

          + Atmel SAM4CMP-DB. + Support for the SAM4CMP-DB board was contributed to NuttX by Masayuki Ishikawa in NuttX-7.19. + The SAM4CM is a dual-CPU part and SMP was included for the ARMv7-M and SAM3/4 families. + The SAM4CMP-DB board support includes an NSH configuration that operates in an SMP configuration. + Refer to the NuttX board README file for further information. +

          + +

          @@ -4856,6 +4868,23 @@ Mem: 29232 5920 23312 23312
        + + + + + Misoc LM32. + + + +
        + +

        + Misoc LM32 Architectural Support. + Architectural support for the Misoc LM32 was contributed by Ramtin Amin in NuttX 7.19. Driver support is basic in this initial release: Serial, Timer, and Ethernet. "Board" support is a available for developing with Misoc LM32 under Qemu or on your custom FPGA. +

        + + + @@ -5222,6 +5251,53 @@ BFD_ASSERT (*plt_offset != (bfd_vma) -1);
      + + + + + + RISC-V. + + + +
      + +

      + RISC-V Architectural Support. + Basic support for the RISC-V architecture was contributed by Ken Pettit in NuttX-7.19. The initial release is thin but a great starting point for anyone interested in RISC-V development with NuttX. +

      + + + + + + + ESP32 (Dual Xtensa LX6). + + + +
      + +

      + Xtensa LX6 ESP32 Architectural Support. + Basic architectural support for Xtensa LX6 processors and the port for the Expressif ESP32 were added in NuttX-7.19. + The basic ESP32 port is function in both single CPU and dual CPU SMP configurations. +

      +

      + Expressif ESP32 Core v2 Board + The NuttX release includes support for Expressif ESP32 Core v2 board. + There is an NSH configuration for each CPU configuration and an OS test configuration for verificatin of the port. +

      +

      + STATUS. + ESP32 support in NuttX-7.19 is functional, but very preliminary. + There is little yet in the way of device driver support. + Outstanding issues include missing clock configuration logic, missing partition tables to support correct configuration from FLASH, and some serial driver pin configuration issues. + The configuration is usable despite these limitations. + Refer to the NuttX board README file for further information. + + + diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index 8ecbf7abc7f..f1007f49926 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -1008,10 +1008,6 @@ drivers/ | |-- Kconfig | |-- Make.defs | `-- (Common sensor driver source files) -|-- sercomm/ -| |-- Kconfig -| |-- Make.defs -| `-- (Files for the Calypso SERCOMM driver) |-- serial/ | |-- Kconfig | |-- Make.defs @@ -1170,8 +1166,6 @@ include/ | | `-- (Power management header files) | |-sensors/ | | `-- (Sensor device driver header files) -| |-sercomm/ -| | `-- (SERCOMM driver header files) | |-serial/ | | `-- (Serial driver header files) | |-spi/ diff --git a/Documentation/NuttxUserGuide.html b/Documentation/NuttxUserGuide.html index 3766eba646f..5f1b35ca946 100644 --- a/Documentation/NuttxUserGuide.html +++ b/Documentation/NuttxUserGuide.html @@ -13,7 +13,7 @@

      NuttX Operating System

      User's Manual

      by

      Gregory Nutt

      -

      Last Updated: July 24, 2015

      +

      Last Updated: December 11, 2016

      @@ -204,48 +204,57 @@ paragraphs.
    • 2.1.4 task_delete
    • 2.1.5 task_restart
    +

    + Non-standard extensions to VxWorks-like interfaces to support POSIX Cancellation Points. +

    +

    Standard interfaces

    Standard vfork and exec[v|l] interfaces:

    Standard posix_spawn interfaces:

    Non-standard task control interfaces inspired by posix_spawn:

    2.1.1 task_create

    @@ -469,8 +478,21 @@ int task_delete(pid_t pid);

    Description: - This function causes a specified task to cease to exist -- its stack and TCB will be deallocated. - This function is the companion to task_create(). + This function causes a specified task to cease to exist. + Its stack and TCB will be deallocated. + This function is the companion to task_create(). + This is the version of the function exposed to the user; + it is simply a wrapper around the internal, task_terminate() function. +

    +

    + The logic in this function only deletes non-running tasks. + If the pid parameter refers to to the currently runing task, then processing is redirected to exit(). + This can only happen if a task calls task_delete() in order to delete itself. +

    +

    + This function obeys the semantics of pthread cancellation: + task deletion is deferred if cancellation is disabled or if deferred cancellation is supported (with Cancellation Points enabled). +

    Input Parameters:

      @@ -485,7 +507,8 @@ int task_delete(pid_t pid);
      • OK, or ERROR if the task cannot be deleted. - This function can fail if the provided pid does not correspond to a task (errno is not set). + The errno is set to indicate the nature of the failure. + This function can fail, for example, if the provided pid does not correspond to a currently executing task.

      @@ -583,7 +606,128 @@ VxWorks provides the following similar interface:

    -

    2.1.6 exit

    +

    2.1.6 task_setcancelstate

    +

    +Function Prototype: +

    +

    +    #include <sched.h>
    +    int task_setcancelstate(int state, int *oldstate);
    +
    +

    +Description: +The task_setcancelstate() function atomically +sets both the calling task's cancelability state to the indicated +state and returns the previous cancelability state at the location +referenced by oldstate. +Legal values for state are TASK_CANCEL_ENABLE and TASK_CANCEL_DISABLE. +

    +

    +Any pending thread cancellation may occur at the time that the +cancellation state is set to TASK_CANCEL_ENABLE. +

    +

    +The cancelability state and type of any newly created tasks are TASK_CANCEL_ENABLE and TASK_CANCEL_DEFERRED respectively. +

    +Input Parameters: +

    +

    +

      +
    • state +New cancellation state. One of PTHREAD_CANCEL_ENABLE or PTHREAD_CANCEL_DISABLE.
    • +
    • oldstate. +Location to return the previous cancellation state. +
    +

    +

    +Returned Value: +

    +

    +Zero (OK) on success; ERROR is returned on any failure with the errno value set appropriately: +

    +

    +

      +
    • ESRCH. +No thread could be found corresponding to that specified by the given thread ID.
    • +
    +

    +Assumptions/Limitations: +

    +POSIX Compatibility: This is a non-standard interface. It extends the functionality of pthread_setcancelstate() to tasks and supports use of task_delete(). +

    + +

    2.1.7 task_setcanceltype

    +

    +Function Prototype: +

    +

    +    #include <sched.h>
    +    int task_setcanceltype(int type, FAR int *oldtype);
    +
    +

    +Description: +The task_setcanceltype() function atomically both sets the calling task's cancelability type to the indicated type and returns the previous cancelability type at the location referenced by oldtype. +Legal values for type are TASK_CANCEL_DEFERRED and TASK_CANCEL_ASYNCHRONOUS. +

    +

    +The cancelability state and type of any newly created tasks are TASK_CANCEL_ENABLE and TASK_CANCEL_DEFERRED respectively. +

    +

    +Input Parameters: +

    +

    +

      +
    • type +New cancellation state. One of PTHREAD_CANCEL_DEFERRED or PTHREAD_CANCEL_ASYNCHRONOUS.
    • +
    • oldtype. +Location to return the previous cancellation type. +
    +

    +

    +Returned Value: +

    +

    +Zero (OK) on success; ERROR is returned on any failure with the errno value set appropriately: +

    +

    +

      +
    • ESRCH. +No thread could be found corresponding to that specified by the given thread ID.
    • +
    +

    +

    +POSIX Compatibility: This is a non-standard interface. It extends the functionality of pthread_setcanceltype() to tasks and supports use of task_delete(). +

    + +

    2.1.8 task_testcancel

    +

    +Function Prototype: +

    +

    +

    +    #include <sched.h>
    +    void task_testcancel(void);
    +
    +

    +

    +Description: +

    +

    +The task_testcancel() function creates a Cancellation Point in the calling task. +The task_testcancel() function has no effect if cancelability is disabled. +

    +

    +Input Parameters: None +

    +

    +Returned Value: None +

    +

    +POSIX Compatibility: This is a non-standard interface. It extends the functionality of pthread_testcancel() to tasks and supports use of task_delete(). +

    + + +

    2.1.9 exit

    Function Prototype: @@ -629,7 +773,7 @@ And the UNIX interface:

  • The code parameter is ignored. -

    2.1.7 getpid

    +

    2.1.10 getpid

    Function Prototype: @@ -657,7 +801,7 @@ level. Compatible with the POSIX interface of the same name.

    -

    2.1.8 vfork

    +

    2.1.11 vfork

    Function Prototype:

    @@ -691,7 +835,7 @@ pid_t vfork(void); Compatible with the Unix interface of the same name.

    -

    2.1.9 execv

    +

    2.1.12 execv

    Function Prototype:

    @@ -777,7 +921,7 @@ int execv(FAR const char *path, FAR char *const argv[]); There are, however, several compatibility issues as detailed in the description above.

    -

    2.1.10 execl

    +

    2.1.13 execl

    Function Prototype:

    @@ -821,7 +965,7 @@ int execl(FAR const char *path, ...); There are, however, several compatibility issues as detailed in the description of execv().

    -

    2.1.11 posix_spawn and posix_spawnp

    +

    2.1.14 posix_spawn and posix_spawnp

    Function Prototype:

    @@ -964,7 +1108,7 @@ int posix_spawnp(FAR pid_t *pid, FAR const char *file, For the caller of posix_spawn(), the provided argv[0] will correspond to argv[1] received by the new task.

    -

    2.1.12 posix_spawn_file_actions_init

    +

    2.1.15 posix_spawn_file_actions_init

    Function Prototype:

    @@ -990,7 +1134,7 @@ int posix_spawn_file_actions_init(FAR posix_spawn_file_actions_t *file_actions); On success, this function returns 0; on failure it will return an error number from <errno.h>.

    -

    2.1.13 posix_spawn_file_actions_destroy

    +

    2.1.16 posix_spawn_file_actions_destroy

    Function Prototype:

    @@ -1017,7 +1161,7 @@ int posix_spawn_file_actions_destroy(FAR posix_spawn_file_actions_t *file_action On success, this function returns 0; on failure it will return an error number from <errno.h>

    -

    2.1.14 posix_spawn_file_actions_addclose

    +

    2.1.17 posix_spawn_file_actions_addclose

    Function Prototype:

    @@ -1048,7 +1192,7 @@ int posix_spawn_file_actions_addclose(FAR posix_spawn_file_actions_t *file_actio On success, this function returns 0; on failure it will return an error number from <errno.h>

    -

    2.1.15 posix_spawn_file_actions_adddup2

    +

    2.1.18 posix_spawn_file_actions_adddup2

    Function Prototype:

    @@ -1085,7 +1229,7 @@ int posix_spawn_file_actions_adddup2(FAR posix_spawn_file_actions_t *file_action On success, this function returns 0; on failure it will return an error number from <errno.h>

    -

    2.1.16 posix_spawn_file_actions_addopen

    +

    2.1.19 posix_spawn_file_actions_addopen

    Function Prototype:

    @@ -1130,7 +1274,7 @@ int posix_spawn_file_actions_addopen(FAR posix_spawn_file_actions_t *file_action On success, this function returns 0; on failure it will return an error number from <errno.h>

    -

    2.1.17 posix_spawnattr_init

    +

    2.1.20 posix_spawnattr_init

    Function Prototype:

    @@ -1166,7 +1310,7 @@ int posix_spawnattr_init(FAR posix_spawnattr_t *attr); On success, this function returns 0; on failure it will return an error number from <errno.h>

    -

    2.1.18 posix_spawnattr_getflags

    +

    2.1.21 posix_spawnattr_getflags

    Function Prototype:

    @@ -1196,7 +1340,7 @@ int posix_spawnattr_getflags(FAR const posix_spawnattr_t *attr, FAR short *flags On success, this function returns 0; on failure it will return an error number from <errno.h>

    -

    2.1.19 posix_spawnattr_getschedparam

    +

    2.1.22 posix_spawnattr_getschedparam

    Function Prototype:

    @@ -1226,7 +1370,7 @@ int posix_spawnattr_getschedparam(FAR const posix_spawnattr_t *attr, FAR struct On success, this function returns 0; on failure it will return an error number from <errno.h>

    -

    2.1.20 posix_spawnattr_getschedpolicy

    +

    2.1.23 posix_spawnattr_getschedpolicy

    Function Prototype:

    @@ -1256,7 +1400,7 @@ int posix_spawnattr_getschedpolicy(FAR const posix_spawnattr_t *attr, FAR int *p On success, this function returns 0; on failure it will return an error number from <errno.h>

    -

    2.1.21 posix_spawnattr_getsigmask

    +

    2.1.24 posix_spawnattr_getsigmask

    Function Prototype:

    @@ -1288,7 +1432,7 @@ int posix_spawnattr_getsigmask(FAR const posix_spawnattr_t *attr, FAR sigset_t * On success, this function returns 0; on failure it will return an error number from <errno.h>

    -

    2.1.22 posix_spawnattr_setflags

    +

    2.1.25 posix_spawnattr_setflags

    Function Prototype:

    @@ -1318,7 +1462,7 @@ int posix_spawnattr_setflags(FAR posix_spawnattr_t *attr, short flags); On success, this function returns 0; on failure it will return an error number from <errno.h>

    -

    2.1.23 posix_spawnattr_setschedparam

    +

    2.1.26 posix_spawnattr_setschedparam

    Function Prototype:

    @@ -1348,7 +1492,7 @@ int posix_spawnattr_setschedparam(FAR posix_spawnattr_t *attr, FAR const struct On success, this function returns 0; on failure it will return an error number from <errno.h>

    -

    2.1.24 posix_spawnattr_setschedpolicy

    +

    2.1.27 posix_spawnattr_setschedpolicy

    Function Prototype:

    @@ -1378,7 +1522,7 @@ int posix_spawnattr_setschedpolicy(FAR posix_spawnattr_t *attr, int policy); On success, this function returns 0; on failure it will return an error number from <errno.h>

    -

    2.1.25 posix_spawnattr_setsigmask

    +

    2.1.28 posix_spawnattr_setsigmask

    Function Prototype:

    @@ -1410,7 +1554,7 @@ int posix_spawnattr_setsigmask(FAR posix_spawnattr_t *attr, FAR const sigset_t * On success, this function returns 0; on failure it will return an error number from <errno.h>

    -

    2.1.26 task_spawn

    +

    2.1.29 task_spawn

    Function Prototype:

    @@ -1524,7 +1668,7 @@ int task_spawn(FAR pid_t *pid, FAR const char *name, main_t entry, This is a non-standard interface inspired by posix_spawn().

    -

    2.1.26 task_spawnattr_getstacksize

    +

    2.1.30 task_spawnattr_getstacksize

    Function Prototype:

    @@ -1554,7 +1698,7 @@ int task_spawnattr_getstacksize(FAR const posix_spawnattr_t *attr, FAR size_t *s On success, this function returns 0; on failure it will return an error number from <errno.h>

    -

    2.1.26 task_spawnattr_setstacksize

    +

    2.1.31 task_spawnattr_setstacksize

    Function Prototype:

    @@ -1584,7 +1728,7 @@ int task_spawnattr_setstacksize(FAR posix_spawnattr_t *attr, size_t stacksize); On success, this function returns 0; on failure it will return an error number from <errno.h>

    -

    2.1.12 posix_spawn_file_actions_init

    +

    2.1.32 posix_spawn_file_actions_init

    Function Prototype:

    @@ -3380,6 +3524,29 @@ interface of the same name. inheritance logic.
  • +

    + Locking versus Signaling Semaphores. + Semaphores (and mutexes) may be used for many different purposes. + One typical use of for mutual exclusion and locking of resources: + In this usage, the thread that needs exclusive access to a resources takes the semaphore to get access to the resource. + The same thread subsequently releases the seamphore count when it no longer needs exclusive access. + Priority inheritance is intended just for this usage case. +

    +

    + In a different usage case, a semaphore may to be used to signal an event: + One thread A waits on a semaphore for an event to occur. + When the event occurs, another thread B will post the semaphore waking the waiting thread A. + This is a completely different usage model; notice that in the mutual exclusion case, the same thread takes and posts the semaphore. In the signaling case, one thread takes the seamphore and a different thread posts the samphore. Priority inheritance should never be used in this signaling case. + Subtle, strange behaviors may result. +

    +

    + When priority inheritance is enabled with CONFIG_PRIORITY_INHERITANCE, the default protocol for the semaphore will be to use priority inheritance. + For signaling semaphores, priority inheritance must be explicitly disabled by calling sem_setprotocol with SEM_PRIO_NONE. + For the case of pthread mutexes, pthread_mutexattr_setprotocol with PTHREAD_PRIO_NONE. +

    +

    + This is discussed in much more detail on this Wiki page. +

    POSIX semaphore interfaces:

    @@ -3394,6 +3561,8 @@ interface of the same name.
  • 2.5.8 sem_trywait
  • 2.5.9 sem_post
  • 2.5.10 sem_getvalue
  • +
  • 2.5.11 sem_getprotocol
  • +
  • 2.5.12 sem_setprotocol
  • 2.5.1 sem_init

    @@ -3868,6 +4037,75 @@ number of tasks waiting for the semaphore. interface of the same name.

    +

    2.5.11 sem_getprotocol

    +

    +Function Prototype: +

    +

    +    #include <nuttx/semaphore.h>
    +    int sem_getprotocol(FAR const pthread_mutexattr_t *attr, FAR int *protocol);
    +
    +

    +Description: Return the value of the semaphore protocol attribute. +

    +

    +Input Parameters: +

    +

    +

      +
    • attr. A pointer to the semaphore to be queried
    • +
    • protocol. The user provided location in which to store the protocol value. May be one of SEM_PRIO_NONE, or SEM_PRIO_INHERIT, SEM_PRIO_PROTECT.
    • +
    +

    +

    +Returned Value: +

    +

    +If successful, the sem_getprotocol() function will return zero (OK). +Otherwise, an -1 (ERROR) will be returned and the errno value will be set to indicate the nature of the error. +

    +

    +Assumptions/Limitations: +

    +

    +POSIX Compatibility: Non-standard NuttX interface. Should not be used in portable code. Analogous to pthread_muxtexattr_getprotocol(). +

    + +

    2.5.12 sem_setprotocol

    +

    +Function Prototype: +

    +

    +    #include <nuttx/semaphore.h>
    +    int sem_setprotocol(FAR pthread_mutexattr_t *attr, int protocol);
    +
    +

    +Description: Set semaphore protocol attribute. See the paragraph Locking versus Signaling Semaphores for some important information about the use of this interface. + +

    +

    +Input Parameters: +

    +

    +

      +
    • attr. A pointer to the semaphore to be modified
    • +
    • protocol. The new protocol to use. One of SEM_PRIO_NONE, or SEM_PRIO_INHERIT, SEM_PRIO_PROTECT. SEM_PRIO_INHERIT is supported only if CONFIG_PRIORITY_INHERITANCE is defined; SEM_PRIO_PROTECT is not currently supported in any configuration.
    • +
    +

    +

    +Returned Value: +

    +

    +If successful, the sem_getprotocol() function will return zero (OK). +Otherwise, an -1 (ERROR) will be returned and the errno value will be set to indicate the nature of the error. +

    +

    +Assumptions/Limitations: +

    +

    +POSIX Compatibility: Non-standard NuttX interface. Should not be used in portable code. Analogous to pthread_muxtexattr_setprotocol(). +

    +
    @@ -4587,9 +4825,9 @@ interface of the same name. See the NuttX Threading Wiki page and the Tasks vs. Threads FAQ for additional information on tasks and threads in NuttX.

    - Signalling Multi-threaded Task Groups. + Signaling Multi-threaded Task Groups. The behavior of signals in the multi-thread task group is complex. - NuttX emulates a process model with task groups and follows the POSIX rules for signalling behavior. + NuttX emulates a process model with task groups and follows the POSIX rules for signaling behavior. Normally when you signal the task group you would signal using the task ID of the main task that created the group (in practice, a different task should not know the IDs of the internal threads created within the task group); that ID is remembered by the task group (even if the main task thread exits).

    @@ -5424,12 +5662,15 @@ be sent.

  • 2.8.13 pthread_exit
  • 2.8.14 pthread_cancel
  • 2.8.15 pthread_setcancelstate
  • -
  • 2.8.16 pthread_testcancelstate
  • -
  • 2.8.17 pthread_join
  • -
  • 2.8.18 pthread_yield
  • -
  • 2.8.19 pthread_self
  • -
  • 2.8.20 pthread_getschedparam
  • -
  • 2.8.21 pthread_setschedparam
  • +
  • 2.8.16 pthread_setcanceltype
  • +
  • 2.8.17 pthread_testcancel
  • +
  • 2.8.18 pthread_cleanup_pop
  • +
  • 2.8.19 pthread_cleanup_push
  • +
  • 2.8.20 pthread_join
  • +
  • 2.8.21 pthread_yield
  • +
  • 2.8.22 pthread_self
  • +
  • 2.8.23 pthread_getschedparam
  • +
  • 2.8.24 pthread_setschedparam
  • Thread Specific Data. @@ -5439,64 +5680,66 @@ be sent. (2) The main task thread does not had thread-specific data.

    pthread Mutexes.

    Condition Variables.

    Barriers.

    Initialization.

    Signals.

    @@ -5515,8 +5758,6 @@ be sent.

  • pthread_attr_setscope. get and set the contentionscope attribute.
  • pthread_attr_setstack. get and set stack attributes.
  • pthread_attr_setstackaddr. get and set the stackaddr attribute.
  • -
  • pthread_cleanup_pop. establish cancellation handlers.
  • -
  • pthread_cleanup_push. establish cancellation handlers.
  • pthread_condattr_getclock. set the clock selection condition variable attribute.
  • pthread_condattr_getpshared. get the process-shared condition variable attribute.
  • pthread_condattr_setclock. set the clock selection condition variable attribute.
  • @@ -5527,9 +5768,7 @@ be sent.
  • pthread_mutex_setprioceiling. get and set the priority ceiling of a mutex.
  • pthread_mutex_timedlock. lock a mutex.
  • pthread_mutexattr_getprioceiling. get and set the prioceiling attribute of the mutex attributes object.
  • -
  • pthread_mutexattr_getprotocol. get and set the protocol attribute of the mutex attributes object.
  • pthread_mutexattr_setprioceiling. get and set the prioceiling attribute of the mutex attributes object.
  • -
  • pthread_mutexattr_setprotocol. get and set the protocol attribute of the mutex attributes object.
  • pthread_rwlock_destroy. destroy and initialize a read-write lock object.
  • pthread_rwlock_init. destroy and initialize a read-write lock object.
  • pthread_rwlock_rdlock. lock a read-write lock object for reading.
  • @@ -5543,14 +5782,12 @@ be sent.
  • pthread_rwlockattr_getpshared. get and set the process-shared attribute of the read-write lock attributes object.
  • pthread_rwlockattr_init. destroy and initialize the read-write lock attributes object.
  • pthread_rwlockattr_setpshared. get and set the process-shared attribute of the read-write lock attributes object.
  • -
  • pthread_setcanceltype. set cancelability state.
  • pthread_setconcurrency. get and set the level of concurrency.
  • pthread_spin_destroy. destroy or initialize a spin lock object.
  • pthread_spin_init. destroy or initialize a spin lock object.
  • pthread_spin_lock. lock a spin lock object.
  • pthread_spin_trylock. lock a spin lock object.
  • pthread_spin_unlock. unlock a spin lock object.
  • -
  • pthread_testcancel. set cancelability state.
  • 2.8.1 pthread_attr_init

    @@ -5985,19 +6222,15 @@ interface of the same name.

    Description: -

    The pthread_cancel() function will request that thread -be canceled. The target thread's cancelability state determines -when the cancellation takes effect. When the -cancellation is acted on, thread will be terminated.

    +

    The pthread_cancel() function will request that thread be canceled. +The target thread's cancelability state, enabled, or disabled, determines when the cancellation takes effect: When the cancellation is acted on, thread will be terminated. +When cancelability is disabled, all cancellations are held pending in the target thread until the thread re-enables cancelability.

    -

    When cancelability is disabled, all cancels are held pending -in the target thread until the thread changes the cancelability. -When cancelability is deferred, all cancels are held pending in -the target thread until the thread changes the cancelability or -calls pthread_testcancel().

    +

    The target thread's cancelability state determines how the cancellation is acted on: +Either asychronrously or deferred. +Asynchronous cancellations we be acted upon immediately (when enabled), interrupting the thread with its processing in an abritray state.

    -

    Cancelability is asynchronous; all cancels are acted upon -immediately (when enable), interrupting the thread with its processing.

    +

    When cancelability is deferred, all cancellations are held pending in the target thread until the thread changes the cancelability type or a Cancellation Point function such as pthread_testcancel() is entered.

    Input Parameters: @@ -6018,16 +6251,10 @@ No thread could be found corresponding to that specified by the given thread ID. Assumptions/Limitations:

    -POSIX Compatibility: Comparable to the POSIX -interface of the same name. Except:

    +POSIX Compatibility: Comparable to the POSIX interface of the same name. Except:

      -
    • The thread-specific data destructor functions will be called for thread. -However, these destructors are not currently supported.
    • -
    • Cancellation types are not supported. The thread will be canceled -at the time that pthread_cancel() is called or, if cancellation is disabled, at -the time when cancellation is re-enabled.
    • -
    • pthread_testcancel() is not supported.
    • -
    • Thread cancellation at cancellation points is not supported.
    • +
    • The thread-specific data destructor functions will be not called for thread +These destructors are not currently supported.

    2.8.15 pthread_setcancelstate

    @@ -6040,23 +6267,29 @@ the time when cancellation is re-enabled.

    Description: -

    The pthread_setcancelstate() function atomically +

    +

    +The pthread_setcancelstate() function atomically sets both the calling thread's cancelability state to the indicated state and returns the previous cancelability state at the location referenced by oldstate. -Legal values for state are PTHREAD_CANCEL_ENABLE and PTHREAD_CANCEL_DISABLE.<.li> - -

    Any pending thread cancellation may occur at the time that the -cancellation state is set to PTHREAD_CANCEL_ENABLE.

    - +Legal values for state are PTHREAD_CANCEL_ENABLE and PTHREAD_CANCEL_DISABLE. +

    +

    +Any pending thread cancellation may occur at the time that the +cancellation state is set to PTHREAD_CANCEL_ENABLE. +

    +

    Input Parameters: +

    • state -New cancellation state. One of PTHREAD_CANCEL_ENABLE or PTHREAD_CANCEL_DISABLE.<.li> +New cancellation state. One of PTHREAD_CANCEL_ENABLE or PTHREAD_CANCEL_DISABLE.
    • oldstate. Location to return the previous cancellation state.
    +

    Returned Value:

    @@ -6072,38 +6305,149 @@ No thread could be found corresponding to that specified by the given thread ID. POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.16 pthread_testcancelstate

    +

    2.8.16 pthread_setcanceltype

    Function Prototype:

         #include <pthread.h>
    -    int pthread_setcancelstate(void);
    +    int pthread_setcanceltype(int type, FAR int *oldtype);
     

    Description: -

    NOT SUPPORTED +The pthread_setcanceltype() function atomically both sets the calling thread's cancelability type to the indicated type and returns the previous cancelability type at the location referenced by oldtype. +Legal values for type are PTHREAD_CANCEL_DEFERRED and PTHREAD_CANCEL_ASYNCHRONOUS. +

    +

    +The cancelability state and type of any newly created threads are PTHREAD_CANCEL_ENABLE and PTHREAD_CANCEL_DEFERRED respectively. +

    +

    +Input Parameters: +

    +

    +

      +
    • type +New cancellation state. One of PTHREAD_CANCEL_DEFERRED or PTHREAD_CANCEL_ASYNCHRONOUS.
    • +
    • oldtype. +Location to return the previous cancellation type. +
    +

    +

    +Returned Value: +

    +If successful, the pthread_setcancelstate() function will return +zero (OK). Otherwise, an error number will be +returned to indicate the error. +

    +

    +POSIX Compatibility: Comparable to the POSIX interface of the same name. +

    + +

    2.8.17 pthread_testcancel

    +

    +Function Prototype: +

    +

    +

    +    #include <pthread.h>
    +    void pthread_testcancel(void);
    +
    +

    +

    +Description: +

    +

    +The pthread_testcancel() function creates a Cancellation Point in the calling thread. +The pthread_testcancel() function has no effect if cancelability is disabled. +

    +

    +Input Parameters: None +

    +

    +Returned Value: None +

    +

    +POSIX Compatibility: Comparable to the POSIX interface of the same name. +

    + +

    2.8.18 pthread_cleanup_pop

    +

    +Function Prototype: +

    +

    +    #include <pthread.h>
    +    void pthread_cleanup_pop(int execute);
    +
    +

    +Description: +

    +

    +The pthread_cleanup_pop() function will remove the routine at the top of the calling thread's cancellation cleanup stack and optionally invoke it (if execute is non-zero). +

    +

    +Input Parameters: +

    +

    +

      +
    • execute. Execute the popped cleanup function immediately.
    • +
    +

    +

    +Returned Value: +

    +

    +If successful, the pthread_setcancelstate() function will return +zero (OK). Otherwise, an error number will be +returned to indicate the error: +

    +

    +

    +POSIX Compatibility: Comparable to the POSIX interface of the same name. +

    + +

    2.8.19 pthread_cleanup_push

    +

    +Function Prototype: +

    +

    +    #include <pthread.h>
    +    void pthread_cleanup_push(CODE void (*routine)(FAR void *), FAR void *arg);
    +
    +

    +Description: +

    +

    +The pthread_cleanup_push() function will push the specified cancellation cleanup handler routine onto the calling thread's cancellation cleanup stack. +

    +

    +The cancellation cleanup handler will be popped from the cancellation cleanup stack and invoked with the argument arg when: +

    +

    +

      +
    • The thread exits (that is, calls pthread_exit()).
    • +
    • The thread acts upon a cancellation request.
    • +
    • The thread calls pthread_cleanup_pop() with a non-zero execute argument.
    • +
    +

    +

    Input Parameters:

      -
    • To be provided.
    • +
    • routine. The cleanup routine to be pushed on the the cleanup stack.
    • +
    • arg. An argument that will accompany the callback.

    Returned Value:

    If successful, the pthread_setcancelstate() function will return zero (OK). Otherwise, an error number will be -returned to indicate the error: +returned to indicate the error. +

    -

      -
    • To be provided.
    • -
    -Assumptions/Limitations: -

    -POSIX Compatibility: Comparable to the POSIX -interface of the same name. +POSIX Compatibility: Comparable to the POSIX interface of the same name. +

    -

    2.8.17 pthread_join

    +

    2.8.20 pthread_join

    Function Prototype:

    @@ -6136,7 +6480,7 @@ returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.18 pthread_yield

    +

    2.8.21 pthread_yield

    Function Prototype:

    @@ -6169,7 +6513,7 @@ returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.19 pthread_self

    +

    2.8.22 pthread_self

    Function Prototype:

    @@ -6201,7 +6545,7 @@ returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.20 pthread_getschedparam

    +

    2.8.23 pthread_getschedparam

    Function Prototype:

    @@ -6291,7 +6635,7 @@ interface of the same name. Comparable to the POSIX interface of the same name.

    -

    2.8.21 pthread_setschedparam

    +

    2.8.24 pthread_setschedparam

    Function Prototype:

    @@ -6383,7 +6727,7 @@ interface of the same name. Comparable to the POSIX interface of the same name.

    -

    2.8.22 pthread_key_create

    +

    2.8.25 pthread_key_create

    Function Prototype:

    @@ -6438,7 +6782,7 @@ interface of the same name.

  • The present implementation ignores the destructor argument. -

    2.8.23 pthread_setspecific

    +

    2.8.26 pthread_setspecific

    Function Prototype:

    @@ -6488,7 +6832,7 @@ interface of the same name. destructor function. -

    2.8.24 pthread_getspecific

    +

    2.8.27 pthread_getspecific

    Function Prototype:

    @@ -6529,7 +6873,7 @@ interface of the same name. destructor function. -

    2.8.25 pthread_key_delete

    +

    2.8.28 pthread_key_delete

    Function Prototype:

    @@ -6561,7 +6905,7 @@ this function does nothing in the present implementation. POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.26 pthread_mutexattr_init

    +

    2.8.29 pthread_mutexattr_init

    Function Prototype:

    @@ -6592,7 +6936,7 @@ returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.27 pthread_mutexattr_destroy

    +

    2.8.30 pthread_mutexattr_destroy

    Function Prototype:

    @@ -6623,7 +6967,7 @@ returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.28 pthread_mutexattr_getpshared

    +

    2.8.31 pthread_mutexattr_getpshared

    Function Prototype:

    @@ -6655,7 +6999,7 @@ returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.29 pthread_mutexattr_setpshared

    +

    2.8.32 pthread_mutexattr_setpshared

    Function Prototype:

    @@ -6687,7 +7031,7 @@ returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.30 pthread_mutexattr_gettype

    +

    2.8.33 pthread_mutexattr_gettype

    Function Prototype:

    @@ -6722,7 +7066,7 @@ returned to indicate the error:

    POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.31 pthread_mutexattr_settype

    +

    2.8.34 pthread_mutexattr_settype

    Function Prototype:

    @@ -6776,7 +7120,77 @@ returned to indicate the error:

    POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.32 pthread_mutex_init

    +

    2.8.35 pthread_mutexattr_getprotocol

    +

    +Function Prototype: +

    +

    +    #include <pthread.h>
    +    int pthread_mutexattr_getprotocol(FAR const pthread_mutexattr_t *attr,
    +                                      FAR int *protocol);
    +
    +

    +Description: Return the value of the mutex protocol attribute.. +

    +

    +Input Parameters: +

    +

    +

      +
    • attr. A pointer to the mutex attributes to be queried
    • +
    • protocol. The user provided location in which to store the protocol value. May be one of PTHREAD_PRIO_NONE, or PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT.
    • +
    +

    +

    +Returned Value: +

    +

    +If successful, the pthread_mutexattr_getprotocol() function will return zero (OK). +Otherwise, an error number will be returned to indicate the error. +

    +

    +Assumptions/Limitations: +

    +

    +POSIX Compatibility: Comparable to the POSIX interface of the same name. +

    + +

    2.8.36 pthread_mutexattr_setprotocol

    +

    +Function Prototype: +

    +

    +    #include <pthread.h>
    +    int pthread_mutexattr_setprotocol(FAR pthread_mutexattr_t *attr,
    +                                      int protocol);
    +
    +

    +Description: Set mutex protocol attribute. See the paragraph Locking versus Signaling Semaphores for some important information about the use of this interface. +

    +

    +Input Parameters: +

    +

    +

      +
    • attr. A pointer to the mutex attributes to be modified
    • +
    • protocol. The new protocol to use. One of PTHREAD_PRIO_NONE, or PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT. PTHREAD_PRIO_INHERIT is supported only if CONFIG_PRIORITY_INHERITANCE is defined; PTHREAD_PRIO_PROTECT is not currently supported in any configuration.
    • +
    +

    +

    +Returned Value: +

    +

    +If successful, the pthread_mutexattr_setprotocol() function will return zero (OK). +Otherwise, an error number will be returned to indicate the error. +

    +

    +Assumptions/Limitations: +

    +

    +POSIX Compatibility: Comparable to the POSIX interface of the same name. +

    + +

    2.8.37 pthread_mutex_init

    Function Prototype:

    @@ -6805,10 +7219,9 @@ returned to indicate the error: Assumptions/Limitations:

    -POSIX Compatibility: Comparable to the POSIX -interface of the same name. +POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.33 pthread_mutex_destroy

    +

    2.8.38 pthread_mutex_destroy

    Function Prototype:

    @@ -6839,7 +7252,7 @@ returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.34 pthread_mutex_lock

    +

    2.8.39 pthread_mutex_lock

    Function Prototype:

    @@ -6905,7 +7318,7 @@ Otherwise, an error number will be returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.35 pthread_mutex_trylock

    +

    2.8.40 pthread_mutex_trylock

    Function Prototype:

    @@ -6945,7 +7358,7 @@ Otherwise, an error number will be returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.36 pthread_mutex_unlock

    +

    2.8.41 pthread_mutex_unlock

    Function Prototype:

    @@ -6991,7 +7404,7 @@ returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.37 pthread_condattr_init

    +

    2.8.42 pthread_condattr_init

    Function Prototype:

    @@ -7022,7 +7435,7 @@ returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.38 pthread_condattr_destroy

    +

    2.8.43 pthread_condattr_destroy

    Function Prototype:

    @@ -7053,7 +7466,7 @@ returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.39 pthread_cond_init

    +

    2.8.44 pthread_cond_init

    Function Prototype:

    @@ -7084,7 +7497,7 @@ returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.40 pthread_cond_destroy

    +

    2.8.45 pthread_cond_destroy

    Function Prototype:

    @@ -7115,7 +7528,7 @@ returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.41 pthread_cond_broadcast

    +

    2.8.46 pthread_cond_broadcast

    Function Prototype:

    @@ -7146,7 +7559,7 @@ returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.42 pthread_cond_signal

    +

    2.8.47 pthread_cond_signal

    Function Prototype:

    @@ -7177,7 +7590,7 @@ returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.43 pthread_cond_wait

    +

    2.8.48 pthread_cond_wait

    Function Prototype:

    @@ -7208,7 +7621,7 @@ returned to indicate the error: POSIX Compatibility: Comparable to the POSIX interface of the same name. -

    2.8.44 pthread_cond_timedwait

    +

    2.8.49 pthread_cond_timedwait

    Function Prototype:

    @@ -7245,7 +7658,7 @@ interface of the same name. POSIX Compatibility: Comparable to the POSIX interface of the same name.

    -

    2.8.45 pthread_barrierattr_init

    +

    2.8.50 pthread_barrierattr_init

    Function Prototype:

    @@ -7278,7 +7691,7 @@ interface of the same name. POSIX Compatibility: Comparable to the POSIX interface of the same name.

    -

    2.8.46 pthread_barrierattr_destroy

    +

    2.8.51 pthread_barrierattr_destroy

    Function Prototype:

    @@ -7310,7 +7723,7 @@ interface of the same name. POSIX Compatibility: Comparable to the POSIX interface of the same name.

    -

    2.8.47 pthread_barrierattr_setpshared

    +

    2.8.52 pthread_barrierattr_setpshared

    Function Prototype:

    @@ -7348,7 +7761,7 @@ interface of the same name. POSIX Compatibility: Comparable to the POSIX interface of the same name.

    -

    2.8.48 pthread_barrierattr_getpshared

    +

    2.8.53 pthread_barrierattr_getpshared

    Function Prototype:

    @@ -7380,7 +7793,7 @@ interface of the same name. POSIX Compatibility: Comparable to the POSIX interface of the same name.

    -

    2.8.49 pthread_barrier_init

    +

    2.8.54 pthread_barrier_init

    Function Prototype:

    @@ -7450,7 +7863,7 @@ interface of the same name. POSIX Compatibility: Comparable to the POSIX interface of the same name.

    -

    2.8.50 pthread_barrier_destroy

    +

    2.8.55 pthread_barrier_destroy

    Function Prototype:

    @@ -7494,7 +7907,7 @@ interface of the same name. POSIX Compatibility: Comparable to the POSIX interface of the same name.

    -

    2.8.51 pthread_barrier_wait

    +

    2.8.56 pthread_barrier_wait

    Function Prototype:

    @@ -7554,7 +7967,7 @@ interface of the same name.

    -

    2.8.52 pthread_once

    +

    2.8.57 pthread_once

    Function Prototype:

    @@ -7598,7 +8011,7 @@ interface of the same name. POSIX Compatibility: Comparable to the POSIX interface of the same name.

    -

    2.8.53 pthread_kill

    +

    2.8.58 pthread_kill

    Function Prototype:

    @@ -7660,7 +8073,7 @@ interface of the same name. POSIX Compatibility: Comparable to the POSIX interface of the same name.

    -

    2.8.54 pthread_sigmask

    +

    2.8.59 pthread_sigmask

    Function Prototype:

    @@ -9975,6 +10388,7 @@ notify a task when a message is available on a queue.
  • lio_listio
  • listen
  • localtime_r
  • +
  • Locking versus Signaling Semaphores
  • lseek
  • Named Message Queue Interfaces
  • mkdir
  • @@ -9992,9 +10406,9 @@ notify a task when a message is available on a queue.
  • mq_timedsend
  • mq_unlink
  • mmap
  • +
  • Network Interfaces
  • -
  • Network Interfaces
  • on_exit
  • open
  • opendir
  • @@ -10060,9 +10474,11 @@ notify a task when a message is available on a queue.
  • pthread_key_delete
  • pthread_kill
  • pthread_mutexattr_destroy
  • +
  • pthread_mutexattr_getprotocol
  • pthread_mutexattr_getpshared
  • pthread_mutexattr_gettype
  • pthread_mutexattr_init
  • +
  • pthread_mutexattr_setprotocol
  • pthread_mutexattr_setpshared
  • pthread_mutexattr_settype
  • pthread_mutex_destroy
  • @@ -10074,10 +10490,11 @@ notify a task when a message is available on a queue.
  • pthread_once
  • pthread_self
  • pthread_setcancelstate
  • +
  • pthread_setcanceltype
  • pthread_setschedparam
  • pthread_setspecific
  • pthread_sigmask
  • -
  • pthread_testcancelstate
  • +
  • pthread_testcancel
  • pthread_yield
  • puts
  • RAM disk driver
  • @@ -10107,10 +10524,12 @@ notify a task when a message is available on a queue.
  • Counting Semaphore Interfaces
  • sem_close
  • sem_destroy
  • +
  • sem_getprotocol
  • sem_getvalue
  • sem_init
  • sem_open
  • sem_post
  • +
  • sem_setprotocol
  • sem_trywait
  • sem_unlink
  • sem_wait
  • @@ -10147,10 +10566,13 @@ notify a task when a message is available on a queue.
  • task_init
  • task_restart
  • Task Scheduling Interfaces +
  • task_setcancelstate
  • +
  • task_spawn
  • task_spawnattr_getstacksize
  • task_spawnattr_setstacksize
  • Task Switching Interfaces +
  • task_testcancel
  • telldir
  • timer_create
  • timer_delete
  • diff --git a/Documentation/README.html b/Documentation/README.html index 3ded166a0af..0341347d9d0 100644 --- a/Documentation/README.html +++ b/Documentation/README.html @@ -8,7 +8,7 @@

    NuttX README Files

    -

    Last Updated: December 4, 2016

    +

    Last Updated: December 21, 2016

    @@ -70,12 +70,6 @@ nuttx/ | | `- README.txt | |- cloudctrl/ | | `- README.txt - | |- compal_e86/ - | | `- README.txt - | |- compal_e88/ - | | `- README.txt - | |- compal_e99/ - | | `- README.txt | |- demo9s12ne64/ | | `- README.txt | |- dk-tm4c129x/ @@ -183,6 +177,8 @@ nuttx/ | | `- README.txt | |- olimex-stm32-p207/ | | `- README.txt + | |- olimex-stm32-p407/ + | | `- README.txt | |- olimex-strp711/ | | `- README.txt | |- open1788/ @@ -199,8 +195,6 @@ nuttx/ | | `- README.txt | |- pic32mz-starterkit/ | | `- README.txt - | |- pirelli_dpl10/ - | | `- README.txt | |- qemu-i486/ | | `- README.txt | |- sabre-6quad/ @@ -328,8 +322,6 @@ nuttx/ | | `- README.txt | |- sensors/ | | `- README.txt - | |- sercomm/ - | | `- README.txt | |- syslog/ | | `- README.txt | `- README.txt diff --git a/README.txt b/README.txt index ee43ef25cc3..89a544880ea 100644 --- a/README.txt +++ b/README.txt @@ -1287,12 +1287,6 @@ nuttx/ | | `- README.txt | |- cloudctrl | | `- README.txt - | |- compal_e86 - | | `- README.txt - | |- compal_e88 - | | `- README.txt - | |- compal_e99 - | | `- README.txt | |- demo0s12ne64/ | | `- README.txt | |- dk-tm4c129x/ @@ -1399,6 +1393,8 @@ nuttx/ | | `- README.txt | |- olimex-stm32-p207/ | | `- README.txt + | |- olimex-stm32-p407/ + | | `- README.txt | |- olimex-strp711/ | | `- README.txt | |- open1788/ @@ -1415,8 +1411,6 @@ nuttx/ | | `- README.txt | |- pic32mz-starterkit/ | | `- README.txt - | |- pirelli_dpl10/ - | | `- README.txt | |- qemu-i486/ | | `- README.txt | |- sabre-6quad/ @@ -1544,8 +1538,6 @@ nuttx/ | | `- README.txt | |- sensors/ | | `- README.txt - | |- sercomm/ - | | `- README.txt | |- syslog/ | | `- README.txt | `- README.txt diff --git a/ReleaseNotes b/ReleaseNotes index 18b20f8b148..e7d50a40532 100644 --- a/ReleaseNotes +++ b/ReleaseNotes @@ -12294,3 +12294,794 @@ detailed bugfix information): - apps/examples/oneshot: If the requested delay is > max_delay, then break the delay up into several pieces. + +NuttX-7.19 Release Notes +------------------------ + +The 119th release of NuttX, Version 7.19, was made on December 26, 2016, +and is available for download from the Bitbucket.org website. Note +that release consists of two tarballs: nuttx-7.19.tar.gz and +apps-7.19.tar.gz. These are available from: + + https://bitbucket.org/nuttx/nuttx/downloads + https://bitbucket.org/nuttx/apps/downloads + +Both may be needed (see the top-level nuttx/README.txt file for build +information). + +Additional new features and extended functionality: + + * Core OS: + + - sched/semaphore, sched/phread/, libc/semaphore, libc/pthread: Add + pthread_mutexattr_get/set_protocol and non-standard + sem_get/set_protocol. These may use to enable or disable priority + inheritance on a single semaphore. + - Spinlocks: Added capability to provide architecture-specific memory + barriers. + - SMP: Add spin_trylock(). Use this in conditions where other CPUs need + to stopped but we cannot call enter_critical_section(). + - sched note: Extend OS instrumentation to include some SMP events. + Also add spinlock instrumentation; In SMP configurations, add a + filter mask to log only notes from certain CPUs. + - sched note: Permit spinlock and critical section notes in in-memory + buffer iff sched_not_get() interfaces is disabled. + - sched note: Add additional note to see if/when CPU is started in SMP + mode. + - sched note: Record ID enumeration now results on constant values; ID + values do not change with configuration. This makes writing post-processing software much easier. + - boardctl: Add new boardctl() command, BOARDIOC_NX_START, to start the + NX server as a kernel thread. + - pthreads: Add pthread_cleanup_push() and pthread_cleanup_pop(). + - pthreads: Added pthread_setcanceltype() and pthread_testcancel(). + - pthreads: Add support for cancellation points. + - task_delete() now obeys all cancellation point semantics. + - Add task_setcancelstate(), task_setcanceltype(), and + task_testcancel(). These are non-standard interfaces analogous to the + correponding pthread_ interfaces that provide cancellation controls + for tasks. + + * Graphics/Display Drivers: + + - boardctl: Add new boardctl() command, BOARDIOC_NX_START, to start the + NX server as a kernel thread. + + * Networking/Network Drivers: + + - Network drivers: Add option to use low-priority work queue to all + Ethernet and MAC level drivers. + - Network Drivers: Adapt all Ethernet (and other MAC) drivers to work + as though CONFIG_NET_MULTIBUFFER were set. Remove all references to + CONFIG_NET_MULTIBUFFER. + - Eliminate CONFIG_NO_NOINTS. There is no longer any support for + interrupt level processing of the network stack. Lots of files changed. + + * Other Common Device Drivers: + + - Vishay VEML6070: Add Vishay VEML6070 driver. From Alan Carvalho de + Assis. + + * ARMv7-A + + - ARMv7-A/i.MX6: Add SCU register definitions. Add some controls to + enable SMP cache coherency in SMP mode. Makes no difference, however + -- cache still incoherent on i.MX6. + - ARMv7 GIC: SGIs are non-maskable but go through the same path as + other, maskable interrupts. Added logic to serialize SGI processing + when necessary. + + * Atmel SAM3/4: + + - SAM3/4: Add SMP support for the dual-core SAM4CM. From Masayuki + Ishikawa. + + * Atmel SAM3/4 Drivers: + + - Add support for the SAM5CMP-DB board. From Masayuki Ishikawa. + + * Atmel SAM3/4 Boards: + + - SAM4CMP-DB: Add support for the Atmel SAM4CMP-DB board running in an + SMP configuration. From Masayuki Ishikawa. + - SAM4CMP-DB: Add hooks to auto-mount the procfs file system on startup + in board bring-up logic. + + * Atmel SAMV7 Drivers: + + - SAMv7: Register the watchdog device at the configured device path + CONFIG_WATCHDOG_DEVPATH vs. hard-coded /dev/wdt. From Frank Benkert. + + * Calypso + + - Calyps: Remove all Calypso board configurations. Remove Calypso + architecture support and support for Calypso SERCOMM driver. + + * Misoc LM32: + + - Misoc LM32: Adds basic support for the Misoc procoessors and the LM32 + in particular. From Ramtin Amin. + - Misoc LM32: Add signal handling logic. From Ramtin Amin. + - Misoc LM32: Add logic to flush/invalidate caches. From Ramtin Amin. + + * Misoc LM32 Drivers: + + - Misoc LM32 Serial: Add interrupting Misoc serial driver. From Ramtin + Amin. + - Misoc LM32 Timer: Add timer driver. From Ramtin Amin. + - Misoc LM32: Add Misoc Ethernet driver From Ramtin Amin. + + * Misoc LM32 Boards: + + - Misoc LM32 Qemu: Board support for testing Misoc LM32 with Qemu. From + Ramtin Amin. + - Misoc LM32 Qemu: Integrate network support into configs/misoc/hello. + From Ramtin Amin. + - Misoc LM32 Qemu: Remove configs/misoc/include/generated directory. I + suppose the the intent now is that this is a symbolic link? DANGER! + This means that you cannot compile this code with first generating + these files a providing a symbolic link to this location! There is a + sample directory containing generated sources. This is really only + useful for performing test builds. You really must generate the Misoc + architecture for a real-life build. From Ramtin Amin. + + * NXP Freescale i.MX6 Drivers: + + - i.MX6: Add an untested SPI driver taken directly from the i.MX1 port. + + * NXP Freescale Kinetis: + + - Kinetis: Added missing headers. Kinetis broke out SPI to + kinetis/kinetis_spi.h. Broke out DMA to use the modern Nuttx chip + inclusion - still STUBS. Add Kinetis support for ARMV7-M Common + Vector and FPU. Allow CONFIG_ARMV7M_CMNVECTOR, + CONFIG_STACK_COLORATION, CONFIG_ARCH_FPU. Fix i2c driver offset + swapped for value in kinetis_i2c_putreg. From David Sidrane. + + * NXP Freescale Kinetis Drivers: + + - Kinetis: Add UID Unique ID. From Neil Hancock. + + * NXP Freescale Kinetis Boards: + + - Freedom-K64F board: Add support for UID Unique ID. From Neil Hancock. + + * NXP Freescale LPC17xx Boards: + + - Olimex-LPC1766-STK: Enable procfs in NSH configuration. Automount + /proc on startup. + + * NXP Freescale LPC43xx Drivers: + + - LPC43xx: Add timer driver: From Alan Carvalho de Assis. + - LPC43xx GPDMA driver: The GPDMA block is basically the same as the + LPC17xx. Only the clock configuration is different and LPC43xx has + four different DMA request sources, where LPC17xx has only two. From + Alan Carvalho de Assis. + + * NXP Freescale LPC43xx Boards: + + - Bambino 200E: Add basic support to Micromint Bambino 200E board. + This includes contributions from Jim Wolfman. From Alan Carvalho de + Assis. + - Bambino 200E: Add support for timer driver. From Alan Carvalho de + Assis. + + * RGMP: + + - Remove RGMP and RGMP drivers. + + * RISC-V: + + - RISC-V: Add support for the RISC-V architecture and + configs/nr5m100-nexys4 board. The board support on this is pretty + thin, but it seems like maybe a good idea to get the base RISC-V stuff + in since there are people interested in it. From Ken Pettit. + + * STMicro STM32 Drivers: + + - STM32 F3: Implemention of the STM32 F37xx SDADC module. There are + also changes to ADC, DAC modules. SDADC has only been tested in DMA + mode and does not support external TIMER triggers. This is a work in + progress. From Marc Recht. + - STM32 F3: Add PWM driver support for STMF37xx. The changes have been + tested successfuly for TIM4 and TIM17 (different IPs). From Marc + Recht. + - STM32 F4: Support oversampling by 8 for the STM32 F4. From David + Sidrane. + - STM32 F4: Added Timers 2-5 and control of SAI and I2S PLLs. Added + support for stmf469 SAI and I2S PLL configuration and STM446 fixes. + From David Sidrane. + - STM32 F4: Expanded OTGFS support to stm32F469 and stm32f446. Added + missing bit definitions, Used stm32F469 and stm32f446 bit + definitions, Removed unsed header file. From David Sidrane. + - STM32 F4: Allow dma in 1 bit mode in STM32F4xxx. From David Sidrane. + - STM32 F7: Allow the config to override the clock edge setting. From + David Sidrane. + - STM32 L4: Support Complementary PWM outputs on STM32L4. From + Sebastien Lorquet. + - STM32 L4: Add implementation of dumpgpio for stm32l4, was required + for pwm debug. From Sebastien Lorquet. + + * STMicro STM32 Boards: + + - STM32F103 Minimum: Add button support. From Alan Carvalho de Assis. + - STM32F103 Minimum: Add support to PWM on STM32F103-Minimum board. + From Alan Carvalho de Assis. + - STM32F103 Minimum: Add RGB LED support on STM32F103 Minimum board. + From Alan Carvalho de Assis. + - STM32F103 Minimum: Add Vishay VEML6070 driver support to the + STM32F103-Minimum board. From Alan Carvalho de Assis. + - Nucleo-F303RE: Add STM32 F303RE hello configuration. From Marc + Recht. + - Nucleo-L476: Support PWM testing on board Nucleo L476. From + Sebastien Lorquet. + - Nucleo L476: Add support for timers to Nucleo L476. From Sebastien + Lorquet. + - Hymini STM32v: Enable CONFIG_RTC in the hymini-stm32v/nsh2 + (kitchensink) config. From Maciej Wjcik. + - Olimex STM32-p407: Add support for the Olimex STM32 P407 board. + + * TI Tiva Drivers: + + - Tiva PWM: Support PWM_PULSECOUNT feature for TI tiva. From Young.Mu. + + * Xtensa/ESP32 + + - Xtensa ESP32: Basic architectural support for Xtensa processors and + the Expressif. ESP32 added. + - Xtensa ESP32: Add EXPERIMENTAL hooks to support lazy Xtensa + co-processor state restore in the future. + - Xtensa ESP32: Basic port is function in both single CPU and dual CPU + SMP configurations. There is an NSH configuration for each CPU + configuration. Outstanding issues include missing clock configuration + logic, missing partition tables to support correct configuration from + FLASH, and some serial driver pin configuration issues. + - Xtensa ESP32: Add stack checking logic. + + * Xtensa/ESP32 Boards: + + - ESP32 Core v2: Basic support for Expressif ESP32 Core v2 board + added. The initial release includes an NSH and an SMP test + configuration. + - ESP32 Core v2: Add configuration to support linking NuttX for + execution out of IRAM. + - ESP32 Core v2: Automatically mount /proc at start-up. + - ESP32 Core v2: Add an OS test to verify the port. + + * C Library/Header Files: + + - libc/locale: Add a dummy setlocale() function to avoid drawing the + function from newlib. Add clocale header file. + - include/locale.h: Modify locale.h to add localeconv() and lconv + structure. From Alan Carvalho de Assis. + - libc/locale: Allows c++ code to compile with or without + CONFIG_LIBC_LOCALE and will generate a link error if + CONFIG_LIBC_LOCALE is not defined and setlocale is referenced. With + CONFIG_LIBC_LOCALE defined setlocale will act as if MB string is not + supported and return "C" for POSIX. C and "". From David Sidrane. + - libc/wchar: Add wcslen, wmemchr, wmemcmp, wmemcpy wmemset, btowc, + mbrtowc, mbtowc, wcscmp, wcscoll, and wmemmove to NuttX. From Alan + Carvalho de Assis. + - libc/wctype: Add functions wcrtomb, wcslcpy, wcsxfrm, wctob, wctomb, + wctype, localeconv, strcoll, strxfrm, swctype, towlower, towupper and + wcsftime. Add wctype.h; Move lib_wctype.c to libc/wctype. From Alan + Carvalho de Assis. + - include/ctype.h : Add isblank() macro to ctype.h. From Alan Carvalho + de Assis. + - lic/stdlib: Add strtof() and strtold() as simply a copy of strtod + with types and limits changed. + - sscanf(): Use strtof() instead of strtod() if a short floating point + value was requested. The should help performance with MCUs with + 32-bit FPU support with some additional code size. + - sscanf(): Add scansets to the scanf function. Enabled + CONFIG_LIBC_SCANSET option. From Aleksandr Vyhovanec. + - include/inttypes.h: Add architecture-specific inttypes.h. From Paul + A. Patience. + - C Library: Allow option to enable IP address conversions even when + the IP address family is not supported. + + * Build/Configuration System: + + - The Smoothie project needs to compile C++ inside config/boardname/src/ + to use with High Priority Interruption, then I modified the board + configs Makefile to support it. It works fine for the first time + compilation, but if we execute "touch config/boardname/src/Pin.cxx" + and execute "make" it will not detect that Pin.cxx was modified. I + think there is some other place I should modify, but I didn't find + it. From Alan Carvalho de Assis. + + * Tools: + + - tools/: Add tools/showsize.sh. + + * NSH: apps/nshlib: + + - NSH: dd command will show statistics. From Masayuki Ishikawa. + + * Applications: apps/system: + + - apps/system/sched_note: Extend to include additions to instumentation + for SMP. + - apps/system/sched_note: Add support for spinlock notes. + - apps/system/sched_note: Add support for new scheduler instrumentation. + + * Platforms: apps/platform: + + - ESP32 Core v2: Add platform support for the ESP32 core v2 board. + - Olimex STM32-p407: Add platform support for the Olimex STM32 P407. + + * Graphics: apps/graphics + + - graphics/traveler/tcledit and libwld: Add an X11 Tcl/Tk tool that can + be used to edit Traveler world files. + - Graphics: Remove all NX server taks. Instead, call boardctl() to the + NX server kernel thread. + + * Applications: apps/examples: + + - examples/buttons: Add a new buttons example that uses the button + character driver instead of the architecture buttons directly. From + Alan Carvalho de Assis. + - examples/cctype: Add an example to verify cctype functions. + - Remove RGMP example. + - examples/ostest: Extend the pthread cancellation test to exercise + pthread_cleanup_push() (and pthread_cleanup_pop() indirectly via + pthread_cancel() and pthread_exit(). + - examples/ostest: enhance pthread cancellation test some. + +Works-In-Progress: + + * IEEE802.14.5/6LowPAN. Hooks and framework for this effort were + introduced in NuttX-7.15. Work has continued on this effort on + forks from the main repositories, albeit with many interruptions. + The completion of this wireless feature will postponed until at + least NuttX-7.20. + +Bugfixes. Only the most critical bugfixes are listed here (see the +ChangeLog for the complete list of bugfixes and for additional, more +detailed bugfix information): + + * Core OS: + + - sched/semaphore: Within the OS, when a thread obtains a semaphore + count it must call sem_addholder() if CONFIG_PRIORITY_INHERITANCE is + enabled. If a count is available, then sem_wait() calls + sem_addholder(), otherwise it waited for the semaphore and called + sem_addholder() when it eventually received the count. This caused a + problem when the thread calling sem_wait() was very low priority. + When it received the count, there may be higher priority threads + "hogging" the CPU that prevent the lower priority task from running + and, as a result, the sem_addholder() may be delayed indefinitely. + The fix was to have sem_post() call sem_addholder() just before + restarting the thread waiting for the semaphore count. This problem + was noted by Benix Vincent who also suggested the solution. + - Many files: Make sure that priority inheritance is not enabled for + semaphores whose primary use is signaling (vs locking of resources) by + calling sem_setprotocol(). + - sched/semaphore: sem_trywait() no longer modifies the errno value + UNLESS an error occurs. This allows these functions to be used + internally without clobbering the errno value. From Freddie Chopin. + - sched/clock: Correct clock initialization. The correct range for the + month is 0-11 but is entered as 1-12 in the .config file. Add ranges + to START_YEAR, MONTH, and DAY in sched/Kconfig. + - sched/clock: Correct calculation for the case of Tickless mode with a + 32-bit timer. In that case, the calculation was returning millisecond + accuracy. That is not good when the timer accuracy is < 1 msec. From + Rajan Gill. + - Work Queue: When queuing new LP work, don't signal any threads if + they are all busy. From Heesub Shin. + - Work Queue: Signal sent from work_signal() may interrupt the low + priority worker thread that is already running. For example, the + worker thread that is waiting for a semaphore could be woken up by the + signal and break any synchronization assumption as a result. It also + does not make any sense to send signal if it is already running and + busy. This change fixes it. From Heesub Shin. + - Fix DEBUGASSERT() in group_signal.c. From Masayuki Ishikawa. + - Eliminate bad boardctl() commands: Remove all references to + BOARDIOC_PWMSETUP and board_pwm_setup(). Remove all references to + BOARDIOC_ADCSETUP and board_adc_setup(). Remove + BOARDIOC_CAN_INITIALIZE. CAN initialization is now done in the board + initialization logic just like every other device driver. + - pthreads: Fix an error in pthread_mutex_destroy(). An error could + occur while destroying a mutex after a pthread has been canceled while + holding the mutex. + - task_restart: Make sure new task starts with pre-emption disabled and + not in a critical section. + - Enter/leave Critical Sections. Major redeign to + enter/leave_critical_section logic to deal with the case where + interrupts are disabled only on the local CPU. In this case, some + rather complex spinlocks must be used to maintain the critical section + accross all CPUs. + - SMP Critical Sections: Fixes for the SMP case: (1) Change order for + SMP case in enter_critical_section: (1) Disable local interrupts + BEFORE taking spinlock and (2) If SMP is enabled, if any interrupt + handler calls enter_critical_section(), it should take the spinlock. + - SMP wdogs: Wdog timers use a tasking interface that to manipulate + wdogs, and a different interface in the timer interrupt handling logic + to manage wdog expirations. In the single CPU case, this is fine. + Since the tasking level code calls enter_critical_section, interrupts + are disabled and no conflicts can occur. But that may not be the case + in the SMP case. Most architectures do not permit disabling + interrupts on other CPUs so enter_critical_section must work + differently: Locks are required to protect code. this change adds + locking (via enter_critical section) to wdog expiration logic for the + the case if the SMP configuration. + - SMP vfork(): Fix a race condition in the SMP case. Existing logic + depended on the fact that the child would not run until waitpid was + called because the child had the same priority as the parent. BUT in + the SMP case that is not true... the child may run immediately on a + different CPU. + - SMP: This change adds a new internal interfaces and fixes a problem + with three APIs in the SMP configuration. The new internal interface + is sched_cpu_pause(tcb). This function will pause a CPU if the task + associated with 'tcb' is running on that CPU. This allows a different + CPU to modify that OS data stuctures associated with the CPU. When + the other CPU is resumed, those modifications can safely take place. + The three fixes are to handle cases in the SMP configuration where one + CPU does need to make modifications to TCB and data structures on a + task that could be running running on another CPU. Those three cases + are task_delete(), task_restart(), and execution of signal handlers. + In all three cases the solutions is basically the same: (1) Call + sched_cpu_pause(tcb) to pause the CPU on which the task is running, + (2) perform the necessary operations, then (3) call up_cpu_resume() to + restart the paused CPU. + - SMP: Add logic to avoid a deadlock condition when CPU1 is hung waiting + for g_cpu_irqlock with interrupts interrupts and CPU0 is waiting for + g_cpu_paused. + - SMP: Enforce this rule: Tasks which are normally restored when + sched_unlock() is called must remain pending (1) if we are in a + critical section, i.e., g_cpu_irqlock is locked , or (2) other CPUs + still have pre-emption disabled, i.e., g_cpu_schedlock is locked. In + those cases, the release of the pending tasks must be deferred until + those conditions are met. + + * File System/Block Drivers/MTD Drivers: + + - AT24XX EEPROM MTD driver: Added EEPROM timeout. Fromo Aleksandr + Vyhovanec. + - fs/procfs: Fix procfs status for SMP case. + + * Graphics/Graphic Drivers: + + - Fonts: Correct some default font IDs. From Pierre-Noel Bouteville. + + * Common Drivers: + + - usbhost/enumerate: Fix possible buffer overwrite. From Janne Rosberg. + - usbhost/composite: Fix compile; missing semicolons. From Jann Rosberg. + - syslog: Fixes required for file syslog output. From Max Kriegleder. + - SPI configuration: Fix Kconfig warning. This change moves the + ARCH_HAVE_SPI options outside the check for SPI. Those options don't + depend on SPI, and Kconfig files in arch/ enable them even if SPI + isn't enabled. Source the driver's Kconfig in drivers/Kconfig only + if support for the driver is enabled prevents us from defining these + ARCH_HAVE options in the driver's Kconfig. We should probably remove + the other checks in drivers/Kconfig and check if the drivers are + enabled only in their Kconfig. From Paul A. Patience. + - drivers/timer: Remove the timer driver TIOC_SETHANDLER IOCTL call. + This calls directly from the timer driver into application code. That + is non-standard, non-portable, and cannot be supported. Instead, add + timer driver hooks to support signal notification of timer + expiration. Signal notification logic added by Sebastien Lorquet. + - All timer lower half drivers. Port Sebastien's changes to all other + implementations of the timer lower half. + - USB MSC Device: Fix length of mode6 sense reply packet. From + Wolfgang Reinegger. + - USB Composite Host: Fix end offset in usbhost_copyinterface(). From + Janne Rosberg. + - USB CDC/ACM Host: Add CDC_SUBCLASS_ACM and CDC_PROTO_ATM to + supported class and proto. From Janne Rosberg. + - SSD1306: Fix errors in SPI mode configuration. From Gong Darcy. + - CDC/ACM Device Class: uart_ops_s portion of cdcacm will not be + initalized with correct functions if CONFIG_SERIAL_DMA is selected. + + * Networking/Network Drivers: + + - drivers/net/tun.c: Fix bug in TUN interface driver. From Max Nekludov. + + * ARMv7-A: + + - ARMv7-A SMP: Add SMP logic to signal handling. + + * ARMv7-M: + + - ARMv7-M: Fix double allocation of MPU region in mmu.h. + + * ARMv7-R: + + - ARMv7-R: Fix compilation error. This change fixes compilation errors + on MPU support for ARMv7-R. From Heesub Shin. + - ARMv7-R: fix invalid drbar handling. In ARMv7-R, [31:5] bits of DRBAR + is physical base address and other bits are reserved and SBZ. Thus, + there is no point in passing other than the base address. From Heesub + Shin. + - ARMv7-R: Remove the redundant update on SCTLR. mpu_control() is + invoking cp15_wrsctlr() around SCTLR update redundantly. From Heesub + Shin. + - ARMv7-R: add new Kconfig entries for d/i-cache. Unlike in ARMv7-A/M, + Kconfig entries for data and instruction caches are currently missing + in ARMv7-R. This change adds those missing Kconfig entries. Actual + implmenetation for those functions will be added in the subsequent + patches. From Heesub Shin. + - ARMv7-R: Add cache handling functions. This change adds functions for + enabling and disabling d/i-caches which were missing for ARMv7-R. + From Heesub Shin. + - ARMv7-R: Fix typo in mpu support. s/ARMV7M/ARMV7R/g. From Heesub Shin. + - ARMv7-R: Fix CPSR corruption after exception handling. A sporadic + hang with consequent crash was observed when booting. It seemed to be + caused by the corrupted or wrong CPSR restored on return from + exception. NuttX restores the context using code like this: msr spsr, + r1. GCC translates this to: msr spsr_fc, r1. As a result, not all + SPSR fields are updated on exception return. This should be: msr + spsr_fsxc, r1. On some evaluation boards, spsr_svc may have totally + invalid value at power-on-reset. As it is not initialized at boot, the + code above may result in the corruption of cpsr and thus unexpected + behavior. From Heesub Shin. + - ARMv7-R: Fix to restore the Thumb flag in CPSR. Thumb flag in CPSR is + not restored back when the context switch occurs while executing thumb + instruction. From Heesub Shin. + + * Atmel SAM3/4 Drivers: + + - SAM3/4 UDP: Add delay between setting and clearing the endpoint RESET + bit in sam_ep_resume(). We need to add a delay between setting and + clearing the endpoint reset bit in SAM_UDP_RSTEP. Without the delay + the USB controller will (may?) not reset the endpoint. If the + endpoint is not being reset, the Data Toggle (DTGLE) bit will not to + be cleared which will cause the next transaction to fail if DTGLE is + 1. If that happens the host will time-out and reset the bus. Adding + this delay may also fix the USBMSC_STALL_RACEWAR in usbmsc_scsi.c, + however this has not been verified yet. From Wolfgang Reinegger. + - SAM3/4: Remove unused 'halted' flag from UDP driver. From Wolfgang + Reinegger. + - SAM3/4: Remove 'stalled' flag from the UDP driver. This flag is not + necessary because the state of the endpoint can be determined using + 'epstate' instead. From Wolfgang Reinegger. + + * Atmel SAM3/4 Boards: + + - SAM4S Xplained Pro: Configuration uses old, improper timer interface. + CONFIG_TIMER disabled in configuration. Remove obsolete timer + initialization logic. + + * Atmel SAMV7 Drivers: + + - SAMv7 USBDEVHS: A problem occurred with the SAMV7 USBDEVHS driver if + the USB cable is unplugged while a large amount of data is send over + an IN endpoint using DMA. If the USB cable is plugged in again after a + few seconds it is not possible to send data over this IN endpoint + again, all other endpoints work as expected. The problem occurs + because if the USB cable is unplugged while an DMA transfer is in + flight the transfer is canceled but the register SAM_USBHS_DEVDMACTRL + is left in an undefined state. The problem was fixed the problem by + resetting the register SAM_USBHS_DEVDMACTRL to a known state. + Additionally all pending interrupts are cleared. From Stefan Kolb. + - SAMV7 MCAN: Prevent Interrupt-Flooding of ACKE when not connected to + CAN-BUS. An Acknowledge-Error will occur every time no other CAN Node + acknowledges the message sent. This will also occur if the device is + not connected to the can-bus. The CAN-Standard declares, that the Chip + has to retry a given message as long as it is not sent successfully + (or it is not cancelled by the application). Every time the chip tries + to resend the message an Acknowledge-Error-Interrupt is generated. At + high baud rates this can lead in extremely high CPU load just for + handling the interrupts (and possibly the error handling in the + application). To prevent this Interrupt-Flooding we disable the ACKE + once it is seen as long we didn't transfer at least one message + successfully. From Frank Benkert. + - SAMV7 MCAN: Make delete_filter functions more robust. From Frank + Benkert. + + * Atmel SAMA5 Drivers: + + - SAMA5 PWM: Driver does not build when executing from SDRAM before + board frequencies are not constant. Rather, the bootloader configures + the clocking and we must derive the clocking from the MCK left by the + bootloader. This means lots more computations. This is untested on + initial change because I don't have a good PWM test setup right now. + + * Misoc LM32: + + - Misoc LM32: Corrects a bug that never occured in qemu on simulation or + real fpga. The error was that the r1 register was being modified out + of context switching and not restoring it. From Ramtin Amin + + * NXP Freescale i.MX6: + + - i.MX6 interrupt handling: Additional logic needed to handle nested + interrupts when an interrupt stack is used. Nesting can occur because + SGI interrupts are non-maskable. + + * NXP Freescale LPC43xx Drivers: + + - LPC43xx serial: Fix a typo in ioctl TIOCSRS485 ioctl. From Vytautas + Lukenskas. + - LPC43xx serial: Restore RS485 mode on serial port open (if RS485 is + enabled via menuconfig). From Vytautas Lukenskas. + - LPC43xx SD/MMC: Correct some definitions on SMMC control register in + lpc43_sdmmc.h. From Alan Carvalho de Assis. + - LPC43xx SD card: Correct pin configuration options needed for SD card + pins. From Alan Carvalho de Assis. + + * SiLabs EFM32: + + - EFM32: Fix a compilation error. From Pierre-noel Bouteville. + + * STMicro STM32 Drivers: + + - STM32 CHxN channels are always outputs. From Sebastien Lorquet. + - STM32 DAC: Fix shift value whenever there are is a DAC2 and, hence, + up to three interfaces. From Marc Recht. + - STM32 F1: Add TIM8 to STM32F103V pinmap. From Maciej Wjcik. + - STM32 F1: Fix for F1 RTC Clock, tested on F103. From Maciej Wjcik. + - STM32 F3: STM32F303xB and STM32F303xC chips have 4 ADCs. From Paul + A. Patience. + - STM32 F4: A new implementation of the STM32 F4 I2C bottom half. The + common I2C as this did not handled correctly in the current + implementation (see also https://github.com/PX4/NuttX/issues/54). The + changes almost exclusively affect the ISR. From Max Kriegleder. + - STM32 F4 OTGHS Host: If STM32F446 increase number of channels to + 16. From Janne Rosberg. + - STM32 F4: I think, that Size is (highest address+1 - Base address). + Base address has been removed and if address+count >= size we are + outside of the Flash. From David Sidrane. + - STM32 F4: Fix ADC compilation error when DMA isn't enabled. From Paul + A. Patience. + - STM32 F4: STM32F427 was rebooting. Over reached family. From David + Sidrane. + - STM32 F4: Added STM32F469 RAM size and deliberated STM32F446 size. + From David Sidrane. + - STM32 F4: Typo in stm32f76xxxx_pinmap.h edited online with + Bitbucket. From David Sidrane. + - STM32 F7: stm32_i2c.c Dejavu. Fixes a bug previously found in the + F4. From David Sidrane. + - STM32 F7: OTGDEV fixed typo. From David Sidrane. + - STM32 F7: Fix to SPI-Master driver. Without this the chip select + decoding feature will not work properly. From Michael Spahlinger. + - STM32 F7: STM32F7 SD/MMC driver depends on CONFIG_SDIO_DMA which is + only defined in stm32/Kconfig. Changed to CONFIG_STM32F7_SDMMC_DMA + and defined in stm32f7/Kconfig. + - STM32 F7: Fix some STM32F7 copy paste errors. From David Sidrane. + - STM32 L4: Complementary PWM outputs on STM32L4" (1) too many + parentheses when calculating max chan count and (2) channel 4 does not + have a complementary output. From Sebastien Lorquet. + - STM32 L4: Fix I2C devices RCC registers. From Sebastien Lorquet. + - STM32 L4: Enable and renaming for 32l4 UARTs 4 and 5. From Sebastien + Lorquet. + - STM32 L4: Change the way to configure quadrature encoder prescalers. + From Sebastien Lorquet. + - STM32 L4: Correct USART1/2 definitions. Use default mbed UART4 + settings. From Sebastien Lorquet. + + * STMicro STM32 Boards: + + - STM32F103 Minimum: Fix Timers 2 to 7 clock frequencies. From Alan + Carvalho de Assis. + - Nucleo-F303RE: Remove duplicate setting from board.h. From Marc + Recht. + - Nucleo F303RE: Various fixes to get the ADC configuration building + again after PR. Refresh all configurations. + - Nucleo L476RG: Add better selection of timer. + + * TI Tiva Boards: + + - DK-TM4C129x: Typo fix. From Wolfgang Reinegger. + + * Xtensa ESP32: + + - ESP32 core v2: Flush the UART TX buffer in the esp32 serial shutdown + routine. The ROM bootloader does not flush the FIFO before handing + over to user code, so some of this output is not currently seen when + the UART is reconfigured in early stages of startup. From Angus + Gratton. + - Xtensa ESP32: Corrects a problem with dispatching to signal + handlers: Cannot vector directly to the signal handling function as + in other ABIs under the Xtensa Window ABI. In that case, we need to + go through a tiny hook when performs the correct window call (call4) + otherwise registers will be scrambled in the signal handler. + + * Xtensa ESP32 Boards: + + - ESP32 core v2: Changes the openocd config file's default flash + voltage from 1.8V to 3.3V. This is not necessary right now, but may + save some hard-to-debug moments down the track (3.3V-only flash + running at 1.8V often half-works and does weird things...). From + Angus Gratton. + + * C Library/Header Files: + + - libc/stdio: Fixes sscanf() %sn where strlen(data) < n. From David + Sidrane. + - libc/stdio: Include wchar.h in lib_libvsprintf.c to fix compilation + error. From Alan Carvalho de Assis. + - include/sys/time.h: timersub macro modified per recommendations of + phreakuencies. + - include/ctype.h and cxx/cctype: Implement ctype.h functions as inline + if possible. cctype can then properly select namespace. + - include/: Fix a number of header files with mismatched 'extern C {' + and '}'. + - libc/unisted: Change brings strtol() and related functions more + conformant with POSIX. Corner cases like strtol(-2147483648, NULL, + 10) now pass clang -fsanitize=integer without warnings. From Juha + Niskanen. + - libc/unistd: sleep() was returning remaining nanoseconds (kind of), + instead the remaining seconds. From Eunbong Song. + - termios.h: Fix CRTSCTS define to include input and output flow. From + Lorenz Meier. + + * Build/Configuration System: + + - configs/*/defconfig: The buttons example was changed to archbuttons. + As a result all of the button configurations are broken and need some + renaming in the defconfig files. Noted by Frank Berkert. + - config/*/defconfgs: More fallout from name change of + apps/examples/buttons to archbuttons. + - configs: All QE encoder files. Last change made timer hard-coded to + 3. Make configurable. + - configs: Remove all traces of the no-longer existent ARCHBUTTONS + example. Remove all button configurations that depended on the + obsoleted ARCHBUTTON example. + - minnsh Configurations: Remove minnsh configurations and support + logic: up_getc() and lowinstream. This was an interesting exercise + to see just how small you could get NuttX, but otherwise it was not + useful: (1) the NSH code violated the OS interface layer by callup + up_getc() and up_putc() directly, and (2) while waiting for character + input, NSH would call up_getc() which would hog all of the CPU. Not a + reasonable solution other than as a proof of concept. + + * Application Build/Configuration System: + + - Make.defs: Using wrong link script if native window tool used with + Cygwin. + + * apps/platform: + + - ESP32 Core v2 Platform: Fix some naming that prevented building the + C++ support. + + * apps/nshlib: + + - NSH Library: nsh_getdirpath(), use snprint instead of sprintf to + avoid possibility of buffer overrun. Noted by Chung Hwan Kim. + + * apps/system: + + - Remove std_readline(). This called up_getc() and up_putc() directly, + violating the POSIX OS interface. + + * apps/netutils: + + - FTPD: Fixed bug that didn't free ftpd ressources on exit. From Pascal + Speck. + - NTP client: Fix missing left parenthesis. From Pierre-Noel Bouteville. + - cJSON: Import patch to fix:cJSON_PrintUnformatted() behaves unexpected + if an empty array shall be printed to text. from Jerome Lang + 2012-04-19. From Pierre-Noel Bouteville. + - esp8266 update cosmetic and many bug fix. From Pierre-Noel Bouteville. + - FTPD: Fix bug un ftpd file or socket may be not closed. From + Pierre-Noel Bouteville. + + * apps/modbus: + + - Modbus Master is missing many files and doesn't compile at all. More + details in + https://groups.yahoo.com/neo/groups/nuttx/conversations/topics/13734. + From Vytautas Lukenskas. + + * apps/examples: + + - The examples/qencoder app was trying to init the encoder by a direct + call into the board, cheating in a local header to declare the + normally unavailable function prototype. From Sebastien Lorquet. + - apps/examples/timer: Should detach signal handler before exiting. + - examples/qencode: The examples/qencoder app was trying to init the + encoder by a direct call into the board, cheating in a local header to + declare the normally unavailable function prototype. From Sebastien + Lorquet. + - apps/examples/archbuttons: Removed becaue it violates OS interface + principles. + - examples/adc, pwm, can: Remove all usage of BOARDIOC_ADCTEST_SETUP, + BIOARDIOC_PWMSETUP. Remove BOARDIOC_CAN_INITIALIZE. CAN + initialization is now done in the board initialization logic just like + every other device driver. + - examples/ostest: Add some delays to the pthread cancellation test. + With deferred cancellation enabled, things happen more asynchronously. diff --git a/TODO b/TODO index 9282df6df60..38557d81242 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ -NuttX TODO List (Last updated December 3, 2016) +NuttX TODO List (Last updated December 11, 2016) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This file summarizes known NuttX bugs, limitations, inconsistencies with @@ -9,7 +9,7 @@ issues related to each board port. nuttx/: - (13) Task/Scheduler (sched/) + (12) Task/Scheduler (sched/) (1) SMP (1) Memory Management (mm/) (1) Power Management (drivers/pm) @@ -22,7 +22,7 @@ nuttx/: (12) Network (net/, drivers/net) (4) USB (drivers/usbdev, drivers/usbhost) (0) Other drivers (drivers/) - (11) Libraries (libc/, libm/) + (12) Libraries (libc/, libm/) (11) File system/Generic drivers (fs/, drivers/) (9) Graphics Subsystem (graphics/) (2) Build system / Toolchains @@ -101,16 +101,37 @@ o Task/Scheduler (sched/) Status: Open Priority: Medium Low for now - Title: ISSUES WITH atexit() AND on_exit() + Title: ISSUES WITH atexit(), on_exit(), AND pthread_cleanup_pop() Description: These functions execute with the following bad properties: 1. They run with interrupts disabled, 2. They run in supervisor mode (if applicable), and 3. They do not obey any setup of PIC or address environments. Do they need to? + 4. In the case of task_delete() and pthread_cancel(), these + callbacks will run on the thread of execution and address + context of the caller of task. That is very bad! The fix for all of these issues it to have the callbacks - run on the caller's thread (as with signal handlers). + run on the caller's thread as is currently done with + signal handlers. Signals are delivered differently in + PROTECTED and KERNEL modes: The deliver is involes a + signal handling trampoline function in the user address + space and two signal handlers: One to call the signal + handler trampoline in user mode (SYS_signal_handler) and + on in with the signal handler trampoline to return to + supervisor mode (SYS_signal_handler_return) + + The primary difference is in the location of the signal + handling trampoline: + + - In PROTECTED mode, there is on a single user space blob + with a header at the beginning of the block (at a well- + known location. There is a pointer to the signal handler + trampoline function in that header. + - In the KERNEL mode, a special process signal handler + trampoline is used at a well-known location in every + process address space (ARCH_DATA_RESERVE->ar_sigtramp). Status: Open Priority: Medium Low. This is an important change to some less important interfaces. For the average user, these @@ -144,20 +165,6 @@ o Task/Scheduler (sched/) incompatibilities could show up in porting some code). Priority: Low - Title: REMOVE TASK_DELETE - Description: Need to remove or fix task delete. This interface is non- - standard and not safe. Arbitrary deleting tasks can cause - serious problems such as memory leaks. Better to remove it - than to retain it as a latent bug. - - Currently used within the OS and also part of the - implementation of pthread_cancel() and task_restart() (which - should also go for the same reasons). It is used in - NxWM::CNxConsole to terminate console tasks and also in - apps/netutils/thttpd to kill CGI tasks that timeout. - Status: Open - Priority: Low and not easily removable. - Title: RELEASE SEMAPHORES HELD BY CANCELED THREADS: Description: Commit: fecb9040d0e54baf14b729e556a832febfe8229e: "In case a thread is doing a blocking operation (e.g. read()) @@ -491,12 +498,6 @@ o Signals (sched/signal, arch/) o pthreads (sched/pthreads) ^^^^^^^^^^^^^^^^^ - Title: CANCELLATION POINTS - Description: pthread_cancel(): Should implement cancellation points and - pthread_testcancel() - Status: Open. No changes are planned. - Priority: Low, probably not that useful - Title: PTHREAD_PRIO_PROTECT Description: Extend pthread_mutexattr_setprotocol() support PTHREAD_PRIO_PROTECT: @@ -557,6 +558,44 @@ o pthreads (sched/pthreads) solution. So I discarded a few hours of programming. Not a big loss from the experience I gained." + Title: ISSUES WITH CANCELLATION POINTS + Description: According to POIX cancellation points must occur when a thread is executing + the following functions. There are some execptions as noted: + + accept() mq_timedsend() NA putpmsg() sigtimedwait() + 04 aio_suspend() NA msgrcv() pwrite() NA sigwait() + NA clock_nanosleep() NA msgsnd() read() sigwaitinfo() + close() NA msync() NA readv() 01 sleep() + connect() nanosleep() recv() 02 system() + -- creat() open() recvfrom() NA tcdrain() + fcntl() pause() NA recvmsg() 01 usleep() + NA fdatasync() poll() select() -- wait() + fsync() pread() sem_timedwait() waitid() + NA getmsg() NA pselect() sem_wait() waitpid() + NA getpmsg() pthread_cond_timedwait() send() write() + NA lockf() pthread_cond_wait() NA sendmsg() NA writev() + mq_receive() pthread_join() sendto() + mq_send() pthread_testcancel() 03 sigpause() + mq_timedreceive() NA putmsg() sigsuspend() + + NA Not supported + -- Doesn't need instrumentation. Handled by lower level calls. + nn See note nn + + NOTE 01: sleep() and usleep() are user-space functions in the C library and cannot + serve as cancellation points. They are, however, simple wrappers around nanosleep + which is a true cancellation point. + NOTE 02: system() is actually implemented in apps/ as part of NSH. It cannot be + a cancellation point either. + NOTE 03: sigpause() is a user-space function in the C library and cannot serve as + cancellation points. It is, however, a simple wrapper around sigsuspend() + which is a true cancellation point. + NOTE 04: aio_suspend() is a user-space function in the C library and cannot serve as + cancellation points. It does call around sigtimedwait() which is a true cancellation + point. + Status: Not really open. This is just the way it is. + Priority: Nothing additional is planned. + o Message Queues (sched/mqueue) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1451,10 +1490,28 @@ o Libraries (libc/, libm/) 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 + Status: Open + Priority: Low for casual users but clearly high if you need care about these incorrect corner case behaviors in the math libraries. + Title: Repartition libc functionality. + Description: There are many things implemented within the kernel (for example + under sched/pthread) that probably should be migrated in the + C library where it belongs. + + I would really like to see a little flavor of a micro-kernel + at the OS interface: I would like to see more primitive OS + system calls with more higher level logic in the C library. + + One awkard thing is the incompatibility of KERNEL vs FLAT + builds: In the kernel build, it would be nice to move many + of the thread-specific data items out of the TCB and into + the process address environment where they belong. It is + difficult to make this compatible with the FLAT build, + however. + Status: Open + Priority: Low + o File system / Generic drivers (fs/, drivers/) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/arch/Kconfig b/arch/Kconfig index 1e26db617f6..f57f510355f 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -77,6 +77,8 @@ config ARCH_X86 config ARCH_XTENSA bool "Xtensa" + select ARCH_HAVE_STACKCHECK + select ARCH_HAVE_CUSTOMOPT ---help--- Cadence® Tensilica® Xtensa® actictures. diff --git a/arch/README.txt b/arch/README.txt index 2e52e95ff02..a0f604e4aff 100644 --- a/arch/README.txt +++ b/arch/README.txt @@ -158,7 +158,6 @@ arch/arm - ARM-based micro-controllers 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 arch/arm/include/efm32 and arch/arm/src/efm32 arch/arm/include/imx1 and arch/arm/src/imx1 diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 9b721e2a3ea..d56e0a861e1 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -31,16 +31,6 @@ config ARCH_CHIP_C5471 ---help--- TI TMS320 C5471, A180, or DA180 (ARM7TDMI) -config ARCH_CHIP_CALYPSO - bool "Calypso" - select ARCH_ARM7TDMI - select ARCH_HAVE_HEAP2 - select ARCH_HAVE_LOWVECTORS - select OTHER_UART_SERIALDRIVER - select ARCH_HAVE_POWEROFF - ---help--- - TI Calypso-based cell phones (ARM7TDMI) - config ARCH_CHIP_DM320 bool "TMS320 DM320" select ARCH_ARM926EJS @@ -409,7 +399,6 @@ config ARCH_CHIP string default "a1x" if ARCH_CHIP_A1X default "c5471" if ARCH_CHIP_C5471 - default "calypso" if ARCH_CHIP_CALYPSO default "dm320" if ARCH_CHIP_DM320 default "efm32" if ARCH_CHIP_EFM32 default "imx1" if ARCH_CHIP_IMX1 @@ -625,9 +614,6 @@ endif if ARCH_CHIP_C5471 source arch/arm/src/c5471/Kconfig endif -if ARCH_CHIP_CALYPSO -source arch/arm/src/calypso/Kconfig -endif if ARCH_CHIP_DM320 source arch/arm/src/dm320/Kconfig endif diff --git a/arch/arm/include/armv7-a/spinlock.h b/arch/arm/include/armv7-a/spinlock.h index f43df337b8c..764a96ecef3 100644 --- a/arch/arm/include/armv7-a/spinlock.h +++ b/arch/arm/include/armv7-a/spinlock.h @@ -36,25 +36,4 @@ #ifndef __ARCH_ARM_INCLUDE_ARMV7_A_SPINLOCK_H #define __ARCH_ARM_INCLUDE_ARMV7_A_SPINLOCK_H -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Not a useful feature */ - -#undef SMP_INTERCPU_NONCACHED - -#if defined(CONFIG_SMP) && defined(SMP_INTERCPU_NONCACHED) - /* In SMP configurations, save spinlocks and other inter-CPU communications - * data in a non-cached memory region. - */ - -# define SP_SECTION __attribute__((section(".nocache"))) -#endif - #endif /* __ARCH_ARM_INCLUDE_ARMV7_A_SPINLOCK_H */ diff --git a/arch/arm/include/calypso/clock.h b/arch/arm/include/calypso/clock.h deleted file mode 100644 index a10a607a5d2..00000000000 --- a/arch/arm/include/calypso/clock.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef __ARCH_ARM_INCLUDE_CALYPSO_CLOCK_H -#define __ARCH_ARM_INCLUDE_CALYPSO_CLOCK_H - -#include - -#define CALYPSO_PLL26_52_MHZ ((2 << 8) | 0) -#define CALYPSO_PLL26_86_7_MHZ ((10 << 8) | 2) -#define CALYPSO_PLL26_87_MHZ ((3 << 8) | 0) -#define CALYPSO_PLL13_104_MHZ ((8 << 8) | 0) - -enum mclk_div { - _ARM_MCLK_DIV_1 = 0, - ARM_MCLK_DIV_1 = 1, - ARM_MCLK_DIV_2 = 2, - ARM_MCLK_DIV_3 = 3, - ARM_MCLK_DIV_4 = 4, - ARM_MCLK_DIV_5 = 5, - ARM_MCLK_DIV_6 = 6, - ARM_MCLK_DIV_7 = 7, - ARM_MCLK_DIV_1_5 = 0x80 | 1, - ARM_MCLK_DIV_2_5 = 0x80 | 2, -}; - -void calypso_clock_set(uint8_t vtcxo_div2, uint16_t inp, enum mclk_div mclk_div); -void calypso_pll_set(uint16_t inp); -void calypso_clk_dump(void); - -/* CNTL_RST */ -enum calypso_rst { - RESET_DSP = (1 << 1), - RESET_EXT = (1 << 2), - RESET_WDOG = (1 << 3), -}; - -void calypso_reset_set(enum calypso_rst calypso_rst, int active); -int calypso_reset_get(enum calypso_rst); - -enum calypso_bank { - CALYPSO_nCS0 = 0, - CALYPSO_nCS1 = 2, - CALYPSO_nCS2 = 4, - CALYPSO_nCS3 = 6, - CALYPSO_nCS7 = 8, - CALYPSO_CS4 = 0xa, - CALYPSO_nCS6 = 0xc, -}; - -enum calypso_mem_width { - CALYPSO_MEM_8bit = 0, - CALYPSO_MEM_16bit = 1, - CALYPSO_MEM_32bit = 2, -}; - -void calypso_mem_cfg(enum calypso_bank bank, uint8_t ws, - enum calypso_mem_width width, int we); - -/* Enable or disable the internal bootrom mapped to 0x0000'0000 */ -void calypso_bootrom(int enable); - -/* Enable or disable the debug unit */ -void calypso_debugunit(int enable); - -/* configure the RHEA bus bridge[s] */ -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 /* __ARCH_ARM_INCLUDE_CALYPSO_CLOCK_H */ diff --git a/arch/arm/include/calypso/debug.h b/arch/arm/include/calypso/debug.h deleted file mode 100644 index 95969467757..00000000000 --- a/arch/arm/include/calypso/debug.h +++ /dev/null @@ -1,31 +0,0 @@ -#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])) -#endif - -/* - * Check at compile time that something is of a particular type. - * Always evaluates to 1 so you may use it easily in comparisons. - */ -#define typecheck(type,x) \ -({ type __dummy; \ - typeof(x) __dummy2; \ - (void)(&__dummy == &__dummy2); \ - 1; \ -}) - -#ifdef DEBUG -#define dputchar(x) putchar(x) -#define dputs(x) puts(x) -#define dphex(x,y) phex(x,y) -#define printd(x, ...) printf(x, ##__VA_ARGS__) -#else -#define dputchar(x) -#define dputs(x) -#define dphex(x,y) -#define printd(x, args ...) -#endif - -#endif /* __ARCH_ARM_INCLUDE_CALYPSO_DEBUG_H */ diff --git a/arch/arm/include/calypso/defines.h b/arch/arm/include/calypso/defines.h deleted file mode 100644 index 4f29560c833..00000000000 --- a/arch/arm/include/calypso/defines.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __ARCH_ARM_INCLUDE_CALYPSO_DEFINES_H -#define __ARCH_ARM_INCLUDE_CALYPSO_DEFINES_H - -#define __attribute_const__ __attribute__((__const__)) - -/* type properties */ -#define __packed __attribute__((packed)) -#define __aligned(alignment) __attribute__((aligned(alignment))) -#define __unused __attribute__((unused)) - -/* linkage */ -#define __section(name) __attribute__((section(name))) - -/* force placement in zero-waitstate memory */ -#define __ramtext __section(".ramtext") - -#endif /* !__ARCH_ARM_INCLUDE_CALYPSO_DEFINES_H */ diff --git a/arch/arm/include/calypso/irq.h b/arch/arm/include/calypso/irq.h deleted file mode 100644 index 0dda3f312fe..00000000000 --- a/arch/arm/include/calypso/irq.h +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** - * arch/arm/include/calypso/irq.h - * Driver for Calypso IRQ controller - * - * (C) 2010 by Harald Welte - * (C) 2011 by Stefan Richter - * - * This source code is derivated from Osmocom-BB project and was - * relicensed as BSD with permission from original authors. - * - * 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_IRQ_H -#error "This file should never be included directly! Use " -#endif - -#ifndef __ARCH_ARM_INCLUDE_CALYPSO_IRQ_H -#define __ARCH_ARM_INCLUDE_CALYPSO_IRQ_H - -#ifndef __ASSEMBLY__ - -enum irq_nr { - IRQ_WATCHDOG = 0, - IRQ_TIMER1 = 1, - IRQ_TIMER2 = 2, - IRQ_TSP_RX = 3, - IRQ_TPU_FRAME = 4, - IRQ_TPU_PAGE = 5, - IRQ_SIMCARD = 6, - IRQ_UART_MODEM = 7, - IRQ_KEYPAD_GPIO = 8, - IRQ_RTC_TIMER = 9, - IRQ_RTC_ALARM_I2C = 10, - IRQ_ULPD_GAUGING = 11, - IRQ_EXTERNAL = 12, - IRQ_SPI = 13, - IRQ_DMA = 14, - IRQ_API = 15, - IRQ_SIM_DETECT = 16, - IRQ_EXTERNAL_FIQ = 17, - IRQ_UART_IRDA = 18, - IRQ_ULPD_GSM_TIMER = 19, - IRQ_GEA = 20, - _NR_IRQS -}; - -#endif /* __ASSEMBLY__ */ - -/* Don't use _NR_IRQS!!! Won't work in preprocessor... */ -#define NR_IRQS 21 - -#define IRQ_SYSTIMER IRQ_TIMER2 - -#endif /* __ARCH_ARM_INCLUDE_CALYPSO_IRQ_H */ diff --git a/arch/arm/include/calypso/memory.h b/arch/arm/include/calypso/memory.h deleted file mode 100644 index a4ce1e890ee..00000000000 --- a/arch/arm/include/calypso/memory.h +++ /dev/null @@ -1,28 +0,0 @@ -#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)) -#define __arch_getl(a) (*(volatile unsigned int *)(a)) - -#define __arch_putb(v,a) (*(volatile unsigned char *)(a) = (v)) -#define __arch_putw(v,a) (*(volatile unsigned short *)(a) = (v)) -#define __arch_putl(v,a) (*(volatile unsigned int *)(a) = (v)) - -#define __raw_writeb(v,a) __arch_putb(v,a) -#define __raw_writew(v,a) __arch_putw(v,a) -#define __raw_writel(v,a) __arch_putl(v,a) - -#define __raw_readb(a) __arch_getb(a) -#define __raw_readw(a) __arch_getw(a) -#define __raw_readl(a) __arch_getl(a) - -#define writeb(v,a) __arch_putb(v,a) -#define writew(v,a) __arch_putw(v,a) -#define writel(v,a) __arch_putl(v,a) - -#define readb(a) __arch_getb(a) -#define readw(a) __arch_getw(a) -#define readl(a) __arch_getl(a) - -#endif /* __ARCH_ARM_INCLUDE_CALYPSO_MEMORY_H */ diff --git a/arch/arm/include/calypso/timer.h b/arch/arm/include/calypso/timer.h deleted file mode 100644 index 93a1bd14925..00000000000 --- a/arch/arm/include/calypso/timer.h +++ /dev/null @@ -1,25 +0,0 @@ -#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); - -/* Configure pre-scaler and if timer is auto-reload */ -void hwtimer_config(int num, uint8_t pre_scale, int auto_reload); - -/* Load a timer with the given value */ -void hwtimer_load(int num, uint16_t val); - -/* Read the current timer value */ -uint16_t hwtimer_read(int num); - -/* Enable or disable the watchdog */ -void wdog_enable(int on); - -/* Reset cpu using watchdog */ -void wdog_reset(void); - -/* power up the timers */ -void hwtimer_init(void); - -#endif /* __ARCH_ARM_INCLUDE_CALYPSO_TIMER_H */ diff --git a/arch/arm/include/calypso/uwire.h b/arch/arm/include/calypso/uwire.h deleted file mode 100644 index 0ca6c376ca7..00000000000 --- a/arch/arm/include/calypso/uwire.h +++ /dev/null @@ -1,6 +0,0 @@ -#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/stm32/chip.h b/arch/arm/include/stm32/chip.h index 8f06701b518..137383bb093 100644 --- a/arch/arm/include/stm32/chip.h +++ b/arch/arm/include/stm32/chip.h @@ -1374,7 +1374,7 @@ # define STM32_NLCD 0 /* (0) No LCD */ # define STM32_NUSBOTG 0 /* USB FS device, but no USB OTG FS/HS */ # define STM32_NGPIO 37 /* GPIOA-F */ -# define STM32_NADC 3 /* (3) 12-bit ADC1-3 */ +# define STM32_NADC 4 /* (3) 12-bit ADC1-4 */ # define STM32_NDAC 2 /* (2) 12-bit DAC1-2 */ # define STM32_NCAPSENSE 0 /* (0) No capacitive sensing channels */ # define STM32_NCRC 1 /* (1) CRC calculation unit */ @@ -1414,7 +1414,7 @@ # define STM32_NLCD 0 /* (0) No LCD */ # define STM32_NUSBOTG 0 /* USB FS device, but no USB OTG FS/HS */ # define STM32_NGPIO 52 /* GPIOA-F */ -# define STM32_NADC 3 /* (3) 12-bit ADC1-3 */ +# define STM32_NADC 4 /* (3) 12-bit ADC1-4 */ # define STM32_NDAC 2 /* (2) 12-bit DAC1-2 */ # define STM32_NCAPSENSE 0 /* (0) No capacitive sensing channels */ # define STM32_NCRC 1 /* (1) CRC calculation unit */ @@ -1494,7 +1494,7 @@ # define STM32_NLCD 0 /* (0) No LCD */ # define STM32_NUSBOTG 0 /* USB FS device, but no USB OTG FS/HS */ # define STM32_NGPIO 87 /* GPIOA-F */ -# define STM32_NADC 3 /* (3) 12-bit ADC1-3 */ +# define STM32_NADC 4 /* (3) 12-bit ADC1-4 */ # define STM32_NDAC 2 /* (2) 12-bit DAC1-2 */ # define STM32_NCAPSENSE 0 /* (0) No capacitive sensing channels */ # define STM32_NCRC 1 /* (1) CRC calculation unit */ diff --git a/arch/arm/src/armv7-a/arm_testset.S b/arch/arm/src/armv7-a/arm_testset.S index e89cbb3adc5..638736e4d67 100644 --- a/arch/arm/src/armv7-a/arm_testset.S +++ b/arch/arm/src/armv7-a/arm_testset.S @@ -75,7 +75,7 @@ * This function must be provided via the architecture-specific logoic. * * Input Parameters: - * lock - The address of spinlock object. + * lock - The address of spinlock object (r0). * * Returned Value: * The spinlock is always locked upon return. The value of previous value @@ -84,6 +84,8 @@ * obtain the lock) or SP_UNLOCKED if the spinlock was previously unlocked * (meaning that we successfully obtained the lock) * + * Modifies: r1, r2, and lr + * ****************************************************************************/ .globl up_testset @@ -98,7 +100,7 @@ up_testset: 1: ldrexb r2, [r0] /* Test if spinlock is locked or not */ cmp r2, r1 /* Already locked? */ - beq 2f /* If alrady locked, return SP_LOCKED */ + beq 2f /* If already locked, return SP_LOCKED */ /* Not locked ... attempt to lock it */ diff --git a/arch/arm/src/armv7-a/arm_vectors.S b/arch/arm/src/armv7-a/arm_vectors.S index 33d1f8fc550..8a76e000b56 100644 --- a/arch/arm/src/armv7-a/arm_vectors.S +++ b/arch/arm/src/armv7-a/arm_vectors.S @@ -64,6 +64,10 @@ g_fiqtmp: .word 0 /* Saved lr */ .word 0 /* Saved spsr */ #endif +#if CONFIG_ARCH_INTERRUPTSTACK > 3 && defined(CONFIG_ARMV7A_HAVE_GICv2) +g_nestlevel: + .word 0 /* Interrupt nesting level */ +#endif /************************************************************************************ * Private Functions @@ -172,13 +176,53 @@ arm_vectorirq: mov r0, sp /* Get r0=xcp */ #if CONFIG_ARCH_INTERRUPTSTACK > 3 +#ifdef CONFIG_ARMV7A_HAVE_GICv2 + /* We will switch to the interrupt stack, UNLESS we are processing a + * nested interrupt in which case we are already using the interrupt + * stack. SGI interrupts may be nested because they are non-maskable. + */ + + ldr r5, .Lirqnestlevel /* r1=Points to interrupt nesting level */ + ldr r1, [r5] /* Get r1= nesting level */ + add r1, r1, #1 /* Increment nesting level */ + str r1, [r5] /* Save r1= nesting level */ + + cmp r1, #1 /* r1>1 if nested */ + bgt .Lintnested /* Use current SP if nested */ +#endif + + /* Call arm_decodeirq() on the interrupt stack */ + ldr sp, .Lirqstackbase /* SP = interrupt stack base */ str r0, [sp] /* Save the user stack pointer */ mov r4, sp /* Save the SP in a preserved register */ bic sp, sp, #7 /* Force 8-byte alignment */ bl arm_decodeirq /* Call the handler */ ldr sp, [r4] /* Restore the user stack pointer */ + +#ifdef CONFIG_ARMV7A_HAVE_GICv2 + b .Lintreturn + + /* Call arm_decodeirq() on whatever stack is in place */ + +.Lintnested: + mov r4, sp /* Save the SP in a preserved register */ + bic sp, sp, #7 /* Force 8-byte alignment */ + bl arm_decodeirq /* Call the handler */ + mov sp, r4 /* Restore the possibly unaligned stack pointer */ + + /* Decrement the nesting level (r5 should be preserved) */ + +.Lintreturn: + ldr r1, [r5] /* Get r1= nesting level */ + cmp r1, #0 /* A sanity check*/ + subgt r1, r1, #1 /* Decrement nesting level */ + strgt r1, [r5] /* Save r1= nesting level */ +#endif + #else + /* Call arm_decodeirq() on the user stack */ + mov r4, sp /* Save the SP in a preserved register */ bic sp, sp, #7 /* Force 8-byte alignment */ bl arm_decodeirq /* Call the handler */ @@ -227,6 +271,10 @@ arm_vectorirq: #if CONFIG_ARCH_INTERRUPTSTACK > 3 .Lirqstackbase: .word g_intstackbase +#ifdef CONFIG_ARMV7A_HAVE_GICv2 +.Lirqnestlevel: + .word g_nestlevel +#endif #endif .size arm_vectorirq, . - arm_vectorirq .align 5 @@ -937,7 +985,7 @@ arm_vectorfiq: .word g_fiqtmp #if CONFIG_ARCH_INTERRUPTSTACK > 3 .Lfiqstackbase: - .word g_intstackbase + .word g_fiqstackbase #endif #else @@ -965,5 +1013,21 @@ g_intstackbase: .size g_intstackbase, 4 .size g_intstackalloc, (CONFIG_ARCH_INTERRUPTSTACK & ~3) + .globl g_fiqstackalloc + .type g_fiqstackalloc, object + .globl g_fiqstackbase + .type g_fiqstackbase, object + +/************************************************************************************ + * Name: g_fiqstackalloc/g_fiqstackbase + ************************************************************************************/ + +g_fiqstackalloc: + .skip ((CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4) +g_fiqstackbase: + .skip 4 + .size g_fiqstackbase, 4 + .size g_fiqstackalloc, (CONFIG_ARCH_INTERRUPTSTACK & ~3) + #endif /* CONFIG_ARCH_INTERRUPTSTACK > 3 */ .end diff --git a/arch/arm/src/armv7-a/mmu.h b/arch/arm/src/armv7-a/mmu.h index 64406572420..c6338d33378 100644 --- a/arch/arm/src/armv7-a/mmu.h +++ b/arch/arm/src/armv7-a/mmu.h @@ -605,9 +605,6 @@ #define MMU_L2_VECTROFLAGS (PTE_TYPE_SMALL | PTE_WRITE_THROUGH | PTE_AP_R1) #define MMU_L2_VECTORFLAGS MMU_L2_VECTRWFLAGS -#define MMU_L1_INTERCPUFLAGS (PMD_TYPE_PTE | PMD_PTE_PXN | PMD_PTE_DOM(0)) -#define MMU_L2_INTERCPUFLAGS (PTE_TYPE_SMALL | PTE_DEVICE | PTE_AP_RW1) - /* Mapped section size */ #define SECTION_SHIFT (20) diff --git a/arch/arm/src/armv7-m/up_doirq.c b/arch/arm/src/armv7-m/up_doirq.c index b51c10e5582..ed33a27aed1 100644 --- a/arch/arm/src/armv7-m/up_doirq.c +++ b/arch/arm/src/armv7-m/up_doirq.c @@ -50,22 +50,6 @@ #include "up_arch.h" #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-m/up_signal_dispatch.c b/arch/arm/src/armv7-m/up_signal_dispatch.c index 4a03a26b213..9ec7d151529 100644 --- a/arch/arm/src/armv7-m/up_signal_dispatch.c +++ b/arch/arm/src/armv7-m/up_signal_dispatch.c @@ -46,18 +46,6 @@ #if ((defined(CONFIG_BUILD_PROTECTED) && defined(__KERNEL__)) || \ defined(CONFIG_BUILD_KERNEL)) && !defined(CONFIG_DISABLE_SIGNALS) -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/calypso/Kconfig b/arch/arm/src/calypso/Kconfig deleted file mode 100644 index e044280f626..00000000000 --- a/arch/arm/src/calypso/Kconfig +++ /dev/null @@ -1,115 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -comment "Calypso Configuration Options" - -menu "Modem UART Configuration" - -config UART_MODEM_BAUD - int "Modem UART BAUD" - default 115200 - -config UART_MODEM_PARITY - int "Modem UART parity" - default 0 - ---help--- - Modem UART parity. 0=None, 1=Odd, 2=Even. Default: None - -config UART_MODEM_BITS - int "Modem UART number of bits" - default 8 - ---help--- - Modem UART number of bits. Default: 8 - -config UART_MODEM_2STOP - int "Modem UART two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - -config UART_MODEM_RXBUFSIZE - int "Modem UART Rx buffer size" - default 256 - ---help--- - Modem UART Rx buffer size. Default: 256 - -config UART_MODEM_TXBUFSIZE - int "Modem UART Tx buffer size" - default 256 - ---help--- - Modem UART Tx buffer size. Default: 256 - -config UART_MODEM_HWFLOWCONTROL - bool "Hardware flow control" - default n - ---help--- - Enabled Modem UART hardware flow control. Default: n - -endmenu - -menu "IrDA UART Configuration" - -config UART_IRDA_BAUD - int "IrDA UART BAUD" - default 115200 - -config UART_IRDA_PARITY - int "IrDA UART parity" - default 0 - ---help--- - IrDA UART parity. 0=None, 1=Odd, 2=Even. Default: None - -config UART_IRDA_BITS - int "IrDA UART number of bits" - default 8 - ---help--- - IrDA UART number of bits. Default: 8 - -config UART_IRDA_2STOP - int "IrDA UART two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - -config UART_IRDA_RXBUFSIZE - int "IrDA UART Rx buffer size" - default 256 - ---help--- - IrDA UART Rx buffer size. Default: 256 - -config UART_IRDA_TXBUFSIZE - int "IrDA UART Tx buffer size" - default 256 - ---help--- - IrDA UART Tx buffer size. Default: 256 - -config UART_IRDA_HWFLOWCONTROL - bool "Hardware flow control" - default n - ---help--- - Enabled IrDA UART hardware flow control. Default: n - -endmenu - -choice - prompt "Serial Console Selection" - default SERIAL_CONSOLE_NONE - depends on DEV_CONSOLE - -# See drivers/Kconfig -config USE_SERCOMM_CONSOLE - bool "SERCOMM console" - select SERCOMM_CONSOLE - -config SERIAL_MODEM_CONSOLE - bool "Serial console on modem UART" - -config SERIAL_IRDA_CONSOLE - bool "Serial console on IrDA UART" - -config SERIAL_CONSOLE_NONE - bool "No serial console" - -endchoice diff --git a/arch/arm/src/calypso/Make.defs b/arch/arm/src/calypso/Make.defs deleted file mode 100644 index c3d6b6b0bb5..00000000000 --- a/arch/arm/src/calypso/Make.defs +++ /dev/null @@ -1,71 +0,0 @@ -############################################################################ -# calypso/Make.defs -# -# Copyright (C) 2007, 2013-2015 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Copyright (C) 2011 Stefan Richter. All rights reserved. -# Author: Stefan Richter -# -# 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 Gregory Nutt 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. -# -############################################################################ - -HEAD_ASRC = calypso_head.S - -CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_vectors.S -CMN_ASRCS += up_nommuhead.S vfork.S -CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copyfullstate.c -CMN_CSRCS += up_createstack.c up_dataabort.c up_mdelay.c up_udelay.c -CMN_CSRCS += up_doirq.c up_exit.c up_idle.c up_initialstate.c up_initialize.c -CMN_CSRCS += up_interruptcontext.c up_prefetchabort.c up_releasepending.c -CMN_CSRCS += up_releasestack.c up_reprioritizertr.c up_schedulesigaction.c -CMN_CSRCS += up_sigdeliver.c up_stackframe.c up_syscall.c up_unblocktask.c -CMN_CSRCS += up_undefinedinsn.c up_usestack.c calypso_power.c up_vfork.c - -ifeq ($(CONFIG_ELF),y) -CMN_CSRCS += up_elf.c -else ifeq ($(CONFIG_MODULE),y) -CMN_CSRCS += up_elf.c -endif - -ifeq ($(CONFIG_STACK_COLORATION),y) -CMN_CSRCS += up_checkstack.c -endif - -CHIP_ASRCS = calypso_lowputc.S -CHIP_CSRCS = calypso_irq.c calypso_heap.c calypso_serial.c clock.c -CHIP_CSRCS += calypso_uwire.c calypso_armio.c calypso_keypad.c - -ifeq ($(CONFIG_SPI),y) -CHIP_CSRCS += calypso_spi.c -endif - -ifneq ($(CONFIG_SCHED_TICKLESS),y) -CHIP_CSRCS += calypso_timer.c -endif diff --git a/arch/arm/src/calypso/calypso_armio.c b/arch/arm/src/calypso/calypso_armio.c deleted file mode 100644 index c210fa34dce..00000000000 --- a/arch/arm/src/calypso/calypso_armio.c +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** - * Driver for shared features of ARMIO modules - * - * Copyright (C) 2011 Stefan Richter. All rights reserved. - * Author: Stefan Richter - * - * 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 - -#include -#include - -#include -#include - -#include "up_arch.h" - -/**************************************************************************** - * HW access - ****************************************************************************/ - -#define BASE_ADDR_ARMIO 0xfffe4800 -#define ARMIO_REG(x) (BASE_ADDR_ARMIO + (x)) - -enum armio_reg { - LATCH_IN = 0x00, - LATCH_OUT = 0x02, - IO_CNTL = 0x04, - CNTL_REG = 0x06, - LOAD_TIM = 0x08, - KBR_LATCH_REG = 0x0a, - KBC_REG = 0x0c, - BUZZ_LIGHT_REG = 0x0e, - LIGHT_LEVEL = 0x10, - BUZZER_LEVEL = 0x12, - GPIO_EVENT_MODE = 0x14, - KBD_GPIO_INT = 0x16, - KBD_GPIO_MASKIT = 0x18, - GPIO_DEBOUNCING = 0x1a, - GPIO_LATCH = 0x1c, -}; - -#define KBD_INT (1 << 0) -#define GPIO_INT (1 << 1) - -/**************************************************************************** - * ARMIO interrupt handler - * forward keypad events - * forward GPIO events - ****************************************************************************/ - -static int kbd_gpio_irq(int irq, uint32_t *regs) -{ - return calypso_kbd_irq(irq, regs); -} - -/**************************************************************************** - * Initialize ARMIO - ****************************************************************************/ - -void calypso_armio(void) -{ - /* Enable ARMIO clock */ - - putreg16(1 << 5, ARMIO_REG(CNTL_REG)); - - /* Mask GPIO interrupt and keypad interrupt */ - - putreg16(KBD_INT | GPIO_INT, ARMIO_REG(KBD_GPIO_MASKIT)); - - /* Attach and enable the interrupt */ - - irq_attach(IRQ_KEYPAD_GPIO, (xcpt_t)kbd_gpio_irq); - up_enable_irq(IRQ_KEYPAD_GPIO); -} diff --git a/arch/arm/src/calypso/calypso_head.S b/arch/arm/src/calypso/calypso_head.S deleted file mode 100644 index eb83b68516f..00000000000 --- a/arch/arm/src/calypso/calypso_head.S +++ /dev/null @@ -1,23 +0,0 @@ -/* Place a branch to the real head at the entry point */ -.section .text.start - b __start - - -/* Exception Vectors like they are needed for the exception vector - indirection of the internal boot ROM. The following section must - be liked to appear at 0x80001c */ -.section .text.exceptions -_undef_instr: - b up_vectorundefinsn -_sw_interr: - b up_vectorswi -_prefetch_abort: - b up_vectorprefetch -_data_abort: - b up_vectordata -_reserved: - b _reserved -_irq: - b up_vectorirq -_fiq: - b up_vectorfiq diff --git a/arch/arm/src/calypso/calypso_irq.c b/arch/arm/src/calypso/calypso_irq.c deleted file mode 100644 index 85f4f084589..00000000000 --- a/arch/arm/src/calypso/calypso_irq.c +++ /dev/null @@ -1,357 +0,0 @@ -/**************************************************************************** - * arch/arm/src/calypso/calypso_irq.c - * Driver for Calypso IRQ controller - * - * (C) 2010 by Harald Welte - * (C) 2011 by Stefan Richter - * - * This source code is derivated from Osmocom-BB project and was - * relicensed as BSD with permission from original authors. - * - * 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 "arm.h" -#include "up_internal.h" -#include "up_arch.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define BASE_ADDR_IRQ 0xfffffa00 -#define BASE_ADDR_IBOOT_EXC 0x0080001C - -enum irq_reg -{ - IT_REG1 = 0x00, - IT_REG2 = 0x02, - MASK_IT_REG1 = 0x08, - MASK_IT_REG2 = 0x0a, - IRQ_NUM = 0x10, - FIQ_NUM = 0x12, - IRQ_CTRL = 0x14, -}; - -#define ILR_IRQ(x) (0x20 + (x*2)) -#define IRQ_REG(x) (BASE_ADDR_IRQ + (x)) - -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -#endif - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/* g_current_regs[] holds a references to the current interrupt level - * register storage structure. If is non-NULL only during interrupt - * processing. Access to g_current_regs[] must be through the macro - * CURRENT_REGS for portability. - */ - -volatile uint32_t *g_current_regs[1]; -extern uint32_t _exceptions; - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static uint8_t default_irq_prio[] = -{ - [IRQ_WATCHDOG] = 0xff, - [IRQ_TIMER1] = 0xff, - [IRQ_TIMER2] = 0xff, - [IRQ_TSP_RX] = 0, - [IRQ_TPU_FRAME] = 3, - [IRQ_TPU_PAGE] = 0xff, - [IRQ_SIMCARD] = 0xff, - [IRQ_UART_MODEM] = 8, - [IRQ_KEYPAD_GPIO] = 4, - [IRQ_RTC_TIMER] = 9, - [IRQ_RTC_ALARM_I2C] = 10, - [IRQ_ULPD_GAUGING] = 2, - [IRQ_EXTERNAL] = 12, - [IRQ_SPI] = 0xff, - [IRQ_DMA] = 0xff, - [IRQ_API] = 0xff, - [IRQ_SIM_DETECT] = 0, - [IRQ_EXTERNAL_FIQ] = 7, - [IRQ_UART_IRDA] = 2, - [IRQ_ULPD_GSM_TIMER] = 1, - [IRQ_GEA] = 0xff, -}; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -static void _irq_enable(enum irq_nr nr, int enable) -{ - uintptr_t reg = IRQ_REG(MASK_IT_REG1); - uint16_t val; - - if (nr > 15) - { - reg = IRQ_REG(MASK_IT_REG2); - nr -= 16; - } - - val = getreg16(reg); - if (enable) - { - val &= ~(1 << nr); - } - else - { - val |= (1 << nr); - } - - putreg16(val, reg); -} - -static void set_default_priorities(void) -{ - unsigned int i; - - for (i = 0; i < ARRAY_SIZE(default_irq_prio); i++) - { - uint16_t val; - uint8_t prio = default_irq_prio[i]; - - if (prio > 31) - { - prio = 31; - } - - val = getreg16(IRQ_REG(ILR_IRQ(i))); - val &= ~(0x1f << 2); - val |= prio << 2; - - /* Make edge mode default. Hopefully causes less trouble */ - - val |= 0x02; - - putreg16(val, IRQ_REG(ILR_IRQ(i))); - } -} - -/* Install the exception handlers to where the ROM loader jumps */ - -static void calypso_exceptions_install(void) -{ - uint32_t *exceptions_dst = (uint32_t *) BASE_ADDR_IBOOT_EXC; - uint32_t *exceptions_src = &_exceptions; - int i; - - for (i = 0; i < 7; i++) - { - *exceptions_dst++ = *exceptions_src++; - } -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_irqinitialize - * - * Description: - * Setup the IRQ and FIQ controllers - * - ****************************************************************************/ - -void up_irqinitialize(void) -{ - /* Prepare hardware */ - - calypso_exceptions_install(); - CURRENT_REGS = NULL; - - /* Switch to internal ROM */ - - calypso_bootrom(1); - - /* Set default priorities */ - - set_default_priorities(); - - /* Mask all interrupts off */ - - putreg16(0xffff, IRQ_REG(MASK_IT_REG1)); - putreg16(0xffff, IRQ_REG(MASK_IT_REG2)); - - /* clear all pending interrupts */ - putreg16(0, IRQ_REG(IT_REG1)); - putreg16(0, IRQ_REG(IT_REG2)); - - /* Enable interrupts globally to the ARM core */ - -#ifndef CONFIG_SUPPRESS_INTERRUPTS - up_irq_restore(SVC_MODE | PSR_F_BIT); -#endif -} - -/**************************************************************************** - * Name: up_disable_irq - * - * Description: - * Disable the IRQ specified by 'irq' - * - ****************************************************************************/ - -void up_disable_irq(int irq) -{ - if ((unsigned)irq < NR_IRQS) - { - _irq_enable(irq, 0); - } -} - -/**************************************************************************** - * Name: up_enable_irq - * - * Description: - * Enable the IRQ specified by 'irq' - * - ****************************************************************************/ - -void up_enable_irq(int irq) -{ - if ((unsigned)irq < NR_IRQS) - { - _irq_enable(irq, 1); - } -} - -/**************************************************************************** - * Name: up_prioritize_irq - * - * Description: - * Set the priority of an IRQ. - * - ****************************************************************************/ - -#ifndef CONFIG_ARCH_IRQPRIO -int up_prioritize_irq(int nr, int prio) -{ - uint16_t val; - - if (prio == -1) - { - prio = default_irq_prio[nr]; - } - - if (prio > 31) - { - prio = 31; - } - - val = prio << 2; - putreg16(val, IRQ_REG(ILR_IRQ(nr))); - - return 0; -} -#endif - -/**************************************************************************** - * Entry point for interrupts - ****************************************************************************/ - -void up_decodeirq(uint32_t *regs) -{ - uint8_t num, tmp; - uint32_t *saved_regs; - - /* XXX: What is this??? - * Passed to but ignored in IRQ handlers - * Only valid meaning is apparently non-NULL == IRQ context */ - - saved_regs = (uint32_t *)CURRENT_REGS; - CURRENT_REGS = regs; - - /* Detect & deliver the IRQ */ - - num = getreg8(IRQ_REG(IRQ_NUM)) & 0x1f; - irq_dispatch(num, regs); - - /* Start new IRQ agreement */ - - tmp = getreg8(IRQ_REG(IRQ_CTRL)); - tmp |= 0x01; - putreg8(tmp, IRQ_REG(IRQ_CTRL)); - - CURRENT_REGS = saved_regs; -} - -/**************************************************************************** - * Entry point for FIQs - ****************************************************************************/ - -void calypso_fiq(void) -{ - uint8_t num, tmp; - uint32_t *regs; - - /* XXX: What is this??? - * Passed to but ignored in IRQ handlers - * Only valid meaning is apparently non-NULL == IRQ context */ - - regs = (uint32_t *)CURRENT_REGS; - CURRENT_REGS = (uint32_t *)# - - /* Detect & deliver like an IRQ but we are in FIQ context */ - - num = getreg8(IRQ_REG(FIQ_NUM)) & 0x1f; - irq_dispatch(num, regs); - - /* Start new FIQ agreement */ - - tmp = getreg8(IRQ_REG(IRQ_CTRL)); - tmp |= 0x02; - putreg8(tmp, IRQ_REG(IRQ_CTRL)); - - CURRENT_REGS = regs; -} diff --git a/arch/arm/src/calypso/calypso_keypad.c b/arch/arm/src/calypso/calypso_keypad.c deleted file mode 100644 index 1d9b11b98a7..00000000000 --- a/arch/arm/src/calypso/calypso_keypad.c +++ /dev/null @@ -1,385 +0,0 @@ -/**************************************************************************** - * Driver for Calypso keypad hardware - * - * Copyright (C) 2011 Stefan Richter. All rights reserved. - * Author: Stefan Richter - * - * 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 - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -/**************************************************************************** - * HW access - ****************************************************************************/ - -#define BASE_ADDR_ARMIO 0xfffe4800 -#define ARMIO_REG(x) ((void *)BASE_ADDR_ARMIO + (x)) - -enum armio_reg -{ - LATCH_IN = 0x00, - LATCH_OUT = 0x02, - IO_CNTL = 0x04, - CNTL_REG = 0x06, - LOAD_TIM = 0x08, - KBR_LATCH_REG = 0x0a, - KBC_REG = 0x0c, - BUZZ_LIGHT_REG = 0x0e, - LIGHT_LEVEL = 0x10, - BUZZER_LEVEL = 0x12, - GPIO_EVENT_MODE = 0x14, - KBD_GPIO_INT = 0x16, - KBD_GPIO_MASKIT = 0x18, - GPIO_DEBOUNCING = 0x1a, - GPIO_LATCH = 0x1c, -}; - -#define KBD_INT (1 << 0) -#define GPIO_INT (1 << 1) - -/**************************************************************************** - * Decoder functions for matrix and power button - ****************************************************************************/ - -static int btn_dec(uint32_t * btn_state, uint8_t col, uint8_t reg, - char *buf, size_t buflen, size_t * len) -{ - uint8_t diff = (*btn_state ^ reg) & 0x1f; - - while (diff) - { - uint8_t val = diff & ~(diff - 1); - uint8_t sc = val >> 1; - sc |= sc << 2; - sc += col; - sc += (sc & 0x20) ? 0x26 : 0x3f; - - if (reg & val) - { - sc |= 0x20; - } - - /* Check for space in buffer and dispatch */ - - if (*len < buflen) - { - buf[(*len)++] = sc; - } - else - { - break; - } - - /* Only change diff if dispatched/buffer not full */ - - diff ^= val; - } - - /* Store new state of the buttons (but only if they where dispatch) */ - - *btn_state >>= 5; -#ifdef INCLUDE_ALL_COLS - *btn_state |= (reg ^ diff) << 20; -#else - *btn_state |= (reg ^ diff) << 15; -#endif - return diff; -} - -static int pwr_btn_dec(uint32_t * state, uint8_t reg, char *buf, size_t * len) -{ - if (reg) - { - /* Check for pressed power button. If pressed, ignore other - * buttons since it collides with an entire row. - */ - - if (~*state & 0x80000000) - { - buf[0] = 'z'; - *len = 1; - *state |= 0x80000000; - } - - return 1; /* break loop in caller */ - } - else - { - /* Check for released power button. */ - - if (*state & 0x80000000) - { - buf[0] = 'Z'; - *len = 1; - - *state &= 0x7fffffff; - - /* Don't scan others when released; might trigger - * false keystrokes otherwise - */ - - return 1; - } - } - - return 0; /* Continue with other columns */ -} - -/**************************************************************************** - * Keypad: Fileops Prototypes and Structures - ****************************************************************************/ - -typedef FAR struct file file_t; - -static int keypad_open(file_t * filep); -static int keypad_close(file_t * filep); -static ssize_t keypad_read(file_t * filep, FAR char *buffer, size_t buflen); -#ifndef CONFIG_DISABLE_POLL -static int keypad_poll(file_t * filep, FAR struct pollfd *fds, bool setup); -#endif - -static const struct file_operations keypad_ops = -{ - keypad_open, /* open */ - keypad_close, /* close */ - keypad_read, /* read */ - 0, /* write */ - 0, /* seek */ - 0, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - keypad_poll /* poll */ -#endif -}; - -static sem_t kbdsem; - -/**************************************************************************** - * Keypad: Fileops - ****************************************************************************/ - -static int keypad_open(file_t * filep) -{ - register uint16_t reg; - - /* Unmask keypad interrupt */ - - reg = readw(ARMIO_REG(KBD_GPIO_MASKIT)); - writew(reg & ~KBD_INT, ARMIO_REG(KBD_GPIO_MASKIT)); - - return OK; -} - -static int keypad_close(file_t * filep) -{ - register uint16_t reg; - - /* Mask keypad interrupt */ - - reg = readw(ARMIO_REG(KBD_GPIO_MASKIT)); - writew(reg | KBD_INT, ARMIO_REG(KBD_GPIO_MASKIT)); - - return OK; -} - -static ssize_t keypad_read(file_t * filep, FAR char *buf, size_t buflen) -{ - static uint32_t btn_state = 0; - register uint16_t reg; - uint16_t col, col_mask; - size_t len = 0; - - if (buf == NULL || buflen < 1) - { - /* Well... nothing to do */ - - return -EINVAL; - } - -retry: - col = 1; - col_mask = 0x1e; - - if (!btn_state) - { - /* Drive all cols low such that all buttons cause events */ - - writew(0, ARMIO_REG(KBC_REG)); - - /* No button currently pressed, use IRQ */ - - reg = readw(ARMIO_REG(KBD_GPIO_MASKIT)); - writew(reg & ~KBD_INT, ARMIO_REG(KBD_GPIO_MASKIT)); - sem_wait(&kbdsem); - } - else - { - writew(0x1f, ARMIO_REG(KBC_REG)); - usleep(80000); - } - - /* Scan columns */ - -#ifdef INCLUDE_ALL_COLS - while (col <= 6) - { -#else - while (col <= 5) - { -#endif - /* Read keypad latch and immediately set new column since - * synchronization takes about 5usec. For the 1st round, the - * interrupt has prepared this and the context switch takes - * long enough to serve as a delay. - */ - - reg = readw(ARMIO_REG(KBR_LATCH_REG)); - writew(col_mask, ARMIO_REG(KBC_REG)); - - /* Turn pressed buttons into 1s */ - - reg = 0x1f & ~reg; - - if (col == 1) - { - /* Power/End switch */ - - if (pwr_btn_dec(&btn_state, reg, buf, &len)) - { - break; - } - } - else - { - /* Non-power switches */ - - if (btn_dec(&btn_state, col, reg, buf, buflen, &len)) - { - break; - } - } - - /* Select next column and respective mask */ - - col_mask = 0x1f & ~(1 << col++); - - /* We have to wait for synchronization of the inputs. The - * processing is too fast if no/few buttons are processed. - */ - - usleep(5); - - /* XXX: usleep seems to suffer hugh overhead. Better this!? - * If nothing else can be done, it's overhead still wastes - * time 'usefully'. - */ - /* sched_yield(); up_udelay(2); */ - } - - /* If we don't have anything to return, retry to avoid EOF */ - - if (!len) - { - goto retry; - } - - return len; -} - -/**************************************************************************** - * Keypad interrupt handler - * mask interrupts - * prepare column drivers for scan - * posts keypad semaphore - ****************************************************************************/ - -int calypso_kbd_irq(int irq, uint32_t * regs) -{ - register uint16_t reg; - - /* Mask keypad interrupt */ - - reg = readw(ARMIO_REG(KBD_GPIO_MASKIT)); - writew(reg | KBD_INT, ARMIO_REG(KBD_GPIO_MASKIT)); - - /* Turn off column drivers */ - - writew(0x1f, ARMIO_REG(KBC_REG)); - - /* Let the userspace know */ - - sem_post(&kbdsem); - - return 0; -} - -/**************************************************************************** - * Initialize device, add /dev/... nodes - ****************************************************************************/ - -void up_keypad(void) -{ - /* kbssem semaphore helps leaving IRQ ctx as soon as possible. This - * semaphore is used for signaling and, hence, should not have priority - * inheritance enabled. - */ - - sem_init(&kbdsem, 0, 0); - sem_setprotocol(&kbdsem, SEM_PRIO_NONE); - - /* Drive cols low in idle state such that all buttons cause events */ - - writew(0, ARMIO_REG(KBC_REG)); - - (void)register_driver("/dev/keypad", &keypad_ops, 0444, NULL); -} - -int keypad_kbdinit(void) -{ - calypso_armio(); - up_keypad(); - - return OK; -} diff --git a/arch/arm/src/calypso/calypso_power.c b/arch/arm/src/calypso/calypso_power.c deleted file mode 100644 index 11b51a629bf..00000000000 --- a/arch/arm/src/calypso/calypso_power.c +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include -#include - -#include "calypso_spi.h" - -/**************************************************************************** - * Name: board_power_off - * - * Description: - * Power off the board. - * - * If this function returns, then it was not possible to power-off the - * board due to some other constraints. - * - * Input Parameters: - * status - Status information provided with the power off event. - * - * Returned Value: - * If this function returns, then it was not possible to power-off the - * board due to some constraints. The return value int this case is a - * board-specific reason for the failure to shutdown. - * - ****************************************************************************/ - -#ifdef CONFIG_BOARDCTL_POWEROFF -int board_power_off(int status) -{ - struct spi_dev_s *spi = calypso_spibus_initialize(0); - uint16_t tx; - - SPI_SETBITS(spi, 16); - (void)SPI_HWFEATURES(spi, 0); - - tx = (1 << 6) | (1 << 1); - SPI_SNDBLOCK(spi, &tx, 1); - - tx = (1 << 6) | (30 << 1); - SPI_SNDBLOCK(spi, &tx, 1); - - return 0; -} -#endif diff --git a/arch/arm/src/calypso/calypso_serial.c b/arch/arm/src/calypso/calypso_serial.c deleted file mode 100644 index 0c4a44c0c14..00000000000 --- a/arch/arm/src/calypso/calypso_serial.c +++ /dev/null @@ -1,968 +0,0 @@ -/**************************************************************************** - * arch/arm/src/calypso/calypso_serial.c - * - * Copyright (C) 2011 Stefan Richter. All rights reserved. - * Author: Stefan Richter - * - * based on c5471/c5471_serial.c - * Copyright (C) 2007-2009, 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 -#include -#include -#include - -#include -#include -#include -#include - -#include "chip.h" -#include "up_arch.h" -#include "up_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define BASE_BAUD 115200 - -#if defined(CONFIG_UART_IRDA_HWFLOWCONTROL) || defined(CONFIG_UART_MODEM_HWFLOWCONTROL) -# define CONFIG_UART_HWFLOWCONTROL -#endif - -#if UART_FCR_OFFS == UART_EFR_OFFS -# define UART_MULTIPLEX_REGS - -/* HW flow control not supported yet */ - -# undef CONFIG_UART_HWFLOWCONTROL -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -struct uart_regs_s -{ - uint32_t ier; - uint32_t lcr; - uint32_t fcr; -#ifdef CONFIG_UART_HWFLOWCONTROL - uint32_t efr; - uint32_t tcr; -#endif -}; - -struct up_dev_s -{ - unsigned int uartbase; /* Base address of UART registers */ - unsigned int baud_base; /* Base baud for conversions */ - unsigned int baud; /* Configured baud */ - uint8_t xmit_fifo_size; /* Size of transmit FIFO */ - uint8_t irq; /* IRQ associated with this UART */ - uint8_t parity; /* 0=none, 1=odd, 2=even */ - uint8_t bits; /* Number of bits (7 or 8) */ -#ifdef CONFIG_UART_HWFLOWCONTROL - bool flowcontrol; /* true: Hardware flow control - * is enabled. */ -#endif - bool stopbits2; /* true: Configure with 2 - * stop bits instead of 1 */ - struct uart_regs_s regs; /* Shadow copy of readonly regs */ - -#ifdef CONFIG_SERCOMM_CONSOLE - bool sercomm; /* Call sercomm in interrupt if true */ -#endif -}; - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -static int up_setup(struct uart_dev_s *dev); -static void up_shutdown(struct uart_dev_s *dev); -static int up_attach(struct uart_dev_s *dev); -static void up_detach(struct uart_dev_s *dev); -static int up_interrupt(int irq, void *context); -static int up_ioctl(struct file *filep, int cmd, unsigned long arg); -static int up_receive(struct uart_dev_s *dev, unsigned int *status); -static void up_rxint(struct uart_dev_s *dev, bool enable); -static bool up_rxavailable(struct uart_dev_s *dev); -static void up_send(struct uart_dev_s *dev, int ch); -static void up_txint(struct uart_dev_s *dev, bool enable); -static bool up_txready(struct uart_dev_s *dev); -static bool up_txempty(struct uart_dev_s *dev); - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static const struct uart_ops_s g_uart_ops = -{ - .setup = up_setup, - .shutdown = up_shutdown, - .attach = up_attach, - .detach = up_detach, - .ioctl = up_ioctl, - .receive = up_receive, - .rxint = up_rxint, - .rxavailable = up_rxavailable, -#ifdef CONFIG_SERIAL_IFLOWCONTROL - .rxflowcontrol = NULL, -#endif - .send = up_send, - .txint = up_txint, - .txready = up_txready, - .txempty = up_txempty, -}; - -/* I/O buffers */ - -static char g_irdarxbuffer[CONFIG_UART_IRDA_RXBUFSIZE]; -static char g_irdatxbuffer[CONFIG_UART_IRDA_TXBUFSIZE]; -static char g_modemrxbuffer[CONFIG_UART_MODEM_RXBUFSIZE]; -static char g_modemtxbuffer[CONFIG_UART_MODEM_TXBUFSIZE]; - -/* This describes the state of the C5471 serial IRDA port. */ - -static struct up_dev_s g_irdapriv = -{ - .xmit_fifo_size = UART_IRDA_XMIT_FIFO_SIZE, - .baud_base = BASE_BAUD, - .uartbase = UART_IRDA_BASE, - .baud = CONFIG_UART_IRDA_BAUD, - .irq = UART_IRQ_IRDA, - .parity = CONFIG_UART_IRDA_PARITY, - .bits = CONFIG_UART_IRDA_BITS, -#ifdef CONFIG_UART_IRDA_HWFLOWCONTROL - .flowcontrol = true, -#endif - .stopbits2 = CONFIG_UART_IRDA_2STOP, - -#ifdef CONFIG_SERCOMM_CONSOLE - .sercomm = false, -#endif -}; - -static uart_dev_t g_irdaport = -{ - .recv = - { - .size = CONFIG_UART_IRDA_RXBUFSIZE, - .buffer = g_irdarxbuffer, - }, - .xmit = - { - .size = CONFIG_UART_IRDA_TXBUFSIZE, - .buffer = g_irdatxbuffer, - }, - .ops = &g_uart_ops, - .priv = &g_irdapriv, -}; - -/* This describes the state of the C5471 serial Modem port. */ - -static struct up_dev_s g_modempriv = -{ - .xmit_fifo_size = UART_XMIT_FIFO_SIZE, - .baud_base = BASE_BAUD, - .uartbase = UART_MODEM_BASE, - .baud = CONFIG_UART_MODEM_BAUD, - .irq = UART_IRQ_MODEM, - .parity = CONFIG_UART_MODEM_PARITY, - .bits = CONFIG_UART_MODEM_BITS, -#ifdef CONFIG_UART_MODEM_HWFLOWCONTROL - .flowcontrol = true, -#endif - .stopbits2 = CONFIG_UART_MODEM_2STOP, - -#ifdef CONFIG_SERCOMM_CONSOLE - .sercomm = false, -#endif -}; - -static uart_dev_t g_modemport = -{ - .recv = - { - .size = CONFIG_UART_MODEM_RXBUFSIZE, - .buffer = g_modemrxbuffer, - }, - .xmit = - { - .size = CONFIG_UART_MODEM_TXBUFSIZE, - .buffer = g_modemtxbuffer, - }, - .ops = &g_uart_ops, - .priv = &g_modempriv, -}; - -/* Now, which one with be tty0/console and which tty1? */ - -#ifdef CONFIG_SERIAL_IRDA_CONSOLE -# define CONSOLE_DEV g_irdaport -# define TTYS0_DEV g_irdaport -# define TTYS1_DEV g_modemport -#else -# define CONSOLE_DEV g_modemport -# define TTYS0_DEV g_modemport -# define TTYS1_DEV g_irdaport -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_inserial - ****************************************************************************/ - -static inline uint32_t up_inserial(struct up_dev_s *priv, uint32_t offset) -{ -#if UART_REGISTER_BITS == 8 - return getreg8(priv->uartbase + offset); -#elif UART_REGISTER_BITS == 32 - return getreg32(priv->uartbase + offset); -#else -#error Unsupported number of bits set in UART_REGISTER_BITS -#endif -} - -/**************************************************************************** - * Name: up_serialout - ****************************************************************************/ - -static inline void up_serialout(struct up_dev_s *priv, uint32_t offset, uint32_t value) -{ -#if UART_REGISTER_BITS == 8 - putreg8(value & 0xff, priv->uartbase + offset); -#elif UART_REGISTER_BITS == 32 - putreg32(value, priv->uartbase + offset); -#endif -} - -/**************************************************************************** - * Name: up_disableuartint - ****************************************************************************/ - -static inline void up_disableuartint(struct up_dev_s *priv, uint16_t *ier) -{ - if (ier) - { - *ier = priv->regs.ier & UART_IER_INTMASK; - } - priv->regs.ier &= ~UART_IER_INTMASK; - up_serialout(priv, UART_IER_OFFS, priv->regs.ier); -} - -/**************************************************************************** - * Name: up_restoreuartint - ****************************************************************************/ - -static inline void up_restoreuartint(struct up_dev_s *priv, uint16_t ier) -{ - priv->regs.ier |= ier & (UART_IER_RECVINT | UART_IER_XMITINT); - up_serialout(priv, UART_IER_OFFS, priv->regs.ier); -} - -/**************************************************************************** - * Name: up_waittxready - ****************************************************************************/ - -static inline void up_waittxready(struct up_dev_s *priv) -{ - int tmp; - - for (tmp = 1000 ; tmp > 0 ; tmp--) - { - if ((up_inserial(priv, UART_SSR_OFFS) & UART_SSR_TXFULL) == 0) - { - break; - } - } -} -/**************************************************************************** - * Name: up_disablebreaks - ****************************************************************************/ - -static inline void up_disablebreaks(struct up_dev_s *priv) -{ - priv->regs.lcr &= ~UART_LCR_BOC; - up_serialout(priv, UART_LCR_OFFS, priv->regs.lcr); -} - -/**************************************************************************** - * Name: up_enablebreaks - ****************************************************************************/ - -static inline void up_enablebreaks(struct up_dev_s *priv) -{ - priv->regs.lcr |= UART_LCR_BOC; - up_serialout(priv, UART_LCR_OFFS, priv->regs.lcr); -} - -/**************************************************************************** - * Name: up_setrate - ****************************************************************************/ - -static inline void up_setrate(struct up_dev_s *priv, unsigned int rate) -{ - uint32_t div_bit_rate; - - switch (rate) - { - case 115200: - div_bit_rate = BAUD_115200; - break; - case 57600: - div_bit_rate = BAUD_57600; - break; - case 38400: - div_bit_rate = BAUD_38400; - break; - case 19200: - div_bit_rate = BAUD_19200; - break; - case 4800: - div_bit_rate = BAUD_4800; - break; - case 2400: - div_bit_rate = BAUD_2400; - break; - case 1200: - div_bit_rate = BAUD_1200; - break; - case 9600: - default: - div_bit_rate = BAUD_9600; - break; - } - -#ifdef UART_DIV_BIT_RATE_OFFS - up_serialout(priv, UART_DIV_BIT_RATE_OFFS, div_bit_rate); -#else - up_serialout(priv, UART_DIV_LOW_OFFS, div_bit_rate); - up_serialout(priv, UART_DIV_HIGH_OFFS, div_bit_rate >> 8); -#endif -} - -/**************************************************************************** - * Name: up_setup - * - * Description: - * Configure the UART baud, bits, parity, fifos, etc. This - * method is called the first time that the serial port is - * opened. - * - ****************************************************************************/ -#include -static int up_setup(struct uart_dev_s *dev) -{ -#ifndef CONFIG_SUPPRESS_UART_CONFIG - struct up_dev_s *priv = dev->priv; - unsigned int cval; - - if (priv->bits == 7) - { - cval = UART_LCR_7BITS; - } - else - { - cval = UART_LCR_8BITS; - } - - if (priv->stopbits2) - { - cval |= UART_LCR_2STOP; - } - - if (priv->parity == 1) /* Odd parity */ - { - cval |= (UART_LCR_PAREN | UART_LCR_PARODD); - } - else if (priv->parity == 2) /* Even parity */ - { - cval |= (UART_LCR_PAREN | UART_LCR_PAREVEN); - } - - /* Both the IrDA and MODEM UARTs support RESET and UART mode. */ - - up_serialout(priv, UART_MDR_OFFS, MDR_RESET_MODE); - up_serialout(priv, UART_LCR_OFFS, 0xbf); - up_serialout(priv, UART_XON1_OFFS, 0x00); - up_serialout(priv, UART_XON2_OFFS, 0x00); - up_serialout(priv, UART_XOFF1_OFFS, 0x00); - up_serialout(priv, UART_XOFF2_OFFS, 0x00); - up_serialout(priv, UART_EFR_OFFS, 0x00); - up_serialout(priv, UART_LCR_OFFS, 0x00); - up_mdelay(5); - - up_serialout(priv, UART_MDR_OFFS, MDR_UART_MODE); - up_mdelay(5); - - priv->regs.ier = up_inserial(priv, UART_IER_OFFS); - priv->regs.lcr = up_inserial(priv, UART_LCR_OFFS); -#ifdef CONFIG_UART_HWFLOWCONTROL - if (priv->flowcontrol) - { - priv->regs.efr = up_inserial(priv, UART_EFR_OFFS); - priv->regs.tcr = up_inserial(priv, UART_TCR_OFFS); - } -#endif - - up_disableuartint(priv, NULL); - -#ifdef UART_MULTIPLEX_REGS - up_serialout(priv, UART_LCR_OFFS, 0x00bf); -#endif - - up_serialout(priv, UART_EFR_OFFS, 0x0010); /* Unprotect enhanced control */ - -#ifdef UART_MULTIPLEX_REGS - priv->regs.lcr = 0x80; - up_serialout(priv, UART_LCR_OFFS, priv->regs.lcr); - //up_serialout(priv, UART_MCR_OFFS, 1 << 4); /* loopback */ -#endif - - up_serialout(priv, UART_TFCR_OFFS, 0); /* Reset to 0 */ - up_serialout(priv, UART_RFCR_OFFS, UART_FCR_RX_CLR); /* Clear RX fifo */ - up_serialout(priv, UART_TFCR_OFFS, UART_FCR_TX_CLR); /* Clear TX fifo */ - priv->regs.fcr = UART_FCR_FIFO_EN; - up_serialout(priv, UART_TFCR_OFFS, priv->regs.fcr); /* Enable RX/TX fifos */ - - up_disablebreaks(priv); - - /* Set the RX and TX trigger levels to the minimum */ - - priv->regs.fcr = (priv->regs.fcr & 0xffffff0f) | UART_FCR_FTL; - up_serialout(priv, UART_RFCR_OFFS, priv->regs.fcr); - - up_setrate(priv, priv->baud); - -#ifdef UART_MULTIPLEX_REGS - up_serialout(priv, UART_SCR_OFFS, 1); /* Disable DMA */ - priv->regs.lcr = (uint32_t)cval; /* Configure mode, return to THR/RHR */ -#else - priv->regs.lcr &= 0xffffffe0; /* clear original field, and... */ - priv->regs.lcr |= (uint32_t)cval; /* Set new bits in that field. */ -#endif - up_serialout(priv, UART_LCR_OFFS, priv->regs.lcr); - -#ifdef CONFIG_UART_HWFLOWCONTROL - if (priv->flowcontrol) - { - /* Set the FIFO level triggers for flow control - * Halt = 48 bytes, resume = 12 bytes - */ - - priv->regs.tcr = (priv->regs.tcr & 0xffffff00) | 0x0000003c; - up_serialout(priv, UART_TCR_OFFS, priv->regs.tcr); - - /* Enable RTS/CTS flow control */ - - priv->regs.efr |= 0x000000c0; - up_serialout(priv, UART_EFR_OFFS, priv->regs.efr); - } - else - { - /* Disable RTS/CTS flow control */ - - priv->regs.efr &= 0xffffff3f; - up_serialout(priv, UART_EFR_OFFS, priv->regs.efr); - } -#endif -#endif - return OK; -} - -/**************************************************************************** - * Name: up_shutdown - * - * Description: - * Disable the UART. This method is called when the serial port is closed - * - ****************************************************************************/ - -static void up_shutdown(struct uart_dev_s *dev) -{ - struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; - up_disableuartint(priv, NULL); -} - -/**************************************************************************** - * Name: up_attach - * - * Description: - * Configure the UART to operation in interrupt driven mode. This method is - * called when the serial port is opened. Normally, this is just after the - * the setup() method is called, however, the serial console may operate in - * a non-interrupt driven mode during the boot phase. - * - * RX and TX interrupts are not enabled when by the attach method (unless the - * hardware supports multiple levels of interrupt enabling). The RX and TX - * interrupts are not enabled until the txint() and rxint() methods are called. - * - ****************************************************************************/ - -static int up_attach(struct uart_dev_s *dev) -{ - struct up_dev_s *priv = (struct up_dev_s *)dev->priv; - int ret; - - /* Attach and enable the IRQ */ - - ret = irq_attach(priv->irq, up_interrupt); - if (ret == OK) - { - /* Enable the interrupt (RX and TX interrupts are still disabled - * in the UART - */ - - up_enable_irq(priv->irq); - } - - return ret; -} - -/**************************************************************************** - * Name: up_detach - * - * Description: - * Detach UART interrupts. This method is called when the serial port is - * closed normally just before the shutdown method is called. The exception is - * the serial console which is never shutdown. - * - ****************************************************************************/ - -static void up_detach(struct uart_dev_s *dev) -{ - struct up_dev_s *priv = (struct up_dev_s *)dev->priv; - up_disable_irq(priv->irq); - irq_detach(priv->irq); -} - -/**************************************************************************** - * Name: up_interrupt - * - * Description: - * This is the UART interrupt handler. It will be invoked - * when an interrupt received on the 'irq' It should call - * uart_transmitchars or uart_receivechar to perform the - * appropriate data transfers. The interrupt handling logic\ - * must be able to map the 'irq' number into the approprite - * uart_dev_s structure in order to call these functions. - * - ****************************************************************************/ - -static int up_interrupt(int irq, void *context) -{ - struct uart_dev_s *dev = NULL; - struct up_dev_s *priv; - volatile uint32_t cause; - - if (g_irdapriv.irq == irq) - { - dev = &g_irdaport; - } - else if (g_modempriv.irq == irq) - { - dev = &g_modemport; - } - else - { - PANIC(); - } - priv = (struct up_dev_s *)dev->priv; - - cause = up_inserial(priv, UART_ISR_OFFS) & 0x0000003f; - - if ((cause & 0x0000000c) == 0x0000000c) - { - uint32_t ier_val = 0; - - /* Is this an interrupt from the IrDA UART? */ - - if (irq == UART_IRQ_IRDA) - { - /* Save the currently enabled IrDA UART interrupts - * so that we can restore the IrDA interrupt state - * below. - */ - - ier_val = up_inserial(priv, UART_IER_OFFS); - - /* Then disable all IrDA UART interrupts */ - - up_serialout(priv, UART_IER_OFFS, 0); - } - - /* Receive characters from the RX fifo */ - -#ifdef CONFIG_SERCOMM_CONSOLE - if (priv->sercomm) - { - sercomm_recvchars(dev); - } - else -#endif - { - uart_recvchars(dev); - } - - /* read UART_RHR to clear int condition - * toss = up_inserialchar(priv,&status); - */ - - /* Is this an interrupt from the IrDA UART? */ - - if (irq == UART_IRQ_IRDA) - { - /* Restore the IrDA UART interrupt enables */ - - up_serialout(priv, UART_IER_OFFS, ier_val); - } - } - else if ((cause & 0x0000000c) == 0x00000004) - { -#ifdef CONFIG_SERCOMM_CONSOLE - if (priv->sercomm) - { - sercomm_recvchars(dev); - } - else -#endif - { - uart_recvchars(dev); - } - } - - if ((cause & 0x00000002) != 0) - { -#ifdef CONFIG_SERCOMM_CONSOLE - if (priv->sercomm) - { - sercomm_xmitchars(dev); - } - else -#endif - { - uart_xmitchars(dev); - } - } - - return OK; -} - -/**************************************************************************** - * Name: up_ioctl - * - * Description: - * All ioctl calls will be routed through this method - * - ****************************************************************************/ - -static int up_ioctl(struct file *filep, int cmd, unsigned long arg) -{ - struct inode *inode = filep->f_inode; - struct uart_dev_s *dev = inode->i_private; - struct up_dev_s *priv = (struct up_dev_s *)dev->priv; - int ret = OK; - - switch (cmd) - { -#ifdef CONFIG_SERIAL_TIOCSERGSTRUCT - case TIOCSERGSTRUCT: - { - struct up_dev_s *user = (struct up_dev_s *)arg; - if (!user) - { - ret = -EINVAL; - } - else - { - memcpy(user, dev, sizeof(struct up_dev_s)); - } - } - break; -#endif - - case TIOCSBRK: /* BSD compatibility: Turn break on, unconditionally */ - { - irqstate_t flags = enter_critical_section(); - up_enablebreaks(priv); - leave_critical_section(flags); - } - break; - - case TIOCCBRK: /* BSD compatibility: Turn break off, unconditionally */ - { - irqstate_t flags; - flags = enter_critical_section(); - up_disablebreaks(priv); - leave_critical_section(flags); - } - break; - - default: - ret = -ENOTTY; - break; - } - - return ret; -} - -/**************************************************************************** - * Name: up_receive - * - * Description: - * Called (usually) from the interrupt level to receive one character from - * the UART. Error bits associated with the receipt are provided in the - * the return 'status'. - * - ****************************************************************************/ - -static int up_receive(struct uart_dev_s *dev, unsigned int *status) -{ - struct up_dev_s *priv = (struct up_dev_s *)dev->priv; - uint32_t rhr; - uint32_t lsr; - - /* Construct a 16bit status word that uses the high byte to - * hold the status bits associated with framing,parity,break - * and a low byte that holds error bits of LSR for - * conditions such as overflow, etc. - */ - - rhr = up_inserial(priv, UART_RHR_OFFS); - lsr = up_inserial(priv, UART_LSR_OFFS); - - *status = (unsigned int)((rhr & 0x0000ff00) | (lsr & 0x000000ff)); - - return rhr & 0x000000ff; -} - -/**************************************************************************** - * Name: up_rxint - * - * Description: - * Call to enable or disable RX interrupts - * - ****************************************************************************/ - -static void up_rxint(struct uart_dev_s *dev, bool enable) -{ - struct up_dev_s *priv = (struct up_dev_s *)dev->priv; - if (enable) - { -#ifndef CONFIG_SUPPRESS_SERIAL_INTS - priv->regs.ier |= UART_IER_RECVINT; - up_serialout(priv, UART_IER_OFFS, priv->regs.ier); -#endif - } - else - { - priv->regs.ier &= ~UART_IER_RECVINT; - up_serialout(priv, UART_IER_OFFS, priv->regs.ier); - } -} - -/**************************************************************************** - * Name: up_rxavailable - * - * Description: - * Return true if the receive fifo is not empty - * - ****************************************************************************/ - -static bool up_rxavailable(struct uart_dev_s *dev) -{ - struct up_dev_s *priv = (struct up_dev_s *)dev->priv; - return up_inserial(priv, UART_LSR_OFFS) & UART_RX_FIFO_NOEMPTY; -} - -/**************************************************************************** - * Name: up_send - * - * Description: - * This method will send one byte on the UART - * - ****************************************************************************/ - -static void up_send(struct uart_dev_s *dev, int ch) -{ - struct up_dev_s *priv = (struct up_dev_s *)dev->priv; - up_serialout(priv, UART_THR_OFFS, (uint8_t)ch); -} - -/**************************************************************************** - * Name: up_txint - * - * Description: - * Call to enable or disable TX interrupts - * - ****************************************************************************/ - -static void up_txint(struct uart_dev_s *dev, bool enable) -{ - struct up_dev_s *priv = (struct up_dev_s *)dev->priv; - if (enable) - { -#ifndef CONFIG_SUPPRESS_SERIAL_INTS - priv->regs.ier |= UART_IER_XMITINT; - up_serialout(priv, UART_IER_OFFS, priv->regs.ier); -#endif - } - else - { - priv->regs.ier &= ~UART_IER_XMITINT; - up_serialout(priv, UART_IER_OFFS, priv->regs.ier); - } -} - -/**************************************************************************** - * Name: up_txready - * - * Description: - * Return true if the tranmsit fifo is not full - * - ****************************************************************************/ - -static bool up_txready(struct uart_dev_s *dev) -{ - struct up_dev_s *priv = (struct up_dev_s *)dev->priv; - return (up_inserial(priv, UART_SSR_OFFS) & UART_SSR_TXFULL) == 0; -} - -/**************************************************************************** - * Name: up_txempty - * - * Description: - * Return true if the transmit fifo is empty - * - ****************************************************************************/ - -static bool up_txempty(struct uart_dev_s *dev) -{ - struct up_dev_s *priv = (struct up_dev_s *)dev->priv; - return (up_inserial(priv, UART_LSR_OFFS) & UART_LSR_TREF) != 0; -} - -/**************************************************************************** - * Public Funtions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_earlyserialinit - * - * Description: - * Performs the low level UART initialization early in - * debug so that the serial console will be available - * during bootup. This must be called before up_serialinit. - * - ****************************************************************************/ - -void up_earlyserialinit(void) -{ - up_disableuartint(TTYS0_DEV.priv, NULL); - up_disableuartint(TTYS1_DEV.priv, NULL); - - CONSOLE_DEV.isconsole = true; - up_setup(&CONSOLE_DEV); -} - -/**************************************************************************** - * Name: up_serialinit - * - * Description: - * Register serial console and serial ports. This assumes - * that up_earlyserialinit was called previously. - * - ****************************************************************************/ - -void up_serialinit(void) -{ -#ifdef CONFIG_SERCOMM_CONSOLE - ((struct up_dev_s *)TTYS0_DEV.priv)->sercomm = true; - (void)sercomm_register("/dev/console", &TTYS0_DEV); - (void)uart_register("/dev/ttyS0", &TTYS1_DEV); -#else - (void)uart_register("/dev/console", &CONSOLE_DEV); - (void)uart_register("/dev/ttyS0", &TTYS0_DEV); - (void)uart_register("/dev/ttyS1", &TTYS1_DEV); -#endif -} - -/**************************************************************************** - * Name: up_putc - * - * Description: - * Provide priority, low-level access to support OS debug - * writes - * - ****************************************************************************/ - -int up_putc(int ch) -{ - struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; - uint16_t ier; - - up_disableuartint(priv, &ier); - up_waittxready(priv); - up_serialout(priv, UART_THR_OFFS, (uint8_t)ch); - - /* Check for LF */ - - if (ch == '\n') - { - /* Add CR */ - - up_waittxready(priv); - up_serialout(priv, UART_THR_OFFS, '\r'); - } - - up_waittxready(priv); - up_restoreuartint(priv, ier); - return ch; -} - diff --git a/arch/arm/src/calypso/calypso_spi.c b/arch/arm/src/calypso/calypso_spi.c deleted file mode 100644 index 36727927c43..00000000000 --- a/arch/arm/src/calypso/calypso_spi.c +++ /dev/null @@ -1,314 +0,0 @@ -/**************************************************************************** - * arch/arm/src/calypso/calypso_spi.c - * SPI driver for TI Calypso - * - * Copyright (C) 2010 Harald Welte - * Copyright (C) 2011 Stefan Richter - * - * Part of this source code is derivated from Osmocom-BB project and was - * relicensed as BSD with permission from original authors. - * - * 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 -#include - -#include -#include -#include -#include -#include - -#include "up_arch.h" -#include "calypso_spi.h" - -#warning "MOST OF SPI API IS INCOMPLETE! (Wrapper around Osmocom driver)" -extern void spi_init(void); -extern int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din); - -#ifndef CONFIG_SPI_EXCHANGE -#error "Calypso HW only supports exchange. Enable CONFIG_SPI_EXCHANGE!" -#endif - -struct calypso_spidev_s -{ - struct spi_dev_s spidev; /* External driver interface */ - int nbits; /* Number of transfered bits */ - sem_t exclsem; /* Supports mutually exclusive access */ -}; - -static int spi_lock(FAR struct spi_dev_s *dev, bool lock) -{ - struct calypso_spidev_s *priv = (struct calypso_spidev_s *)dev; - - if (lock) - { - /* Take the semaphore (perhaps waiting) */ - - while (sem_wait(&priv->exclsem) != 0) - { - /* The only case that an error should occur here is if the wait - * was awakened by a signal. - */ - - DEBUGASSERT(errno == EINTR); - } - } - else - { - (void)sem_post(&priv->exclsem); - } - - return OK; -} - -/* STUBS! */ - -static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, - bool selected) -{ -} - -static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency) -{ - return frequency; -} - -static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode) -{ -} - -/* Osmocom wrapper */ - -static void spi_setbits(FAR struct spi_dev_s *dev, int nbits) -{ - ((FAR struct calypso_spidev_s *)dev)->nbits = nbits; -} - -static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, - FAR void *rxbuffer, size_t nwords) -{ - FAR struct calypso_spidev_s *priv = (FAR struct calypso_spidev_s *)dev; - size_t i; - - for (i = 0; i < nwords; i++) - { - spi_xfer(0, priv->nbits, txbuffer + i, rxbuffer + i); - } -} - -static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd) -{ - uint16_t buf = wd; - spi_exchange(dev, &buf, &buf, 1); - return buf; -} - -static const struct spi_ops_s g_spiops = -{ - .lock = spi_lock, - .select = spi_select, - .setfrequency = spi_setfrequency, - .setmode = spi_setmode, - .setbits = spi_setbits, -#ifdef CONFIG_SPI_HWFEATURES - .hwfeatures = 0, -#endif - .status = 0, -#ifdef CONFIG_SPI_CMDDATA - .cmddata = 0, -#endif - .send = spi_send, -#ifdef CONFIG_SPI_EXCHANGE - .exchange = spi_exchange, -#else - .sndblock = spi_sndblock, - .recvblock = spi_recvblock, -#endif - .registercallback = 0, -}; - -static struct calypso_spidev_s g_spidev = -{ - .spidev = { &g_spiops }, - .nbits = 0, - .exclsem = SEM_INITIALIZER(1) -}; - -void spi_init(void) -{ - putreg16(SPI_SET1_EN_CLK | SPI_SET1_WR_IRQ_DIS | SPI_SET1_RDWR_IRQ_DIS, - SPI_REG(REG_SET1)); - - putreg16(0x0001, SPI_REG(REG_SET2)); -} - -int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din) -{ - uint8_t bytes_per_xfer; - uint8_t reg_status, reg_ctrl = 0; - uint32_t tmp; - - if (bitlen == 0) - { - return 0; - } - - if (bitlen > 32) - { - return -1; - } - - if (dev_idx > 4) - { - return -1; - } - - bytes_per_xfer = bitlen / 8; - if (bitlen % 8) - { - bytes_per_xfer ++; - } - - reg_ctrl |= (bitlen - 1) << SPI_CTRL_NB_SHIFT; - reg_ctrl |= (dev_idx & 0x7) << SPI_CTRL_AD_SHIFT; - - if (bitlen <= 8) - { - tmp = *(uint8_t *)dout; - tmp <<= 24 + (8-bitlen); /* align to MSB */ - } - else if (bitlen <= 16) - { - tmp = *(uint16_t *)dout; - tmp <<= 16 + (16-bitlen); /* align to MSB */ - } - else - { - tmp = *(uint32_t *)dout; - tmp <<= (32-bitlen); /* align to MSB */ - } - - spiinfo("spi_xfer(dev_idx=%u, bitlen=%u, data_out=0x%08x): ", - dev_idx, bitlen, tmp); - - /* fill transmit registers */ - - putreg16(tmp >> 16, SPI_REG(REG_TX_MSB)); - putreg16(tmp & 0xffff, SPI_REG(REG_TX_LSB)); - - /* initiate transfer */ - - if (din) - { - reg_ctrl |= SPI_CTRL_RDWR; - } - else - { - reg_ctrl |= SPI_CTRL_WR; - } - - putreg16(reg_ctrl, SPI_REG(REG_CTRL)); - spiinfo("reg_ctrl=0x%04x ", reg_ctrl); - - /* wait until the transfer is complete */ - - while (1) - { - reg_status = getreg16(SPI_REG(REG_STATUS)); - spiinfo("status=0x%04x ", reg_status); - if (din && (reg_status & SPI_STATUS_RE)) - { - break; - } - else if (reg_status & SPI_STATUS_WE) - { - break; - } - } - - /* FIXME: calibrate how much delay we really need (seven 13MHz cycles) */ - - usleep(1000); - - if (din) - { - tmp = getreg16(SPI_REG(REG_RX_MSB)) << 16; - tmp |= getreg16(SPI_REG(REG_RX_LSB)); - spiinfo("data_in=0x%08x ", tmp); - - if (bitlen <= 8) - { - *(uint8_t *)din = tmp & 0xff; - } - else if (bitlen <= 16) - { - *(uint16_t *)din = tmp & 0xffff; - } - else - { - *(uint32_t *)din = tmp; - } - } - - spiinfo("\n"); - - return 0; -} - -/**************************************************************************** - * Name: calypso_spibus_initialize - * - * Description: - * Initialize the selected SPI port - * - * Input Parameter: - * Port number (for hardware that has mutiple SPI interfaces) - * - * Returned Value: - * Valid SPI device structure reference on succcess; a NULL on failure - * - ****************************************************************************/ - -FAR struct spi_dev_s *calypso_spibus_initialize(int port) -{ - switch (port) - { - case 0: /* SPI master device */ - spi_init(); - return (FAR struct spi_dev_s *)&g_spidev; - - case 1: /* uWire device */ - return NULL; - - default: - return NULL; - } -} diff --git a/arch/arm/src/calypso/calypso_spi.h b/arch/arm/src/calypso/calypso_spi.h deleted file mode 100644 index 70ca2ad9d0a..00000000000 --- a/arch/arm/src/calypso/calypso_spi.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef ___ARCH_ARM_SRC_CALYPSO_CALYPSO_SPI_H -#define ___ARCH_ARM_SRC_CALYPSO_CALYPSO_SPI_H - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define BASE_ADDR_SPI 0xfffe3000 -#define SPI_REG(n) (BASE_ADDR_SPI+(n)) - -#define SPI_SET1_EN_CLK (1 << 0) -#define SPI_SET1_WR_IRQ_DIS (1 << 4) -#define SPI_SET1_RDWR_IRQ_DIS (1 << 5) - -#define SPI_CTRL_RDWR (1 << 0) -#define SPI_CTRL_WR (1 << 1) -#define SPI_CTRL_NB_SHIFT 2 -#define SPI_CTRL_AD_SHIFT 7 - -#define SPI_STATUS_RE (1 << 0) /* Read End */ -#define SPI_STATUS_WE (1 << 1) /* Write End */ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -enum spi_regs -{ - REG_SET1 = 0x00, - REG_SET2 = 0x02, - REG_CTRL = 0x04, - REG_STATUS = 0x06, - REG_TX_LSB = 0x08, - REG_TX_MSB = 0x0a, - REG_RX_LSB = 0x0c, - REG_RX_MSB = 0x0e, -}; - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Name: calypso_spibus_initialize - * - * Description: - * Initialize the selected SPI port - * - * Input Parameter: - * Port number (for hardware that has mutiple SPI interfaces) - * - * Returned Value: - * Valid SPI device structure reference on succcess; a NULL on failure - * - ****************************************************************************/ - -FAR struct spi_dev_s *calypso_spibus_initialize(int port); - -#endif /* ___ARCH_ARM_SRC_CALYPSO_CALYPSO_SPI_H */ diff --git a/arch/arm/src/calypso/calypso_timer.c b/arch/arm/src/calypso/calypso_timer.c deleted file mode 100644 index 86626c5de64..00000000000 --- a/arch/arm/src/calypso/calypso_timer.c +++ /dev/null @@ -1,227 +0,0 @@ -/**************************************************************************** - * arch/arm/src/calypso/calypso_timer.c - * Calypso DBB internal Timer Driver - * - * (C) 2010 by Harald Welte - * (C) 2011 by Stefan Richter - * - * This source code is derivated from Osmocom-BB project and was - * relicensed as BSD with permission from original authors. - * - * 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 -#include -#include - -#include -#include -#include - -#include "up_arch.h" - -#define BASE_ADDR_TIMER 0xfffe3800 -#define TIMER2_OFFSET 0x3000 - -#define TIMER_REG(n, m) (((n)-1) ? (BASE_ADDR_TIMER + TIMER2_OFFSET + (m)) : (BASE_ADDR_TIMER + (m))) - -enum timer_reg -{ - CNTL_TIMER = 0x00, - LOAD_TIMER = 0x02, - READ_TIMER = 0x04, -}; - -enum timer_ctl -{ - CNTL_START = (1 << 0), - CNTL_AUTO_RELOAD = (1 << 1), - CNTL_CLOCK_ENABLE = (1 << 5), -}; - -/* Regular Timers (1 and 2) */ - -void hwtimer_enable(int num, int on) -{ - uint8_t ctl; - - if (num < 1 || num > 2) - { - printf("Unknown timer %d\n", num); - return; - } - - ctl = getreg8(TIMER_REG(num, CNTL_TIMER)); - if (on) - { - ctl |= CNTL_START | CNTL_CLOCK_ENABLE; - } - else - { - ctl &= ~CNTL_START; - } - - putreg8(ctl, TIMER_REG(num, CNTL_TIMER)); -} - -void hwtimer_config(int num, uint8_t pre_scale, int auto_reload) -{ - uint8_t ctl; - - ctl = (pre_scale & 0x7) << 2; - if (auto_reload) - ctl |= CNTL_AUTO_RELOAD; - - putreg8(ctl, TIMER_REG(num, CNTL_TIMER)); -} - -void hwtimer_load(int num, uint16_t val) -{ - putreg16(val, TIMER_REG(num, LOAD_TIMER)); -} - -uint16_t hwtimer_read(int num) -{ - uint8_t ctl = getreg8(TIMER_REG(num, CNTL_TIMER)); - - /* Somehow a read results in an abort */ - - if ((ctl & (CNTL_START | CNTL_CLOCK_ENABLE)) != (CNTL_START | CNTL_CLOCK_ENABLE)) - { - return 0xffff; - } - - return getreg16(TIMER_REG(num, READ_TIMER)); -} - -/**************************************************************************** - * Watchdog Timer - ****************************************************************************/ - -#define BASE_ADDR_WDOG 0xfffff800 -#define WDOG_REG(m) (BASE_ADDR_WDOG + m) - -enum wdog_reg -{ - WD_CNTL_TIMER = CNTL_TIMER, - WD_LOAD_TIMER = LOAD_TIMER, - WD_READ_TIMER = 0x02, - WD_MODE = 0x04, -}; - -enum wdog_ctl -{ - WD_CTL_START = (1 << 7), - WD_CTL_AUTO_RELOAD = (1 << 8) -}; - -enum wdog_mode -{ - WD_MODE_DIS_ARM = 0xF5, - WD_MODE_DIS_CONFIRM = 0xA0, - WD_MODE_ENABLE = (1 << 15) -}; - -#define WD_CTL_PRESCALE(value) (((value)&0x07) << 9) - -static void wdog_irq(__unused enum irq_nr nr) -{ - puts("=> WATCHDOG\n"); -} - -void wdog_enable(int on) -{ - if (!on) - { - putreg16(WD_MODE_DIS_ARM, WDOG_REG(WD_MODE)); - putreg16(WD_MODE_DIS_CONFIRM, WDOG_REG(WD_MODE)); - } -} - -void wdog_reset(void) -{ - /* Enable watchdog */ - - putreg16(WD_MODE_ENABLE, WDOG_REG(WD_MODE)); - - /* Force expiration */ - - putreg16(0x0000, WDOG_REG(WD_LOAD_TIMER)); - putreg16(0x0000, WDOG_REG(WD_LOAD_TIMER)); -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Function: up_timerisr - * - * Description: - * The timer ISR will perform a variety of services for - * various portions of the systems. - * - ****************************************************************************/ - -int up_timerisr(int irq, uint32_t *regs) -{ - /* Process timer interrupt */ - - sched_process_timer(); - return 0; -} - -/**************************************************************************** - * Function: up_timer_initialize - * - * Description: - * Setup Calypso HW timer 2 to cause system ticks. - * - * This function is called during start-up to initialize - * the timer interrupt. - * - ****************************************************************************/ - -void up_timer_initialize(void) -{ - up_disable_irq(IRQ_SYSTIMER); - - /* The timer runs at 13MHz / 32, i.e. 406.25kHz */ - /* 4062 ticks until expiry yields 100Hz interrupt */ - - hwtimer_load(2, 4062); - hwtimer_config(2, 0, 1); - hwtimer_enable(2, 1); - - /* Attach and enable the timer interrupt */ - - irq_attach(IRQ_SYSTIMER, (xcpt_t)up_timerisr); - up_enable_irq(IRQ_SYSTIMER); -} diff --git a/arch/arm/src/calypso/calypso_uwire.c b/arch/arm/src/calypso/calypso_uwire.c deleted file mode 100644 index fe2c33b7cc1..00000000000 --- a/arch/arm/src/calypso/calypso_uwire.c +++ /dev/null @@ -1,161 +0,0 @@ -/**************************************************************************** - * arch/arm/src/calypso/calypso_uwire.c - * Driver for Calypso uWire Master Controller - * - * (C) 2010 by Sylvain Munaut - * - * This source code is derivated from Osmocom-BB project and was - * relicensed as BSD with permission from original authors. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#include "up_arch.h" - -#define BASE_ADDR_UWIRE 0xfffe4000 -#define UWIRE_REG(n) (BASE_ADDR_UWIRE+(n)) - -enum uwire_regs -{ - REG_DATA = 0x00, - REG_CSR = 0x02, - REG_SR1 = 0x04, - REG_SR2 = 0x06, - REG_SR3 = 0x08, -}; - -#define UWIRE_CSR_BITS_RD(n) (((n) & 0x1f) << 0) -#define UWIRE_CSR_BITS_WR(n) (((n) & 0x1f) << 5) -#define UWIRE_CSR_IDX(n) (((n) & 3) << 10) -#define UWIRE_CSR_CS_CMD (1 << 12) -#define UWIRE_CSR_START (1 << 13) -#define UWIRE_CSR_CSRB (1 << 14) -#define UWIRE_CSR_RDRB (1 << 15) - -#define UWIRE_CSn_EDGE_RD (1 << 0) /* 1=falling 0=rising */ -#define UWIRE_CSn_EDGE_WR (1 << 1) /* 1=falling 0=rising */ -#define UWIRE_CSn_CS_LVL (1 << 2) -#define UWIRE_CSn_FRQ_DIV2 (0 << 3) -#define UWIRE_CSn_FRQ_DIV4 (1 << 3) -#define UWIRE_CSn_FRQ_DIV8 (2 << 3) -#define UWIRE_CSn_CKH - -#define UWIRE_CSn_SHIFT(n) (((n) & 1) ? 6 : 0) -#define UWIRE_CSn_REG(n) (((n) & 2) ? REG_SR2 : REG_SR1) - -#define UWIRE_SR3_CLK_EN (1 << 0) -#define UWIRE_SR3_CLK_DIV2 (0 << 1) -#define UWIRE_SR3_CLK_DIV4 (1 << 1) -#define UWIRE_SR3_CLK_DIV7 (2 << 1) -#define UWIRE_SR3_CLK_DIV10 (3 << 1) - -static inline void _uwire_wait(int mask, int val) -{ - while ((getreg16(UWIRE_REG(REG_CSR)) & mask) != val); -} - -void uwire_init(void) -{ - putreg16(UWIRE_SR3_CLK_EN | UWIRE_SR3_CLK_DIV2, UWIRE_REG(REG_SR3)); - - /* FIXME only init CS0 for now */ - - putreg16(((UWIRE_CSn_CS_LVL | UWIRE_CSn_FRQ_DIV2) << UWIRE_CSn_SHIFT(0)), - UWIRE_REG(UWIRE_CSn_REG(0))); - putreg16(UWIRE_CSR_IDX(0) | UWIRE_CSR_CS_CMD, UWIRE_REG(REG_CSR)); - _uwire_wait(UWIRE_CSR_CSRB, 0); -} - -int uwire_xfer(int cs, int bitlen, const void *dout, void *din) -{ - uint16_t tmp = 0; - - if (bitlen <= 0 || bitlen > 16) - return -1; - - if (cs < 0 || cs > 4) - return -1; - - /* FIXME uwire_init always selects CS0 for now */ - - _info("uwire_xfer(dev_idx=%u, bitlen=%u\n", cs, bitlen); - - /* select the chip */ - - putreg16(UWIRE_CSR_IDX(0) | UWIRE_CSR_CS_CMD, UWIRE_REG(REG_CSR)); - _uwire_wait(UWIRE_CSR_CSRB, 0); - - if (dout) - { - if (bitlen <= 8) - tmp = *(uint8_t *)dout; - else if (bitlen <= 16) - tmp = *(uint16_t *)dout; - - tmp <<= 16 - bitlen; /* align to MSB */ - putreg16(tmp, UWIRE_REG(REG_DATA)); - _info(", data_out=0x%04hx", tmp); - } - - tmp = (dout ? UWIRE_CSR_BITS_WR(bitlen) : 0) | - (din ? UWIRE_CSR_BITS_RD(bitlen) : 0) | - UWIRE_CSR_START; - putreg16(tmp, UWIRE_REG(REG_CSR)); - _uwire_wait(UWIRE_CSR_CSRB, 0); - - if (din) - { - _uwire_wait(UWIRE_CSR_RDRB, UWIRE_CSR_RDRB); - - tmp = getreg16(UWIRE_REG(REG_DATA)); - _info(", data_in=0x%08x", tmp); - - if (bitlen <= 8) - *(uint8_t *)din = tmp & 0xff; - else if (bitlen <= 16) - *(uint16_t *)din = tmp & 0xffff; - } - - /* unselect the chip */ - - putreg16(UWIRE_CSR_IDX(0) | 0, UWIRE_REG(REG_CSR)); - _uwire_wait(UWIRE_CSR_CSRB, 0); - - _info(")\n"); - - return 0; -} diff --git a/arch/arm/src/calypso/chip.h b/arch/arm/src/calypso/chip.h deleted file mode 100644 index bea381cc385..00000000000 --- a/arch/arm/src/calypso/chip.h +++ /dev/null @@ -1,211 +0,0 @@ -/**************************************************************************** - * calypso/chip.h - * - * Copyright (C) 2011 Stefan Richter. All rights reserved. - * Author: Stefan Richter - * - * based on: c5471/chip.h - * Copyright (C) 2007 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 Gregory Nutt 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_CALYPSO_CHIP_H -#define __ARCH_ARM_SRC_CALYPSO_CHIP_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* UARTs ********************************************************************/ - -#define UART_IRDA_BASE 0xffff5000 -#define UART_MODEM_BASE 0xffff5800 -#define UART_UIR 0xffff6000 -#define UARTn_IO_RANGE 0x00000800 - -/* Common UART Registers. Expressed as offsets from the BASE address */ - -#define UART_RHR_OFFS 0x00000000 /* Rcv Holding Register */ -#define UART_THR_OFFS 0x00000000 /* Xmit Holding Register */ -#define UART_FCR_OFFS 0x00000002 /* FIFO Control Register */ -#define UART_RFCR_OFFS 0x00000002 /* Rcv FIFO Control Register */ -#define UART_TFCR_OFFS 0x00000002 /* Xmit FIFO Control Register */ -#define UART_SCR_OFFS 0x00000010 /* Status Control Register */ -#define UART_LCR_OFFS 0x00000003 /* Line Control Register */ -#define UART_LSR_OFFS 0x00000005 /* Line Status Register */ -#define UART_SSR_OFFS 0x00000011 /* Supplementary Status Register */ -#define UART_MCR_OFFS 0x00000004 /* Modem Control Register */ -#define UART_MSR_OFFS 0x00000006 /* Modem Status Register */ -#define UART_IER_OFFS 0x00000001 /* Interrupt Enable Register */ -#define UART_ISR_OFFS 0x00000002 /* Interrupt Status Register */ -#define UART_EFR_OFFS 0x00000002 /* Enhanced Feature Register */ -#define UART_XON1_OFFS 0x00000004 /* XON1 Character Register */ -#define UART_XON2_OFFS 0x00000005 /* XON2 Character Register */ -#define UART_XOFF1_OFFS 0x00000006 /* XOFF1 Character Register */ -#define UART_XOFF2_OFFS 0x00000007 /* XOFF2 Character Register */ -#define UART_SPR_OFFS 0x00000007 /* Scratch-pad Register */ -#define UART_DIV_LOW_OFFS 0x00000000 /* Divisor for baud generation */ -#define UART_DIV_HIGH_OFFS 0x00000001 -#define UART_TCR_OFFS 0x00000006 /* Transmission Control Register */ -#define UART_TLR_OFFS 0x00000007 /* Trigger Level Register */ -#define UART_MDR_OFFS 0x00000008 /* Mode Definition Register */ - -/* UART Settings ************************************************************/ - -/* Miscellaneous UART settings. */ - -#define UART_REGISTER_BITS 8 -#define UART_IRQ_MODEM IRQ_UART_MODEM -#define UART_IRQ_IRDA IRQ_UART_IRDA - -#define UART_RX_FIFO_NOEMPTY 0x00000001 -#define UART_SSR_TXFULL 0x00000001 -#define UART_LSR_TREF 0x00000020 - -#define UART_XMIT_FIFO_SIZE 64 -#define UART_IRDA_XMIT_FIFO_SIZE 64 - -/* UART_LCR Register */ - /* Bits 31-7: Reserved */ -#define UART_LCR_BOC 0x00000040 /* Bit 6: Break Control */ - /* Bit 5: Parity Type 2 */ -#define UART_LCR_PAREVEN 0x00000010 /* Bit 4: Parity Type 1 */ -#define UART_LCR_PARODD 0x00000000 -#define UART_LCR_PARMARK 0x00000010 -#define UART_LCR_PARSPACE 0x00000011 -#define UART_LCR_PAREN 0x00000008 /* Bit 3: Paity Enable */ -#define UART_LCR_PARDIS 0x00000000 -#define UART_LCR_2STOP 0x00000004 /* Bit 2: Number of stop bits */ -#define UART_LCR_1STOP 0x00000000 -#define UART_LCR_5BITS 0x00000000 /* Bits 0-1: Word-length */ -#define UART_LCR_6BITS 0x00000001 -#define UART_LCR_7BITS 0x00000002 -#define UART_LCR_8BITS 0x00000003 - -#define UART_FCR_FTL 0x000000f0 -#define UART_FCR_FIFO_EN 0x00000001 -#define UART_FCR_TX_CLR 0x00000002 -#define UART_FCR_RX_CLR 0x00000004 - -#define UART_IER_RECVINT 0x00000001 -#define UART_IER_XMITINT 0x00000002 -#define UART_IER_LINESTSINT 0x00000004 -#define UART_IER_MODEMSTSINT 0x00000008 /* IrDA UART only */ -#define UART_IER_XOFFINT 0x00000020 -#define UART_IER_RTSINT 0x00000040 /* IrDA UART only */ -#define UART_IER_CTSINT 0x00000080 /* IrDA UART only */ -#define UART_IER_INTMASK 0x000000ff - -#define BAUD_115200 0x00000007 -#define BAUD_57600 0x00000014 -#define BAUD_38400 0x00000021 -#define BAUD_19200 0x00000006 -#define BAUD_9600 0x0000000C -#define BAUD_4800 0x00000018 -#define BAUD_2400 0x00000030 -#define BAUD_1200 0x00000060 - -#define MDR_UART_MODE 0x00000000 /* Both IrDA and Modem UARTs */ -#define MDR_SIR_MODE 0x00000001 /* IrDA UART only */ -#define MDR_AUTOBAUDING_MODE 0x00000002 /* Modem UART only */ -#define MDR_RESET_MODE 0x00000007 /* Both IrDA and Modem UARTs */ - -/* SPI **********************************************************************/ - -#define MAX_SPI 3 - -#define SPI_REGISTER_BASE 0xffff2000 - -/* ARMIO ********************************************************************/ -/* Timers / Watchdog ********************************************************/ - -#define C5471_TIMER0_CTRL 0xffff2a00 -#define C5471_TIMER0_CNT 0xffff2a04 -#define C5471_TIMER1_CTRL 0xffff2b00 -#define C5471_TIMER1_CNT 0xffff2b04 -#define C5471_TIMER2_CTRL 0xffff2c00 -#define C5471_TIMER2_CNT 0xffff2c04 - -/* Interrupts ***************************************************************/ - -#define HAVE_SRC_IRQ_BIN_REG 0 - -#define INT_FIRST_IO 0xffff2d00 -#define INT_IO_RANGE 0x5C - -#define IT_REG 0xffff2d00 -#define MASK_IT_REG 0xffff2d04 -#define SRC_IRQ_REG 0xffff2d08 -#define SRC_FIQ_REG 0xffff2d0c -#define SRC_IRQ_BIN_REG 0xffff2d10 -#define INT_CTRL_REG 0xffff2d18 - -#define ILR_IRQ0_REG 0xffff2d1C /* 0-Timer 0 */ -#define ILR_IRQ1_REG 0xffff2d20 /* 1-Timer 1 */ -#define ILR_IRQ2_REG 0xffff2d24 /* 2-Timer 2 */ -#define ILR_IRQ3_REG 0xffff2d28 /* 3-GPIO0 */ -#define ILR_IRQ4_REG 0xffff2d2c /* 4-Ethernet */ -#define ILR_IRQ5_REG 0xffff2d30 /* 5-KBGPIO[7:0] */ -#define ILR_IRQ6_REG 0xffff2d34 /* 6-Uart serial */ -#define ILR_IRQ7_REG 0xffff2d38 /* 7-Uart IRDA */ -#define ILR_IRQ8_REG 0xffff2d3c /* 8-KBGPIO[15:8] */ -#define ILR_IRQ9_REG 0xffff2d40 /* 9-GPIO3 */ -#define ILR_IRQ10_REG 0xffff2d44 /* 10-GPIO2 */ -#define ILR_IRQ11_REG 0xffff2d48 /* 11-I2C */ -#define ILR_IRQ12_REG 0xffff2d4c /* 12-GPIO1 */ -#define ILR_IRQ13_REG 0xffff2d50 /* 13-SPI */ -#define ILR_IRQ14_REG 0xffff2d54 /* 14-GPIO[19:4] */ -#define ILR_IRQ15_REG 0xffff2d58 /* 15-API */ - -/* CLKM *********************************************************************/ - -#define CLKM 0xffff2f00 -#define CLKM_CTL_RST 0xffff2f10 -#define CLKM_RESET 0xffff2f18 - -#define CLKM_RESET_EIM 0x00000008 -#define CLKM_EIM_CLK_STOP 0x00000010 -#define CLKM_CTL_RST_LEAD_RESET 0x00000000 -#define CLKM_CTL_RST_EXT_RESET 0x00000002 - -/**************************************************************************** - * Inline Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#endif /* __ARCH_ARM_SRC_CALYPSO_CHIP_H */ diff --git a/arch/arm/src/calypso/clock.c b/arch/arm/src/calypso/clock.c deleted file mode 100644 index 29dc2f8273a..00000000000 --- a/arch/arm/src/calypso/clock.c +++ /dev/null @@ -1,230 +0,0 @@ -/**************************************************************************** - * arch/arm/src/calypso/clock.c - * Driver for Calypso clock management - * - * (C) 2010 by Harald Welte - * - * This source code is derivated from Osmocom-BB project and was - * relicensed as BSD with permission from original authors. - * - * 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 - -#include -#include - -//#define DEBUG -#include - -#include -#include - -#include "up_arch.h" - -#define REG_DPLL 0xffff9800 -#define DPLL_LOCK (1 << 0) -#define DPLL_BREAKLN (1 << 1) -#define DPLL_BYPASS_DIV_SHIFT 2 /* 2 bits */ -#define DPLL_PLL_ENABLE (1 << 4) -#define DPLL_PLL_DIV_SHIFT 5 /* 2 bits */ -#define DPLL_PLL_MULT_SHIFT 7 /* 5 bits */ -#define DPLL_TEST (1 << 12) -#define DPLL_IOB (1 << 13) /* Initialize on break */ -#define DPLL_IAI (1 << 14) /* Initialize after Idle */ - -#define BASE_ADDR_CLKM 0xfffffd00 -#define CLKM_REG(m) (BASE_ADDR_CLKM+(m)) - -enum clkm_reg -{ - CNTL_ARM_CLK = 0, - CNTL_CLK = 2, - CNTL_RST = 4, - CNTL_ARM_DIV = 8, -}; - -/* CNTL_ARM_CLK */ - -#define ARM_CLK_BIG_SLEEP (1 << 0) /* MCU Master Clock enabled? */ -#define ARM_CLK_CLKIN_SEL0 (1 << 1) /* MCU source clock (0 = DPLL output, 1 = VTCXO or CLKIN */ -#define ARM_CLK_CLKIN_SEL (1 << 2) /* 0 = VTCXO or 1 = CLKIN */ -#define ARM_CLK_MCLK_DIV5 (1 << 3) /* enable 1.5 or 2.5 division factor */ -#define ARM_CLK_MCLK_DIV_SHIFT 4 /* 3 bits */ -#define ARM_CLK_DEEP_POWER_SHIFT 8 -#define ARM_CLK_DEEP_SLEEP 12 - -/* CNTL_CLK */ -#define CLK_IRQ_CLK_DIS (1 << 0) /* IRQ clock control (0 always, 1 according ARM_MCLK_EN) */ -#define CLK_BRIDGE_CLK_DIS (1 << 1) -#define CLK_TIMER_CLK_DIS (1 << 2) -#define CLK_DPLL_DIS (1 << 3) /* 0: DPLL is not stopped during SLEEP */ -#define CLK_CLKOUT_EN (1 << 4) /* Enable CLKOUT output pins */ -#define CLK_EN_IDLE3_FLG (1 << 5) /* DSP idle flag control (1 = - * SAM/HOM register forced to HOM when DSP IDLE3) */ -#define CLK_VCLKOUT_DIV2 (1 << 6) /* 1: VCLKOUT-FR is divided by 2 */ -#define CLK_VTCXO_DIV2 (1 << 7) /* 1: VTCXO is dividied by 2 */ - -#define BASE_ADDR_MEMIF 0xfffffb00 -#define MEMIF_REG(x) (BASE_ADDR_MEMIF+(x)) - -enum memif_reg -{ - API_RHEA_CTL = 0x0e, - EXTRA_CONF = 0x10, -}; - -static void dump_reg16(uint32_t addr, char *name) -{ - printf("%s=0x%04x\n", name, getreg16(addr)); -} - -void calypso_clk_dump(void) -{ - dump_reg16(REG_DPLL, "REG_DPLL"); - dump_reg16(CLKM_REG(CNTL_ARM_CLK), "CNTL_ARM_CLK"); - dump_reg16(CLKM_REG(CNTL_CLK), "CNTL_CLK"); - dump_reg16(CLKM_REG(CNTL_RST), "CNTL_RST"); - dump_reg16(CLKM_REG(CNTL_ARM_DIV), "CNTL_ARM_DIV"); -} - -void calypso_pll_set(uint16_t inp) -{ - uint8_t mult = inp >> 8; - uint8_t div = inp & 0xff; - uint16_t reg = getreg16(REG_DPLL); - - reg &= ~0x0fe0; - reg |= (div & 0x3) << DPLL_PLL_DIV_SHIFT; - reg |= (mult & 0x1f) << DPLL_PLL_MULT_SHIFT; - reg |= DPLL_PLL_ENABLE; - - putreg16(reg, REG_DPLL); -} - -void calypso_reset_set(enum calypso_rst calypso_rst, int active) -{ - uint8_t reg = getreg8(CLKM_REG(CNTL_RST)); - - if (active) - reg |= calypso_rst; - else - reg &= ~calypso_rst; - - putreg8(reg, CLKM_REG(CNTL_RST)); -} - -int calypso_reset_get(enum calypso_rst calypso_rst) -{ - uint8_t reg = getreg8(CLKM_REG(CNTL_RST)); - - if (reg & calypso_rst) - return 1; - else - return 0; -} - -void calypso_clock_set(uint8_t vtcxo_div2, uint16_t inp, enum mclk_div mclk_div) -{ - uint16_t cntl_clock = getreg16(CLKM_REG(CNTL_CLK)); - uint16_t cntl_arm_clk = getreg16(CLKM_REG(CNTL_ARM_CLK)); - - /* First set the vtcxo_div2 */ - - cntl_clock &= ~CLK_VCLKOUT_DIV2; - if (vtcxo_div2) - cntl_clock |= CLK_VTCXO_DIV2; - else - cntl_clock &= ~CLK_VTCXO_DIV2; - - putreg16(cntl_clock, CLKM_REG(CNTL_CLK)); - - /* Then configure the MCLK divider */ - - cntl_arm_clk &= ~ARM_CLK_CLKIN_SEL0; - if (mclk_div & 0x80) - { - mclk_div &= ~0x80; - cntl_arm_clk |= ARM_CLK_MCLK_DIV5; - } - else - cntl_arm_clk &= ~ARM_CLK_MCLK_DIV5; - - cntl_arm_clk &= ~(0x7 << ARM_CLK_MCLK_DIV_SHIFT); - cntl_arm_clk |= (mclk_div << ARM_CLK_MCLK_DIV_SHIFT); - putreg16(cntl_arm_clk, CLKM_REG(CNTL_ARM_CLK)); - - /* Then finally set the PLL */ - - calypso_pll_set(inp); -} - -void calypso_mem_cfg(enum calypso_bank bank, uint8_t ws, - enum calypso_mem_width width, int we) -{ - putreg16((ws & 0x1f) | ((width & 3) << 5) | ((we & 1) << 7), - BASE_ADDR_MEMIF + bank); -} - -void calypso_bootrom(int enable) -{ - uint16_t conf = getreg16(MEMIF_REG(EXTRA_CONF)); - - conf |= (3 << 8); - - if (enable) - conf &= ~(1 << 9); - - putreg16(conf, MEMIF_REG(EXTRA_CONF)); -} - -void calypso_debugunit(int enable) -{ - uint16_t conf = getreg16(MEMIF_REG(EXTRA_CONF)); - - if (enable) - conf &= ~(1 << 11); - else - conf |= (1 << 11); - - putreg16(conf, MEMIF_REG(EXTRA_CONF)); -} - -#define REG_RHEA_CNTL 0xfffff900 -#define REG_API_CNTL 0xfffff902 -#define REG_ARM_RHEA 0xfffff904 - -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) -{ - putreg16(fac0 | (fac1 << 4) | (timeout << 8), REG_RHEA_CNTL); - putreg16(ws_h | (ws_l << 5), REG_API_CNTL); - putreg16(w_en0 | (w_en1 << 1), REG_ARM_RHEA); -} diff --git a/arch/arm/src/common/up_internal.h b/arch/arm/src/common/up_internal.h index 7318a70caad..36095a87a45 100644 --- a/arch/arm/src/common/up_internal.h +++ b/arch/arm/src/common/up_internal.h @@ -191,11 +191,6 @@ # define _DATA_INIT &_eronly # define _START_DATA &_sdata # define _END_DATA &_edata - -#ifdef CONFIG_SMP -# define _START_NOCACHE &_snocache -# define _END_NOCACHE &_enocache -#endif #endif /* This is the value used to mark the stack for subsequent stack monitoring @@ -284,11 +279,6 @@ EXTERN uint32_t _edata; /* End+1 of .data */ EXTERN uint32_t _sbss; /* Start of .bss */ EXTERN uint32_t _ebss; /* End+1 of .bss */ -#ifdef CONFIG_SMP -EXTERN uint32_t _snocache; /* Start of .nocache */ -EXTERN uint32_t _enocache; /* End+1 of .nocache */ -#endif - /* Sometimes, functions must be executed from RAM. In this case, the following * macro may be used (with GCC!) to specify a function that will execute from * RAM. For example, diff --git a/arch/arm/src/efm32/efm32_lowputc.c b/arch/arm/src/efm32/efm32_lowputc.c index b3fa2ee3866..26ec02884aa 100644 --- a/arch/arm/src/efm32/efm32_lowputc.c +++ b/arch/arm/src/efm32/efm32_lowputc.c @@ -281,7 +281,8 @@ static void efm32_leuart_setbaud(uintptr_t base, uint32_t baud) void efm32_lowsetup(void) { -#if defined(HAVE_UART_DEVICE) || defined(HAVE_LEUART_DEVICE) +#if defined(HAVE_UART_DEVICE) || defined(HAVE_LEUART_DEVICE) || \ + defined(HAVE_SPI_DEVICE) uint32_t regval; #endif diff --git a/arch/arm/src/imx6/chip/imx_memorymap.h b/arch/arm/src/imx6/chip/imx_memorymap.h index 17304c2474a..c9ad19dfdf3 100644 --- a/arch/arm/src/imx6/chip/imx_memorymap.h +++ b/arch/arm/src/imx6/chip/imx_memorymap.h @@ -126,9 +126,7 @@ * address in the top-level memory map are candidates for other mapping uses: * * 00018000-000fffff Reserved -- Not used - * 00400000-007fffff Reserved -- Used as the virtual address an inter-CPU, - * un-cached memory region in SMP - * configurations + * 00400000-007fffff Reserved -- Not used * 00d00000-00ffffff Reserved -- Not used * 0220c000-023fffff Reserved -- Not used * 80000000-efffffff Reserved -- Level 2 page table (See below) @@ -929,8 +927,6 @@ * the address space. */ -#define INTERCPU_L2_PAGES 1 /* Pages allowed for inter-processor communications */ - #ifndef CONFIG_ARCH_LOWVECTORS /* Memory map * VIRTUAL ADDRESS RANGE L1 PG TABLE L2 PG TABLE DESCRIPTION @@ -938,10 +934,6 @@ * ---------- ---------- ------------ ---------------------------- * 0x80000000 0x803fffff 0x000002000 0x000000400 Vectors (1MiB) * 0x80100000 0x806fffff 0x000002400 0x000001800 Paging (6MiB) - * - * If SMP is enabled, then 1MiB of address spaces for the INTERCPU_L2_PAGES - * pages are taken from the end of the Paging L2 page table to hold non- - * cacheable, inter-processor communication data. */ /* Vector L2 page table offset/size */ @@ -959,18 +951,10 @@ # define VECTOR_L2_END_PADDR (VECTOR_L2_PBASE + VECTOR_L2_SIZE) # define VECTOR_L2_END_VADDR (VECTOR_L2_VBASE + VECTOR_L2_SIZE) -# if defined(CONFIG_SMP) && defined(SMP_INTERCPU_NONCACHED) - /* Paging L2 page table offset/size */ + /* Paging L2 page table offset/size */ -# define PGTABLE_L2_OFFSET 0x000002400 -# define PGTABLE_L2_SIZE 0x000001400 - -# else - /* Paging L2 page table offset/size */ - -# define PGTABLE_L2_OFFSET 0x000002400 -# define PGTABLE_L2_SIZE 0x000001800 -# endif +# define PGTABLE_L2_OFFSET 0x000002400 +# define PGTABLE_L2_SIZE 0x000001800 #else /* Memory map @@ -978,24 +962,12 @@ * START END OFFSET SIZE * ---------- ---------- ------------ ---------------------------- * 0x80000000 0x806fffff 0x000002000 0x000001c00 Paging (7MiB) - * - * If SMP is enabled, then 1MiB of address spaces for the INTERCPU_L2_PAGES - * pages are taken from the end of the Paging L2 page table to hold non- - * cacheable, inter-processor communication data. */ -# if defined(CONFIG_SMP) && defined(SMP_INTERCPU_NONCACHED) /* Paging L2 page table offset/size */ -# define PGTABLE_L2_OFFSET 0x000002000 -# define PGTABLE_L2_SIZE 0x000001800 - -# else - /* Paging L2 page table offset/size */ - -# define PGTABLE_L2_OFFSET 0x000002000 -# define PGTABLE_L2_SIZE 0x000001c00 -# endif +# define PGTABLE_L2_OFFSET 0x000002000 +# define PGTABLE_L2_SIZE 0x000001c00 #endif @@ -1013,23 +985,6 @@ #define PGTABLE_L2_END_PADDR (PGTABLE_L2_PBASE + PGTABLE_L2_SIZE) #define PGTABLE_L2_END_VADDR (PGTABLE_L2_VBASE + PGTABLE_L2_SIZE) -#if defined(CONFIG_SMP) && defined(SMP_INTERCPU_NONCACHED) -/* Non-cached inter-processor communication data */ - -# define INTERCPU_L2_OFFSET (PGTABLE_L2_OFFSET + PGTABLE_L2_SIZE) -# define INTERCPU_L2_SIZE (0x00000400) - -/* Non-cached inter-processor communication page table base addresses */ - -# define INTERCPU_L2_PBASE (PGTABLE_BASE_PADDR + INTERCPU_L2_OFFSET) -# define INTERCPU_L2_VBASE (PGTABLE_BASE_VADDR + INTERCPU_L2_OFFSET) - -/* Non-cached inter-processor communication end addresses */ - -# define INTERCPU_L2_END_PADDR (INTERCPU_L2_PBASE + INTERCPU_L2_SIZE) -# define INTERCPU_L2_END_VADDR (INTERCPU_L2_VBASE + INTERCPU_L2_SIZE) -#endif - /* Base address of the interrupt vector table. * * IMX_VECTOR_PADDR - Unmapped, physical address of vector table in SRAM @@ -1052,8 +1007,7 @@ * START END CONTENT * ---------- ---------- --------------------------- * 0x00000000 0x00010000 Vectors (VECTOR_TABLE_SIZE) - * 0x00010000 0x00011000 Inter-CPU communications - * 0x00011000 0x0003c000 Unused + * 0x00010000 0x0003c000 Unused * 0x0003c000 0x00004000 Page table (PGTABLE_SIZE) */ @@ -1061,27 +1015,13 @@ # define IMX_VECTOR_VSRAM IMX_OCRAM_VBASE # define IMX_VECTOR_VADDR 0x00000000 -#if defined(CONFIG_SMP) && defined(SMP_INTERCPU_NONCACHED) -/* Inter-processor communications. - * - * NOTICE that we use the unused virtual address space at 0x00400000 for - * the inter-CPU virtual communication area. - */ - -# define INTERCPU_PADDR (IMX_VECTOR_PADDR + VECTOR_TABLE_SIZE) -# define INTERCPU_VADDR (0x00400000) -# define INTERCPU_SIZE (INTERCPU_L2_PAGES << 12) -# define INTERCPU_VSRAM (IMX_VECTOR_VSRAM + VECTOR_TABLE_SIZE) -#endif - #else /* Vectors located at 0xffff:0000 -- this probably does not work */ /* OCRAM Memory Map: * ---------- ---------- --------------------------- * START END CONTENT * ---------- ---------- --------------------------- * 0x00000000 0x00004000 Page table (PGTABLE_SIZE) - * 0x00004000 0x0002f000 Unused - * 0x0002f000 0x00030000 Inter-CPU communications + * 0x00004000 0x00030000 Unused * 0x00030000 0x00010000 Vectors (VECTOR_TABLE_SIZE) */ @@ -1089,18 +1029,6 @@ # define IMX_VECTOR_VSRAM (IMX_OCRAM_VBASE + IMX_OCRAM_SIZE - VECTOR_TABLE_SIZE) # define IMX_VECTOR_VADDR 0xffff0000 -#if defined(CONFIG_SMP) && defined(SMP_INTERCPU_NONCACHED) -/* Inter-processor communications - * - * NOTICE that we use the unused virtual address space at 0x00400000 for - * the inter-CPU virtual communication area. - */ - -# define INTERCPU_PADDR (IMX_VECTOR_PADDR - INTERCPU_L2_SIZE) -# define INTERCPU_VADDR (0x00400000) -# define INTERCPU_SIZE (INTERCPU_L2_PAGES << 12) -# define INTERCPU_VSRAM (IMX_VECTOR_VSRAM - INTERCPU_L2_SIZE) -#endif #endif /************************************************************************************ diff --git a/arch/arm/src/imx6/imx_boot.c b/arch/arm/src/imx6/imx_boot.c index 888baf53ae8..6abc6f8b157 100644 --- a/arch/arm/src/imx6/imx_boot.c +++ b/arch/arm/src/imx6/imx_boot.c @@ -235,48 +235,6 @@ static void imx_vectormapping(void) # define imx_vectormapping() #endif -/**************************************************************************** - * Name: imx_intercpu_mapping - * - * Description: - * Setup a special mapping for the non-cached, inter-cpu communications - * area. - * - ****************************************************************************/ - -#if defined(CONFIG_SMP) && defined(SMP_INTERCPU_NONCACHED) -static void imx_intercpu_mapping(void) -{ - uint32_t intercpu_paddr = INTERCPU_PADDR & PTE_SMALL_PADDR_MASK; - uint32_t intercpu_vaddr = INTERCPU_VADDR & PTE_SMALL_PADDR_MASK; - uint32_t end_paddr = INTERCPU_PADDR + INTERCPU_SIZE; - - DEBUGASSERT(intercpu_vaddr == (uint32_t)&_snocache); - - /* We want to keep the inter-cpu region in on-chip RAM (OCRAM). The - * i.MX6 has 256Kb of OCRAM positioned at physical address 0x0090:0000. - */ - - while (intercpu_paddr < end_paddr) - { - mmu_l2_setentry(INTERCPU_L2_VBASE, intercpu_paddr, intercpu_vaddr, - MMU_L2_INTERCPUFLAGS); - intercpu_paddr += 4096; - intercpu_vaddr += 4096; - } - - /* Now set the level 1 descriptor to refer to the level 2 page table. */ - - mmu_l1_setentry(INTERCPU_L2_PBASE & PMD_PTE_PADDR_MASK, - INTERCPU_VADDR & PMD_PTE_PADDR_MASK, - MMU_L1_INTERCPUFLAGS); -} -#else - /* No inter-cpu communications area */ - -# define imx_intercpu_mapping() -#endif - /**************************************************************************** * Name: imx_copyvectorblock * @@ -477,15 +435,6 @@ void arm_boot(void) imx_vectormapping(); PROGRESS('D'); -#if defined(CONFIG_SMP) && defined(SMP_INTERCPU_NONCACHED) - /* Provide a special mapping for the OCRAM interrupt vector positioned in - * high memory. - */ - - imx_intercpu_mapping(); - PROGRESS('E'); -#endif - #ifdef CONFIG_ARCH_RAMFUNCS /* Copy any necessary code sections from FLASH to RAM. The correct * destination in OCRAM is given by _sramfuncs and _eramfuncs. The @@ -498,14 +447,14 @@ void arm_boot(void) *dest++ = *src++; } - PROGRESS('F'); + PROGRESS('E'); /* Flush the copied RAM functions into physical RAM so that will * be available when fetched into the I-Cache. */ arch_clean_dcache((uintptr_t)&_sramfuncs, (uintptr_t)&_eramfuncs) - PROGRESS('G'); + PROGRESS('F'); #endif /* Setup up vector block. _vector_start and _vector_end are exported from @@ -513,23 +462,23 @@ void arm_boot(void) */ imx_copyvectorblock(); - PROGRESS('H'); + PROGRESS('G'); /* Disable the watchdog timer */ imx_wdtdisable(); - PROGRESS('I'); + PROGRESS('H'); /* Initialize clocking to settings provided by board-specific logic */ imx_clockconfig(); - PROGRESS('J'); + PROGRESS('I'); #ifdef CONFIG_ARCH_FPU /* Initialize the FPU */ arm_fpuconfig(); - PROGRESS('K'); + PROGRESS('J'); #endif /* Perform board-specific memroy initialization, This must include @@ -541,7 +490,7 @@ void arm_boot(void) */ imx_memory_initialize(); - PROGRESS('L'); + PROGRESS('K'); #ifdef NEED_SDRAM_REMAPPING /* SDRAM was configured in a temporary state to support low-level @@ -550,7 +499,7 @@ void arm_boot(void) */ imx_remap(); - PROGRESS('M'); + PROGRESS('L'); #endif #ifdef CONFIG_BOOT_SDRAM_DATA @@ -559,7 +508,7 @@ void arm_boot(void) */ arm_data_initialize(); - PROGRESS('N'); + PROGRESS('M'); #endif /* Perform board-specific device initialization. This would include @@ -567,23 +516,12 @@ void arm_boot(void) */ imx_board_initialize(); - PROGRESS('O'); - -#if defined(CONFIG_SMP) && defined(SMP_INTERCPU_NONCACHED) - /* Initialize the uncached, inter-CPU communications area */ - - for (dest = &_snocache; dest < &_enocache; ) - { - *dest++ = 0; - } - - PROGRESS('P'); -#endif + PROGRESS('N'); /* Perform common, low-level chip initialization (might do nothing) */ imx_lowsetup(); - PROGRESS('Q'); + PROGRESS('O'); #ifdef USE_EARLYSERIALINIT /* Perform early serial initialization if we are going to use the serial @@ -591,7 +529,7 @@ void arm_boot(void) */ imx_earlyserialinit(); - PROGRESS('R'); + PROGRESS('P'); #endif /* Now we can enable all other CPUs. The enabled CPUs will start execution @@ -600,6 +538,6 @@ void arm_boot(void) */ imx_cpu_enable(); - PROGRESS('S'); + PROGRESS('Q'); PROGRESS('\n'); } diff --git a/arch/arm/src/imx6/imx_timerisr.c b/arch/arm/src/imx6/imx_timerisr.c index 60f8864177f..4c766664937 100644 --- a/arch/arm/src/imx6/imx_timerisr.c +++ b/arch/arm/src/imx6/imx_timerisr.c @@ -115,10 +115,6 @@ static void up_output_compare(uint32_t sr, uint32_t of) if ((sr & of) != 0) { - /* Clear the pending output compare interrupt */ - - putreg32(of, IMX_GPT_SR); - /* Process timer interrupt event */ sched_process_timer(); @@ -140,9 +136,16 @@ static void up_output_compare(uint32_t sr, uint32_t of) int up_timerisr(int irq, uint32_t *regs) { - /* Sample the SR (once) and process all pending output compare interrupt */ + /* Sample the SR (once) */ uint32_t sr = getreg32(IMX_GPT_SR); + + /* Clear GPT status register */ + + putreg32(sr, IMX_GPT_SR); + + /* Process all pending output compare interrupt */ + up_output_compare(sr, GPT_INT_OF1); up_output_compare(sr, GPT_INT_OF2); up_output_compare(sr, GPT_INT_OF3); diff --git a/arch/arm/src/kl/Make.defs b/arch/arm/src/kl/Make.defs index d7712f0983c..6af672fd465 100644 --- a/arch/arm/src/kl/Make.defs +++ b/arch/arm/src/kl/Make.defs @@ -70,7 +70,7 @@ CMN_CSRCS += up_dumpnvic.c endif CHIP_ASRCS = -CHIP_CSRCS = kl_clockconfig.c kl_gpio.c kl_idle.c kl_irq.c kl_getc.c +CHIP_CSRCS = kl_clockconfig.c kl_gpio.c kl_idle.c kl_irq.c CHIP_CSRCS += kl_lowputc.c kl_serial.c kl_start.c kl_cfmconfig.c ifneq ($(CONFIG_SCHED_TICKLESS),y) diff --git a/arch/arm/src/lpc11xx/Make.defs b/arch/arm/src/lpc11xx/Make.defs index a347d99946d..d9fcb5e1526 100644 --- a/arch/arm/src/lpc11xx/Make.defs +++ b/arch/arm/src/lpc11xx/Make.defs @@ -71,7 +71,7 @@ endif CHIP_ASRCS = CHIP_CSRCS = lpc11_clockconfig.c lpc11_gpio.c lpc11_i2c.c lpc11_idle.c -CHIP_CSRCS += lpc11_irq.c lpc11_lowputc.c lpc11_getc.c lpc11_serial.c +CHIP_CSRCS += lpc11_irq.c lpc11_lowputc.c lpc11_serial.c CHIP_CSRCS += lpc11_spi.c lpc11_ssp.c lpc11_start.c # Configuration-dependent LPC11xx files diff --git a/arch/arm/src/lpc11xx/lpc11_getc.h b/arch/arm/src/lpc11xx/lpc11_getc.h deleted file mode 100644 index e00864bfc48..00000000000 --- a/arch/arm/src/lpc11xx/lpc11_getc.h +++ /dev/null @@ -1,47 +0,0 @@ -/************************************************************************************ - * arch/arm/src/lpc11/lpc11_getc.h - * - * Copyright (C) 2015, 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ************************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LPC11XX_LPC11_GETC_H -#define __ARCH_ARM_SRC_LPC11XX_LPC11_GETC_H - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include -#include "lpc11_serial.h" -#include "chip/lpc11_uart.h" - -#endif /* __ARCH_ARM_SRC_LPC11XX_LPC11_GETC_H */ diff --git a/arch/arm/src/lpc17xx/lpc17_sdcard.c b/arch/arm/src/lpc17xx/lpc17_sdcard.c index 532c8ed35d9..b4b555f5ded 100644 --- a/arch/arm/src/lpc17xx/lpc17_sdcard.c +++ b/arch/arm/src/lpc17xx/lpc17_sdcard.c @@ -2086,6 +2086,7 @@ static int lpc17_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t rlo rlong[2] = getreg32(LPC17_SDCARD_RESP2); rlong[3] = getreg32(LPC17_SDCARD_RESP3); } + return ret; } diff --git a/arch/arm/src/lpc43xx/chip/lpc4310203050_pinconfig.h b/arch/arm/src/lpc43xx/chip/lpc4310203050_pinconfig.h index 708ecfa8624..23380f60e31 100644 --- a/arch/arm/src/lpc43xx/chip/lpc4310203050_pinconfig.h +++ b/arch/arm/src/lpc43xx/chip/lpc4310203050_pinconfig.h @@ -603,23 +603,23 @@ #define PINCONF_QEI_PHA (PINCONF_FUNC1|PINCONF_PINSA|PINCONF_PIN_3) #define PINCONF_QEI_PHB (PINCONF_FUNC1|PINCONF_PINSA|PINCONF_PIN_2) -#define PINCONF_SD_CD_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_13) -#define PINCONF_SD_CD_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_8) -#define PINCONF_SD_CLK (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_0) -#define PINCONF_SD_CMD_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_6) -#define PINCONF_SD_CMD_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_10) -#define PINCONF_SD_DAT0_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_9) -#define PINCONF_SD_DAT0_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_4) -#define PINCONF_SD_DAT1_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_10) -#define PINCONF_SD_DAT1_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_5) -#define PINCONF_SD_DAT2_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_11) -#define PINCONF_SD_DAT2_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_6) -#define PINCONF_SD_DAT3_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_12) -#define PINCONF_SD_DAT3_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_7) -#define PINCONF_SD_DAT4 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_11) -#define PINCONF_SD_DAT5 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_12) -#define PINCONF_SD_DAT6 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_13) -#define PINCONF_SD_DAT7 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_14) +#define PINCONF_SD_CD_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_13) +#define PINCONF_SD_CD_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_8) +#define PINCONF_SD_CLK (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_0) +#define PINCONF_SD_CMD_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_6) +#define PINCONF_SD_CMD_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_10) +#define PINCONF_SD_DAT0_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_9) +#define PINCONF_SD_DAT0_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_4) +#define PINCONF_SD_DAT1_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_10) +#define PINCONF_SD_DAT1_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_5) +#define PINCONF_SD_DAT2_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_11) +#define PINCONF_SD_DAT2_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_6) +#define PINCONF_SD_DAT3_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_12) +#define PINCONF_SD_DAT3_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_7) +#define PINCONF_SD_DAT4 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_11) +#define PINCONF_SD_DAT5 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_12) +#define PINCONF_SD_DAT6 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_13) +#define PINCONF_SD_DAT7 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_14) #define PINCONF_SD_POW_1 (PINCONF_FUNC5|PINCONF_PINSD|PINCONF_PIN_1) #define PINCONF_SD_POW_2 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_5) #define PINCONF_SD_POW_3 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_9) diff --git a/arch/arm/src/lpc43xx/chip/lpc4337jet100_pinconfig.h b/arch/arm/src/lpc43xx/chip/lpc4337jet100_pinconfig.h index cf3fcd22132..fb63978ec3d 100644 --- a/arch/arm/src/lpc43xx/chip/lpc4337jet100_pinconfig.h +++ b/arch/arm/src/lpc43xx/chip/lpc4337jet100_pinconfig.h @@ -603,23 +603,23 @@ #define PINCONF_QEI_PHA (PINCONF_FUNC1|PINCONF_PINSA|PINCONF_PIN_3) #define PINCONF_QEI_PHB (PINCONF_FUNC1|PINCONF_PINSA|PINCONF_PIN_2) -#define PINCONF_SD_CD_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_13) -#define PINCONF_SD_CD_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_8) -#define PINCONF_SD_CLK (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_0) -#define PINCONF_SD_CMD_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_6) -#define PINCONF_SD_CMD_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_10) -#define PINCONF_SD_DAT0_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_9) -#define PINCONF_SD_DAT0_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_4) -#define PINCONF_SD_DAT1_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_10) -#define PINCONF_SD_DAT1_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_5) -#define PINCONF_SD_DAT2_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_11) -#define PINCONF_SD_DAT2_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_6) -#define PINCONF_SD_DAT3_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_12) -#define PINCONF_SD_DAT3_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_7) -#define PINCONF_SD_DAT4 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_11) -#define PINCONF_SD_DAT5 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_12) -#define PINCONF_SD_DAT6 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_13) -#define PINCONF_SD_DAT7 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_14) +#define PINCONF_SD_CD_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_13) +#define PINCONF_SD_CD_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_8) +#define PINCONF_SD_CLK (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_0) +#define PINCONF_SD_CMD_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_6) +#define PINCONF_SD_CMD_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_10) +#define PINCONF_SD_DAT0_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_9) +#define PINCONF_SD_DAT0_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_4) +#define PINCONF_SD_DAT1_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_10) +#define PINCONF_SD_DAT1_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_5) +#define PINCONF_SD_DAT2_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_11) +#define PINCONF_SD_DAT2_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_6) +#define PINCONF_SD_DAT3_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_12) +#define PINCONF_SD_DAT3_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_7) +#define PINCONF_SD_DAT4 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_11) +#define PINCONF_SD_DAT5 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_12) +#define PINCONF_SD_DAT6 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_13) +#define PINCONF_SD_DAT7 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_14) #define PINCONF_SD_POW_1 (PINCONF_FUNC5|PINCONF_PINSD|PINCONF_PIN_1) #define PINCONF_SD_POW_2 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_5) #define PINCONF_SD_POW_3 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_9) diff --git a/arch/arm/src/lpc43xx/chip/lpc4357fet256_pinconfig.h b/arch/arm/src/lpc43xx/chip/lpc4357fet256_pinconfig.h index 41a5d939540..0c9a37a0ff7 100644 --- a/arch/arm/src/lpc43xx/chip/lpc4357fet256_pinconfig.h +++ b/arch/arm/src/lpc43xx/chip/lpc4357fet256_pinconfig.h @@ -603,23 +603,23 @@ #define PINCONF_QEI_PHA (PINCONF_FUNC1|PINCONF_PINSA|PINCONF_PIN_3) #define PINCONF_QEI_PHB (PINCONF_FUNC1|PINCONF_PINSA|PINCONF_PIN_2) -#define PINCONF_SD_CD_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_13) -#define PINCONF_SD_CD_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_8) -#define PINCONF_SD_CLK (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_0) -#define PINCONF_SD_CMD_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_6) -#define PINCONF_SD_CMD_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_10) -#define PINCONF_SD_DAT0_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_9) -#define PINCONF_SD_DAT0_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_4) -#define PINCONF_SD_DAT1_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_10) -#define PINCONF_SD_DAT1_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_5) -#define PINCONF_SD_DAT2_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_11) -#define PINCONF_SD_DAT2_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_6) -#define PINCONF_SD_DAT3_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_12) -#define PINCONF_SD_DAT3_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_7) -#define PINCONF_SD_DAT4 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_11) -#define PINCONF_SD_DAT5 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_12) -#define PINCONF_SD_DAT6 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_13) -#define PINCONF_SD_DAT7 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_14) +#define PINCONF_SD_CD_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_13) +#define PINCONF_SD_CD_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_8) +#define PINCONF_SD_CLK (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_0) +#define PINCONF_SD_CMD_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_6) +#define PINCONF_SD_CMD_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_10) +#define PINCONF_SD_DAT0_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_9) +#define PINCONF_SD_DAT0_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_4) +#define PINCONF_SD_DAT1_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_10) +#define PINCONF_SD_DAT1_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_5) +#define PINCONF_SD_DAT2_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_11) +#define PINCONF_SD_DAT2_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_6) +#define PINCONF_SD_DAT3_1 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINS1|PINCONF_PIN_12) +#define PINCONF_SD_DAT3_2 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_7) +#define PINCONF_SD_DAT4 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_11) +#define PINCONF_SD_DAT5 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_12) +#define PINCONF_SD_DAT6 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_13) +#define PINCONF_SD_DAT7 (PINCONF_FUNC7|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_SLEW_FAST|PINCONF_PINSC|PINCONF_PIN_14) #define PINCONF_SD_POW_1 (PINCONF_FUNC5|PINCONF_PINSD|PINCONF_PIN_1) #define PINCONF_SD_POW_2 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_5) #define PINCONF_SD_POW_3 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_9) diff --git a/arch/arm/src/sam34/sam4cm_cpustart.c b/arch/arm/src/sam34/sam4cm_cpustart.c index 7a5c62f0fc6..f8544abf7fc 100644 --- a/arch/arm/src/sam34/sam4cm_cpustart.c +++ b/arch/arm/src/sam34/sam4cm_cpustart.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/src/samv7/sam_mcan.c b/arch/arm/src/samv7/sam_mcan.c index 49e05f306b9..683463be9e6 100644 --- a/arch/arm/src/samv7/sam_mcan.c +++ b/arch/arm/src/samv7/sam_mcan.c @@ -1907,16 +1907,35 @@ static int mcan_del_extfilter(FAR struct sam_mcan_s *priv, int ndx) DEBUGASSERT(priv != NULL && priv->config != NULL); config = priv->config; - DEBUGASSERT(ndx < config->nextfilters); + + /* Check user Parameters */ + + DEBUGASSERT(ndx >= 0 || ndx < config->nextfilters); + + if (ndx < 0 || ndx >= config->nextfilters) + { + return -EINVAL; + } /* Get exclusive excess to the MCAN hardware */ mcan_dev_lock(priv); - /* Release the filter */ - word = ndx >> 5; bit = ndx & 0x1f; + + /* Check if this filter is really assigned */ + + if ((priv->extfilters[word] & (1 << bit)) == 0) + { + /* No, error out */ + + mcan_dev_unlock(priv); + return -ENOENT; + } + + /* Release the filter */ + priv->extfilters[word] &= ~(1 << bit); DEBUGASSERT(priv->nextalloc > 0); @@ -2137,16 +2156,35 @@ static int mcan_del_stdfilter(FAR struct sam_mcan_s *priv, int ndx) DEBUGASSERT(priv != NULL && priv->config != NULL); config = priv->config; - DEBUGASSERT(ndx < config->nstdfilters); + + /* Check Userspace Parameters */ + + DEBUGASSERT(ndx >= 0 || ndx < config->nstdfilters); + + if (ndx < 0 || ndx >= config->nstdfilters) + { + return -EINVAL; + } /* Get exclusive excess to the MCAN hardware */ mcan_dev_lock(priv); - /* Release the filter */ - word = ndx >> 5; bit = ndx & 0x1f; + + /* Check if this filter is really assigned */ + + if ((priv->stdfilters[word] & (1 << bit)) == 0) + { + /* No, error out */ + + mcan_dev_unlock(priv); + return -ENOENT; + } + + /* Release the filter */ + priv->stdfilters[word] &= ~(1 << bit); DEBUGASSERT(priv->nstdalloc > 0); @@ -3388,6 +3426,19 @@ static void mcan_interrupt(FAR struct can_dev_s *dev) { canerr("ERROR: TX %08x\n", pending & MCAN_TXERR_INTS); + /* An Acknowledge-Error will occur if for example the device + * is not connected to the bus. + * + * The CAN-Standard states that the Chip has to retry the + * message forever, which will produce an ACKE every time. + * To prevent this Interrupt-Flooding and the high CPU-Load + * we disable the ACKE here as long we didn't transfer at + * least one message successfully (see MCAN_INT_TC below). + */ + + ie &= ~MCAN_INT_ACKE; + mcan_putreg(priv, SAM_MCAN_IE_OFFSET, ie); + /* Clear the error indications */ mcan_putreg(priv, SAM_MCAN_IR_OFFSET, MCAN_TXERR_INTS); @@ -3441,6 +3492,17 @@ static void mcan_interrupt(FAR struct can_dev_s *dev) if ((pending & MCAN_INT_TC) != 0) { + /* Check if we have disabled the ACKE in the error-handling above + * (see MCAN_TXERR_INTS) to prevent Interrupt-Flooding and + * re-enable the error interrupt here again. + */ + + if ((ie & MCAN_INT_ACKE) == 0) + { + ie |= MCAN_INT_ACKE; + mcan_putreg(priv, SAM_MCAN_IE_OFFSET, ie); + } + /* Clear the pending TX completion interrupt (and all * other TX-related interrupts) */ diff --git a/arch/arm/src/stm32/Make.defs b/arch/arm/src/stm32/Make.defs index 5cd35648931..8b10228a3a0 100644 --- a/arch/arm/src/stm32/Make.defs +++ b/arch/arm/src/stm32/Make.defs @@ -110,7 +110,7 @@ CHIP_ASRCS = CHIP_CSRCS = stm32_allocateheap.c stm32_start.c stm32_rcc.c stm32_lse.c CHIP_CSRCS += stm32_lsi.c stm32_gpio.c stm32_exti_gpio.c stm32_flash.c -CHIP_CSRCS += stm32_irq.c stm32_dma.c stm32_lowputc.c stm32_getc.c +CHIP_CSRCS += stm32_irq.c stm32_dma.c stm32_lowputc.c CHIP_CSRCS += stm32_serial.c stm32_spi.c stm32_sdio.c stm32_tim.c CHIP_CSRCS += stm32_waste.c stm32_ccm.c stm32_uid.c stm32_capture.c diff --git a/arch/arm/src/stm32/stm32.h b/arch/arm/src/stm32/stm32.h index f2304e27350..6680e81293f 100644 --- a/arch/arm/src/stm32/stm32.h +++ b/arch/arm/src/stm32/stm32.h @@ -78,7 +78,6 @@ #include "stm32_usbdev.h" #include "stm32_wdg.h" #include "stm32_lowputc.h" -#include "stm32_getc.h" #include "stm32_eth.h" #endif /* __ARCH_ARM_SRC_STM32_STM32_H */ diff --git a/arch/arm/src/stm32/stm32_allocateheap.c b/arch/arm/src/stm32/stm32_allocateheap.c index a222253af5e..92a3fcdd810 100644 --- a/arch/arm/src/stm32/stm32_allocateheap.c +++ b/arch/arm/src/stm32/stm32_allocateheap.c @@ -295,6 +295,10 @@ # define SRAM1_END 0x20018000 # elif defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) # define SRAM1_END 0x20030000 +# elif defined(CONFIG_STM32_STM32F446) +# define SRAM1_END 0x20020000 +# elif defined(CONFIG_STM32_STM32F469) +# define SRAM1_END 0x20050000 # else # define SRAM1_END 0x20020000 # endif diff --git a/arch/arm/src/stm32/stm32_flash.c b/arch/arm/src/stm32/stm32_flash.c index 56aa1f75edc..73f1419506c 100644 --- a/arch/arm/src/stm32/stm32_flash.c +++ b/arch/arm/src/stm32/stm32_flash.c @@ -313,7 +313,7 @@ ssize_t up_progmem_write(size_t addr, const void *buf, size_t count) addr -= STM32_FLASH_BASE; } - if ((addr+count) >= STM32_FLASH_SIZE) + if ((addr+count) > STM32_FLASH_SIZE) { return -EFAULT; } diff --git a/arch/arm/src/stm32/stm32_getc.c b/arch/arm/src/stm32/stm32_getc.c deleted file mode 100644 index de9020bab40..00000000000 --- a/arch/arm/src/stm32/stm32_getc.c +++ /dev/null @@ -1,121 +0,0 @@ -/**************************************************************************** - * arch/arm/src/stm32/stm32_getc.c - * - * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include - -#include - -#include "up_internal.h" -#include "up_arch.h" - -#include "chip.h" - -#include "stm32.h" -#include "stm32_rcc.h" -#include "stm32_gpio.h" -#include "stm32_uart.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Select U[S]ART console base address */ - -#ifdef HAVE_CONSOLE -# if defined(CONFIG_USART1_SERIAL_CONSOLE) -# define STM32_CONSOLE_BASE STM32_USART1_BASE -# elif defined(CONFIG_USART2_SERIAL_CONSOLE) -# define STM32_CONSOLE_BASE STM32_USART2_BASE -# elif defined(CONFIG_USART3_SERIAL_CONSOLE) -# define STM32_CONSOLE_BASE STM32_USART3_BASE -# elif defined(CONFIG_UART4_SERIAL_CONSOLE) -# define STM32_CONSOLE_BASE STM32_UART4_BASE -# elif defined(CONFIG_UART5_SERIAL_CONSOLE) -# define STM32_CONSOLE_BASE STM32_UART5_BASE -# elif defined(CONFIG_USART6_SERIAL_CONSOLE) -# define STM32_CONSOLE_BASE STM32_USART6_BASE -# elif defined(CONFIG_UART7_SERIAL_CONSOLE) -# define STM32_CONSOLE_BASE STM32_UART7_BASE -# elif defined(CONFIG_UART8_SERIAL_CONSOLE) -# define STM32_CONSOLE_BASE STM32_UART8_BASE -# endif -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_getc - * - * Description: - * Read one byte from the serial console - * - * REVIST: If used with the serial driver enabled, then this could - * interfere with the serial driver operations. Serial interrupts should - * be disabled when this function executes in that case. - * - ****************************************************************************/ - -int up_getc(void) -{ - uint32_t ch = 0; - -#ifdef HAVE_CONSOLE - /* While there is any error, read and discard bytes to clear the errors */ - - while ((getreg32(STM32_CONSOLE_BASE + STM32_USART_SR_OFFSET) & - (USART_SR_ORE | USART_SR_NE | USART_SR_FE | USART_SR_PE)) != 0) - { - (void)getreg32(STM32_CONSOLE_BASE + STM32_USART_RDR_OFFSET); - } - - /* Wait until the RX data register has a character to be read */ - - while ((getreg32(STM32_CONSOLE_BASE + STM32_USART_SR_OFFSET) & USART_SR_RXNE) == 0); - - /* Then read the character */ - - ch = getreg32(STM32_CONSOLE_BASE + STM32_USART_RDR_OFFSET); -#endif /* HAVE_CONSOLE */ - - return (int)ch; -} diff --git a/arch/arm/src/stm32/stm32_sdio.c b/arch/arm/src/stm32/stm32_sdio.c index 9d93a432c03..860eff8b9c1 100644 --- a/arch/arm/src/stm32/stm32_sdio.c +++ b/arch/arm/src/stm32/stm32_sdio.c @@ -2209,6 +2209,7 @@ static int stm32_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t rlo rlong[2] = getreg32(STM32_SDIO_RESP3); rlong[3] = getreg32(STM32_SDIO_RESP4); } + return ret; } @@ -2577,12 +2578,14 @@ static int stm32_dmapreflight(FAR struct sdio_dev_s *dev, DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0); +#if !defined(CONFIG_STM32_STM32F40XX) /* Wide bus operation is required for DMA */ if (!priv->widebus) { return -EINVAL; } +#endif /* DMA must be possible to the buffer */ diff --git a/arch/arm/src/stm32/stm32_serial.c b/arch/arm/src/stm32/stm32_serial.c index 644c810817e..10919e878bc 100644 --- a/arch/arm/src/stm32/stm32_serial.c +++ b/arch/arm/src/stm32/stm32_serial.c @@ -1945,11 +1945,11 @@ static int up_interrupt_common(struct up_dev_s *priv) static int up_ioctl(struct file *filep, int cmd, unsigned long arg) { #if defined(CONFIG_SERIAL_TERMIOS) || defined(CONFIG_SERIAL_TIOCSERGSTRUCT) \ - || defined(CONFIG_STM32F7_SERIALBRK_BSDCOMPAT) + || defined(CONFIG_STM32_SERIALBRK_BSDCOMPAT) struct inode *inode = filep->f_inode; struct uart_dev_s *dev = inode->i_private; #endif -#if defined(CONFIG_SERIAL_TERMIOS) || defined(CONFIG_STM32F7_SERIALBRK_BSDCOMPAT) +#if defined(CONFIG_SERIAL_TERMIOS) || defined(CONFIG_STM32_SERIALBRK_BSDCOMPAT) struct up_dev_s *priv = (struct up_dev_s *)dev->priv; #endif int ret = OK; diff --git a/arch/arm/src/stm32/stm32f40xxx_rcc.c b/arch/arm/src/stm32/stm32f40xxx_rcc.c index abb44313c89..5e2ba73b1f9 100644 --- a/arch/arm/src/stm32/stm32f40xxx_rcc.c +++ b/arch/arm/src/stm32/stm32f40xxx_rcc.c @@ -743,7 +743,8 @@ static void stm32_stdclockconfig(void) { } -#if defined(PWR_CSR_ODRDY) +#if defined(CONFIG_STM32_STM32F429) || defined(CONFIG_STM32_STM32F446) || \ + defined(CONFIG_STM32_STM32F469) /* Enable the Over-drive to extend the clock frequency to 180 Mhz */ diff --git a/arch/arm/src/stm32f7/chip/stm32f76xx77xx_pinmap.h b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_pinmap.h index 6054d702429..c5d1b50a16c 100644 --- a/arch/arm/src/stm32f7/chip/stm32f76xx77xx_pinmap.h +++ b/arch/arm/src/stm32f7/chip/stm32f76xx77xx_pinmap.h @@ -997,7 +997,7 @@ #define GPIO_SPI2_SCK_3 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN13) #define GPIO_SPI2_SCK_4 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTD|GPIO_PIN3) #define GPIO_SPI2_SCK_5 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTI|GPIO_PIN1) -#define GPIO_SPI2_SCK_6 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTIA|GPIO_PIN12) +#define GPIO_SPI2_SCK_6 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTA|GPIO_PIN12) #define GPIO_SPI3_MISO_1 (GPIO_ALT|GPIO_AF6|GPIO_SPEED_50MHz|GPIO_PORTB|GPIO_PIN4) #define GPIO_SPI3_MISO_2 (GPIO_ALT|GPIO_AF6|GPIO_SPEED_50MHz|GPIO_PORTC|GPIO_PIN11) diff --git a/arch/arm/src/tiva/chip/tiva_pwm.h b/arch/arm/src/tiva/chip/tiva_pwm.h index f0af47a6696..05e2302f359 100644 --- a/arch/arm/src/tiva/chip/tiva_pwm.h +++ b/arch/arm/src/tiva/chip/tiva_pwm.h @@ -107,6 +107,23 @@ #define CC_PWMDIV_64 (0x5) /* (Value) Divided by 64 */ #define TIVA_PWMn_CTL_ENABLE (0) /* (Bit) PWM Block Enable */ +#define CTL_DISABLE (0) /* (Value) Disable */ #define CTL_ENABLE (1) /* (Value) Enable */ +#define INTEN_GEN3 (3) /* (Bit) Enable PWM GEN3 Interrupt */ +#define INTEN_GEN2 (2) /* (Bit) Enable PWM GEN2 Interrupt */ +#define INTEN_GEN1 (1) /* (Bit) Enable PWM GEN1 Interrupt */ +#define INTEN_GEN0 (0) /* (Bit) Enable PWM GEN0 Interrupt */ +#define INT_DISABLE (0) /* (Value) Disable */ +#define INT_ENABLE (1) /* (Value) Enable */ + +#define INTCMPBD (5) /* (Bit) Interrupt for Counter=PWMnCMPB Down */ +#define INTCMPBU (4) /* (Bit) Interrupt for Counter=PWMnCMPB Up */ +#define INTCMPAD (3) /* (Bit) Interrupt for Counter=PWMnCMPA Down */ +#define INTCMPAU (2) /* (Bit) Interrupt for Counter=PWMnCMPA Up */ +#define INTCNTLOAD (1) /* (Bit) Interrupt for Counter=PWMnLOAD */ +#define INTCNTZERO (0) /* (Bit) Interrupt for Counter=0 */ +#define INT_CLR (0) /* (Value) Bit Clear */ +#define INT_SET (1) /* (Value) Bit Set */ + #endif /* __ARCH_ARM_SRC_TIVA_CHIP_TIVA_PWM_H */ diff --git a/arch/arm/src/tiva/tiva_pwm.c b/arch/arm/src/tiva/tiva_pwm.c index b5032aeb21d..73b86349b33 100644 --- a/arch/arm/src/tiva/tiva_pwm.c +++ b/arch/arm/src/tiva/tiva_pwm.c @@ -85,21 +85,57 @@ struct tiva_pwm_chan_s uint8_t generator_id; uintptr_t generator_base; uint8_t channel_id; +#ifdef CONFIG_PWM_PULSECOUNT + bool inited; + uint8_t irq; + uint32_t count; + uint32_t cur_count; + FAR void *handle; +#endif }; /************************************************************************************ * Private Function Prototypes ************************************************************************************/ +#if defined(CONFIG_PWM_PULSECOUNT) && defined(CONFIG_TIVA_PWM0_CHAN0) +static int tiva_pwm_gen0_interrupt(int irq, FAR void *context); +#endif + +#if defined(CONFIG_PWM_PULSECOUNT) && defined(CONFIG_TIVA_PWM0_CHAN2) +static int tiva_pwm_gen1_interrupt(int irq, FAR void *context); +#endif + +#if defined(CONFIG_PWM_PULSECOUNT) && defined(CONFIG_TIVA_PWM0_CHAN4) +static int tiva_pwm_gen2_interrupt(int irq, FAR void *context); +#endif + +#if defined(CONFIG_PWM_PULSECOUNT) && defined(CONFIG_TIVA_PWM0_CHAN6) +static int tiva_pwm_gen3_interrupt(int irq, FAR void *context); +#endif + +#if defined(CONFIG_PWM_PULSECOUNT) && \ + (defined(CONFIG_TIVA_PWM0_CHAN0) || defined(CONFIG_TIVA_PWM0_CHAN2) || \ + defined(CONFIG_TIVA_PWM0_CHAN4) || defined(CONFIG_TIVA_PWM0_CHAN6)) +static int tiva_pwm_interrupt(struct tiva_pwm_chan_s *chan); +#endif + 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 inline int tiva_pwm_timer(FAR struct tiva_pwm_chan_s *chan, + FAR const struct pwm_info_s *info); static int tiva_pwm_setup(FAR struct pwm_lowerhalf_s *dev); static int tiva_pwm_shutdown(FAR struct pwm_lowerhalf_s *dev); +#ifdef CONFIG_PWM_PULSECOUNT +static int tiva_pwm_start(FAR struct pwm_lowerhalf_s *dev, + FAR const struct pwm_info_s *info, FAR void *handle); +#else static int tiva_pwm_start(FAR struct pwm_lowerhalf_s *dev, FAR const struct pwm_info_s *info); +#endif 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); @@ -108,7 +144,7 @@ static int tiva_pwm_ioctl(FAR struct pwm_lowerhalf_s *dev, * Private Data ************************************************************************************/ -static uint32_t g_pwm_freq = 15000000; +static uint32_t g_pwm_freq = 1875000; static uint32_t g_pwm_counter = (1 << 16); static const struct pwm_ops_s g_pwm_ops = @@ -129,6 +165,13 @@ static struct tiva_pwm_chan_s g_pwm_chan0 = .generator_id = 0, .generator_base = TIVA_PWM0_BASE + TIVA_PWMn_BASE + TIVA_PWMn_INTERVAL * 0, .channel_id = 0, +#ifdef CONFIG_PWM_PULSECOUNT + .inited = false, + .irq = TIVA_IRQ_PWM0_GEN0, + .count = 0, + .cur_count = 0, + .handle = NULL, +#endif }; #endif @@ -141,6 +184,13 @@ static struct tiva_pwm_chan_s g_pwm_chan1 = .generator_id = 0, .generator_base = TIVA_PWM0_BASE + TIVA_PWMn_BASE + TIVA_PWMn_INTERVAL * 0, .channel_id = 1, +#ifdef CONFIG_PWM_PULSECOUNT + .inited = false, + .irq = TIVA_IRQ_PWM0_GEN0, + .count = 0, + .cur_count = 0, + .handle = NULL, +#endif }; #endif @@ -153,6 +203,13 @@ static struct tiva_pwm_chan_s g_pwm_chan2 = .generator_id = 1, .generator_base = TIVA_PWM0_BASE + TIVA_PWMn_BASE + TIVA_PWMn_INTERVAL * 1, .channel_id = 2, +#ifdef CONFIG_PWM_PULSECOUNT + .inited = false, + .irq = TIVA_IRQ_PWM0_GEN1, + .count = 0, + .cur_count = 0, + .handle = NULL, +#endif }; #endif @@ -165,6 +222,13 @@ static struct tiva_pwm_chan_s g_pwm_chan3 = .generator_id = 1, .generator_base = TIVA_PWM0_BASE + TIVA_PWMn_BASE + TIVA_PWMn_INTERVAL * 1, .channel_id = 3, +#ifdef CONFIG_PWM_PULSECOUNT + .inited = false, + .irq = TIVA_IRQ_PWM0_GEN1, + .count = 0, + .cur_count = 0, + .handle = NULL, +#endif }; #endif @@ -177,6 +241,13 @@ static struct tiva_pwm_chan_s g_pwm_chan4 = .generator_id = 2, .generator_base = TIVA_PWM0_BASE + TIVA_PWMn_BASE + TIVA_PWMn_INTERVAL * 2, .channel_id = 4, +#ifdef CONFIG_PWM_PULSECOUNT + .inited = false, + .irq = TIVA_IRQ_PWM0_GEN2, + .count = 0, + .cur_count = 0, + .handle = NULL, +#endif }; #endif @@ -189,6 +260,13 @@ static struct tiva_pwm_chan_s g_pwm_chan5 = .generator_id = 2, .generator_base = TIVA_PWM0_BASE + TIVA_PWMn_BASE + TIVA_PWMn_INTERVAL * 2, .channel_id = 5, +#ifdef CONFIG_PWM_PULSECOUNT + .inited = false, + .irq = TIVA_IRQ_PWM0_GEN2, + .count = 0, + .cur_count = 0, + .handle = NULL, +#endif }; #endif @@ -198,9 +276,16 @@ 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_id = 3, .generator_base = TIVA_PWM0_BASE + TIVA_PWMn_BASE + TIVA_PWMn_INTERVAL * 3, .channel_id = 6, +#ifdef CONFIG_PWM_PULSECOUNT + .inited = false, + .irq = TIVA_IRQ_PWM0_GEN3, + .count = 0, + .cur_count = 0, + .handle = NULL, +#endif }; #endif @@ -213,6 +298,13 @@ static struct tiva_pwm_chan_s g_pwm_chan7 = .generator_id = 3, .generator_base = TIVA_PWM0_BASE + TIVA_PWMn_BASE + TIVA_PWMn_INTERVAL * 3, .channel_id = 7, +#ifdef CONFIG_PWM_PULSECOUNT + .inited = false, + .irq = TIVA_IRQ_PWM0_GEN3, + .count = 0, + .cur_count = 0, + .handle = NULL, +#endif }; #endif @@ -220,6 +312,76 @@ static struct tiva_pwm_chan_s g_pwm_chan7 = * Private Functions ************************************************************************************/ +/************************************************************************************ + * Name: tiva_pwm_gen[n]_interrupt + * + * Description: + * Pulse count interrupt handlers for PWM[n] + * + ************************************************************************************/ + +#if defined(CONFIG_PWM_PULSECOUNT) && defined(CONFIG_TIVA_PWM0_CHAN0) +static int tiva_pwm_gen0_interrupt(int irq, FAR void *context) +{ + return tiva_pwm_interrupt(&g_pwm_chan0); +} +#endif + +#if defined(CONFIG_PWM_PULSECOUNT) && defined(CONFIG_TIVA_PWM0_CHAN2) +static int tiva_pwm_gen1_interrupt(int irq, FAR void *context) +{ + return tiva_pwm_interrupt(&g_pwm_chan2); +} +#endif + +#if defined(CONFIG_PWM_PULSECOUNT) && defined(CONFIG_TIVA_PWM0_CHAN4) +static int tiva_pwm_gen2_interrupt(int irq, FAR void *context) +{ + return tiva_pwm_interrupt(&g_pwm_chan4); +} +#endif + +#if defined(CONFIG_PWM_PULSECOUNT) && defined(CONFIG_TIVA_PWM0_CHAN6) +static int tiva_pwm_gen3_interrupt(int irq, FAR void *context) +{ + return tiva_pwm_interrupt(&g_pwm_chan6); +} +#endif + +/************************************************************************************ + * Name: tiva_pwm_interrupt + * + * Description: + * Common pulse count interrupt handler. + * + ************************************************************************************/ + +#if defined(CONFIG_PWM_PULSECOUNT) && \ + (defined(CONFIG_TIVA_PWM0_CHAN0) || defined(CONFIG_TIVA_PWM0_CHAN2) || \ + defined(CONFIG_TIVA_PWM0_CHAN4) || defined(CONFIG_TIVA_PWM0_CHAN6)) +static int tiva_pwm_interrupt(struct tiva_pwm_chan_s *chan) +{ + /* Clear interrupt */ + + tiva_pwm_putreg(chan, TIVA_PWMn_ISC_OFFSET, INT_SET << INTCMPAD); + + /* Count down current pulse count */ + + chan->cur_count--; + + /* Disable PWM generator and reload current pulse count */ + + if (chan->cur_count == 0) + { + tiva_pwm_putreg(chan, TIVA_PWMn_CTL_OFFSET, CTL_DISABLE << TIVA_PWMn_CTL_ENABLE); + chan->cur_count = chan->count; + pwm_expired(chan->handle); + } + + return 0; +} +#endif + /************************************************************************************ * Name: tiva_pwm_getreg * @@ -251,7 +413,7 @@ static inline void tiva_pwm_putreg(struct tiva_pwm_chan_s *chan, } /**************************************************************************** - * Name: pwm_setup + * Name: tiva_pwm_setup * * Description: * This method is called when the driver is opened. The lower half driver @@ -288,7 +450,7 @@ static int tiva_pwm_setup(FAR struct pwm_lowerhalf_s *dev) } /**************************************************************************** - * Name: pwm_shutdown + * Name: tiva_pwm_shutdown * * Description: * This method is called when the driver is closed. The lower half driver @@ -320,7 +482,7 @@ static int tiva_pwm_shutdown(FAR struct pwm_lowerhalf_s *dev) } /**************************************************************************** - * Name: pwm_start + * Name: tiva_pwm_start * * Description: * (Re-)initialize the timer resources and start the pulsed output @@ -328,33 +490,117 @@ static int tiva_pwm_shutdown(FAR struct pwm_lowerhalf_s *dev) * Input parameters: * dev - A reference to the lower half PWM driver state structure * info - A reference to the characteristics of the pulsed output + * handle - This is the handle that was provided to the lower-half + * start() method. + * + * Returned Value: + * Zero on success; a negated errno value on failure + * + ****************************************************************************/ + +#ifdef CONFIG_PWM_PULSECOUNT +static int tiva_pwm_start(FAR struct pwm_lowerhalf_s *dev, + FAR const struct pwm_info_s *info, FAR void *handle) +{ + FAR struct tiva_pwm_chan_s *chan = (FAR struct tiva_pwm_chan_s *)dev; + pwminfo("start PWM for channel %d\n", chan->channel_id); + + /* Save the handle */ + + chan->handle = handle; + + /* Load pulse count and current pulse count + * + * Workaround: + * Count should be add 1 for the first time + */ + + chan->count = info->count; + chan->cur_count = info->count; + + if (!chan->inited) + { + chan->count++; + chan->cur_count++; + chan->inited = true; + } + + /* Count 0 means to generate indefinite number of pulses */ + + if (info->count == 0) + { + pwm_expired(chan->handle); + + /* Disable interrupt */ + + uint32_t enable = getreg32(chan->controller_base + TIVA_PWM_INTEN_OFFSET); + enable &= ~(INT_ENABLE << chan->generator_id); + putreg32(enable, chan->controller_base + TIVA_PWM_INTEN_OFFSET); + } + else + { + /* Enable interrupt */ + + uint32_t enable = getreg32(chan->controller_base + TIVA_PWM_INTEN_OFFSET); + enable |= (INT_ENABLE << chan->generator_id); + putreg32(enable, chan->controller_base + TIVA_PWM_INTEN_OFFSET); + } + + /* Start the timer */ + + return tiva_pwm_timer(chan, info); +} +#else +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); + + /* Start the timer */ + + return tiva_pwm_timer(chan, info); +} +#endif + +/**************************************************************************** + * Name: tiva_pwm_timer + * + * Description: + * Configure PWM registers and start the PWM timer + * + * 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) +static inline int tiva_pwm_timer(FAR struct tiva_pwm_chan_s *chan, + 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; + pwminfo("> frequency = %d\n", frequency); + pwminfo("> duty = %d\n", duty); + /* 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); + 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); + GENx_LOW << TIVA_PWMn_GENx_ACTCMPBD | + GENx_HIGH << TIVA_PWMn_GENx_ACTLOAD); } /* Set the PWM period (refer to TM4C1294NC 23.4.7) */ @@ -363,7 +609,7 @@ static int tiva_pwm_start(FAR struct pwm_lowerhalf_s *dev, 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); + pwminfo("> load = %u (%08x)\n", load, load); if (load >= g_pwm_counter || load < 1) { @@ -383,7 +629,7 @@ static int tiva_pwm_start(FAR struct pwm_lowerhalf_s *dev, 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); + pwminfo("> comp = %u (%08x)\n", comp, comp); if (chan->channel_id % 2 == 0) { @@ -408,7 +654,7 @@ static int tiva_pwm_start(FAR struct pwm_lowerhalf_s *dev, } /**************************************************************************** - * Name: pwm_stop + * Name: tiva_pwm_stop * * Description: * Stop the pulsed output and reset the timer resources @@ -441,7 +687,7 @@ static int tiva_pwm_stop(FAR struct pwm_lowerhalf_s *dev) } /**************************************************************************** - * Name: pwm_ioctl + * Name: tiva_pwm_ioctl * * Description: * Lower-half logic may support platform-specific ioctl commands @@ -550,11 +796,12 @@ FAR struct pwm_lowerhalf_s *tiva_pwm_initialize(int 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); + pwminfo("channel %d:\n", channel); + pwminfo("> channel_id = %d\n", chan->channel_id); + pwminfo("> controller_id = %d\n", chan->controller_id); + pwminfo("> controller_base = %08x\n", chan->controller_base); + pwminfo("> generator_id = %d\n", chan->generator_id); + pwminfo("> generator_base = %08x\n", chan->generator_base); /* Enable PWM controller (refer to TM4C1294NC 23.4.1) */ @@ -564,14 +811,55 @@ FAR struct pwm_lowerhalf_s *tiva_pwm_initialize(int channel) /* 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) + * On TM4C1294NC, configure the PWM clock source as 1.875MHz (the system + * clock 120MHz divided by 64) * * 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, + putreg32(CC_USEPWM << TIVA_PWM_CC_USEPWM | CC_PWMDIV_64 << TIVA_PWM_CC_PWMDIV, chan->controller_base + TIVA_PWM_CC); +#ifdef CONFIG_PWM_PULSECOUNT + + /* Enable interrupt INTCMPAD mode */ + + tiva_pwm_putreg(chan, TIVA_PWMn_INTEN_OFFSET, INT_SET << INTCMPAD); + + /* Attach IRQ handler and enable interrupt*/ + + switch (chan->channel_id) + { +#ifdef CONFIG_TIVA_PWM0_CHAN0 + case 0: + irq_attach(chan->irq, tiva_pwm_gen0_interrupt); + up_enable_irq(chan->irq); + break; +#endif + +#ifdef CONFIG_TIVA_PWM0_CHAN2 + case 2: + irq_attach(chan->irq, tiva_pwm_gen1_interrupt); + up_enable_irq(chan->irq); + break; +#endif + +#ifdef CONFIG_TIVA_PWM0_CHAN4 + case 4: + irq_attach(chan->irq, tiva_pwm_gen2_interrupt); + up_enable_irq(chan->irq); + break; +#endif + +#ifdef CONFIG_TIVA_PWM0_CHAN6 + case 6: + irq_attach(chan->irq, tiva_pwm_gen3_interrupt); + up_enable_irq(chan->irq); + break; +#endif + } + +#endif + return (FAR struct pwm_lowerhalf_s *)chan; } diff --git a/arch/sim/include/spinlock.h b/arch/sim/include/spinlock.h index 350bf24b33e..85333276b12 100644 --- a/arch/sim/include/spinlock.h +++ b/arch/sim/include/spinlock.h @@ -46,6 +46,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Must match definitions in up_testset.c */ #define SP_UNLOCKED false /* The Un-locked state */ diff --git a/arch/sim/src/nuttx-names.dat b/arch/sim/src/nuttx-names.dat index 759743be534..f1373f1d9c1 100644 --- a/arch/sim/src/nuttx-names.dat +++ b/arch/sim/src/nuttx-names.dat @@ -62,7 +62,10 @@ pthread_mutex_init NXpthread_mutex_init pthread_mutex_lock NXpthread_mutex_lock pthread_mutex_unlock NXpthread_mutex_unlock pthread_setspecific NXpthread_setspecific +pthread_setcancelstate NXpthread_setcancelstate +pthread_setcanceltype NXpthread_setcanceltype pthread_sigmask NXpthread_sigmask +pthread_testcancel NXpthread_testcancel pthread_yield NXpthread_yield ptsname NXptsname ptsname_r NXptsname_r diff --git a/arch/sim/src/up_internal.h b/arch/sim/src/up_internal.h index 53f4e2cd42e..7ca32a479ea 100644 --- a/arch/sim/src/up_internal.h +++ b/arch/sim/src/up_internal.h @@ -52,7 +52,7 @@ # include # ifdef CONFIG_SMP # include -# include +# include # endif #endif diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 5c051980e68..b00d8f0d235 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -22,6 +22,10 @@ config ARCH_CHIP_ESP32 of two CPUs is symmetric, meaning they use the same addresses to access the same memory. + The two CPUs are named "PRO_CPU" and "APP_CPU" (for "protocol" and + "application"), however for most purposes the two CPUs are + interchangeable. + endchoice # XTENSA chip selection config ARCH_FAMILY_LX6 diff --git a/arch/xtensa/include/esp32/irq.h b/arch/xtensa/include/esp32/irq.h index 4c8e6c47ca5..6c0373856dd 100644 --- a/arch/xtensa/include/esp32/irq.h +++ b/arch/xtensa/include/esp32/irq.h @@ -378,7 +378,7 @@ #define ESP32_CPUINT_NEDGEPERIPHS 4 #define EPS32_CPUINT_EDGESET 0x50400400 -#define ESP32_CPUINT_NNMIPERIPHS 4 +#define ESP32_CPUINT_NNMIPERIPHS 1 #define EPS32_CPUINT_NMISET 0x00004000 #define ESP32_CPUINT_TIMER0 6 @@ -388,11 +388,12 @@ #define ESP32_CPUINT_TIMER2 16 #define ESP32_CPUINT_SOFTWARE1 29 -#define ESP32_CPUINT_NINTERNAL 5 +#define ESP32_CPUINT_NINTERNAL 6 -#define ESP32_CPUINT_MAX 31 -#define EPS32_CPUINT_PERIPHSET 0xdffe6f3f -#define EPS32_CPUINT_INTERNALSET 0x200180c0 +#define ESP32_NCPUINTS 32 +#define ESP32_CPUINT_MAX (ESP32_NCPUINTS - 1) +#define EPS32_CPUINT_PERIPHSET 0xdffe773f +#define EPS32_CPUINT_INTERNALSET 0x200188c0 /* Priority 1: 0-10, 12-13, 17-18 (15) * Priority 2: 19-21 (3) diff --git a/arch/xtensa/include/irq.h b/arch/xtensa/include/irq.h index 0e8f7c33b01..aee6625ddea 100644 --- a/arch/xtensa/include/irq.h +++ b/arch/xtensa/include/irq.h @@ -108,20 +108,21 @@ # define REG_LBEG (_REG_LOOPS_START + 0) # define REG_LEND (_REG_LOOPS_START + 1) # define REG_LCOUNT (_REG_LOOPS_START + 2) -# define _REG_CALL0_START (_REG_LOOPS_START + 3) +# define _REG_WINDOW_TMPS (_REG_LOOPS_START + 3) #else -# define _REG_CALL0_START _REG_LOOPS_START +# define _REG_WINDOW_TMPS _REG_LOOPS_START #endif #ifndef __XTENSA_CALL0_ABI__ - /* Temporary space for saving stuff during window spill */ + /* Temporary space for saving stuff during window spill. + * REVISIT: I don't think that we need so many temporaries. + */ -# define REG_TMP0 (_REG_CALL0_START + 0) -# define REG_TMP1 (_REG_CALL0_START + 1) -# define REG_TMP2 (_REG_CALL0_START + 2) -# define _REG_OVLY_START (_REG_CALL0_START + 3) +# define REG_TMP0 (_REG_WINDOW_TMPS + 0) +# define REG_TMP1 (_REG_WINDOW_TMPS + 1) +# define _REG_OVLY_START (_REG_WINDOW_TMPS + 2) #else -# define _REG_OVLY_START _REG_CALL0_START +# define _REG_OVLY_START _REG_WINDOW_TMPS #endif #ifdef CONFIG_XTENSA_USE_OVLY diff --git a/arch/xtensa/include/xtensa/xtensa_coproc.h b/arch/xtensa/include/xtensa/xtensa_coproc.h index 54794447034..26829a7a3a4 100644 --- a/arch/xtensa/include/xtensa/xtensa_coproc.h +++ b/arch/xtensa/include/xtensa/xtensa_coproc.h @@ -153,7 +153,8 @@ static inline uint32_t xtensa_get_cpenable(void) __asm__ __volatile__ ( - "rsr %0, CPENABLE" : "=r"(cpenable) + "\trsr %0, CPENABLE\n" + : "=r"(cpenable) ); return cpenable; @@ -165,7 +166,9 @@ static inline void xtensa_set_cpenable(uint32_t cpenable) { __asm__ __volatile__ ( - "wsr %0, PS" : : "r"(cpenable) + "\twsr %0, CPENABLE\n" + "\trsync\n" + : : "r"(cpenable) ); } diff --git a/arch/xtensa/src/common/xtensa.h b/arch/xtensa/src/common/xtensa.h index 422ec0b96fb..133903d1941 100644 --- a/arch/xtensa/src/common/xtensa.h +++ b/arch/xtensa/src/common/xtensa.h @@ -104,10 +104,30 @@ /* Check if an interrupt stack size is configured */ -#ifndef CONFIG_ARCH_INTERRUPTSTACK -# define CONFIG_ARCH_INTERRUPTSTACK 0 +#define HAVE_INTERRUPTSTACK 1 + +#if !defined(CONFIG_ARCH_INTERRUPTSTACK) +# define CONFIG_ARCH_INTERRUPTSTACK 0 +# undef HAVE_INTERRUPTSTACK +#elif CONFIG_ARCH_INTERRUPTSTACK < 16 +# warning CONFIG_ARCH_INTERRUPTSTACK is to small +# undef HAVE_INTERRUPTSTACK #endif +#define INTERRUPTSTACK_SIZE ((CONFIG_ARCH_INTERRUPTSTACK + 15) & ~15) +#define INTERRUPT_STACKWORDS (INTERRUPTSTACK_SIZE >> 2) + +/* An IDLE thread stack size for CPU0 must be defined */ + +#if !defined(CONFIG_IDLETHREAD_STACKSIZE) +# error CONFIG_IDLETHREAD_STACKSIZE is not defined +#elif CONFIG_IDLETHREAD_STACKSIZE < 16 +# error CONFIG_IDLETHREAD_STACKSIZE is to small +#endif + +#define IDLETHREAD_STACKSIZE ((CONFIG_IDLETHREAD_STACKSIZE + 15) & ~15) +#define IDLETHREAD_STACKWORDS (IDLETHREAD_STACKSIZE >> 2) + /* Used for stack usage measurements */ #define STACK_COLOR 0xdeadbeef @@ -180,12 +200,16 @@ extern volatile uint32_t *g_current_regs[1]; #endif -/* Address of the saved user stack pointer */ +#ifdef HAVE_INTERRUPTSTACK +/* The (optional) interrupt stack */ -#if CONFIG_ARCH_INTERRUPTSTACK > 3 -extern void g_intstackbase; +extern uint32_t g_intstack[INTERRUPT_STACKWORDS]; #endif +/* Address of the CPU0 IDLE thread */ + +extern uint32_t g_idlestack[IDLETHREAD_STACKWORDS]; + /* These 'addresses' of these values are setup by the linker script. They are * not actual uint32_t storage locations! They are only used meaningfully in the * following way: @@ -266,7 +290,7 @@ void xtensa_coproc_disable(struct xtensa_cpstate_s *cpstate, int cpset); /* IRQs */ -uint32_t *xtensa_int_decode(uint32_t *regs); +uint32_t *xtensa_int_decode(uint32_t cpuints, uint32_t *regs); uint32_t *xtensa_irq_dispatch(int irq, uint32_t *regs); uint32_t xtensa_enable_cpuint(uint32_t *shadow, uint32_t intmask); uint32_t xtensa_disable_cpuint(uint32_t *shadow, uint32_t intmask); @@ -293,7 +317,8 @@ void xtensa_coproc_restorestate(struct xtensa_cpstate_s *cpstate); /* Signals */ -void xtensa_sigdeliver(void); +void _xtensa_sig_trampoline(void); +void xtensa_sig_deliver(void); /* Chip-specific functions **************************************************/ /* Chip specific functions defined in arch/xtensa/src/ */ diff --git a/arch/xtensa/src/common/xtensa_abi.h b/arch/xtensa/src/common/xtensa_abi.h index 63e53f26c5d..db5ab5d5521 100644 --- a/arch/xtensa/src/common/xtensa_abi.h +++ b/arch/xtensa/src/common/xtensa_abi.h @@ -58,6 +58,27 @@ * CALL8, or CALL12 instructions to save 4, 8, or 12 live registers. Calls * to routines that use a2..a7 for parameters may use only CALL8 or CALL12. * + * Arguments are passed in both registers and memory. The first six incoming + * arguments are stored in registers a2 through a7, and additional arguments + * are stored on the stack starting at the current stack pointer a1. Because + * Xtensa uses register windows that rotate during a function call, outgoing + * arguments that will become the incoming arguments must be stored to + * different register numbers. Depending on the call instruction and, thus, + * the rotation of the register window, the arguments are passed starting + * starting with register a(2+N), where N is the size of the window rotation. + * Therefore, the first argument in case of a call4 instruction is placed into + * a6, and for a call8 instruction into a10. Large arguments (8-bytes) are + * always passed in an even/odd register pair even if that means to omit a + * register for alignment. The return values are stored in a2 through a7. + * + * return addr stack ptr arg0, arg1, arg2, arg3, arg4, arg5 + * ----------- --------- ---------------------------------- + * a0 a1 a2, a3, a4, a5, a6, a7 + * + * call4 a4 a5 a6, a7, a8, a9, a10, a11 + * call8 a8 a9 a10, a11, a12, a13, a14, a15 + * call12 a12 a13 a14, a15 --- --- --- --- + * * The stack pointer SP should only be modified by ENTRY and MOVSP * instructions (except for initialization and restoration). If some other * instruction modifies SP, any values in the register-spill area will not diff --git a/arch/xtensa/src/common/xtensa_checkstack.c b/arch/xtensa/src/common/xtensa_checkstack.c new file mode 100644 index 00000000000..48535139057 --- /dev/null +++ b/arch/xtensa/src/common/xtensa_checkstack.c @@ -0,0 +1,214 @@ +/**************************************************************************** + * arch/xtensa/src/common/xtensa_checkstack.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 "xtensa.h" +#include "sched/sched.h" + +#ifdef CONFIG_STACK_COLORATION + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static size_t do_stackcheck(uintptr_t alloc, size_t size); + +/**************************************************************************** + * Name: do_stackcheck + * + * Description: + * Determine (approximately) how much stack has been used be searching the + * stack memory for a high water mark. That is, the deepest level of the + * stack that clobbered some recognizable marker in the stack memory. + * + * Input Parameters: + * alloc - Allocation base address of the stack + * size - The size of the stack in bytes + * + * Returned value: + * The estimated amount of stack space used. + * + ****************************************************************************/ + +static size_t do_stackcheck(uintptr_t alloc, size_t size) +{ + FAR uintptr_t start; + FAR uintptr_t end; + FAR uint32_t *ptr; + size_t mark; + + if (size == 0) + { + return 0; + } + + /* Get aligned addresses of the top and bottom of the stack */ + +#ifdef CONFIG_TLS + /* Skip over the TLS data structure at the bottom of the stack */ + + DEBUGASSERT((alloc & TLS_STACK_MASK) == 0); + start = alloc + sizeof(struct tls_info_s); +#else + start = alloc & ~3; +#endif + end = (alloc + size + 3) & ~3; + + /* Get the adjusted size based on the top and bottom of the stack */ + + size = end - start; + + /* The Xtensa CPUs use a push-down stack: the stack grows toward lower + * addresses in memory. We need to start at the lowest address in the + * stack memory allocation and search to higher addresses. The first word + * we encounter that does not have the magic value is the high water mark. + */ + + for (ptr = (FAR uint32_t *)start, mark = (size >> 2); + *ptr == STACK_COLOR && mark > 0; + ptr++, mark--); + + /* If the stack is completely used, then this might mean that the stack + * overflowed from above (meaning that the stack is too small), or may + * have been overwritten from below meaning that some other stack or data + * structure overflowed. + * + * If you see returned values saying that the entire stack is being used + * then enable the following logic to see it there are unused areas in the + * middle of the stack. + */ + +#if 0 + if (mark + 16 > nwords) + { + int i; + int j; + + ptr = (FAR uint32_t *)start; + for (i = 0; i < size; i += 4*64) + { + for (j = 0; j < 64; j++) + { + int ch; + if (*ptr++ == STACK_COLOR) + { + ch = '.'; + } + else + { + ch = 'X'; + } + + up_putc(ch); + } + + up_putc('\n'); + } + } +#endif + + /* Return our guess about how much stack space was used */ + + return mark << 2; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_check_stack and friends + * + * Description: + * Determine (approximately) how much stack has been used be searching the + * stack memory for a high water mark. That is, the deepest level of the + * stack that clobbered some recognizable marker in the stack memory. + * + * Input Parameters: + * None + * + * Returned value: + * The estimated amount of stack space used. + * + ****************************************************************************/ + +size_t up_check_tcbstack(FAR struct tcb_s *tcb) +{ + return do_stackcheck((uintptr_t)tcb->stack_alloc_ptr, tcb->adj_stack_size); +} + +ssize_t up_check_tcbstack_remain(FAR struct tcb_s *tcb) +{ + return (ssize_t)tcb->adj_stack_size - (ssize_t)up_check_tcbstack(tcb); +} + +size_t up_check_stack(void) +{ + return up_check_tcbstack(this_task()); +} + +ssize_t up_check_stack_remain(void) +{ + return up_check_tcbstack_remain(this_task()); +} + +#if CONFIG_ARCH_INTERRUPTSTACK > 3 +size_t up_check_intstack(void) +{ + return do_stackcheck((uintptr_t)&g_intstackalloc, (CONFIG_ARCH_INTERRUPTSTACK & ~3)); +} + +size_t up_check_intstack_remain(void) +{ + return (CONFIG_ARCH_INTERRUPTSTACK & ~3) - up_check_intstack(); +} +#endif + +#endif /* CONFIG_STACK_COLORATION */ diff --git a/arch/xtensa/src/common/xtensa_context.S b/arch/xtensa/src/common/xtensa_context.S index 8d9462e5a60..aa0306cb5a2 100644 --- a/arch/xtensa/src/common/xtensa_context.S +++ b/arch/xtensa/src/common/xtensa_context.S @@ -116,7 +116,6 @@ _xtensa_context_save: - s32i a2, a2, (4 * REG_A2) s32i a3, a2, (4 * REG_A3) s32i a4, a2, (4 * REG_A4) s32i a5, a2, (4 * REG_A5) @@ -146,22 +145,13 @@ _xtensa_context_save: s32i a3, a2, (4 * REG_LCOUNT) #endif -#ifndef __XTENSA_CALL0_ABI__ - mov a9, a0 /* Preserve ret addr */ -#endif - #ifndef __XTENSA_CALL0_ABI__ /* To spill the reg windows, temp. need pre-interrupt stack ptr and - * a4-15. Need to save a9,12,13 temporarily (in frame temps) and - * recover originals. Interrupts need to be disabled below - * XCHAL_EXCM_LEVEL and window overflow and underflow exceptions - * disabled (assured by PS.EXCM == 1). + * a4-15. Interrupts need to be disabled below XCHAL_EXCM_LEVEL and + * window overflow and underflow exceptions disabled (assured by + * PS.EXCM == 1). */ - s32i a12, a2, (4 * REG_TMP0) /* Temp. save stuff in stack frame */ - s32i a13, a2, (4 * REG_TMP1) - s32i a9, a2, (4 * REG_TMP2) - #ifdef CONFIG_XTENSA_USE_OVLY /* Save the overlay state if we are supporting overlays. Since we just * saved three registers, we can conveniently use them here. Note that @@ -171,17 +161,16 @@ _xtensa_context_save: #error Overly support is not implemented #endif - l32i a12, a2, (4 * REG_A12) /* Recover original a9,12,13 */ - l32i a13, a2, (4 * REG_A13) - l32i a9, a2, (4 * REG_A9) + s32i a0, a2, (4 * REG_TMP0) /* Save return address */ + s32i sp, a2, (4 * REG_TMP1) /* Save current stack pointer */ + wsr a2, EXCSAVE_1 /* Preserve register save area */ -#warning REVISIT: The following is probably not correct due to changes in registers - addi sp, sp, (4 * XCPTCONTEXT_SIZE) /* Restore the interruptee's SP */ - call0 _xtensa_window_spill /* Preserves only a4,5,8,9,12,13 */ - addi sp, sp, -(4 * XCPTCONTEXT_SIZE) - l32i a12, sp, (4 * REG_TMP0) /* Recover stuff from stack frame */ - l32i a13, sp, (4 * REG_TMP1) - l32i a9, sp, (4 * REG_TMP2) + l32i sp, a2, (4 * REG_A1) /* Restore the interruptee's SP */ + call0 _xtensa_window_spill /* Preserves only a4-a5, a8-a9, a12-a13 */ + + rsr a2, EXCSAVE_1 /* Save interruptee's a0 */ + l32i a0, a2, (4 * REG_TMP0) /* Save return address */ + l32i sp, a2, (4 * REG_TMP1) /* Save current stack pointer */ #endif ret @@ -193,13 +182,11 @@ _xtensa_context_save: * * Description: * - * NOTE: MUST BE CALLED ONLY BY 'CALL0' INSTRUCTION! - * * This functions implements the moral equivalent of setjmp(). It is * called from user code (with interrupts disabled) to save the current * state of the running thread. This function always returns zero. * However, it sets the saved value of the return address (A2) to 1. - * If the thread is restarted via _xtensa_contest_restore or + * If the thread is s via _xtensa_context_restore or * xtensa_context_restore, it will appear as a second return from * xtensa_context_save but with the returned value of 1 to distinguish * the two cases. @@ -217,6 +204,24 @@ _xtensa_context_save: * Assumptions: * - Interrupts are disabled. * + ****************************************************************************/ + +#ifdef __XTENSA_CALL0_ABI__ + +/**************************************************************************** + * Name: xtensa_context_save: + * + * Description: + * This implementation of xtensa_context_save for the case of the CALL0 ABI + * + * Input State: + * a0 = The return value to the caller. + * a2 = The address of the register state state structure + * + * Return state: + * a0 = The return value to the caller. + * a2, a12-a15 preserved as at entry + * ****************************************************************************/ .global xtensa_context_save @@ -227,30 +232,185 @@ _xtensa_context_save: .align 4 xtensa_context_save: + ENTRY(16) - /* Set up for call to _xtensa_context_save() */ + /* Set up for (potential) call to _xtensa_context_save() */ - rsr a12, PS /* Save callee's PS */ - s32i a12, a2, (4 * REG_PS) + s32i a3, a2, (4 * REG_A3) /* Get scratch register */ + rsr a3, PS /* Save callee's PS */ + s32i a3, a2, (4 * REG_PS) s32i a0, a2, (4 * REG_PC) /* Save Return address as PC */ s32i a0, a2, (4 * REG_A0) /* Save callee's a0 */ s32i sp, a2, (4 * REG_A1) /* Save callee's SP */ - movi a12, 1 /* Set saved A2 to 1 */ - s32i a12, a2, (4 * REG_A2) + movi a3, 1 /* Set saved A2 to 1 */ + s32i a3, a2, (4 * REG_A2) - /* Save the rest of the processor state */ + /* Save the rest of the processor state. For the CALL0 ABI, we can user + * _xtensa_context_save(), Otherwise we duplicate the context save here + * to avoid the window spill. + */ + l32i r3, a2, (4 * REG_A3) /* Recover original a3 */ call0 _xtensa_context_save /* Save full register state */ /* Recover the return address and return zero */ l32i a0, a2, (4 * REG_A0) /* Recover return addess */ movi a2, 0 /* Return zero */ - - ret + RET(16) .size xtensa_context_save, . - xtensa_context_save +#endif + +/**************************************************************************** + * This implementation of xtensa_context_save for the case of the window ABI. + * This case is more complex. For the Window ABI, there is a "hook" that + * performs the low level state state. xtensa_context_save() is a simply + * trampoline function that performs the window oeprations in that + * configuration. + ****************************************************************************/ + +#ifndef __XTENSA_CALL0_ABI__ + +/**************************************************************************** + * Name: _xtensa_save_hook: + * + * Input State: + * True return value has already been saved + * a0 = The return value into xtensa_context_save() + * a2 = The address of the register state state structure + * + * Return state: + * a0, a3 modified. + * Other values as on entry + * Returned value is in a3 (non-stanadard) + * + ****************************************************************************/ + + .type _xtensa_save_hook, @function + + .align 4 + .literal_position + .align 4 + +_xtensa_save_hook: + + /* Save the return value of 1 that will be used when returning from a + * context switch. NOTE that the returned value from this function is + * expected in a3 (not the usual a2). This also frees up a3 for a use + * as a scratch register. + */ + + movi a3, 1 /* Set saved a3 to 1 */ + s32i a3, a2, (4 * REG_A3) + + /* Save the rest of the processor state. + * + * REVISIT: We could save a lot here. It should not be necessary to + * preserve all of these registers. The ABI permits volatile, callee- + * saved, registers to be clobbered on function calls. We save the + * whole tamale here mostly for debug purposes. + * + * NOTE that a3 was saved above. The true a0 return value was saved + * in xtensa_context_save. The a0 value saved below is the return into + * xtensa_context_save. + */ + + rsr a3, PS /* Save callee's PS */ + s32i a3, a2, (4 * REG_PS) + s32i a0, a2, (4 * REG_PC) /* Save Return address as PC */ + + s32i sp, a2, (4 * REG_A1) /* Save callee's SP */ + s32i a2, a2, (4 * REG_A2) + s32i a4, a2, (4 * REG_A4) /* Save remaining registers */ + s32i a5, a2, (4 * REG_A5) + s32i a6, a2, (4 * REG_A6) + s32i a7, a2, (4 * REG_A7) + s32i a8, a2, (4 * REG_A8) + s32i a9, a2, (4 * REG_A9) + s32i a10, a2, (4 * REG_A10) + s32i a11, a2, (4 * REG_A11) + + /* Call0 ABI callee-saved regs a12-15 */ + + s32i a12, a2, (4 * REG_A12) + s32i a13, a2, (4 * REG_A13) + s32i a14, a2, (4 * REG_A14) + s32i a15, a2, (4 * REG_A15) + + rsr a3, SAR + s32i a3, a2, (4 * REG_SAR) + +#ifdef XCHAL_HAVE_LOOPS + rsr a3, LBEG + s32i a3, a2, (4 * REG_LBEG) + rsr a3, LEND + s32i a3, a2, (4 * REG_LEND) + rsr a3, LCOUNT + s32i a3, a2, (4 * REG_LCOUNT) +#endif + + /* NOTE that the returned value is through a3 */ + + movi a3, 0 /* Return zero, no context switch */ + ret + + .size _xtensa_save_hook, . - _xtensa_save_hook + +/**************************************************************************** + * Name: xtensa_context_save: + * + * Description: + * This is the implementation of xtensa_context_save for the case of the + * window ABI. In the window ABI configuration, xtensa_context_save is a + * thin "trampoline" layer. It performs the ENTRY window operations on + * entry and the exit. A call0 is used to force the retun from the context + * switch to the window return within this trampoline. + * + * Input State: + * a0 = The true return value to the caller. + * a2 = The address of the register state state structure + * + * Return state: + * a0, a2, and a3 modified. + * Returned value is in a2 + * + ****************************************************************************/ + + .global xtensa_context_save + .type xtensa_context_save, @function + + .align 4 + .literal_position + .align 4 + +xtensa_context_save: + ENTRY(16) + + /* Save the true return address in the register save structure (a0). */ + + s32i a0, a2, (4 * REG_A0) /* Save true return address (a0) */ + + /* Then perform the actual state save in _xtensa_save_hook. The saved + * EPC will be set to the return from this function then we will do the + * RET(16) window fix-up. + */ + + call0 _xtensa_save_hook /* Save full register state */ + + /* a0 and a2 will be automatically restored in the context switch case + * with a3=1. In the non-context switch return with a2=0, a2 will still + * be valid, but we have to restore a0 ourself. The following should + * work in either case. + */ + + l32i a0, a2, (4 * REG_A0) /* Recover the true return address (a0) */ + mov a2, a3 /* Move a3 to the correct register for return */ + RET(16) + + .size xtensa_context_save, . - xtensa_context_save +#endif /**************************************************************************** * Name: _xtensa_context_restore @@ -273,12 +433,13 @@ xtensa_context_save: * * Exit conditions: * - A0 = Return address in caller. - * - Other registers are restored as detailed above (including A1 and A2). + * - Other registers are restored as detailed above + * - A2 is preserved * ****************************************************************************/ .global _xtensa_context_restore - .type _xtensa_context_restore,@function + .type xtensa_context_restore,@function .align 4 .literal_position @@ -287,12 +448,12 @@ xtensa_context_save: _xtensa_context_restore: #ifdef XCHAL_HAVE_LOOPS - l32i a2, a2, (4 * REG_LBEG) - l32i a3, a2, (4 * REG_LEND) - wsr a2, LBEG - l32i a2, a2, (4 * REG_LCOUNT) - wsr a3, LEND - wsr a2, LCOUNT + l32i a3, a2, (4 * REG_LBEG) + l32i a4, a2, (4 * REG_LEND) + wsr a3, LBEG + l32i a3, a2, (4 * REG_LCOUNT) + wsr a4, LEND + wsr a3, LCOUNT #endif #ifdef CONFIG_XTENSA_USE_OVLY @@ -326,10 +487,6 @@ _xtensa_context_restore: l32i a14, a2, (4 * REG_A14) l32i a15, a2, (4 * REG_A15) - /* Finally, restore A2 with the correct value */ - - l32i a2, a2, (4 * REG_A2) - ret .size _xtensa_context_restore, . - _xtensa_context_restore @@ -339,8 +496,6 @@ _xtensa_context_restore: * * Description: * - * NOTE: MUST BE CALLED ONLY BY 'CALL0' INSTRUCTION! - * * This functions implements the moral equivalent of longjmp(). It is * called from user code (with interrupts disabled) to restor the current * state of the running thread. This function always appears to be a @@ -372,8 +527,40 @@ _xtensa_context_restore: .align 4 xtensa_context_restore: + ENTRY(16) - /* Restore the processor state */ +#ifndef __XTENSA_CALL0_ABI__ + /* Force a spill of the live registers of the thread that has been + * suspended. + * + * _xtensa_window_spill return state: + * a2, a3: clobbered + * a4,a5,a8,a9,a12,a13: preserved + * a6,a7,a10,a11,a14,a15 clobbered if they were part of window(s) + * to be spilled, otherwise they are the same as on entry + * loop registers: Perserved + * SAR: clobbered + * + * We need to preserve only a2 for _xtensa_context_restore + */ + + mov a4, a2 /* Save a2 in a preserved register */ + rsr a5, PS /* Save PS in preserved register */ + + movi a3, ~(PS_WOE_MASK | PS_INTLEVEL_MASK) + and a2, a5, a3 /* Clear WOE, INTLEVEL */ + addi a2, a2, XCHAL_EXCM_LEVEL /* Set INTLEVEL = XCHAL_EXCM_LEVEL */ + wsr a2, PS /* Apply to PS */ + rsync + + call0 _xtensa_window_spill + wsr a5, PS /* Restore PS */ + rsync + + mov a2, a4 /* Recover a2 */ +#endif + + /* Restore the processor state for the newly started thread */ call0 _xtensa_context_restore /* Restore full register state */ @@ -382,10 +569,15 @@ xtensa_context_restore: l32i a0, a2, (4 * REG_PS) /* Restore PS */ wsr a0, PS l32i a0, a2, (4 * REG_PC) /* Set up for RFE */ - rsr a0, EPC + wsr a0, EPC_1 l32i a0, a2, (4 * REG_A0) /* Restore a0 */ l32i a2, a2, (4 * REG_A2) /* Restore A2 */ + /* Return from exception. RFE returns from either the UserExceptionVector + * or the KernelExceptionVector. RFE sets PS.EXCM back to 0, and then + * jumps to the address in EPC[1]. PS.UM and PS.WOE are left unchanged. + */ + rfe /* And return from "exception" */ .size xtensa_context_restore, . - xtensa_context_restore diff --git a/arch/xtensa/src/common/xtensa_coproc.S b/arch/xtensa/src/common/xtensa_coproc.S index 8b01063bf3b..6af4849ceea 100644 --- a/arch/xtensa/src/common/xtensa_coproc.S +++ b/arch/xtensa/src/common/xtensa_coproc.S @@ -225,26 +225,12 @@ xtensa_coproc_savestate: #ifdef __XTENSA_CALL0_ABI__ /* Need to preserve a8-11. _xtensa_coproc_savestate modifies a2-a7, - * a13-a15. So no registers need be saved. + * a13-a15. a12-a15 are callee saved registers so a13-a14 must be + * preserved. */ ENTRY(16) - - /* Call _xtensa_coproc_savestate() with A2=address of co-processor - * save area. - */ - - call0 _xtensa_coproc_savestate - RET(16) - -#else - - /* Need to preserve a8-15. _xtensa_coproc_savestate modifies a2-a7, - * a13-a15. So only a13-a15 need be preserved. - */ - - ENTRY(16) - s32i a13, sp, LOCAL_OFFSET(1) + s32i a13, sp, LOCAL_OFFSET(1) /* Save clobbered registers */ s32i a14, sp, LOCAL_OFFSET(2) s32i a15, sp, LOCAL_OFFSET(3) @@ -256,12 +242,30 @@ xtensa_coproc_savestate: /* Restore a13-15 and return */ - l32i a13, sp, LOCAL_OFFSET(1) + l32i a13, sp, LOCAL_OFFSET(1) /* Restore clobbered registers */ l32i a14, sp, LOCAL_OFFSET(2) l32i a15, sp, LOCAL_OFFSET(3) - RET(16) +#else + /* Need to preserve a8-15. _xtensa_coproc_savestate modifies a2-a7, + * a13-a15. So a13-a15 may need to be preserved. + */ + + ENTRY(32 /*16*/) /* REVISIT: Why 32? */ + s32i a0, sp, LOCAL_OFFSET(1) /* Save return address */ + + /* Call _xtensa_coproc_savestate() with A2=address of co-processor + * save area. + */ + + call0 _xtensa_coproc_savestate + + /* Restore a0 and return */ + + l32i a0, sp, LOCAL_OFFSET(1) /* Recover return address */ + RET(32 /*16*/) /* REVISIT: Why 32? */ + #endif .size xtensa_coproc_savestate, . - xtensa_coproc_savestate @@ -420,43 +424,47 @@ xtensa_coproc_restorestate: #ifdef __XTENSA_CALL0_ABI__ /* Need to preserve a8-11. _xtensa_coproc_restorestate modifies a2-a7, - * a13-a15. So no registers need be saved. + * a13-a15. a12-a15 are callee saved registers so a13-a14 must be + * preserved. */ ENTRY(16) - - /* Call _xtensa_coproc_restorestate() with A2=address of co-processor - * save area. - */ - - call0 _xtensa_coproc_restorestate - RET(16) - -#else - - /* Need to preserve a8-15. _xtensa_coproc_savestate modifies a2-a7, - * a13-a15. So only a13-a15 need be preserved. - */ - - ENTRY(16) - s32i a13, sp, LOCAL_OFFSET(1) + s32i a13, sp, LOCAL_OFFSET(1) /* Save clobbered values */ s32i a14, sp, LOCAL_OFFSET(2) s32i a15, sp, LOCAL_OFFSET(3) /* Call _xtensa_coproc_restorestate() with A2=address of co-processor - * save area. + * save area. Registers a0, a2-a7, a13-a15 have been trashed. */ call0 _xtensa_coproc_restorestate - /* Restore a13-15 and return */ + /* Restore a13-a15 and return */ - l32i a13, sp, LOCAL_OFFSET(1) + l32i a13, sp, LOCAL_OFFSET(1) /* Restore clobbered registers */ l32i a14, sp, LOCAL_OFFSET(2) l32i a15, sp, LOCAL_OFFSET(3) - RET(16) +#else + /* Need to preserve a8-15. _xtensa_coproc_savestate modifies a2-a7, + * a13-a15. So a13-a15 may need to be preserved. + */ + + ENTRY(32 /*16*/) /* REVISIT: Why 32? */ + s32i a0, sp, LOCAL_OFFSET(1) /* Save return address */ + + /* Call _xtensa_coproc_restorestate() with A2=address of co-processor + * save area. Registers a0, a2-a7, a13-a15 have been trashed. + */ + + call0 _xtensa_coproc_restorestate + + /* Restore a0 and return */ + + l32i a0, sp, LOCAL_OFFSET(1) /* Recover return address */ + RET(32 /*16*/) /* REVISIT: Why 32? */ + #endif .size xtensa_coproc_restorestate, . - xtensa_coproc_restorestate diff --git a/arch/xtensa/src/common/xtensa_cpuint.S b/arch/xtensa/src/common/xtensa_cpuint.S index 6ea46d71d41..9c7e28260b5 100644 --- a/arch/xtensa/src/common/xtensa_cpuint.S +++ b/arch/xtensa/src/common/xtensa_cpuint.S @@ -40,6 +40,8 @@ #include #include +#include "xtensa_abi.h" + #if XCHAL_HAVE_INTERRUPTS /**************************************************************************** @@ -69,6 +71,7 @@ .align 4 xtensa_enable_cpuint: + ENTRY(16) movi a4, 0 xsr a4, INTENABLE /* Disables all interrupts */ @@ -80,7 +83,7 @@ xtensa_enable_cpuint: wsr a5, INTENABLE /* Set CPU INTENABLE to shadow */ mov a3, a4 /* Return previous shadow content */ - ret + RET(16) .size xtensa_enable_cpuint, . - xtensa_enable_cpuint @@ -107,6 +110,7 @@ xtensa_enable_cpuint: .align 4 xtensa_disable_cpuint: + ENTRY(16) movi a4, 0 xsr a4, INTENABLE /* Disables all interrupts */ @@ -119,7 +123,7 @@ xtensa_disable_cpuint: wsr a5, INTENABLE /* Set CPU INTENABLE to shadow */ mov a3, a4 /* Return previous shadow content */ - ret + RET(16) .size xtensa_disable_cpuint, . - xtensa_disable_cpuint diff --git a/arch/xtensa/src/common/xtensa_cpupause.c b/arch/xtensa/src/common/xtensa_cpupause.c index 8d1fcd0371b..370054d5c74 100644 --- a/arch/xtensa/src/common/xtensa_cpupause.c +++ b/arch/xtensa/src/common/xtensa_cpupause.c @@ -164,6 +164,7 @@ int up_cpu_paused(int cpu) } spin_unlock(&g_cpu_wait[cpu]); + return OK; } /**************************************************************************** diff --git a/arch/xtensa/src/common/xtensa_dumpstate.c b/arch/xtensa/src/common/xtensa_dumpstate.c index 975993af62c..ce2808162de 100644 --- a/arch/xtensa/src/common/xtensa_dumpstate.c +++ b/arch/xtensa/src/common/xtensa_dumpstate.c @@ -78,6 +78,42 @@ static inline uint32_t xtensa_getsp(void) return sp; } +/**************************************************************************** + * Name: up_taskdump + ****************************************************************************/ + +#ifdef CONFIG_STACK_COLORATION +static void up_taskdump(FAR struct tcb_s *tcb, FAR void *arg) +{ + /* Dump interesting properties of this task */ + +#if CONFIG_TASK_NAME_SIZE > 0 + _alert("%s: PID=%d Stack Used=%lu of %lu\n", + tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb), + (unsigned long)tcb->adj_stack_size); +#else + _alert("PID: %d Stack Used=%lu of %lu\n", + tcb->pid, (unsigned long)up_check_tcbstack(tcb), + (unsigned long)tcb->adj_stack_size); +#endif +} +#endif + +/**************************************************************************** + * Name: up_showtasks + ****************************************************************************/ + +#ifdef CONFIG_STACK_COLORATION +static inline void up_showtasks(void) +{ + /* Dump interesting properties of each task in the crash environment */ + + sched_foreach(up_taskdump, NULL); +} +#else +# define up_showtasks() +#endif + /**************************************************************************** * Name: xtensa_stackdump ****************************************************************************/ @@ -130,9 +166,8 @@ static inline void xtensa_registerdump(void) (unsigned long)regs[REG_LCOUNT]); #endif #ifndef __XTENSA_CALL0_ABI__ - _alert(" TMP0: %08lx TMP1: %08lx TMP2: %08lx\n", - (unsigned long)regs[REG_TMP0], (unsigned long)regs[REG_TMP1], - (unsigned long)regs[REG_TMP2]); + _alert(" TMP0: %08lx TMP1: %08lx\n", + (unsigned long)regs[REG_TMP0], (unsigned long)regs[REG_TMP1]); #endif } } @@ -151,7 +186,7 @@ void xtensa_dumpstate(void) uint32_t sp = xtensa_getsp(); uint32_t ustackbase; uint32_t ustacksize; -#if CONFIG_ARCH_INTERRUPTSTACK > 3 +#ifdef HAVE_INTERRUPTSTACK uint32_t istackbase; uint32_t istacksize; #endif @@ -166,14 +201,8 @@ void xtensa_dumpstate(void) if (rtcb->pid == 0) { -#warning REVISIT: Need top of IDLE stack -#if 0 - ustackbase = g_idle_topstack - 4; - ustacksize = CONFIG_IDLETHREAD_STACKSIZE; -#else - ustackbase = sp + 128; - ustacksize = 128; -#endif + ustackbase = (uint32_t)&g_idlestack[IDLETHREAD_STACKWORDS-1]; + ustacksize = IDLETHREAD_STACKSIZE; } else { @@ -184,9 +213,9 @@ void xtensa_dumpstate(void) /* Get the limits on the interrupt stack memory */ #warning REVISIT interrupt stack -#if CONFIG_ARCH_INTERRUPTSTACK > 3 - istackbase = (uint32_t)&g_intstackbase; - istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4; +#ifdef HAVE_INTERRUPTSTACK + istackbase = (uint32_t)&g_intstack[INTERRUPT_STACKWORDS-1]; + istacksize = INTERRUPTSTACK_SIZE; /* Show interrupt stack info */ @@ -194,6 +223,9 @@ void xtensa_dumpstate(void) _alert("IRQ stack:\n"); _alert(" base: %08x\n", istackbase); _alert(" size: %08x\n", istacksize); +#ifdef CONFIG_STACK_COLORATION + _alert(" used: %08x\n", up_check_intstack()); +#endif /* Does the current stack pointer lie within the interrupt * stack? @@ -209,7 +241,7 @@ void xtensa_dumpstate(void) * at the base of the interrupt stack. */ - sp = g_intstackbase; + sp = &g_instack[INTERRUPTSTACK_SIZE - sizeof(uint32_t)]; _alert("sp: %08x\n", sp); } @@ -218,10 +250,16 @@ void xtensa_dumpstate(void) _alert("User stack:\n"); _alert(" base: %08x\n", ustackbase); _alert(" size: %08x\n", ustacksize); +#ifdef CONFIG_STACK_COLORATION + _alert(" used: %08x\n", up_check_tcbstack(rtcb)); +#endif #else _alert("sp: %08x\n", sp); _alert("stack base: %08x\n", ustackbase); _alert("stack size: %08x\n", ustacksize); +#ifdef CONFIG_STACK_COLORATION + _alert("stack used: %08x\n", up_check_tcbstack(rtcb)); +#endif #endif /* Dump the user stack if the stack pointer lies within the allocated user @@ -230,7 +268,7 @@ void xtensa_dumpstate(void) if (sp > ustackbase || sp <= ustackbase - ustacksize) { -#if !defined(CONFIG_ARCH_INTERRUPTSTACK) || CONFIG_ARCH_INTERRUPTSTACK < 4 +#ifdef HAVE_INTERRUPTSTACK _alert("ERROR: Stack pointer is not within allocated stack\n"); #endif } @@ -242,6 +280,10 @@ void xtensa_dumpstate(void) /* Then dump the registers (if available) */ xtensa_registerdump(); + + /* Dump the state of all tasks (if available) */ + + up_showtasks(); } #endif /* CONFIG_ARCH_STACKDUMP */ diff --git a/arch/xtensa/src/common/xtensa_int_handlers.S b/arch/xtensa/src/common/xtensa_int_handlers.S index 0cf3c2f129e..f84992d2127 100644 --- a/arch/xtensa/src/common/xtensa_int_handlers.S +++ b/arch/xtensa/src/common/xtensa_int_handlers.S @@ -63,6 +63,7 @@ #include #include +#include "xtensa.h" #include "xtensa_abi.h" #include "chip_macros.h" #include "xtensa_timer.h" @@ -125,37 +126,25 @@ * a consequence of context switching. */ - mov a12, sp /* a12 = address of save area */ - -._xtensa_dispatch_level&level&: + mov a12, sp /* Address of save area */ +#ifdef __XTENSA_CALL0_ABI__ /* Get mask of pending, enabled interrupts at this level into a2. */ rsr a2, INTENABLE rsr a3, INTERRUPT movi a4, \mask and a2, a2, a3 - and a2, a2, a4 - beqz a2, 5f /* Nothing to do */ - - /* If multiple bits are set then MSB has highest priority. */ - - extract_msb a4, a2 /* a4 = MSB of a2, a2 trashed */ - - movi a3, XT_TIMER_INTEN /* a3 = timer interrupt bit */ - wsr a4, INTCLEAR /* Clear sw or edge-triggered interrupt */ - beq a3, a4, 4f /* If timer interrupt then skip table */ + and a2, a2, a4 /* a2 = Set of pending, enabled interrupts for this level */ + beqz a2, 1f /* Nothing to do */ /* Call xtensa_int_decode with, passing that address of the register save * area as a parameter (A2). */ - mov a2, a12 /* Argument: Top of stack = register save area */ -#ifdef __XTENSA_CALL0_ABI__ + /* Argument 1: Set of CPU interrupt to dispatch */ + mov a3, sp /* Argument 2: Top of stack = register save area */ call0 xtensa_int_decode /* Call xtensa_int_decode */ -#else - call4 xtensa_int_decode /* Call xtensa_int_decode */ -#endif /* On return from xtensa_int_decode, a2 will contain the address of the new * register save area. Usually this would be the same as the current SP. @@ -163,55 +152,38 @@ * register save area. This may or may not reside on a stack. */ - beq a2, a12, 3f /* If timer interrupt then skip table */ - - /* Switch stacks */ - mov a12, a2 /* Switch to the save area of the new thread */ - l32i a2, a12, (4 * REG_A1) /* Retrieve stack ptr and replace */ - addi sp, a2, -(4 * XCPTCONTEXT_SIZE) -3: - j ._xtensa_dispatch_level&level& /* Check for more interrupts */ +#else + /* Get mask of pending, enabled interrupts at this level into a2. */ -4: + rsr a6, INTENABLE + rsr a2, INTERRUPT + movi a3, \mask + and a6, a6, a2 + and a6, a6, a3 /* a6 = Set of pending, enabled interrupts for this level */ + beqz a6, 1f /* Nothing to do */ - .ifeq XT_TIMER_INTPRI - \level - - /* Interrupt handler for the NuttX system timer if at this level. - * We'll be reading the interrupt state again after this call - * so no need to preserve any registers except a7 (pointer to - * state save area). + /* Call xtensa_int_decode with, passing that address of the register save + * area as a parameter (A2). */ - movi a2, XTENSA_IRQ_TIMER&level& /* Argument 1: IRQ number */ - mov a3, a12 /* Argument 2: Top of stack = register save area */ -#ifdef __XTENSA_CALL0_ABI__ - call0 xtensa_irq_dispatch /* Call xtensa_int_decode */ -#else - call4 xtensa_irq_dispatch /* Call xtensa_int_decode */ + /* Argument 1: Set of CPU interrupt to dispatch */ + mov a7, sp /* Argument 2: Top of stack = register save area */ + call4 xtensa_int_decode /* Call xtensa_int_decode */ + + /* On return from xtensa_int_decode, a6 will contain the address of the new + * register save area. Usually this would be the same as the current SP. + * But in the event of a context switch, a2 will instead refer to the TCB + * register save area. This may or may not reside on a stack. + */ + + mov a12, a6 /* Switch to the save area of the new thread */ #endif - /* On return from xtensa_irq_dispatch, A2 will contain the address of the new - * register save area. Usually this would be the same as the current SP. - * But in the event of a context switch, A2 will instead refer to the TCB - * register save area. - */ - - beq a2, a12, 5f /* If timer interrupt then skip table */ - - /* Switch stacks */ - - mov a12, a2 /* Switch to the save area of the new thread */ - l32i a2, a12, (4 * REG_A1) /* Retrieve stack ptr and replace */ - addi sp, a2, -(4 * XCPTCONTEXT_SIZE) - .endif - - j ._xtensa_dispatch_level&level& /* Check for more interrupts */ - -5: - /* done */ + /* Done */ +1: .endm /**************************************************************************** @@ -270,6 +242,7 @@ .section HANDLER_SECTION, "ax" .type _xtensa_level1_handler, @function + .global _xtensa_level1_handler .align 4 _xtensa_level1_handler: @@ -306,24 +279,25 @@ _xtensa_level1_handler: /* Restore registers in preparation to return from interrupt */ mov a2, a12 /* a2 = address of new state save area */ - call0 _xtensa_context_restore + call0 _xtensa_context_restore /* (preserves a2) */ /* Restore only level-specific regs (the rest were already restored) */ - l32i a0, sp, (4 * REG_PS) /* Retrieve interruptee's PS */ + l32i a0, a2, (4 * REG_PS) /* Retrieve interruptee's PS */ wsr a0, PS - l32i a0, sp, (4 * REG_PC) /* Retrieve interruptee's PC */ + l32i a0, a2, (4 * REG_PC) /* Retrieve interruptee's PC */ wsr a0, EPC_1 - l32i a0, sp, (4 * REG_A0) /* Retrieve interruptee's A0 */ - l32i a2, sp, (4 * REG_A2) /* Retrieve interruptee's A2 */ - l32i sp, sp, (4 * REG_A1) /* Remove interrupt stack frame */ - rsync /* Ensure EPS and EPC written */ + l32i a0, a2, (4 * REG_A0) /* Retrieve interruptee's A0 */ + l32i sp, a2, (4 * REG_A1) /* Remove interrupt stack frame */ + l32i a2, a2, (4 * REG_A2) /* Retrieve interruptee's A2 */ + rsync /* Ensure PS and EPC written */ - /* Return from interrupt. RFI restores the PS from EPS_1 and jumps to - * the address in EPC_1. + /* Return from exception. RFE returns from either the UserExceptionVector + * or the KernelExceptionVector. RFE sets PS.EXCM back to 0, and then + * jumps to the address in EPC[1]. PS.UM and PS.WOE are left unchanged. */ - rfi 1 + rfe /* And return from "exception" */ /**************************************************************************** * MEDIUM PRIORITY (LEVEL 2+) INTERRUPT LOW LEVEL HANDLERS. @@ -354,6 +328,7 @@ _xtensa_level1_handler: #if XCHAL_EXCM_LEVEL >= 2 .section HANDLER_SECTION, "ax" .type _xtensa_level2_handler, @function + .global _xtensa_level2_handler .align 4 _xtensa_level2_handler: @@ -390,17 +365,17 @@ _xtensa_level2_handler: /* Restore registers in preparation to return from interrupt */ mov a2, a12 /* a2 = address of new state save area */ - call0 _xtensa_context_restore + call0 _xtensa_context_restore /* (preserves a2) */ /* Restore only level-specific regs (the rest were already restored) */ - l32i a0, sp, (4 * REG_PS) /* Retrieve interruptee's PS */ + l32i a0, a2, (4 * REG_PS) /* Retrieve interruptee's PS */ wsr a0, EPS_2 - l32i a0, sp, (4 * REG_PC) /* Retrieve interruptee's PC */ + l32i a0, a2, (4 * REG_PC) /* Retrieve interruptee's PC */ wsr a0, EPC_2 - l32i a0, sp, (4 * REG_A0) /* Retrieve interruptee's A0 */ - l32i a2, sp, (4 * REG_A2) /* Retrieve interruptee's A2 */ - l32i sp, sp, (4 * REG_A1) /* Remove interrupt stack frame */ + l32i a0, a2, (4 * REG_A0) /* Retrieve interruptee's A0 */ + l32i sp, a2, (4 * REG_A1) /* Remove interrupt stack frame */ + l32i a2, a2, (4 * REG_A2) /* Retrieve interruptee's A2 */ rsync /* Ensure EPS and EPC written */ /* Return from interrupt. RFI restores the PS from EPS_2 and jumps to @@ -414,6 +389,7 @@ _xtensa_level2_handler: #if XCHAL_EXCM_LEVEL >= 3 .section HANDLER_SECTION, "ax" .type _xtensa_level3_handler, @function + .global _xtensa_level3_handler .align 4 _xtensa_level3_handler: @@ -450,17 +426,17 @@ _xtensa_level3_handler: /* Restore registers in preparation to return from interrupt */ mov a2, a12 /* a2 = address of new state save area */ - call0 _xtensa_context_restore + call0 _xtensa_context_restore /* (preserves a2) */ /* Restore only level-specific regs (the rest were already restored) */ - l32i a0, sp, (4 * REG_PS) /* Retrieve interruptee's PS */ + l32i a0, a2, (4 * REG_PS) /* Retrieve interruptee's PS */ wsr a0, EPS_3 - l32i a0, sp, (4 * REG_PC) /* Retrieve interruptee's PC */ + l32i a0, a2, (4 * REG_PC) /* Retrieve interruptee's PC */ wsr a0, EPC_3 - l32i a0, sp, (4 * REG_A0) /* Retrieve interruptee's A0 */ - l32i a2, sp, (4 * REG_A2) /* Retrieve interruptee's A2 */ - l32i sp, sp, (4 * REG_A1) /* Remove interrupt stack frame */ + l32i a0, a2, (4 * REG_A0) /* Retrieve interruptee's A0 */ + l32i sp, a2, (4 * REG_A1) /* Remove interrupt stack frame */ + l32i a2, a2, (4 * REG_A2) /* Retrieve interruptee's A2 */ rsync /* Ensure EPS and EPC written */ /* Return from interrupt. RFI restores the PS from EPS_3 and jumps to @@ -474,6 +450,7 @@ _xtensa_level3_handler: #if XCHAL_EXCM_LEVEL >= 4 .section HANDLER_SECTION, "ax" .type _xtensa_level4_handler, @function + .global _xtensa_level4_handler .align 4 _xtensa_level4_handler: @@ -510,17 +487,17 @@ _xtensa_level4_handler: /* Restore registers in preparation to return from interrupt */ mov a2, a12 /* a2 = address of new state save area */ - call0 _xtensa_context_restore + call0 _xtensa_context_restore /* (presevers a2) */ /* Restore only level-specific regs (the rest were already restored) */ - l32i a0, sp, (4 * REG_PS) /* Retrieve interruptee's PS */ + l32i a0, a2, (4 * REG_PS) /* Retrieve interruptee's PS */ wsr a0, EPS_4 - l32i a0, sp, (4 * REG_PC) /* Retrieve interruptee's PC */ + l32i a0, a2, (4 * REG_PC) /* Retrieve interruptee's PC */ wsr a0, EPC_4 - l32i a0, sp, (4 * REG_A0) /* Retrieve interruptee's A0 */ - l32i a2, sp, (4 * REG_A2) /* Retrieve interruptee's A2 */ - l32i sp, sp, (4 * REG_A1) /* Remove interrupt stack frame */ + l32i a0, a2, (4 * REG_A0) /* Retrieve interruptee's A0 */ + l32i sp, a2, (4 * REG_A1) /* Remove interrupt stack frame */ + l32i a2, a2, (4 * REG_A2) /* Retrieve interruptee's A2 */ rsync /* Ensure EPS and EPC written */ /* Return from interrupt. RFI restores the PS from EPS_4 and jumps to @@ -534,6 +511,7 @@ _xtensa_level4_handler: #if XCHAL_EXCM_LEVEL >= 5 .section HANDLER_SECTION, "ax" .type _xtensa_level5_handler, @function + .global _xtensa_level5_handler .align 4 _xtensa_level5_handler: @@ -570,17 +548,17 @@ _xtensa_level5_handler: /* Restore registers in preparation to return from interrupt */ mov a2, a12 /* a2 = address of new state save area */ - call0 _xtensa_context_restore + call0 _xtensa_context_restore /* (preserves a2) */ /* Restore only level-specific regs (the rest were already restored) */ - l32i a0, sp, (4 * REG_PS) /* Retrieve interruptee's PS */ + l32i a0, a2, (4 * REG_PS) /* Retrieve interruptee's PS */ wsr a0, EPS_5 - l32i a0, sp, (4 * REG_PC) /* Retrieve interruptee's PC */ + l32i a0, a2, (4 * REG_PC) /* Retrieve interruptee's PC */ wsr a0, EPC_5 - l32i a0, sp, (4 * REG_A0) /* Retrieve interruptee's A0 */ - l32i a2, sp, (4 * REG_A2) /* Retrieve interruptee's A2 */ - l32i sp, sp, (4 * REG_A1) /* Remove interrupt stack frame */ + l32i a0, a2, (4 * REG_A0) /* Retrieve interruptee's A0 */ + l32i sp, a2, (4 * REG_A1) /* Remove interrupt stack frame */ + l32i a2, a2, (4 * REG_A2) /* Retrieve interruptee's A2 */ rsync /* Ensure EPS and EPC written */ /* Return from interrupt. RFI restores the PS from EPS_5 and jumps to @@ -594,6 +572,7 @@ _xtensa_level5_handler: #if XCHAL_EXCM_LEVEL >= 6 .section HANDLER_SECTION, "ax" .type _xtensa_level6_handler, @function + .global _xtensa_level6_handler .align 4 _xtensa_level6_handler: @@ -630,17 +609,17 @@ _xtensa_level6_handler: /* Restore registers in preparation to return from interrupt */ mov a2, a12 /* a2 = address of new state save area */ - call0 _xtensa_context_restore + call0 _xtensa_context_restore /* (preserves a2) */ /* Restore only level-specific regs (the rest were already restored) */ - l32i a0, sp, (4 * REG_PS) /* Retrieve interruptee's PS */ + l32i a0, a2, (4 * REG_PS) /* Retrieve interruptee's PS */ wsr a0, EPS_6 - l32i a0, sp, (4 * REG_PC) /* Retrieve interruptee's PC */ + l32i a0, a2, (4 * REG_PC) /* Retrieve interruptee's PC */ wsr a0, EPC_6 - l32i a0, sp, (4 * REG_A0) /* Retrieve interruptee's A0 */ - l32i a2, sp, (4 * REG_A2) /* Retrieve interruptee's A2 */ - l32i sp, sp, (4 * REG_A1) /* Remove interrupt stack frame */ + l32i a0, a2, (4 * REG_A0) /* Retrieve interruptee's A0 */ + l32i sp, a2, (4 * REG_A1) /* Remove interrupt stack frame */ + l32i a2, a2, (4 * REG_A2) /* Retrieve interruptee's A2 */ rsync /* Ensure EPS and EPC written */ /* Return from interrupt. RFI restores the PS from EPS_6 and jumps to @@ -690,6 +669,7 @@ _xtensa_level6_handler: #if XCHAL_INT_NLEVELS >=2 && XCHAL_EXCM_LEVEL < 2 && XCHAL_DEBUGLEVEL !=2 .section HANDLER_SECTION, "ax" .type _xtensa_level2_handler, @function + .global _xtensa_level2_handler .align 4 _xtensa_level2_handler: @@ -723,6 +703,7 @@ _xtensa_level2_handler: #if XCHAL_INT_NLEVELS >=3 && XCHAL_EXCM_LEVEL < 3 && XCHAL_DEBUGLEVEL !=3 .section HANDLER_SECTION, "ax" .type _xtensa_level3_handler, @function + .global _xtensa_level3_handler .align 4 _xtensa_level3_handler: @@ -758,6 +739,7 @@ _xtensa_level3_handler: #if XCHAL_INT_NLEVELS >=4 && XCHAL_EXCM_LEVEL < 4 && XCHAL_DEBUGLEVEL !=4 .section HANDLER_SECTION, "ax" .type _xtensa_level4_handler, @function + .global _xtensa_level4_handler .align 4 _xtensa_level4_handler: @@ -793,6 +775,7 @@ _xtensa_level4_handler: #if XCHAL_INT_NLEVELS >=5 && XCHAL_EXCM_LEVEL < 5 && XCHAL_DEBUGLEVEL !=5 .section HANDLER_SECTION, "ax" .type _xtensa_level5_handler, @function + .global _xtensa_level5_handler .align 4 _xtensa_level5_handler: @@ -828,6 +811,7 @@ _xtensa_level5_handler: #if XCHAL_INT_NLEVELS >=6 && XCHAL_EXCM_LEVEL < 6 && XCHAL_DEBUGLEVEL !=6 .section HANDLER_SECTION, "ax" .type _xtensa_level6_handler, @function + .global _xtensa_level6_handler .align 4 _xtensa_level6_handler: diff --git a/arch/xtensa/src/common/xtensa_irqdispatch.c b/arch/xtensa/src/common/xtensa_irqdispatch.c index 2f05eab152a..813846e76e8 100644 --- a/arch/xtensa/src/common/xtensa_irqdispatch.c +++ b/arch/xtensa/src/common/xtensa_irqdispatch.c @@ -99,14 +99,14 @@ uint32_t *xtensa_irq_dispatch(int irq, uint32_t *regs) if (regs != CURRENT_REGS) { #if XCHAL_CP_NUM > 0 - /* If an interrupt level context switch has occurred, then save the - * co-processor state in in the suspended thread's co-processor save - * area. - * - * NOTE 1. The state of the co-processor has not been altered and - * still represents the to-be-suspended thread. - * NOTE 2. We saved a reference TCB of the original thread on entry. - */ + /* If an interrupt level context switch has occurred, then save the + * co-processor state in in the suspended thread's co-processor save + * area. + * + * NOTE 1. The state of the co-processor has not been altered and + * still represents the to-be-suspended thread. + * NOTE 2. We saved a reference TCB of the original thread on entry. + */ xtensa_coproc_savestate(&tcb->xcp.cpstate); diff --git a/arch/xtensa/src/common/xtensa_panic.S b/arch/xtensa/src/common/xtensa_panic.S index e24acc12fa4..c526eab6d4f 100644 --- a/arch/xtensa/src/common/xtensa_panic.S +++ b/arch/xtensa/src/common/xtensa_panic.S @@ -59,10 +59,13 @@ ****************************************************************************/ #include + #include #include #include +#include "chip_macros.h" + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -95,6 +98,10 @@ .align 4 _xtensa_panic: + /* Save the exception code */ + + wsr a2, EXCSAVE_1 + /* Save rest of interrupt context (A2=address of state save area on * stack. */ @@ -111,17 +118,25 @@ _xtensa_panic: /* Set up PS for C, reenable hi-pri interrupts, and clear EXCM. */ +#ifdef __XTENSA_CALL0_ABI__ + movi a0, PS_INTLEVEL(XCHAL_EXCM_LEVEL) | PS_UM +#else movi a0, PS_INTLEVEL(XCHAL_EXCM_LEVEL) | PS_UM | PS_WOE +#endif + wsr a0, PS /* Call C panic handler: Arg1 (A2) = Exception code; Arg 2 (A3) = start * of the register save area. */ - mov a3, sp #ifdef __XTENSA_CALL0_ABI__ + rsr a2, EXCSAVE_1 + mov a3, sp call0 xtensa_panic /* Call xtensa_panic. Should not return */ #else + rsr a6, EXCSAVE_1 + mov a7, sp call4 xtensa_panic /* Call xtensa_panic. Should not return */ #endif diff --git a/arch/xtensa/src/common/xtensa_schedsigaction.c b/arch/xtensa/src/common/xtensa_schedsigaction.c index db0f5fa9c35..6154f5126a2 100644 --- a/arch/xtensa/src/common/xtensa_schedsigaction.c +++ b/arch/xtensa/src/common/xtensa_schedsigaction.c @@ -150,7 +150,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - CURRENT_REGS[REG_PC] = (uint32_t)xtensa_sigdeliver; + CURRENT_REGS[REG_PC] = (uint32_t)_xtensa_sig_trampoline; #ifdef __XTENSA_CALL0_ABI__ CURRENT_REGS[REG_PS] = (uint32_t)(PS_INTLEVEL(XCHAL_EXCM_LEVEL) | PS_UM); #else @@ -185,7 +185,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - tcb->xcp.regs[REG_PC] = (uint32_t)xtensa_sigdeliver; + tcb->xcp.regs[REG_PC] = (uint32_t)_xtensa_sig_trampoline; #ifdef __XTENSA_CALL0_ABI__ tcb->xcp.regs[REG_PS] = (uint32_t)(PS_INTLEVEL(XCHAL_EXCM_LEVEL) | PS_UM); #else diff --git a/arch/xtensa/src/common/xtensa_sigdeliver.c b/arch/xtensa/src/common/xtensa_sigdeliver.c index ce434419288..ec6e6c56ddf 100644 --- a/arch/xtensa/src/common/xtensa_sigdeliver.c +++ b/arch/xtensa/src/common/xtensa_sigdeliver.c @@ -58,7 +58,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: xtensa_sigdeliver + * Name: xtensa_sig_deliver * * Description: * This is the a signal handling trampoline. When a signal action was @@ -67,7 +67,7 @@ * ****************************************************************************/ -void xtensa_sigdeliver(void) +void xtensa_sig_deliver(void) { struct tcb_s *rtcb = this_task(); uint32_t regs[XCPTCONTEXT_REGS]; diff --git a/configs/compal_e88/src/boot.c b/arch/xtensa/src/common/xtensa_sigtramp.S similarity index 65% rename from configs/compal_e88/src/boot.c rename to arch/xtensa/src/common/xtensa_sigtramp.S index a3c68292275..cf91a302aa1 100644 --- a/configs/compal_e88/src/boot.c +++ b/arch/xtensa/src/common/xtensa_sigtramp.S @@ -1,8 +1,10 @@ /**************************************************************************** - * configs/compal_e88/boot.c + * arch/xtensa/src/common/xtensa_sigtramp.S * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Adapted from use in NuttX by: + * + * 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 @@ -33,43 +35,49 @@ * ****************************************************************************/ + .file "xtensa_sigtramp.S" + /**************************************************************************** * Included Files ****************************************************************************/ #include -#include + +#include "xtensa_abi.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: board_app_initialize + * Name: _xtensa_sig_trampoline * * Description: - * Perform architecture specific initialization + * Just sets up a proper window call to xtensa_sig_deliver(). We get + * here via a context switch setup in up_schedule_signaction. Which + * re-vectors the context switch to this location. * - * Input Parameters: - * arg - The boardctl() argument is passed to the board_app_initialize() - * implementation without modification. The argument has no - * meaning to NuttX; the meaning of the argument is a contract - * between the board-specific initalization logic and the the - * matching application logic. The value cold be such things as a - * mode enumeration value, a set of DIP switch switch settings, a - * pointer to configuration data read from a file or serial FLASH, - * or whatever you would like to do with it. Every implementation - * should accept zero/NULL as a default configuration. + * Here we just call xtensa_sig_deliver() using the proper ABI. NOTE + * that this function cannot return and depends on the fact that + * xtensa_sig_deliver() does not return. * - * Returned Value: - * Zero (OK) is returned on success; a negated errno value is returned on - * any failure to indicate the nature of the failure. * ****************************************************************************/ -#ifdef CONFIG_LIB_BOARDCTL -int board_app_initialize(uintptr_t arg) -{ - return 0; -} -#endif /* CONFIG_LIB_BOARDCTL */ + .text + .global _xtensa_sig_trampoline + .type _xtensa_sig_trampoline, @function + .align 4 + +_xtensa_sig_trampoline: + ENTRY(16) /* REVISIT: This should not be here */ + +#ifdef __XTENSA_CALL0_ABI__ + cali0 xtensa_sig_deliver /* Call xtensa_sig_deliver */ +#else + call4 xtensa_sig_deliver /* Call xtensa_sig_deliver */ +#endif + +1: j 1b /* xtensa_sig_deliver does not return */ + + .size _xtensa_sig_trampoline, . - _xtensa_sig_trampoline diff --git a/arch/xtensa/src/common/xtensa_user_handler.S b/arch/xtensa/src/common/xtensa_user_handler.S index fc789ccb5a3..39c9eb1c7f9 100644 --- a/arch/xtensa/src/common/xtensa_user_handler.S +++ b/arch/xtensa/src/common/xtensa_user_handler.S @@ -59,10 +59,13 @@ ****************************************************************************/ #include + #include #include #include +#include "chip_macros.h" + /**************************************************************************** * Assembly Language Macros ****************************************************************************/ @@ -158,6 +161,7 @@ _xtensa_to_coproc_handler: ****************************************************************************/ .type _xtensa_user_handler, @function + .global _xtensa_user_handler .align 4 _xtensa_user_handler: @@ -225,12 +229,13 @@ _xtensa_user_handler: * beginning of the register save area. */ +#ifdef __XTENSA_CALL0_ABI__ rsr a2, EXCCAUSE /* Argument 1 (a2) = EXCCAUSE */ mov a3, sp /* Argument 2 (a2) = pointer to register save area */ - -#ifdef __XTENSA_CALL0_ABI__ calx0 xtensa_user /* Call xtensa_user */ #else + rsr a6, EXCCAUSE /* Argument 1 (a2) = EXCCAUSE */ + mov a7, sp /* Argument 2 (a2) = pointer to register save area */ call4 xtensa_user /* Call xtensa_user */ #endif @@ -254,6 +259,7 @@ _xtensa_user_handler: .section HANDLER_SECTION, "ax" .type _xtensa_syscall_handler, @function .align 4 + _xtensa_syscall_handler: /* Allocate stack frame and save A0, A1, and PS */ @@ -323,54 +329,52 @@ _xtensa_syscall_handler: ps_setup 1 a0 /* Dispatch the sycall as with other interrupts. */ - /* At this point, sp holds the pointer to the register save area. That, - * however, may change as a consequence of context switching. - */ mov a12, sp /* a12 = address of register save area */ - movi a2, XTENSA_IRQ_SYSCALL /* Argument 1: IRQ number */ - mov a3, a12 /* Argument 2: Top of stack = register save area */ -#ifdef __XTENSA_CALL0_ABI__ - call0 xtensa_irq_dispatch /* Call xtensa_int_decode */ -#else - call4 xtensa_irq_dispatch /* Call xtensa_int_decode */ -#endif - /* On return from xtensa_irq_dispatch, A2 will contain the address of the new +#ifdef __XTENSA_CALL0_ABI__ + movi a2, XTENSA_IRQ_SYSCALL /* Argument 1: IRQ number */ + mov a3, sp /* Argument 2: Top of stack = register save area */ + call0 xtensa_irq_dispatch /* Call xtensa_int_decode */ + + /* On return from xtensa_irq_dispatch, a2 will contain the address of the new * register save area. Usually this would be the same as the current SP. * But in the event of a context switch, A2 will instead refer to the TCB * register save area. */ - beq a2, a12, 2f /* If timer interrupt then skip table */ +#else + movi a6, XTENSA_IRQ_SYSCALL /* Argument 1: IRQ number */ + mov a7, sp /* Argument 2: Top of stack = register save area */ + call4 xtensa_irq_dispatch /* Call xtensa_int_decode */ - /* Switch stacks */ + /* On return from xtensa_irq_dispatch, a5 will contain the address of the new + * register save area. Usually this would be the same as the current SP. + * But in the event of a context switch, A2 will instead refer to the TCB + * register save area. + */ - mov a12, a2 /* Switch to the save area of the new thread */ - l32i a2, a12, (4 * REG_A1) /* Retrieve stack ptr and replace */ - addi sp, a2, -(4 * XCPTCONTEXT_SIZE) - -2: + mov a2, a6 /* Switch to the new register save area */ +#endif /* Restore registers in preparation to return from interrupt */ - mov a2, a12 /* a2 = address of new state save area */ - call0 _xtensa_context_restore + call0 _xtensa_context_restore /* (Preserves a2) */ /* Restore only level-specific regs (the rest were already restored) */ - l32i a0, sp, (4 * REG_PS) /* Retrieve interruptee's PS */ + l32i a0, a2, (4 * REG_PS) /* Retrieve interruptee's PS */ wsr a0, PS - l32i a0, sp, (4 * REG_PC) /* Retrieve interruptee's PC */ + l32i a0, a2, (4 * REG_PC) /* Retrieve interruptee's PC */ wsr a0, EPC_1 - l32i a0, sp, (4 * REG_A0) /* Retrieve interruptee's A0 */ - l32i a2, sp, (4 * REG_A2) /* Retrieve interruptee's A2 */ - l32i sp, sp, (4 * REG_A1) /* Remove interrupt stack frame */ + l32i a0, a2, (4 * REG_A0) /* Retrieve interruptee's A0 */ + l32i sp, a2, (4 * REG_A1) /* Remove interrupt stack frame */ + l32i a2, a2, (4 * REG_A2) /* Retrieve interruptee's A2 */ rsync /* Ensure EPS and EPC written */ - /* Return from exception. RFE returns from either the UserExceptionVector - * or the KernelExceptionVector. RFE sets PS.EXCM back to 0 and then jumps - * to the address in EPC[1]. + /* Return from exception. RFE returns from either the UserExceptionVector + * or the KernelExceptionVector. RFE sets PS.EXCM back to 0, and then + * jumps to the address in EPC[1]. PS.UM and PS.WOE are left unchanged. */ rfe @@ -463,12 +467,13 @@ _xtensa_coproc_handler: * beginning of the register save area. */ +#ifdef __XTENSA_CALL0_ABI__ rsr a2, EXCCAUSE /* Argument 1 (a2) = EXCCAUSE */ mov a3, sp /* Argument 2 (a2) = pointer to register save area */ - -#ifdef __XTENSA_CALL0_ABI__ calx0 xtensa_user /* Call xtensa_user */ #else + rsr a6, EXCCAUSE /* Argument 1 (a2) = EXCCAUSE */ + mov a7, sp /* Argument 2 (a2) = pointer to register save area */ call4 xtensa_user /* Call xtensa_user */ #endif diff --git a/arch/xtensa/src/common/xtensa_vectors.S b/arch/xtensa/src/common/xtensa_vectors.S index 726824f0580..9dfc4869f67 100644 --- a/arch/xtensa/src/common/xtensa_vectors.S +++ b/arch/xtensa/src/common/xtensa_vectors.S @@ -42,6 +42,7 @@ #include #include +#include "xtensa.h" #include "xtensa_abi.h" /**************************************************************************** @@ -74,7 +75,7 @@ _xtensa_level2_vector: /* Never returns here - call0 is used as a jump */ - .end literal_prefix + .end literal_prefix .size _xtensa_level2_vector, . - _xtensa_level2_vector #endif @@ -93,7 +94,7 @@ _xtensa_level3_vector: /* Never returns here - call0 is used as a jump */ - .end literal_prefix + .end literal_prefix .size _xtensa_level3_vector, . - _xtensa_level3_vector #endif @@ -112,7 +113,7 @@ _xtensa_level4_vector: /* Never returns here - call0 is used as a jump */ - .end literal_prefix + .end literal_prefix .size _xtensa_level5_vector, . - _xtensa_level5_vector #endif @@ -131,8 +132,8 @@ _xtensa_level5_vector: /* Never returns here - call0 is used as a jump */ - .size _xtensa_level5_vector, . - _xtensa_level5_vector - .end literal_prefix + .size _xtensa_level5_vector, . - _xtensa_level5_vector + .end literal_prefix #endif #if XCHAL_EXCM_LEVEL >= 6 @@ -202,7 +203,7 @@ _xtensa_nmi_vector: s32i a0, sp, (4 * REG_A0) s32i a2, sp, (4 * REG_A2) - movi a2, XTENSA_NMI_EXCEPTION /* Address of state save on stack */ + movi a2, XTENSA_NMI_EXCEPTION /* Argument 1: Error code */ call0 _xtensa_panic /* Does not return */ #else @@ -226,10 +227,10 @@ _xtensa_nmi_vector: ****************************************************************************/ #if XCHAL_HAVE_DEBUG - .begin literal_prefix .debug_exception_vector - .section .debug_exception_vector.text, "ax" - .global _debug_exception_vector - .align 4 + .begin literal_prefix .debug_exception_vector + .section .debug_exception_vector.text, "ax" + .global _debug_exception_vector + .align 4 _debug_exception_vector: @@ -244,7 +245,7 @@ _debug_exception_vector: s32i a0, sp, (4 * REG_A0) s32i a2, sp, (4 * REG_A2) - movi a2, XTENSA_DEBUG_EXCEPTION /* Address of state save on stack */ + movi a2, XTENSA_DEBUG_EXCEPTION /* Argument 1: Error code */ call0 _xtensa_panic /* Does not return */ .end literal_prefix @@ -261,10 +262,10 @@ _debug_exception_vector: ****************************************************************************/ #ifdef XCHAL_DOUBLEEXC_VECTOR_VADDR - .begin literal_prefix .double_exception_vector - .section .double_exception_vector.text, "ax" - .global _double_exception_vector - .align 4 + .begin literal_prefix .double_exception_vector + .section .double_exception_vector.text, "ax" + .global _double_exception_vector + .align 4 _double_exception_vector: @@ -279,14 +280,19 @@ _double_exception_vector: s32i a0, sp, (4 * REG_PS) rsr a0, DEPC /* Save interruptee's PC */ s32i a0, sp, (4 * REG_PC) - rsr a0, EXCSAVE_1 /* Save interruptee's a0 -- REVISIT */ + rsr a0, EXCSAVE /* Save interruptee's a0 -- REVISIT */ s32i a0, sp, (4 * REG_A0) + rsr a0, EXCCAUSE /* Save the EXCCAUSE register */ + s32i a0, sp, (4 * REG_EXCCAUSE) + rsr a0, EXCVADDR /* Save the EXCVADDR register */ + s32i a0, sp, (4 * REG_EXCVADDR) + s32i a2, sp, (4 * REG_A2) - movi a2, XTENSA_DOUBLE_EXCEPTION /* Address of state save on stack */ + movi a2, XTENSA_DOUBLE_EXCEPTION /* Argument 1: Error code */ call0 _xtensa_panic /* Does not return */ - .end literal_prefix + .end literal_prefix #endif /* XCHAL_DOUBLEEXC_VECTOR_VADDR */ @@ -298,10 +304,10 @@ _double_exception_vector: * ****************************************************************************/ - .begin literal_prefix .kernel_exception_vector - .section .kernel_exception_vector.text, "ax" - .global _kernel_exception_vector - .align 4 + .begin literal_prefix .kernel_exception_vector + .section .kernel_exception_vector.text, "ax" + .global _kernel_exception_vector + .align 4 _kernel_exception_vector: @@ -320,7 +326,7 @@ _kernel_exception_vector: s32i a0, sp, (4 * REG_A0) s32i a2, sp, (4 * REG_A2) - movi a2, XTENSA_KERNEL_EXCEPTION /* Address of state save on stack */ + movi a2, XTENSA_KERNEL_EXCEPTION /* Argument 1: Error code */ call0 _xtensa_panic /* Does not return */ .end literal_prefix @@ -333,15 +339,15 @@ _kernel_exception_vector: * ****************************************************************************/ - .begin literal_prefix .user_exception_vector - .section .user_exception_vector.text, "ax" - .global _user_exception_vector - .type _user_exception_vector, @function - .align 4 + .begin literal_prefix .user_exception_vector + .section .user_exception_vector.text, "ax" + .global _user_exception_vector + .type _user_exception_vector, @function + .align 4 _user_exception_vector: wsr a0, EXCSAVE_1 /* Preserve a0 */ - call0 xtensa_user_handler /* And jump to user exception handler */ + call0 _xtensa_user_handler /* And jump to user exception handler */ .end literal_prefix diff --git a/arch/xtensa/src/esp32/Make.defs b/arch/xtensa/src/esp32/Make.defs index 39a67813c66..bda6c738ff4 100644 --- a/arch/xtensa/src/esp32/Make.defs +++ b/arch/xtensa/src/esp32/Make.defs @@ -35,14 +35,14 @@ # The start-up, "head", file. May be either a .S or a .c file. -HEAD_ASRC = -HEAD_CSRC = esp32_start.c +HEAD_ASRC = xtensa_vectors.S xtensa_window_vector.S xtensa_windowspill.S +HEAD_ASRC += xtensa_int_handlers.S xtensa_user_handler.S +HEAD_CSRC = esp32_start.c # Common XTENSA files (arch/xtensa/src/common) -CMN_ASRCS = xtensa_context.S xtensa_coproc.S xtensa_cpuint.S -CMN_ASRCS += xtensa_int_handlers.S xtensa_panic.S xtensa_user_handler.S -CMN_ASRCS += xtensa_vectors.S xtensa_windowspill.S +CMN_ASRCS = xtensa_context.S xtensa_coproc.S xtensa_cpuint.S xtensa_panic.S +CMN_ASRCS += xtensa_sigtramp.S CMN_CSRCS = xtensa_assert.c xtensa_blocktask.c xtensa_copystate.c CMN_CSRCS += xtensa_cpenable.c xtensa_createstack.c xtensa_exit.c xtensa_idle.c @@ -68,6 +68,11 @@ ifeq ($(CONFIG_SMP),y) CMN_CSRCS += xtensa_cpupause.c endif +ifeq ($(CONFIG_STACK_COLORATION),y) + CMN_CSRCS += xtensa_checkstack.c +endif + + # Use of common/xtensa_etherstub.c is deprecated. The preferred mechanism # is to use CONFIG_NETDEV_LATEINIT=y to suppress the call to # up_netinitialize() in xtensa_initialize.c. Then this stub would not be @@ -89,7 +94,7 @@ CHIP_CSRCS += esp32_timerisr.c # Configuration-dependent ESP32 files ifeq ($(CONFIG_SMP),y) -CHIP_ASRCS = esp32_cpuhead.S esp32_cpuindex.S +CHIP_ASRCS = esp32_cpuindex.S CMN_CSRCS += esp32_cpuidlestack.c esp32_cpustart.c esp32_intercpu_interrupt.c endif diff --git a/arch/xtensa/src/esp32/esp32_cpuhead.S b/arch/xtensa/src/esp32/esp32_cpuhead.S deleted file mode 100644 index 40cbf2e85d6..00000000000 --- a/arch/xtensa/src/esp32/esp32_cpuhead.S +++ /dev/null @@ -1,148 +0,0 @@ -/**************************************************************************** - * arch/xtensa/src/esp32/esp32_cpuhead.S - * - * 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. - * - ****************************************************************************/ - - .file "esp32_cpuhead.S" - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#ifdef CONFIG_SMP - -/**************************************************************************** - * Private Data - ****************************************************************************/ - - .section .noinit, "aw" - .global g_cpu1_idlestack - .type g_cpu1_idlestack, @object - .align 16 - -g_cpu1_idlestack: - .space (CONFIG_SMP_IDLETHREAD_STACKSIZE & ~15) -.Lcpu1_stacktop: - .size g_cpu1_idlestack, . - g_cpu1_idlestack - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - - .text - -/**************************************************************************** - * Name: __cpu[n]_start - * - * Description: - * Boot functions for each CPU (other than CPU0). These functions set up - * the ARM operating mode, the initial stack, and configure co-processor - * registers. At the end of the boot, esp32_cpu_boot() is called. - * - * These functions are provided by the common ARMv7-A logic. - * - * Input parameters: - * None - * - * Returned Value: - * Do not return. - * - ****************************************************************************/ - - .global __cpu1_start - .type __cpu1_start, @function - - .align 4 - -.Lcpu1_bottomofstack: - .long .Lcpu1_stacktop - .size .Lcpu1_bottomofstack, . - .Lcpu1_bottomofstack - -#ifdef CONFIG_STACK_COLORATION -.Lcpu1_bottomofstack: - .long .Lcpu1_stacktop - .size .Lcpu1_bottomofstack, . - .Lcpu1_bottomofstack - -.Lcpu1_stackcolor: - .long STACK_COLOR - .size .Lcpu1_stackcolor, . - .Lcpu1_stackcolor -#endif - - .align 4 - -__cpu1_start: - - /* Set up the stack pointer and the CPU index */ - - l32r sp, .Lcpu1_bottomofstack - - /* REVIST: Does it make since to have co-processors enabled on the IDLE thread? */ - -#ifdef CONFIG_STACK_COLORATION - /* Write a known value to the IDLE thread stack to support stack - * monitoring logic - */ - - mov a0, sp - l32r a1, .Lcpu1_bottomofstack - l32r a2, .Lcpu1_stackcolor - -1: - s32i a2, a1, 0 - addi a2, a2, 4 - bne a1, a2, 1b -#endif - - /* Set up the intiali PS */ - -#ifdef __XTENSA_CALL0_ABI__ - movi a0, (PS_INTLEVEL(XCHAL_EXCM_LEVEL) | PS_UM | PS_EXCM) -#else - movi a0, (PS_INTLEVEL(XCHAL_EXCM_LEVEL) | PS_UM | PS_EXCM | PS_WOE | PS_CALLINC(1)) -#endif - wsr a0, PS - - /* Finish initialization in C */ - - movi a2, 1 /* Argument 1: CPU ID */ - call0 xtensa_start_handler - - /* xtensa_start_handler() does not return */ - -2: j 2b - .size __cpu1_start, . - __cpu1_start -#endif /* CONFIG_SMP */ diff --git a/arch/xtensa/src/esp32/esp32_cpuidlestack.c b/arch/xtensa/src/esp32/esp32_cpuidlestack.c index 7b2e90364e9..ea475b79b3f 100644 --- a/arch/xtensa/src/esp32/esp32_cpuidlestack.c +++ b/arch/xtensa/src/esp32/esp32_cpuidlestack.c @@ -36,6 +36,16 @@ #ifdef CONFIG_SMP +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* Address of the CPU0 IDLE thread */ + +uint32_t g_cpu1_idlestack[CPU1_IDLETHREAD_STACKWORDS] + __attribute__((aligned(16) section(".noinit"))); + + /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/xtensa/src/esp32/esp32_cpuindex.S b/arch/xtensa/src/esp32/esp32_cpuindex.S index f62eed12020..0a9abc27fd8 100644 --- a/arch/xtensa/src/esp32/esp32_cpuindex.S +++ b/arch/xtensa/src/esp32/esp32_cpuindex.S @@ -39,6 +39,7 @@ * Included Files ****************************************************************************/ +#include "xtensa_abi.h" #include "chip_macros.h" /**************************************************************************** @@ -71,6 +72,8 @@ .type up_cpu_index, @function up_cpu_index: + ENTRY(16) getcoreid a2 - ret + RET(16) + .size up_cpu_index, . - up_cpu_index diff --git a/arch/xtensa/src/esp32/esp32_cpuint.c b/arch/xtensa/src/esp32/esp32_cpuint.c index 7d62e6bd771..8d43741ac03 100644 --- a/arch/xtensa/src/esp32/esp32_cpuint.c +++ b/arch/xtensa/src/esp32/esp32_cpuint.c @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -52,6 +53,8 @@ #include "esp32_cpuint.h" #include "xtensa.h" +#include "sched/sched.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -147,6 +150,17 @@ #define ESP32_MAX_PRIORITY 5 #define ESP32_PRIO_INDEX(p) ((p) - ESP32_MIN_PRIORITY) +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* Maps a CPU interrupt to the IRQ of the attached peripheral interrupt */ + +uint8_t g_cpu0_intmap[ESP32_NCPUINTS]; +#ifdef CONFIG_SMP +uint8_t g_cpu1_intmap[ESP32_NCPUINTS]; +#endif + /**************************************************************************** * Private Data ****************************************************************************/ @@ -156,18 +170,19 @@ */ #ifdef CONFIG_SMP - static uint32_t g_intenable[CONFIG_SMP_NCPUS]; - #else - static uint32_t g_intenable[1]; - #endif -/* Bitsets for free, unallocated CPU interrupts */ +/* Bitsets for free, unallocated CPU interrupts available to peripheral + * devices. + */ -static uint32_t g_free_cpuints = 0xffffffff; +static uint32_t g_cpu0_freeints = EPS32_CPUINT_PERIPHSET; +#ifdef CONFIG_SMP +static uint32_t g_cpu1_freeints = EPS32_CPUINT_PERIPHSET; +#endif /* Bitsets for each interrupt priority 1-5 */ @@ -184,11 +199,27 @@ static const uint32_t g_priority[5] = * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: xtensa_disable_all + ****************************************************************************/ + +static inline void xtensa_disable_all(void) +{ + __asm__ __volatile__ + ( + "movi a2, 0\n" + "xsr a2, INTENABLE\n" + : : : "a2" + ); +} + /**************************************************************************** * Name: esp32_alloc_cpuint * * Description: - * Allocate a CPU interrupt + * Allocate a CPU interrupt for a peripheral device. This function will + * not allocate any of the pre-allocated CPU interrupts for internal + * devices. * * Input Parameters: * intmask - mask of candidate CPU interrupts. The CPU interrupt will be @@ -205,6 +236,7 @@ static const uint32_t g_priority[5] = int esp32_alloc_cpuint(uint32_t intmask) { irqstate_t flags; + uint32_t *freeints; uint32_t bitmask; uint32_t intset; int cpuint; @@ -216,7 +248,18 @@ int esp32_alloc_cpuint(uint32_t intmask) flags = enter_critical_section(); - intset = g_free_cpuints & intmask; +#ifdef CONFIG_SMP + if (this_cpu() != 0) + { + freeints = &g_cpu1_freeints; + } + else +#endif + { + freeints = &g_cpu0_freeints; + } + + intset = *freeints & intmask; if (intset != 0) { /* Skip over initial unavailable CPU interrupts quickly in groups @@ -224,7 +267,7 @@ int esp32_alloc_cpuint(uint32_t intmask) */ for (cpuint = 0, bitmask = 0xff; - cpuint <= ESP32_CPUINT_MAX; + cpuint <= ESP32_CPUINT_MAX && (intset & bitmask) == 0; cpuint += 8, bitmask <<= 8); /* Search for an unallocated CPU interrupt number in the remaining @@ -242,7 +285,7 @@ int esp32_alloc_cpuint(uint32_t intmask) { /* Got it! */ - g_free_cpuints &= ~bitmask; + *freeints &= ~bitmask; ret = cpuint; break; } @@ -257,6 +300,94 @@ int esp32_alloc_cpuint(uint32_t intmask) * Public Functions ****************************************************************************/ +/**************************************************************************** + * Name: esp32_cpuint_initialize + * + * Description: + * Initialize CPU interrupts + * + * Input Parameters: + * None + * + * Returned Value: + * Zero (OK) is returned on success; A negated errno value is returned on + * any failre. + * + ****************************************************************************/ + +int esp32_cpuint_initialize(void) +{ + uintptr_t regaddr; + uint8_t *intmap; +#ifdef CONFIG_SMP + int cpu; +#endif + int i; + +#ifdef CONFIG_SMP + /* Which CPU are we initializing */ + + cpu = up_cpu_index(); + DEBUGASSERT(cpu >= 0 && cpu < CONFIG_SMP_NCPUS); +#endif + + /* Disable all CPU interrupts on this CPU */ + + xtensa_disable_all(); + + /* Detach all peripheral sources PRO CPU interrupts */ + + for (i = 0; i < ESP32_NPERIPHERALS; i++) + { +#ifdef CONFIG_SMP + if (cpu != 0) + { + regaddr = DPORT_APP_MAP_REGADDR(i); + } + else +#endif + { + regaddr = DPORT_PRO_MAP_REGADDR(i); + } + + putreg32(NO_CPUINT, regaddr); + } + + /* Initialize CPU interrupt-to-IRQ mapping table */ + +#ifdef CONFIG_SMP + if (cpu != 0) + { + intmap = g_cpu1_intmap; + } + else +#endif + { + intmap = g_cpu0_intmap; + } + + /* Indiate that no peripheral interrupts are assigned to CPU interrupts */ + + memset(intmap, CPUINT_UNASSIGNED, ESP32_NCPUINTS); + + /* Special case the 6 internal interrupts. + * + * CPU interrupt bit IRQ number + * --------------------------- --------------------- + * ESP32_CPUINT_TIMER0 6 XTENSA_IRQ_TIMER0 0 + * SP32_CPUINT_SOFTWARE0 7 Not yet defined + * ESP32_CPUINT_PROFILING 11 Not yet defined + * ESP32_CPUINT_TIMER1 15 XTENSA_IRQ_TIMER1 1 + * ESP32_CPUINT_TIMER2 16 XTENSA_IRQ_TIMER2 2 + * ESP32_CPUINT_SOFTWARE1 29 Not yet defined + */ + + intmap[ESP32_CPUINT_TIMER0] = XTENSA_IRQ_TIMER0; + intmap[ESP32_CPUINT_TIMER1] = XTENSA_IRQ_TIMER1; + intmap[ESP32_CPUINT_TIMER2] = XTENSA_IRQ_TIMER2; + return OK; +} + /**************************************************************************** * Name: up_disable_irq * @@ -327,7 +458,7 @@ int esp32_alloc_levelint(int priority) uint32_t intmask; DEBUGASSERT(priority >= ESP32_MIN_PRIORITY && - priority <= ESP32_MAX_PRIORITY) + priority <= ESP32_MAX_PRIORITY); /* Check if there are any level CPU interrupts available at the requested * interrupt priority. @@ -359,7 +490,7 @@ int esp32_alloc_edgeint(int priority) uint32_t intmask; DEBUGASSERT(priority >= ESP32_MIN_PRIORITY && - priority <= ESP32_MAX_PRIORITY) + priority <= ESP32_MAX_PRIORITY); /* Check if there are any edge CPU interrupts available at the requested * interrupt priority. @@ -386,6 +517,7 @@ int esp32_alloc_edgeint(int priority) void esp32_free_cpuint(int cpuint) { irqstate_t flags; + uint32_t *freeints; uint32_t bitmask; DEBUGASSERT(cpuint >= 0 && cpuint < ESP32_CPUINT_NEDGEPERIPHS); @@ -394,8 +526,20 @@ void esp32_free_cpuint(int cpuint) bitmask = (1ul << cpuint); flags = enter_critical_section(); - DEBUGASSERT((g_free_cpuints & bitmask) == 0); - g_free_cpuints |= bitmask; + +#ifdef CONFIG_SMP + if (this_cpu() != 0) + { + freeints = &g_cpu1_freeints; + } + else +#endif + { + freeints = &g_cpu0_freeints; + } + + DEBUGASSERT((*freeints & bitmask) == 0); + *freeints |= bitmask; leave_critical_section(flags); } @@ -407,8 +551,10 @@ void esp32_free_cpuint(int cpuint) * * Input Parameters: * cpu - The CPU to receive the interrupt 0=PRO CPU 1=APP CPU - * periphid - The peripheral number from ira.h to be assigned. + * periphid - The peripheral number from ira.h to be assigned to + * a CPU interrupt. * cpuint - The CPU interrupt to receive the peripheral interrupt + * assignment. * * Returned Value: * None @@ -418,6 +564,7 @@ void esp32_free_cpuint(int cpuint) void esp32_attach_peripheral(int cpu, int periphid, int cpuint) { uintptr_t regaddr; + uint8_t *intmap; DEBUGASSERT(periphid >= 0 && periphid < ESP32_NPERIPHERALS); DEBUGASSERT(cpuint >= 0 && cpuint <= ESP32_CPUINT_MAX); @@ -427,13 +574,18 @@ void esp32_attach_peripheral(int cpu, int periphid, int cpuint) if (cpu != 0) { regaddr = DPORT_APP_MAP_REGADDR(periphid); + intmap = g_cpu1_intmap; } else #endif { regaddr = DPORT_PRO_MAP_REGADDR(periphid); + intmap = g_cpu0_intmap; } + DEBUGASSERT(intmap[cpuint] == CPUINT_UNASSIGNED); + intmap[cpuint] = periphid + XTENSA_IRQ_FIRSTPERIPH; + putreg32(cpuint, regaddr); } @@ -444,17 +596,21 @@ void esp32_attach_peripheral(int cpu, int periphid, int cpuint) * Detach a peripheral interupt from a CPU interrupt. * * Input Parameters: - * cpu - The CPU to receive the interrupt 0=PRO CPU 1=APP CPU - * periphid - The peripheral number from ira.h to be assigned. + * cpu - The CPU to receive the interrupt 0=PRO CPU 1=APP CPU + * periphid - The peripheral number from irq.h to be detached from the + * CPU interrupt. + * cpuint - The CPU interrupt from which the peripheral interrupt will + * be detached. * * Returned Value: * None * ****************************************************************************/ -void esp32_detach_peripheral(int cpu, int periphid) +void esp32_detach_peripheral(int cpu, int periphid, int cpuint) { uintptr_t regaddr; + uint8_t *intmap; DEBUGASSERT(periphid >= 0 && periphid < ESP32_NPERIPHERALS); #ifdef CONFIG_SMP @@ -463,12 +619,17 @@ void esp32_detach_peripheral(int cpu, int periphid) if (cpu != 0) { regaddr = DPORT_APP_MAP_REGADDR(periphid); + intmap = g_cpu1_intmap; } else #endif { regaddr = DPORT_PRO_MAP_REGADDR(periphid); + intmap = g_cpu0_intmap; } + DEBUGASSERT(intmap[cpuint] != CPUINT_UNASSIGNED); + intmap[cpuint] = CPUINT_UNASSIGNED; + putreg32(NO_CPUINT, regaddr); } diff --git a/arch/xtensa/src/esp32/esp32_cpuint.h b/arch/xtensa/src/esp32/esp32_cpuint.h index a3b599cf542..0132ce80718 100644 --- a/arch/xtensa/src/esp32/esp32_cpuint.h +++ b/arch/xtensa/src/esp32/esp32_cpuint.h @@ -42,10 +42,46 @@ #include +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define CPUINT_UNASSIGNED 0xff /* No peripheral assigned to this CPU interrupt */ + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* Maps a CPU interrupt to the IRQ of the attached peripheral interrupt */ + +extern uint8_t g_cpu0_intmap[ESP32_NCPUINTS]; +#ifdef CONFIG_SMP +extern uint8_t g_cpu1_intmap[ESP32_NCPUINTS]; +#endif + /**************************************************************************** * Public Function Prototypes ****************************************************************************/ +/**************************************************************************** + * Name: esp32_cpuint_initialize + * + * Description: + * Initialize CPU interrupts + * + * Input Parameters: + * None + * + * Returned Value: + * Zero (OK) is returned on success; A negated errno value is returned on + * any failre. + * + ****************************************************************************/ + +int esp32_cpuint_initialize(void); + /**************************************************************************** * Name: esp32_alloc_levelint * @@ -108,8 +144,10 @@ void esp32_free_cpuint(int cpuint); * * Input Parameters: * cpu - The CPU to receive the interrupt 0=PRO CPU 1=APP CPU - * periphid - The peripheral number from ira.h to be attached. + * periphid - The peripheral number from ira.h to be assigned to + * a CPU interrupt. * cpuint - The CPU interrupt to receive the peripheral interrupt + * assignment. * * Returned Value: * None @@ -125,14 +163,17 @@ void esp32_attach_peripheral(int cpu, int periphid, int cpuint); * Detach a peripheral interupt from a CPU interrupt. * * Input Parameters: - * cpu - The CPU to receive the interrupt 0=PRO CPU 1=APP CPU - * periphid - The peripheral number from ira.h to be detached. + * cpu - The CPU to receive the interrupt 0=PRO CPU 1=APP CPU + * periphid - The peripheral number from irq.h to be detached from the + * CPU interrupt. + * cpuint - The CPU interrupt from which the peripheral interrupt will + * be detached. * * Returned Value: * None * ****************************************************************************/ -void esp32_detach_peripheral(int cpu, int periphid); +void esp32_detach_peripheral(int cpu, int periphid, int cpuint); #endif /* __ARCH_XTENSA_SRC_ESP32_ESP32_CPUINT_H */ diff --git a/arch/xtensa/src/esp32/esp32_cpustart.c b/arch/xtensa/src/esp32/esp32_cpustart.c index 90998f107c4..1efb25b567c 100644 --- a/arch/xtensa/src/esp32/esp32_cpustart.c +++ b/arch/xtensa/src/esp32/esp32_cpustart.c @@ -41,32 +41,38 @@ #include #include -#include +#include #include #include #include -#include +#include #include #include "sched/sched.h" #include "xtensa.h" #include "chip/esp32_dport.h" +#include "chip/esp32_rtccntl.h" #include "esp32_region.h" #include "esp32_cpuint.h" #include "esp32_smp.h" #ifdef CONFIG_SMP -#warning REVISIT Need ets_set_appcpu_boot_addr() prototype -void ets_set_appcpu_boot_addr(uint32_t); - /**************************************************************************** * Private Data ****************************************************************************/ static volatile bool g_appcpu_started; -static sem_t g_appcpu_interlock; +static volatile spinlock_t g_appcpu_interlock SP_SECTION; + +/**************************************************************************** + * ROM function prototypes + ****************************************************************************/ + +void Cache_Flush(int cpu); +void Cache_Read_Enable(int cpu); +void ets_set_appcpu_boot_addr(uint32_t start); /**************************************************************************** * Private Functions @@ -88,20 +94,6 @@ static inline void xtensa_registerdump(FAR struct tcb_s *tcb) # define xtensa_registerdump(tcb) #endif -/**************************************************************************** - * Name: xtensa_disable_all - ****************************************************************************/ - -static inline void xtensa_disable_all(void) -{ - __asm__ __volatile__ - ( - "movi a2, 0\n" - "xsr a2, INTENABLE\n" - : : : "a2" - ); -} - /**************************************************************************** * Name: xtensa_attach_fromcpu0_interrupt ****************************************************************************/ @@ -136,25 +128,52 @@ static inline void xtensa_attach_fromcpu0_interrupt(void) ****************************************************************************/ /**************************************************************************** - * Name: xtensa_start_handler + * Name: xtensa_appcpu_start * * Description: - * This is the handler for SGI1. This handler simply returns from the - * interrupt, restoring the state of the new task at the head of the ready - * to run list. + * This is the entry point used with the APP CPU was started via + * up_cpu_start(). The actually start-up logic in in ROM and we boot up + * in C code. * * Input Parameters: - * Standard interrupt handling + * None * * Returned Value: - * Zero on success; a negated errno value on failure. + * None, does not return * ****************************************************************************/ -int xtensa_start_handler(int irq, FAR void *context) +void xtensa_appcpu_start(void) { FAR struct tcb_s *tcb = this_task(); - int i; + register uint32_t sp; + +#ifdef CONFIG_STACK_COLORATION + { + register uint32_t *ptr; + register int i; + + /* If stack debug is enabled, then fill the stack with a recognizable value + * that we can use later to test for high water marks. + */ + + for (i = 0, ptr = (uint32_t *)tcb->stack_alloc_ptr; + i < tcb->adj_stack_size; + i += sizeof(uint32_t)) + { + *ptr++ = STACK_COLOR; + } + } +#endif + + /* Move to the stack assigned to us by up_smp_start immediately. Although + * we were give a stack pointer at start-up, we don't know where that stack + * pointer is positioned respect to our memory map. The only safe option + * is to switch to a well-known IDLE thread stack. + */ + + sp = (uint32_t)tcb->adj_stack_ptr; + __asm__ __volatile__("mov sp, %0\n" : : "r"(sp)); sinfo("CPU%d Started\n", up_cpu_index()); @@ -167,7 +186,7 @@ int xtensa_start_handler(int irq, FAR void *context) /* Handle interlock*/ g_appcpu_started = true; - sem_post(&g_appcpu_interlock); + spin_unlock(&g_appcpu_interlock); /* Reset scheduler parameters */ @@ -181,9 +200,9 @@ int xtensa_start_handler(int irq, FAR void *context) esp32_region_protection(); - /* Disable all PRO CPU interrupts */ + /* Initialize CPU interrupts */ - xtensa_disable_all(); + (void)esp32_cpuint_initialize(); /* Attach and emable internal interrupts */ @@ -193,13 +212,6 @@ int xtensa_start_handler(int irq, FAR void *context) xtensa_attach_fromcpu0_interrupt(); #endif - /* Detach all peripheral sources APP CPU interrupts */ - - for (i = 0; i < ESP32_NPERIPHERALS; i++) - { - esp32_detach_peripheral(1, i);; - } - #if 0 /* Does it make since to have co-processors enabled on the IDLE thread? */ #if XTENSA_CP_ALLSET != 0 /* Set initial co-processor state */ @@ -224,7 +236,6 @@ int xtensa_start_handler(int irq, FAR void *context) */ xtensa_context_restore(tcb->xcp.regs); - return OK; } /**************************************************************************** @@ -261,7 +272,6 @@ int up_cpu_start(int cpu) if (!g_appcpu_started) { uint32_t regval; - int ret; /* Start CPU1 */ @@ -277,8 +287,24 @@ int up_cpu_start(int cpu) * have priority inheritance enabled. */ - sem_init(&g_appcpu_interlock, 0, 0); - sem_setprotocol(&g_appcpu_interlock, SEM_PRIO_NONE); + spin_initialize(&g_appcpu_interlock, SP_LOCKED); + + /* Flush and enable I-cache for APP CPU */ + + Cache_Flush(cpu); + Cache_Read_Enable(cpu); + + /* Unstall the APP CPU */ + + regval = getreg32(RTC_CNTL_SW_CPU_STALL_REG); + regval &= ~RTC_CNTL_SW_STALL_APPCPU_C1_M; + putreg32(regval, RTC_CNTL_SW_CPU_STALL_REG); + + regval = getreg32(RTC_CNTL_OPTIONS0_REG); + regval &= ~RTC_CNTL_SW_STALL_APPCPU_C0_M; + putreg32(regval, RTC_CNTL_OPTIONS0_REG); + + /* Enable clock gating for the APP CPU */ regval = getreg32(DPORT_APPCPU_CTRL_B_REG); regval |= DPORT_APPCPU_CLKGATE_EN; @@ -288,6 +314,8 @@ int up_cpu_start(int cpu) regval &= ~DPORT_APPCPU_RUNSTALL; putreg32(regval, DPORT_APPCPU_CTRL_C_REG); + /* Reset the APP CPU */ + regval = getreg32(DPORT_APPCPU_CTRL_A_REG); regval |= DPORT_APPCPU_RESETTING; putreg32(regval, DPORT_APPCPU_CTRL_A_REG); @@ -298,20 +326,12 @@ int up_cpu_start(int cpu) /* Set the CPU1 start address */ - ets_set_appcpu_boot_addr((uint32_t)__cpu1_start); + ets_set_appcpu_boot_addr((uint32_t)xtensa_appcpu_start); - /* And way for the initial task to run on CPU1 */ + /* And wait for the initial task to run on CPU1 */ - while (!g_appcpu_started) - { - ret = sem_wait(&g_appcpu_interlock); - if (ret < 0) - { - DEBUGASSERT(errno == EINTR); - } - } - - sem_destroy(&g_appcpu_interlock); + spin_lock(&g_appcpu_interlock); + DEBUGASSERT(g_appcpu_started); } return OK; diff --git a/arch/xtensa/src/esp32/esp32_intdecode.c b/arch/xtensa/src/esp32/esp32_intdecode.c index 675c5327e66..0bc40415246 100644 --- a/arch/xtensa/src/esp32/esp32_intdecode.c +++ b/arch/xtensa/src/esp32/esp32_intdecode.c @@ -39,29 +39,32 @@ #include -#include -#include +#include +#include + +#include +#include -#include "chip/esp32_dport.h" #include "xtensa.h" +#include "esp32_cpuint.h" /**************************************************************************** - * Private Data + * Private Functions ****************************************************************************/ -static const uint8_t g_baseirq[3] = -{ - ESP32_IRQ_SREG0, - ESP32_IRQ_SREG1, - ESP32_IRQ_SREG2 -}; +/**************************************************************************** + * Name: xtensa_intclear + ****************************************************************************/ -static const uint8_t g_nirqs[3] = +static inline void xtensa_intclear(uint32_t mask) { - ESP32_NIRQS_SREG0, - ESP32_NIRQS_SREG1, - ESP32_NIRQS_SREG2 -}; + __asm__ __volatile__ + ( + "movi a2, 0\n" + "wsr %0, INTCLEAR\n" + : "=r"(mask) : : + ); +} /**************************************************************************** * Public Functions @@ -75,80 +78,74 @@ static const uint8_t g_nirqs[3] = * handling to the registered interrupt handler via xtensa_irq_dispatch(). * * Input Parameters: - * regs - Saves processor state on the stack + * cpuints - Set of pending interrupts valid for this level + * regs - Saves processor state on the stack * * Returned Value: - * Normally the same vale as regs is returned. But, in the event of an + * Normally the same value as regs is returned. But, in the event of an * interrupt level context switch, the returned value will, instead point * to the saved processor state in the TCB of the newly started task. * ****************************************************************************/ -uint32_t *xtensa_int_decode(uint32_t *regs) +uint32_t *xtensa_int_decode(uint32_t cpuints, uint32_t *regs) { - uintptr_t regaddr; - uint32_t regval; + uint8_t *intmap; uint32_t mask; - int regndx; int bit; - int baseirq; - int nirqs; - #ifdef CONFIG_SMP int cpu; +#endif - /* Select PRO or APP interrupt status registers */ +#ifdef CONFIG_SMP + /* Select PRO or APP CPU interrupt mapping table */ cpu = up_cpu_index(); - if (cpu == 0) + if (cpu != 0) { - regaddr = DPORT_PRO_INTR_STATUS_0_REG; + intmap = g_cpu1_intmap; } else #endif { - regaddr = DPORT_APP_INTR_STATUS_0_REG; + intmap = g_cpu0_intmap; } - /* Process each pending interrupt in each of the three interrupt status - * registers. - */ + /* Skip over zero bits, eight at a time */ - for (regndx = 0; regndx < 3; regndx++) + for (bit = 0, mask = 0xff; + bit < ESP32_NCPUINTS && (cpuints & mask) == 0; + bit += 8, mask <<= 8); + + /* Process each pending CPU interrupt */ + + for (; bit < ESP32_NCPUINTS && cpuints != 0; bit++) { - /* Fetch the next register status register */ - - regval = getreg32(regaddr); - regaddr += sizeof(uint32_t); - - /* Set up the search */ - - baseirq = g_baseirq[regndx]; - nirqs = g_nirqs[regndx]; - - /* Decode and dispatch each pending bit in the interrupt status - * register. - */ - - for (bit = 0; regval != 0 && bit < nirqs; bit++) + mask = (1 << bit); + if ((cpuints & mask) != 0) { - /* Check if this interrupt is pending */ + /* Extract the IRQ number from the mapping table */ - mask = (1 << bit); - if ((regval & mask) != 0) - { - /* Yes.. Dispatch the interrupt. Note that regs may be - * altered in the case of an interrupt level context switch. - */ + uint8_t irq = intmap[bit]; + DEBUGASSERT(irq != CPUINT_UNASSIGNED); - regs = xtensa_irq_dispatch(baseirq + bit, regs); + /* Clear software or edge-triggered interrupt */ - /* Clear this bit in the sampled status register so that - * perhaps we can exit this loop sooner. - */ + xtensa_intclear(mask); - regval &= ~mask; - } + /* Dispatch the CPU interrupt. + * + * NOTE that regs may be altered in the case of an interrupt + * level context switch. + */ + + regs = xtensa_irq_dispatch((int)irq, regs); + + /* Clear the bit in the pending interrupt so that perhaps + * we can exit the look early. + */ + + cpuints &= ~mask; } } diff --git a/arch/xtensa/src/esp32/esp32_intercpu_interrupt.c b/arch/xtensa/src/esp32/esp32_intercpu_interrupt.c index ccbe9de4e5c..01bac85b0cb 100644 --- a/arch/xtensa/src/esp32/esp32_intercpu_interrupt.c +++ b/arch/xtensa/src/esp32/esp32_intercpu_interrupt.c @@ -41,7 +41,6 @@ #include #include -#include #include #include @@ -86,7 +85,7 @@ static int esp32_fromcpu_interrupt(int fromcpu) int intcode; int tocpu; - DEBUGASSERT(regs != NULL); + DEBUGASSERT((unsigned)fromcpu < CONFIG_SMP_NCPUS); /* Clear the interrupt from the other CPU */ @@ -155,14 +154,8 @@ int xtensa_intercpu_interrupt(int tocpu, int intcode) { int fromcpu; - DEBUGASSERT((unsigned)cpu < CONFIG_SMP_NCPUS && - (unsigned)incode <= UINT8_MAX); - - /* Disable context switching so that some other thread does not attempt to - * take the spinlock on the same CPU. - */ - - sched_lock(); + DEBUGASSERT((unsigned)tocpu < CONFIG_SMP_NCPUS && + (unsigned)intcode <= UINT8_MAX); /* Make sure that each inter-cpu event is atomic. The spinlock should * only be locked if we just completed sending an interrupt to this @@ -195,7 +188,6 @@ int xtensa_intercpu_interrupt(int tocpu, int intcode) putreg32(DPORT_CPU_INTR_FROM_CPU_1, DPORT_CPU_INTR_FROM_CPU_1_REG); } - sched_unlock(); return OK; } diff --git a/arch/xtensa/src/esp32/esp32_irq.c b/arch/xtensa/src/esp32/esp32_irq.c index 4c1d15008f3..11c43a4a1ce 100644 --- a/arch/xtensa/src/esp32/esp32_irq.c +++ b/arch/xtensa/src/esp32/esp32_irq.c @@ -98,20 +98,6 @@ static void esp32_irq_dump(const char *msg, int irq) # define esp32_irq_dump(msg, irq) #endif -/**************************************************************************** - * Name: xtensa_disable_all - ****************************************************************************/ - -static inline void xtensa_disable_all(void) -{ - __asm__ __volatile__ - ( - "movi a2, 0\n" - "xsr a2, INTENABLE\n" - : : : "a2" - ); -} - /**************************************************************************** * Name: xtensa_attach_fromcpu1_interrupt ****************************************************************************/ @@ -151,20 +137,11 @@ static inline void xtensa_attach_fromcpu1_interrupt(void) void xtensa_irq_initialize(void) { - int i; + /* Initialize CPU interrupts */ - /* Disable all PRO CPU interrupts */ + (void)esp32_cpuint_initialize(); - xtensa_disable_all(); - - /* Detach all peripheral sources PRO CPU interrupts */ - - for (i = 0; i < ESP32_NPERIPHERALS; i++) - { - esp32_detach_peripheral(0, i); - } - -#if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 3 +#if defined(CONFIG_STACK_COLORATION) && defined(HAVE_INTERRUPTSTACK) /* Colorize the interrupt stack for debug purposes */ #warning Missing logic @@ -187,7 +164,7 @@ void xtensa_irq_initialize(void) #endif #ifndef CONFIG_SUPPRESS_INTERRUPTS - /* And finally, enable interrupts */ + /* And finally, enable interrupts. Also clears PS.EXCM */ up_irq_enable(); #endif diff --git a/arch/xtensa/src/esp32/esp32_serial.c b/arch/xtensa/src/esp32/esp32_serial.c index f48b06e304f..3226895de7d 100644 --- a/arch/xtensa/src/esp32/esp32_serial.c +++ b/arch/xtensa/src/esp32/esp32_serial.c @@ -146,7 +146,7 @@ struct esp32_config_s { - const uint32_t uartbase; /* Base address of UART registers */ + const uint32_t uartbase; /* Base address of UART registers */ xcpt_t handler; /* Interrupt handler */ uint8_t periph; /* UART peripheral ID */ uint8_t irq; /* IRQ number assigned to the peripheral */ @@ -455,8 +455,8 @@ static void esp32_disableallints(struct esp32_dev_s *priv, uint32_t *intena) static int esp32_setup(struct uart_dev_s *dev) { - struct esp32_dev_s *priv = (struct esp32_dev_s *)dev->priv; #ifndef CONFIG_SUPPRESS_UART_CONFIG + struct esp32_dev_s *priv = (struct esp32_dev_s *)dev->priv; uint32_t clkdiv; uint32_t regval; uint32_t conf0; @@ -586,6 +586,19 @@ static int esp32_setup(struct uart_dev_s *dev) static void esp32_shutdown(struct uart_dev_s *dev) { struct esp32_dev_s *priv = (struct esp32_dev_s *)dev->priv; + uint32_t status; + + /* Wait for outgoing FIFO to clear. The ROM bootloader does not flush + * the FIFO before handing over to user code, so some of this output is + * not currently seen when the UART is reconfigured in early stages of + * startup. + */ + + do + { + status = esp32_serialin(priv, UART_STATUS_OFFSET); + } + while ((status & UART_TXFIFO_CNT_M) != 0); /* Disable all UART interrupts */ @@ -642,7 +655,9 @@ static int esp32_attach(struct uart_dev_s *dev) priv->cpuint = esp32_alloc_levelint(1); if (priv->cpuint < 0) { - ret = priv->cpuint; + /* Failed to allocate a CPU interrupt of this type */ + + return priv->cpuint; } /* Set up to receive peripheral interrupts on the current CPU */ @@ -701,7 +716,7 @@ static void esp32_detach(struct uart_dev_s *dev) cpu = 0; #endif - esp32_detach_peripheral(cpu, priv->config->periph); + esp32_detach_peripheral(cpu, priv->config->periph, priv->cpuint); /* And release the CPU interrupt */ @@ -725,6 +740,8 @@ static int esp32_interrupt(struct uart_dev_s *dev) struct esp32_dev_s *priv; uint32_t regval; uint32_t status; + uint32_t enabled; + unsigned int nfifo; int passes; bool handled; @@ -741,28 +758,48 @@ static int esp32_interrupt(struct uart_dev_s *dev) handled = false; priv->status = esp32_serialin(priv, UART_INT_RAW_OFFSET); status = esp32_serialin(priv, UART_STATUS_OFFSET); + enabled = esp32_serialin(priv, UART_INT_ENA_OFFSET); /* Clear pending interrupts */ - regval = (UART_RXFIFO_FULL_INT_CLR_S | UART_FRM_ERR_INT_CLR_S | - UART_RXFIFO_TOUT_INT_CLR_S | UART_TX_DONE_INT_CLR_S | - UART_TXFIFO_EMPTY_INT_CLR_S); + regval = (UART_RXFIFO_FULL_INT_CLR | UART_FRM_ERR_INT_CLR | + UART_RXFIFO_TOUT_INT_CLR | UART_TX_DONE_INT_CLR | + UART_TXFIFO_EMPTY_INT_CLR); esp32_serialout(priv, UART_INT_CLR_OFFSET, regval); - if ((status & UART_RXFIFO_CNT_M) > 0) + /* Are Rx interrupts enabled? The upper layer may hold off Rx input + * by disabling the Rx interrupts if there is no place to saved the + * data, possibly resulting in an overrun error. + */ + + if ((enabled & (UART_RXFIFO_FULL_INT_ENA | UART_RXFIFO_TOUT_INT_ENA)) != 0) + { + /* Is there any data waiting in the Rx FIFO? */ + + nfifo = (status & UART_RXFIFO_CNT_M) >> UART_RXFIFO_CNT_S; + if (nfifo > 0) + { + /* Received data in the RXFIFO! ... Process incoming bytes */ + + uart_recvchars(dev); + handled = true; + } + } + + /* Are Tx interrupts enabled? The upper layer will disable Tx interrupts + * when it has nothing to send. + */ + + if ((enabled & (UART_TX_DONE_INT_ENA | UART_TXFIFO_EMPTY_INT_ENA)) != 0) { - /* Received data in the RXFIFO ... process incoming bytes */ + nfifo = (status & UART_TXFIFO_CNT_M) >> UART_TXFIFO_CNT_S; + if (nfifo < 0x7f) + { + /* The TXFIFO is not full ... process outgoing bytes */ - uart_recvchars(dev); - handled = true; - } - - if ((status & UART_TXFIFO_CNT_M) < 0x7f) - { - /* The TXFIFO is not full ... process outgoing bytes */ - - uart_xmitchars(dev); - handled = true; + uart_xmitchars(dev); + handled = true; + } } } @@ -1032,8 +1069,11 @@ static int esp32_receive(struct uart_dev_s *dev, unsigned int *status) static void esp32_rxint(struct uart_dev_s *dev, bool enable) { struct esp32_dev_s *priv = (struct esp32_dev_s *)dev->priv; + irqstate_t flags; int regval; + flags = enter_critical_section(); + if (enable) { /* Receive an interrupt when their is anything in the Rx data register (or an Rx @@ -1042,8 +1082,8 @@ static void esp32_rxint(struct uart_dev_s *dev, bool enable) #ifndef CONFIG_SUPPRESS_SERIAL_INTS regval = esp32_serialin(priv, UART_INT_ENA_OFFSET); - regval |= (UART_RXFIFO_FULL_INT_CLR_S | UART_FRM_ERR_INT_CLR_S | - UART_RXFIFO_TOUT_INT_CLR_S); + regval |= (UART_RXFIFO_FULL_INT_ENA | UART_FRM_ERR_INT_ENA | + UART_RXFIFO_TOUT_INT_ENA); esp32_serialout(priv, UART_INT_ENA_OFFSET, regval); #endif } @@ -1051,10 +1091,13 @@ static void esp32_rxint(struct uart_dev_s *dev, bool enable) { /* Disable the RX interrupts */ - esp32_serialout(priv, UART_INT_CLR_OFFSET, - (UART_RXFIFO_FULL_INT_CLR_S | UART_FRM_ERR_INT_CLR_S | - UART_RXFIFO_TOUT_INT_CLR_S)); + regval = esp32_serialin(priv, UART_INT_ENA_OFFSET); + regval &= ~(UART_RXFIFO_FULL_INT_ENA | UART_FRM_ERR_INT_ENA | + UART_RXFIFO_TOUT_INT_ENA); + esp32_serialout(priv, UART_INT_ENA_OFFSET, regval); } + + leave_critical_section(flags); } /**************************************************************************** @@ -1099,20 +1142,19 @@ static void esp32_txint(struct uart_dev_s *dev, bool enable) { struct esp32_dev_s *priv = (struct esp32_dev_s *)dev->priv; irqstate_t flags; + int regval; flags = enter_critical_section(); if (enable) { - uint32_t regval; - /* Set to receive an interrupt when the TX holding register register * is empty */ #ifndef CONFIG_SUPPRESS_SERIAL_INTS regval = esp32_serialin(priv, UART_INT_ENA_OFFSET); - regval |= (UART_TX_DONE_INT_ENA_S | UART_TXFIFO_EMPTY_INT_ENA_S); + regval |= (UART_TX_DONE_INT_ENA | UART_TXFIFO_EMPTY_INT_ENA); esp32_serialout(priv, UART_INT_ENA_OFFSET, regval); /* Fake a TX interrupt here by just calling uart_xmitchars() with @@ -1126,8 +1168,9 @@ static void esp32_txint(struct uart_dev_s *dev, bool enable) { /* Disable the TX interrupt */ - esp32_serialout(priv, UART_INT_CLR_OFFSET, - (UART_TX_DONE_INT_CLR_S | UART_TXFIFO_EMPTY_INT_CLR_S)); + regval = esp32_serialin(priv, UART_INT_ENA_OFFSET); + regval &= ~(UART_TX_DONE_INT_ENA | UART_TXFIFO_EMPTY_INT_ENA); + esp32_serialout(priv, UART_INT_ENA_OFFSET, regval); } leave_critical_section(flags); @@ -1253,7 +1296,7 @@ int up_putc(int ch) /* Add CR */ while(!esp32_txready(&CONSOLE_DEV)); - esp32_send(&CONSOLE_DEV, 'r'); + esp32_send(&CONSOLE_DEV, '\r'); } while(!esp32_txready(&CONSOLE_DEV)); diff --git a/arch/xtensa/src/esp32/esp32_smp.h b/arch/xtensa/src/esp32/esp32_smp.h index 22d934e7a6b..7418a2e0606 100644 --- a/arch/xtensa/src/esp32/esp32_smp.h +++ b/arch/xtensa/src/esp32/esp32_smp.h @@ -44,6 +44,20 @@ #ifdef CONFIG_SMP +/**************************************************************************** + * Pre-procesor Definitions + ****************************************************************************/ + +/* An IDLE thread stack size for CPU0 must be defined */ + +#if !defined(CONFIG_SMP_IDLETHREAD_STACKSIZE) +# error CONFIG_SMP_IDLETHREAD_STACKSIZE is not defined +#elif CONFIG_SMP_IDLETHREAD_STACKSIZE < 16 +# error CONFIG_SMP_IDLETHREAD_STACKSIZE is to small +#endif + +#define CPU1_IDLETHREAD_STACKSIZE ((CONFIG_SMP_IDLETHREAD_STACKSIZE + 15) & ~15) +#define CPU1_IDLETHREAD_STACKWORDS (CPU1_IDLETHREAD_STACKSIZE >> 2) /**************************************************************************** * Public Data @@ -51,8 +65,7 @@ /* This is the CPU1 IDLE stack */ -#define CPU1_IDLETHREAD_STACKSIZE (CONFIG_SMP_IDLETHREAD_STACKSIZE & ~15) -extern uint32_t g_cpu1_idlestack[CPU1_IDLETHREAD_STACKSIZE / 34]; +extern uint32_t g_cpu1_idlestack[CPU1_IDLETHREAD_STACKWORDS]; /**************************************************************************** * Public Functions diff --git a/arch/xtensa/src/esp32/esp32_start.c b/arch/xtensa/src/esp32/esp32_start.c index a468e83a9c8..b0d9a584439 100644 --- a/arch/xtensa/src/esp32/esp32_start.c +++ b/arch/xtensa/src/esp32/esp32_start.c @@ -33,14 +33,25 @@ #include #include +#include +#include "xtensa.h" #include "xtensa_attr.h" + #include "chip/esp32_dport.h" #include "chip/esp32_rtccntl.h" #include "esp32_clockconfig.h" #include "esp32_region.h" #include "esp32_start.h" -#include "xtensa.h" + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +/* Address of the CPU0 IDLE thread */ + +uint32_t g_idlestack[IDLETHREAD_STACKWORDS] + __attribute__((aligned(16) section(".noinit"))); /**************************************************************************** * Public Functions @@ -62,6 +73,7 @@ void IRAM_ATTR __start(void) { uint32_t regval; + uint32_t sp; /* Kill the watchdog timer */ @@ -73,6 +85,39 @@ void IRAM_ATTR __start(void) regval &= ~(1 << 14); putreg32(regval, 0x6001f048); + /* Make sure that normal interrupts are disabled. This is really only an + * issue when we are started in un-usual ways (such as from IRAM). In this + * case, we can at least defer some unexpected interrupts left over from the + * last program execution. + */ + + up_irq_disable(); + +#ifdef CONFIG_STACK_COLORATION + { + register uint32_t *ptr; + register int i; + + /* If stack debug is enabled, then fill the stack with a recognizable value + * that we can use later to test for high water marks. + */ + + for (i = 0, ptr = g_idlestack; i < IDLETHREAD_STACKWORDS; i++) + { + *ptr++ = STACK_COLOR; + } + } +#endif + + /* Move the stack to a known location. Although we were give a stack + * pointer at start-up, we don't know where that stack pointer is positioned + * respect to our memory map. The only safe option is to switch to a well- + * known IDLE thread stack. + */ + + sp = (uint32_t)g_idlestack + IDLETHREAD_STACKSIZE; + __asm__ __volatile__("mov sp, %0\n" : : "r"(sp)); + /* Make page 0 access raise an exception */ esp32_region_protection(); @@ -108,4 +153,5 @@ void IRAM_ATTR __start(void) /* Bring up NuttX */ os_start(); + for(; ; ); /* Should not return */ } diff --git a/arch/xtensa/src/esp32/esp32_timerisr.c b/arch/xtensa/src/esp32/esp32_timerisr.c index 90ba8ecaae6..09653a582f3 100644 --- a/arch/xtensa/src/esp32/esp32_timerisr.c +++ b/arch/xtensa/src/esp32/esp32_timerisr.c @@ -170,20 +170,15 @@ static int esp32_timerisr(int irq, uint32_t *regs) void xtensa_timer_initialize(void) { - uint64_t divisor; + uint32_t divisor; uint32_t count; /* Configured the timer0 as the system timer. * - * divisor = BOARD_CLOCK_FREQUENCY / ticks_per_sec - * = BOARD_CLOCK_FREQUENCY / (ticks_per_usec * 1000000) - * = (1000000 * BOARD_CLOCK_FREQUENCY) / ticks_per_usec - * - * A long long calculation is used to preserve accuracy in all cases. + * divisor = BOARD_CLOCK_FREQUENCY / ticks_per_sec */ - divisor = (1000000ull * (uint64_t)BOARD_CLOCK_FREQUENCY) / CONFIG_USEC_PER_TICK; - DEBUGASSERT(divisor <= UINT32_MAX) + divisor = BOARD_CLOCK_FREQUENCY / CLOCKS_PER_SEC; g_tick_divisor = divisor; /* Set up periodic timer */ diff --git a/arch/xtensa/src/lx6/Kconfig b/arch/xtensa/src/lx6/Kconfig index 073954b7d6b..9edff0ce33e 100644 --- a/arch/xtensa/src/lx6/Kconfig +++ b/arch/xtensa/src/lx6/Kconfig @@ -5,27 +5,4 @@ if ARCH_CHIP_LX6 -choice - prompt "LX6 implementation" - default ARCH_CHIP_ESP32 - -config ARCH_CHIP_ESP32 - bool "Expressif ESP32" - ---help--- - The ESP32 is a dual-core system with two Harvard Architecture Xtensa - LX6 CPUs. All embedded memory, external memory and peripherals are - located on the data bus and/or the instruction bus of these CPUs. - With some minor exceptions the address mapping of two CPUs is - symmetric, meaning they use the same addresses to access the same - memory. Multiple peripherals in the system can access embedded - memory via DMA. - - The two CPUs are named "PRO_CPU" and "APP_CPU" (for "protocol" and - "application"), however for most purposes the two CPUs are - interchangeable. - -endchoice # LX6 implementation - -source arch/xtensa/src/esp32/Kconfig - endif # ARCH_CHIP_LX6 diff --git a/configs/Kconfig b/configs/Kconfig index cf6826157b9..396b5e1414e 100644 --- a/configs/Kconfig +++ b/configs/Kconfig @@ -70,32 +70,6 @@ config ARCH_BOARD_CLOUDCTRL Small network relay development board. Based on the Shenzhou IV development board design. -config ARCH_BOARD_COMPALE86 - bool "Compal e86 phone" - depends on ARCH_CHIP_CALYPSO - ---help--- - This configuration enables board support for Compal e86 phone. - This port derives from the Compal E88 port and was provided by Craig - Comstock. - -config ARCH_BOARD_COMPALE88 - bool "Compal e88 phone" - depends on ARCH_CHIP_CALYPSO - ---help--- - This configuration enables board support for compal e88 phone. - This ports is based on patches contributed by Denis Carikli for both the - compal e99 and e88. The patches were made by Alan Carvalho de Assis and - Denis Carikli using the Stefan Richter's Osmocom-bb patches. - -config ARCH_BOARD_COMPALE99 - bool "Compal e99 phone" - depends on ARCH_CHIP_CALYPSO - ---help--- - This configuration enables board support for compal e88 and e99 phones. - This port is based on patches contributed by Denis Carikli for both the - compal e99 and e88. The patches were made by Alan Carvalho de Assis and - Denis Carikli using the Stefan Richter's Osmocom-bb patches. - config ARCH_BOARD_DEMOS92S12NEC64 bool "Freescale DMO9S12NE64 board" depends on ARCH_CHIP_MCS92S12NEC64 @@ -568,6 +542,17 @@ config ARCH_BOARD_OLIMEX_STM32P207 toolchain under Linux or Cygwin. See the http://www.olimex.com for further information. This board features the STMicro STM32F207ZE MCU +config ARCH_BOARD_OLIMEX_STM32P407 + bool "Olimex STM32 P407 board" + depends on ARCH_CHIP_STM32F407ZG + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS + ---help--- + This port uses the Olimex STM32 P407 board and a GNU arm-nuttx-elf + toolchain under Linux or Cygwin. See the http://www.olimex.com for + further information. This board features the STMicro STM32F407ZG MCU + config ARCH_BOARD_OLIMEXINO_STM32 bool "Olimexino STM32 board" depends on ARCH_CHIP_STM32F103RB @@ -677,13 +662,6 @@ config ARCH_BOARD_PIC32MZ_STARTERKIT See www.microchip.com for further information. -config ARCH_BOARD_PIRELLI_DPL10 - bool "Pirelli DPL10 phone" - depends on ARCH_CHIP_CALYPSO - ---help--- - This directory contains the board support for Pirelli dpl10 phones. The - additions were made by Craig Comstock (with help form Alan Carvalho de Assis). - config ARCH_BOARD_NR5M100_NEXYS4 bool "NEXT RISC-V NR5M100 on Nexys-4 board" depends on ARCH_CHIP_NR5M100 @@ -1386,9 +1364,6 @@ config ARCH_BOARD default "bambino-200e" if ARCH_BOARD_BAMBINO_200E default "c5471evm" if ARCH_BOARD_C5471EVM default "cloudctrl" if ARCH_BOARD_CLOUDCTRL - default "compal_e86" if ARCH_BOARD_COMPALE86 - default "compal_e88" if ARCH_BOARD_COMPALE88 - default "compal_e99" if ARCH_BOARD_COMPALE99 default "demo9s12ne64" if ARCH_BOARD_DEMOS92S12NEC64 default "dk-tm4c129x" if ARCH_BOARD_DK_TM4C129X default "ea3131" if ARCH_BOARD_EA3131 @@ -1438,6 +1413,7 @@ config ARCH_BOARD default "olimex-stm32-e407" if ARCH_BOARD_OLIMEX_STM32E407 default "olimex-stm32-p107" if ARCH_BOARD_OLIMEX_STM32P107 default "olimex-stm32-p207" if ARCH_BOARD_OLIMEX_STM32P207 + default "olimex-stm32-p407" if ARCH_BOARD_OLIMEX_STM32P407 default "olimex-strp711" if ARCH_BOARD_OLIMEX_STRP711 default "olimexino-stm32" if ARCH_BOARD_OLIMEXINO_STM32 default "open1788" if ARCH_BOARD_OPEN1788 @@ -1447,7 +1423,6 @@ config ARCH_BOARD default "pic32mx-starterkit" if ARCH_BOARD_PIC32MX_STARTERKIT default "pic32mx7mmb" if ARCH_BOARD_PIC32MX7MMB default "pic32mz-starterkit" if ARCH_BOARD_PIC32MZ_STARTERKIT - default "pirelli_dpl10" if ARCH_BOARD_PIRELLI_DPL10 default "nucleo-144" if ARCH_BOARD_NUCLEO_144 default "nucleo-f303re" if ARCH_BOARD_NUCLEO_F303RE default "nucleo-f4x1re" if ARCH_BOARD_NUCLEO_F401RE || ARCH_BOARD_NUCLEO_F411RE @@ -1567,15 +1542,6 @@ endif if ARCH_BOARD_CLOUDCTRL source "configs/cloudctrl/Kconfig" endif -if ARCH_BOARD_COMPALE86 -source "configs/compal_e86/Kconfig" -endif -if ARCH_BOARD_COMPALE88 -source "configs/compal_e88/Kconfig" -endif -if ARCH_BOARD_COMPALE99 -source "configs/compal_e99/Kconfig" -endif if ARCH_BOARD_DEMOS92S12NEC64 source "configs/demo9s12ne64/Kconfig" endif @@ -1723,6 +1689,9 @@ endif if ARCH_BOARD_OLIMEX_STM32P207 source "configs/olimex-stm32-p207/Kconfig" endif +if ARCH_BOARD_OLIMEX_STM32P407 +source "configs/olimex-stm32-p407/Kconfig" +endif if ARCH_BOARD_OLIMEX_STRP711 source "configs/olimex-strp711/Kconfig" endif @@ -1747,9 +1716,6 @@ endif if ARCH_BOARD_PIC32MZ_STARTERKIT source "configs/pic32mz-starterkit/Kconfig" endif -if ARCH_BOARD_PIRELLI_DPL10 -source "configs/pirelli_dpl10/Kconfig" -endif if ARCH_BOARD_NUCLEO_144 source "configs/nucleo-144/Kconfig" endif diff --git a/configs/README.txt b/configs/README.txt index c7fe008e1de..80c0270ba26 100644 --- a/configs/README.txt +++ b/configs/README.txt @@ -206,13 +206,6 @@ configs/cloudctrl board. Based on the Shenzhou IV development board design. It is based on the STM32F107VC MCU. -configs/compal_e86, compal_e88 and compal_e99 - These directories contain the board support for compal e86, e88 and e99 phones. - These ports are based on patches contributed by Denis Carikli for both the - compal e99 and e88. The patches were made by Alan Carvalho de Assis and - Denis Carikli using the Stefan Richter's Osmocom-bb patches. The variant - for the e86 was submitted by Craig Comstock. - configs/demo9s12ne64 Freescale DMO9S12NE64 board based on the MC9S12NE64 hcs12 cpu. This port uses the m9s12x GCC toolchain. STATUS: (Still) under development; it @@ -467,6 +460,11 @@ configs/olimex-stm32-p207 toolchain under Linux or Cygwin. See the https://www.olimex.com/dev/stm32-p207.html for further information. Contributed by Martin Lederhilger. +configs/olimex-stm32-p407 + This port uses the Olimex STM32-P407 board (STM32F407ZG) and a GNU arm-nuttx-elf + toolchain under Linux or Cygwin. See the https://www.olimex.com/dev/stm32-p407.html + for further information. + configs/olimexino-stm32 This port uses the Olimexino STM32 board (STM32F103RBT6) and a GNU arm-nuttx-elf toolchain* under Linux or Cygwin. See the http://www.olimex.com for further\ @@ -531,7 +529,6 @@ configs/pic32mx7mmb Mikroelektronika PIC32MX7 Multimedia Board (MMB). See http://www.mikroe.com/ for further information. -configs/pirelli_dpl10 configs/pic32mz-starterkit This directory contains the port of NuttX to the Microchip PIC32MZ Embedded Connectivity (EC) Starter Kit. There are two configurations of @@ -544,10 +541,6 @@ configs/pic32mz-starterkit See www.microchip.com for further information. - This directory contains the board support for Pirelli "Discus" DP-L10 phones. - It is a variant of the compal_e88 config with the small changes for the - differences in the board. - configs/qemu-i486 Port of NuttX to QEMU in i486 mode. This port will also run on real i486 hardwared (Google the Bifferboard). diff --git a/configs/amber/hello/defconfig b/configs/amber/hello/defconfig index 7292bfeb9dc..2dc6a34254a 100644 --- a/configs/amber/hello/defconfig +++ b/configs/amber/hello/defconfig @@ -233,7 +233,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set diff --git a/configs/arduino-due/nsh/defconfig b/configs/arduino-due/nsh/defconfig index 268589a9aeb..bc43e12c289 100644 --- a/configs/arduino-due/nsh/defconfig +++ b/configs/arduino-due/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -501,7 +500,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/arduino-mega2560/hello/defconfig b/configs/arduino-mega2560/hello/defconfig index 8907161516b..95e74bd6c9b 100644 --- a/configs/arduino-mega2560/hello/defconfig +++ b/configs/arduino-mega2560/hello/defconfig @@ -296,7 +296,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set diff --git a/configs/arduino-mega2560/nsh/defconfig b/configs/arduino-mega2560/nsh/defconfig index 6636c1d8ff8..40cfb5458a2 100644 --- a/configs/arduino-mega2560/nsh/defconfig +++ b/configs/arduino-mega2560/nsh/defconfig @@ -304,7 +304,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set diff --git a/configs/avr32dev1/nsh/defconfig b/configs/avr32dev1/nsh/defconfig index cbd3aa7c1a8..5e2bffbca87 100644 --- a/configs/avr32dev1/nsh/defconfig +++ b/configs/avr32dev1/nsh/defconfig @@ -271,7 +271,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set diff --git a/configs/avr32dev1/ostest/defconfig b/configs/avr32dev1/ostest/defconfig index ea66ee4723a..600c0191aa2 100644 --- a/configs/avr32dev1/ostest/defconfig +++ b/configs/avr32dev1/ostest/defconfig @@ -270,7 +270,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set diff --git a/configs/bambino-200e/include/board.h b/configs/bambino-200e/include/board.h index d84320a8d3b..9f33f9aea72 100644 --- a/configs/bambino-200e/include/board.h +++ b/configs/bambino-200e/include/board.h @@ -57,12 +57,11 @@ * here because the including C file may not have that file in its include * path. * - * The Xplorer board has four crystals on board: + * The Bambino-200e board has three crystals on board: * * Y1 - RTC 32.768 MHz oscillator input, - * Y2 - 24.576 MHz input to the UDA 1380 audio codec, - * Y3 - 12.000 MHz LPC43xx crystal oscillator input - * Y4 - 50 MHz input for Ethernet + * Y2 - 12.000 MHz LPC43xx crystal oscillator input + * Y3 - 25 MHz input for Ethernet KSZ8031 PHY */ #define BOARD_XTAL_FREQUENCY (12000000) /* XTAL oscillator frequency (Y3) */ diff --git a/configs/bambino-200e/nsh/defconfig b/configs/bambino-200e/nsh/defconfig index 56947667f4f..729e7fdc658 100644 --- a/configs/bambino-200e/nsh/defconfig +++ b/configs/bambino-200e/nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -502,7 +501,6 @@ CONFIG_TIMER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y diff --git a/configs/c5471evm/httpd/defconfig b/configs/c5471evm/httpd/defconfig index 86eb3afb030..c388a368c89 100644 --- a/configs/c5471evm/httpd/defconfig +++ b/configs/c5471evm/httpd/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # CONFIG_ARCH_CHIP_A1X is not set CONFIG_ARCH_CHIP_C5471=y -# 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 @@ -414,7 +413,6 @@ CONFIG_WATCHDOG_DEVPATH="/dev/watchdog0" # 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 diff --git a/configs/c5471evm/nettest/defconfig b/configs/c5471evm/nettest/defconfig index ec8f1de7446..729f8df76ea 100644 --- a/configs/c5471evm/nettest/defconfig +++ b/configs/c5471evm/nettest/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # CONFIG_ARCH_CHIP_A1X is not set CONFIG_ARCH_CHIP_C5471=y -# 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 @@ -407,7 +406,6 @@ CONFIG_WATCHDOG_DEVPATH="/dev/watchdog0" # 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 diff --git a/configs/c5471evm/nsh/defconfig b/configs/c5471evm/nsh/defconfig index 8608b844207..a7d595285fa 100644 --- a/configs/c5471evm/nsh/defconfig +++ b/configs/c5471evm/nsh/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # CONFIG_ARCH_CHIP_A1X is not set CONFIG_ARCH_CHIP_C5471=y -# 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 @@ -415,7 +414,6 @@ CONFIG_NETDEV_TELNET=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/cc3200-launchpad/nsh/defconfig b/configs/cc3200-launchpad/nsh/defconfig index eba49bcd2c4..1de3eee3e2e 100644 --- a/configs/cc3200-launchpad/nsh/defconfig +++ b/configs/cc3200-launchpad/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -462,7 +461,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/cloudctrl/nsh/defconfig b/configs/cloudctrl/nsh/defconfig index 3fa1500ea5f..6da8937d151 100644 --- a/configs/cloudctrl/nsh/defconfig +++ b/configs/cloudctrl/nsh/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -835,7 +834,6 @@ CONFIG_ETH0_PHY_DM9161=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/compal_e86/Kconfig b/configs/compal_e86/Kconfig deleted file mode 100644 index f72f3c094ce..00000000000 --- a/configs/compal_e86/Kconfig +++ /dev/null @@ -1,4 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# diff --git a/configs/compal_e86/README.txt b/configs/compal_e86/README.txt deleted file mode 100644 index 704f2b6b70e..00000000000 --- a/configs/compal_e86/README.txt +++ /dev/null @@ -1,70 +0,0 @@ -compal_e86 -========== - -This directory contains the board support for compal e86 phones. This port -is tested on the following phone: - -* motorola c139 (compal e86) with flash configuration - -This port is based on patches contributed by Denis Carikli for both the -compal e99 and e88. At the time of initial check-in, the following phones -were tested: - -* motorolla c155 (compal e99) with the compalram and highram configuration -* motorolla W220 (compal e88) -* The openmoko freerunner baseband(compal e88) - -The patches were made by Alan Carvalho de Assis and Denis Carikli using -the Stefan Richter's patches that can be found here: - -http://cgit.osmocom.org/cgit/nuttx-bb/log/?h=lputt%2Ftesting - -Osmocom-BB Dependencies and Sercomm -=================================== - -The build environment assumes that you have the osmocom-bb project -directory at same level as the nuttx project: - - |- nuttx - |- apps - `- osmocom-bb - -If you attempt to build this configuration without osmocom-bb, and that -you added support for sercomm in your configuration(CONFIG_SERCOMM_CONSOLE=y) -you will get compilation errors in drivers/sercomm due to header files that -are needed from the osmocom-bb directory. - -By default, NuttX will not use sercomm (HDLC protocol) to communicate with -the host system. Sercomm is the transport used by osmocom-bb that runs on top -of serial. See http://bb.osmocom.org/trac/wiki/nuttx-bb/run for detailed -the usage of nuttx with sercomm. - -Running NuttX From Flash -======================== - -Flash layout: - -0x00000 - 0x02000 - original compal loader -0x02000 - 0x10000 - simple binary to jump to 0x10000 (jumper.e86loader.bin) -0x10000 - ??? - NuttX binary (nuttx.bin) - -Using osmocon/osmoload, retrieve the compal loader, flash it and the -jumper.e86loader.bin as well as nuttx.bin. - -The jumper app is a modified version of the menu app in osmocom-bb, branch -jolly/menu. The app disabled irqs (setup by compal loader?) and jumps to -0x10000. This app is submitted as a patch to osmocom-bb mailing list. - -Loading NuttX (highram) -======================= - -The osmocom-bb wiki describes how to load NuttX. See -http://bb.osmocom.org/trac/wiki/nuttx-bb for detailed information. -The way that nuttx is loaded depends on the configuration (highram/compalram) -and phone: - -o compalram is for the ramloader(for phone having a bootloader on flash) -o highram is for phones having the romloader(if the phone has a bootrom) - or for loading in the ram trough a special loader(loaded first on ram - by talking to the ramloader) when having a ramloader(which can only - load 64k). diff --git a/configs/compal_e86/include/board.h b/configs/compal_e86/include/board.h deleted file mode 100644 index 00c96bf6f56..00000000000 --- a/configs/compal_e86/include/board.h +++ /dev/null @@ -1,6 +0,0 @@ -/**************************************************************************** - * configs/nsh_highram/include/board.h - * - * Supposed to be empty - * - ****************************************************************************/ diff --git a/configs/compal_e86/nsh_highram/Make.defs b/configs/compal_e86/nsh_highram/Make.defs deleted file mode 100644 index c06a6821b16..00000000000 --- a/configs/compal_e86/nsh_highram/Make.defs +++ /dev/null @@ -1,140 +0,0 @@ -############################################################################ -# configs/compal_e86/nsh_highram/Make.defs -# -# Copyright (C) 2007, 2008, 2011, 2013 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -include ${TOPDIR}/.config -include ${TOPDIR}/tools/Config.mk -include ${TOPDIR}/arch/arm/src/arm/Toolchain.defs - -ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y) - LDSCRIPT = flash.ld -else - LDSCRIPT = highram.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. -I "${shell cygpath -w $(OSMODIR)/src/shared/libosmocore/include}" -isystem "${shell cygpath -w $(TOPDIR)/include}" - ARCHXXINCLUDES = -I. -I "${shell cygpath -w $(OSMODIR)/src/shared/libosmocore/include}" -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)}" - -ifeq ("${CONFIG_SERCOMM_CONSOLE}","y") - OSMODIR = "${shell cygpath -w $(TOPDIR)/../../osmocom-bb}" - EXTRA_LIBS = "${shell cygpath -w $(OSMODIR)/src/target/firmware/comm/libcomm.a}" \ - "${shell cygpath -w $(OSMODIR)/src/shared/libosmocore/build-target/src/.libs/libosmocore.a}" \ - "${shell cygpath -w $(OSMODIR)/src/target/firmware/calypso/libcalypso.a}" \ - "${shell cygpath -w $(OSMODIR)/src/target/firmware/comm/libcomm.a}" -endif -else - # Linux/Cygwin-native toolchain - MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) - ARCHINCLUDES = -I. -isystem $(TOPDIR)/include - ARCHINCLUDES = -I. -I$(OSMODIR)/src/shared/libosmocore/include -isystem $(TOPDIR)/include - ARCHXXINCLUDES = -I. -I$(OSMODIR)/src/shared/libosmocore/include -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) - -ifeq ("${CONFIG_SERCOMM_CONSOLE}","y") - OSMODIR = $(TOPDIR)/../../osmocom-bb - EXTRA_LIBS = $(OSMODIR)/src/target/firmware/comm/libcomm.a \ - $(OSMODIR)/src/shared/libosmocore/build-target/src/.libs/libosmocore.a \ - $(OSMODIR)/src/target/firmware/calypso/libcalypso.a \ - $(OSMODIR)/src/target/firmware/comm/libcomm.a - # ^^^ Stupid hack! Why do I have to put it twice??? -endif -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 - -ifeq ($(ARCHCCMAJOR),4) - ARCHCPUFLAGS = -mcpu=arm7tdmi -mfloat-abi=soft -fno-builtin -else - ARCHCPUFLAGS = -mapcs-32 -mcpu=arm7tdmi -msoft-float -fno-builtin -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-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/compal_e86/nsh_highram/setenv.sh b/configs/compal_e86/nsh_highram/setenv.sh deleted file mode 100755 index 3828a56504e..00000000000 --- a/configs/compal_e86/nsh_highram/setenv.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash -# compal_e86/nsh_highram/setenv.sh -# -# Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -if [ "$_" = "$0" ] ; then - echo "You must source this script, not run it!" 1>&2 - exit 1 -fi - -WD=`pwd` -if [ ! -x "setenv.sh" ]; then - echo "This script must be executed from the top-level NuttX build directory" - exit 1 -fi - -if [ -z "${PATH_ORIG}" ]; then - export PATH_ORIG="${PATH}" -fi - -# This is the Cygwin path to the location where I installed the Atmel GCC -# toolchain under Windows. You will also have to edit this if you install -# this toolchain in any other location -#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Atmel/Atmel Toolchain/ARM GCC/Native/4.7.3.99/arm-gnu-toolchain/bin" - -# This is the Cygwin path to the location where I installed the CodeSourcery -# toolchain under windows. You will also have to edit this if you install -# the CodeSourcery toolchain in any other location -#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" - -# 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" - -# 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/compal_e86/scripts/flash.ld b/configs/compal_e86/scripts/flash.ld deleted file mode 100644 index 73c72f00cee..00000000000 --- a/configs/compal_e86/scripts/flash.ld +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Linker script for flashed applications on the Compal E86 - * - * This script creates a binary that can be linked at 0xFFFF, starting - * with the second flash page. This is what a phone application or - * pure layer1 device uses. - * - * XXX: interrupts? - * - */ - -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -OUTPUT_ARCH(arm) -ENTRY(_start) -MEMORY -{ - LOADR (rx) : ORIGIN = 0x00000000, LENGTH = 0x10000 - /* 4 MBytes of external flash memory (minus loader) */ - FLASH (rx) : ORIGIN = 0x00010000, LENGTH = 0x3F0000 - /* 256 kBytes of internal zero-waitstate sram */ - IRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x040000 - /* 256 kBytes of external slow sram */ - ERAM (rw) : ORIGIN = 0x01000000, LENGTH = 0x040000 -} -SECTIONS -{ - /* entrypoint */ - .text.start : { - PROVIDE(_start = .); - KEEP(*(.text.start)) - *(.text.start) - } > FLASH - - /* exception vectors from 0x80001c to 0x800034 */ - .text.exceptions 0x80001c : { - KEEP(*(.text.exceptions)) - * (.text.exceptions) - . = ALIGN(4); - } > IRAM AT> FLASH - PROVIDE(_exceptions = LOADADDR(.text.exceptions)); - - /* code */ - .text : { - _stext = ABSOLUTE(.) ; - /* regular code */ - *(.text*) - /* gcc voodoo */ - *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx) - _etext = ABSOLUTE(.) ; - } > FLASH - PROVIDE(_text_start = ADDR(.text)); - PROVIDE(_text_end = ADDR(.text) + SIZEOF(.text)); - - /* constructor pointers */ - .ctors : { - /* ctor count */ - LONG(SIZEOF(.ctors) / 4 - 2) - /* ctor pointers */ - KEEP(*(SORT(.ctors))) - /* end of list */ - LONG(0) - } > FLASH - PROVIDE(_ctor_start = LOADADDR(.ctors)); - PROVIDE(_ctor_end = LOADADDR(.ctors) + SIZEOF(.ctors)); - - /* destructor pointers */ - .dtors : { - /* dtor count */ - LONG(SIZEOF(.dtors) / 4 - 2) - /* dtor pointers */ - KEEP(*(SORT(.dtors))) - /* end of list */ - LONG(0) - } > FLASH - PROVIDE(_dtor_start = LOADADDR(.dtors)); - PROVIDE(_dtor_end = LOADADDR(.dtors) + SIZEOF(.dtors)); - - /* read-only data */ - .rodata : { - *(.rodata*) - _eronly = ABSOLUTE(.) ; - } > FLASH - PROVIDE(_rodata_start = ADDR(.rodata)); - PROVIDE(_rodata_end = ADDR(.rodata) + SIZEOF(.rodata)); - - /* pic offset tables */ - .got : { - . = ALIGN(4); - *(.got) - *(.got.plt) *(.igot.plt) *(.got) *(.igot) - . = ALIGN(4); - } > FLASH - PROVIDE(_got_start = ADDR(.got)); - PROVIDE(_got_end = ADDR(.got) + SIZEOF(.got)); - - /* reserved ram */ - .compal.reservedram 0x800000 (NOLOAD) : { - . = 0xff; - } > IRAM - - /* initialized data */ - .data : AT (LOADADDR(.got) + SIZEOF(.got)) { - . = ALIGN(4); - _sdata = ABSOLUTE(.); - *(.data) - _edata = ABSOLUTE(.); - . = ALIGN(4); - } > IRAM - PROVIDE(__data_start = LOADADDR(.data)); - PROVIDE(__data_end = LOADADDR(.data) + SIZEOF(.data)); - PROVIDE(_data_start = ADDR(.data)); - PROVIDE(_data_end = ADDR(.data) + SIZEOF(.data)); - - /* ram code */ - .ramtext : AT (LOADADDR(.data) + SIZEOF(.data)) { - . = ALIGN(4); - *(.ramtext) - . = ALIGN(4); - } > IRAM - PROVIDE(__ramtext_start = LOADADDR(.ramtext)); - PROVIDE(__ramtext_end = LOADADDR(.ramtext) + SIZEOF(.ramtext)); - PROVIDE(_ramtext_start = ADDR(.ramtext)); - PROVIDE(_ramtext_end = ADDR(.ramtext) + SIZEOF(.ramtext)); - - /* uninitialized data */ - .bss (NOLOAD) : { - . = ALIGN(4); - _sbss = ABSOLUTE(.); - *(.bss) - _ebss = ABSOLUTE(.); - . = ALIGN(4); - } > IRAM - PROVIDE(__bss_start = ADDR(.bss)); - PROVIDE(__bss_end = ADDR(.bss) + SIZEOF(.bss)); - PROVIDE(_bss_start = __bss_start); - PROVIDE(_bss_end = __bss_end); - - /* end of image */ - . = ALIGN(4); - _end = .; - PROVIDE(end = .); -} diff --git a/configs/compal_e86/scripts/highram.ld b/configs/compal_e86/scripts/highram.ld deleted file mode 100644 index 429ef2b5025..00000000000 --- a/configs/compal_e86/scripts/highram.ld +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Linker script for running from internal SRAM on Compal phones - * - * This script is tailored specifically to the requirements imposed - * on us by the Compal bootloader. - * - */ - -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -OUTPUT_ARCH(arm) -ENTRY(__start) -MEMORY -{ - -/* E86 stacked flash 32mbit flash, 4mbit sram, DBB internal 256kb SRAM */ - /* 0x800000-0x87ffff */ /* bump up because we have 32mbit instead of 16mbit */ - /* compal-loaded binary: our text, initialized data */ - LRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x00020000 - TRAM (rw) : ORIGIN = 0x00820000, LENGTH = 0x00040000 - /* compal-loaded binary: our unitialized data, stacks, heap */ - IRAM (rw) : ORIGIN = 0x00860000, LENGTH = 0x00020000 - -/* E88 NOR flash 16mbits, SRAM 256 kb, DBB has 256kb internal SRAM */ - /* 0x800000-0x83ffff */ - /* compal-loaded binary: our text, initialized data */ -/* - LRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x00020000 - TRAM (rw) : ORIGIN = 0x00820000, LENGTH = 0x00010000 -*/ - /* compal-loaded binary: our unitialized data, stacks, heap */ -/* - IRAM (rw) : ORIGIN = 0x00830000, LENGTH = 0x00010000 -*/ -} -SECTIONS -{ - . = 0x800000; - - /* romloader data section, contains passthru interrupt vectors */ - .compal.loader (NOLOAD) : { . = 0x100; } > LRAM - - /* image signature (prepended by osmocon according to phone type) */ - .compal.header (NOLOAD) : { . = 4; } > LRAM - - /* initialization code */ - . = ALIGN(4); - .text.start : { - PROVIDE(__start = .); - KEEP(*(.text.start)) - *(.text.start) - } > TRAM - - /* exception vectors from 0x80001c to 0x800034 */ - .text.exceptions 0x80001c : AT (LOADADDR(.text.start) + SIZEOF(.text.start)) { - KEEP(*(.text.exceptions)) - * (.text.exceptions) - . = ALIGN(4); - } > LRAM - PROVIDE(_exceptions = LOADADDR(.text.exceptions)); - - /* code */ - . = ALIGN(4); - .text (LOADADDR(.text.exceptions) + SIZEOF(.text.exceptions)) : - AT (LOADADDR(.text.exceptions) + SIZEOF(.text.exceptions)) { - /* regular code */ - *(.text*) - /* always-in-ram code */ - *(.ramtext*) - /* gcc voodoo */ - *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx) - . = ALIGN(4); - } > TRAM - PROVIDE(_text_start = LOADADDR(.text)); - PROVIDE(_text_end = LOADADDR(.text) + SIZEOF(.text)); - - /* constructor pointers */ - .ctors : { - /* ctor count */ - LONG(SIZEOF(.ctors) / 4 - 2) - /* ctor pointers */ - KEEP(*(SORT(.ctors))) - /* end of list */ - LONG(0) - } > TRAM - PROVIDE(_ctor_start = LOADADDR(.ctors)); - PROVIDE(_ctor_end = LOADADDR(.ctors) + SIZEOF(.ctors)); - - /* destructor pointers */ - .dtors : { - /* dtor count */ - LONG(SIZEOF(.dtors) / 4 - 2) - /* dtor pointers */ - KEEP(*(SORT(.dtors))) - /* end of list */ - LONG(0) - } > TRAM - PROVIDE(_dtor_start = LOADADDR(.dtors)); - PROVIDE(_dtor_end = LOADADDR(.dtors) + SIZEOF(.dtors)); - - /* read-only data */ - . = ALIGN(4); - .rodata : { - *(.rodata*) - } > TRAM - PROVIDE(_rodata_start = LOADADDR(.rodata)); - PROVIDE(_rodata_end = LOADADDR(.rodata) + SIZEOF(.rodata)); - - /* initialized data */ - . = ALIGN(4); - .data : { - *(.data) - } > TRAM - PROVIDE(_data_start = LOADADDR(.data)); - PROVIDE(_data_end = LOADADDR(.data) + SIZEOF(.data)); - - /* pic offset tables */ - . = ALIGN(4); - .got : { - *(.got) - *(.got.plt) *(.igot.plt) *(.got) *(.igot) - } > TRAM - PROVIDE(_got_start = LOADADDR(.got)); - PROVIDE(_got_end = LOADADDR(.got) + SIZEOF(.got)); - - /* uninitialized data */ - .bss (NOLOAD) : { - . = ALIGN(4); - __bss_start = .; - _sbss = ABSOLUTE(.); - *(.bss) - _ebss = ABSOLUTE(.); - } > IRAM - . = ALIGN(4); - __bss_end = .; - PROVIDE(_bss_start = __bss_start); - PROVIDE(_bss_end = __bss_end); - - /* end of image */ - . = ALIGN(4); - _end = .; - PROVIDE(end = .); -} diff --git a/configs/compal_e86/src/Makefile b/configs/compal_e86/src/Makefile deleted file mode 100644 index b8f7e5dc8a3..00000000000 --- a/configs/compal_e86/src/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################ -# configs/compal_e86/src/Makefile -# -# Copyright (C) 2007, 2008, 2013, 2015 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Copyright (C) 2011 Stefan Richter. All rights reserved. -# Author: Stefan Richter -# -# 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 = boot.c - -include $(TOPDIR)/configs/Board.mk diff --git a/configs/compal_e88/Kconfig b/configs/compal_e88/Kconfig deleted file mode 100644 index f72f3c094ce..00000000000 --- a/configs/compal_e88/Kconfig +++ /dev/null @@ -1,4 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# diff --git a/configs/compal_e88/README.txt b/configs/compal_e88/README.txt deleted file mode 100644 index 1dfefc74669..00000000000 --- a/configs/compal_e88/README.txt +++ /dev/null @@ -1,52 +0,0 @@ -compal_e88 -========== - -This directory contains the board support for compal e88 phones. - -This port is based on patches contributed by Denis Carikli for both the -compal e99 and e88. At the time of initial check-in, the following phones -were tested: - -* Motorola c155 (compal e99) with the compalram and highram configuration -* Motorola W220 (compal e88) -* The openmoko freerunner baseband(compal e88) - -The patches were made by Alan Carvalho de Assis and Denis Carikli using -the Stefan Richter's patches that can be found here: - -http://cgit.osmocom.org/cgit/nuttx-bb/log/?h=lputt%2Ftesting - -Osmocom-BB Dependencies and Sercomm -=================================== - -The build environment assumes that you have the osmocom-bb project -directory at same level as the nuttx project: - - |- nuttx - |- apps - `- osmocom-bb - -If you attempt to build this configuration without osmocom-bb, and that -you added support for sercomm in your configuration(CONFIG_SERCOMM_CONSOLE=y) -you will get compilation errors in drivers/sercomm due to header files that -are needed from the osmocom-bb directory. - -By default, NuttX will not use sercomm (HDLC protocol) to communicate with -the host system. Sercomm is the transport used by osmocom-bb that runs on top -of serial. See http://bb.osmocom.org/trac/wiki/nuttx-bb/run for detailed -the usage of nuttx with sercomm. - -Loading NuttX -============= - -The osmocom-bb wiki describes how to load NuttX. See -http://bb.osmocom.org/trac/wiki/nuttx-bb for detailed information. -The way that nuttx is loaded depends on the configuration (highram/compalram) -and phone: - -o compalram is for the ramloader(for phone having a bootloader on flash) -o highram is for phones having the romloader(if the phone has a bootrom) - or for loading in the ram trough a special loader(loaded first on ram - by talking to the ramloader) when having a ramloader(which can only - load 64k). - diff --git a/configs/compal_e88/include/board.h b/configs/compal_e88/include/board.h deleted file mode 100644 index 5855614184f..00000000000 --- a/configs/compal_e88/include/board.h +++ /dev/null @@ -1,6 +0,0 @@ -/**************************************************************************** - * arch/board.h - * - * Supposed to be empty - * - ****************************************************************************/ diff --git a/configs/compal_e88/nsh_highram/Make.defs b/configs/compal_e88/nsh_highram/Make.defs deleted file mode 100644 index e9c3e239431..00000000000 --- a/configs/compal_e88/nsh_highram/Make.defs +++ /dev/null @@ -1,124 +0,0 @@ -############################################################################ -# configs/compal_e88/nsh_highram/Make.defs -# -# 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. -# -############################################################################ - -include ${TOPDIR}/.config -include ${TOPDIR}/tools/Config.mk -include ${TOPDIR}/arch/arm/src/arm/Toolchain.defs - -LDSCRIPT = ld.script - -ifeq ($(WINTOOL),y) - # Windows-native toolchains - 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 - ARCHINCLUDES = -I. -isystem $(TOPDIR)/include - ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) -endif - -CC = $(CROSSDEV)gcc -CXX = $(CROSSDEV)g++ -CPP = $(CROSSDEV)gcc -E -LD = $(CROSSDEV)ld -AR = $(ARCROSSDEV)ar rcs -NM = $(ARCROSSDEV)nm -OBJCOPY = $(CROSSDEV)objcopy -OBJDUMP = $(CROSSDEV)objdump - -ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} -ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} - -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION = -g -endif - -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -endif - -ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -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-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 = -ifeq ($(CONFIG_HOST_WINDOWS),y) - HOSTEXEEXT = .exe -else - HOSTEXEEXT = -endif - -ifeq ($(WINTOOL),y) - # Windows-native host tools - DIRLINK = $(TOPDIR)/tools/copydir.sh - DIRUNLINK = $(TOPDIR)/tools/unlink.sh - MKDEP = $(TOPDIR)/tools/mkwindeps.sh -else - # Linux/Cygwin-native host tools - MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) -endif - diff --git a/configs/compal_e88/nsh_highram/defconfig b/configs/compal_e88/nsh_highram/defconfig deleted file mode 100644 index 3672faf14d7..00000000000 --- a/configs/compal_e88/nsh_highram/defconfig +++ /dev/null @@ -1,808 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Nuttx/ Configuration -# - -# -# Build Setup -# -# CONFIG_EXPERIMENTAL is not set -# CONFIG_DEFAULT_SMALL is not set -CONFIG_HOST_LINUX=y -# CONFIG_HOST_OSX is not set -# CONFIG_HOST_WINDOWS is not set -# CONFIG_HOST_OTHER is not set - -# -# Build Configuration -# -# CONFIG_APPS_DIR="../apps" -CONFIG_BUILD_FLAT=y -# CONFIG_BUILD_2PASS is not set - -# -# Binary Output Formats -# -# CONFIG_RRLOAD_BINARY is not set -# CONFIG_INTELHEX_BINARY is not set -# CONFIG_MOTOROLA_SREC is not set -CONFIG_RAW_BINARY=y -# CONFIG_UBOOT_UIMAGE is not set - -# -# Customize Header Files -# -# CONFIG_ARCH_STDINT_H is not set -# CONFIG_ARCH_STDBOOL_H is not set -# CONFIG_ARCH_MATH_H is not set -# CONFIG_ARCH_FLOAT_H is not set -# CONFIG_ARCH_STDARG_H is not set -# CONFIG_ARCH_DEBUG_H is not set - -# -# Debug Options -# -CONFIG_DEBUG_ALERT=y -# CONFIG_DEBUG_FEATURES is not set -CONFIG_ARCH_HAVE_STACKCHECK=y -# CONFIG_STACK_COLORATION is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_SYMBOLS is not set -CONFIG_ARCH_HAVE_CUSTOMOPT=y -# CONFIG_DEBUG_NOOPT is not set -# CONFIG_DEBUG_CUSTOMOPT is not set -CONFIG_DEBUG_FULLOPT=y - -# -# System Type -# -CONFIG_ARCH_ARM=y -# CONFIG_ARCH_AVR is not set -# CONFIG_ARCH_HC is not set -# CONFIG_ARCH_MIPS is not set -# CONFIG_ARCH_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=y -# CONFIG_ARCH_CHIP_DM320 is not set -# CONFIG_ARCH_CHIP_EFM32 is not set -# CONFIG_ARCH_CHIP_IMX1 is not set -# CONFIG_ARCH_CHIP_IMX6 is not set -# CONFIG_ARCH_CHIP_KINETIS is not set -# CONFIG_ARCH_CHIP_KL is not set -# CONFIG_ARCH_CHIP_LM is not set -# CONFIG_ARCH_CHIP_TIVA is not set -# CONFIG_ARCH_CHIP_LPC11XX is not set -# CONFIG_ARCH_CHIP_LPC17XX is not set -# CONFIG_ARCH_CHIP_LPC214X is not set -# CONFIG_ARCH_CHIP_LPC2378 is not set -# CONFIG_ARCH_CHIP_LPC31XX is not set -# CONFIG_ARCH_CHIP_LPC43XX is not set -# CONFIG_ARCH_CHIP_NUC1XX is not set -# CONFIG_ARCH_CHIP_SAMA5 is not set -# CONFIG_ARCH_CHIP_SAMD is not set -# CONFIG_ARCH_CHIP_SAML is not set -# CONFIG_ARCH_CHIP_SAM34 is not set -# CONFIG_ARCH_CHIP_SAMV7 is not set -# CONFIG_ARCH_CHIP_STM32 is not set -# CONFIG_ARCH_CHIP_STM32F7 is not set -# CONFIG_ARCH_CHIP_STM32L4 is not set -# CONFIG_ARCH_CHIP_STR71X is not set -# CONFIG_ARCH_CHIP_TMS570 is not set -# CONFIG_ARCH_CHIP_MOXART is not set -CONFIG_ARCH_ARM7TDMI=y -# CONFIG_ARCH_ARM926EJS is not set -# CONFIG_ARCH_ARM920T is not set -# CONFIG_ARCH_CORTEXM0 is not set -# CONFIG_ARCH_CORTEXM3 is not set -# CONFIG_ARCH_CORTEXM4 is not set -# CONFIG_ARCH_CORTEXM7 is not set -# CONFIG_ARCH_CORTEXA5 is not set -# CONFIG_ARCH_CORTEXA8 is not set -# CONFIG_ARCH_CORTEXA9 is not set -# CONFIG_ARCH_CORTEXR4 is not set -# CONFIG_ARCH_CORTEXR4F is not set -# CONFIG_ARCH_CORTEXR5 is not set -# CONFIG_ARCH_CORTEX5F is not set -# CONFIG_ARCH_CORTEXR7 is not set -# CONFIG_ARCH_CORTEXR7F is not set -CONFIG_ARCH_FAMILY="arm" -CONFIG_ARCH_CHIP="calypso" -# CONFIG_ARM_TOOLCHAIN_IAR is not set -# CONFIG_ARM_TOOLCHAIN_GNU is not set -# CONFIG_ARCH_HAVE_FPU is not set -# CONFIG_ARCH_HAVE_DPFPU is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set -# CONFIG_ARM_HAVE_MPU_UNIFIED is not set -CONFIG_ARCH_HAVE_LOWVECTORS=y -# CONFIG_ARCH_LOWVECTORS is not set - -# -# ARM Configuration Options -# -# CONFIG_ARM_TOOLCHAIN_BUILDROOT is not set -# CONFIG_ARM_TOOLCHAIN_CODESOURCERYL is not set -CONFIG_ARM_TOOLCHAIN_GNU_EABIL=y -# CONFIG_ARM_TOOLCHAIN_GNU_OABI is not set -CONFIG_UART_IRDA_BAUD=115200 -CONFIG_UART_IRDA_PARITY=0 -CONFIG_UART_IRDA_BITS=8 -CONFIG_UART_IRDA_2STOP=0 -CONFIG_UART_IRDA_RXBUFSIZE=256 -CONFIG_UART_IRDA_TXBUFSIZE=256 -CONFIG_UART_MODEM_BAUD=115200 -CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_MODEM_BITS=8 -CONFIG_UART_MODEM_2STOP=0 -CONFIG_UART_MODEM_RXBUFSIZE=256 -CONFIG_UART_MODEM_TXBUFSIZE=256 - -# -# Calypso Configuration Options -# - -# -# Modem UART Configuration -# -# CONFIG_UART_MODEM_HWFLOWCONTROL is not set - -# -# IrDA UART Configuration -# -# CONFIG_UART_IRDA_HWFLOWCONTROL is not set -# CONFIG_USE_SERCOMM_CONSOLE is not set -# CONFIG_SERIAL_MODEM_CONSOLE is not set -# CONFIG_SERIAL_IRDA_CONSOLE is not set -CONFIG_SERIAL_CONSOLE_NONE=y - -# -# Architecture Options -# -# CONFIG_ARCH_NOINTC is not set -# CONFIG_ARCH_VECNOTIRQ is not set -# CONFIG_ARCH_DMA is not set -# CONFIG_ARCH_HAVE_IRQPRIO is not set -# CONFIG_ARCH_L2CACHE is not set -# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set -# CONFIG_ARCH_HAVE_ADDRENV is not set -# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set -# CONFIG_ARCH_HAVE_MULTICPU is not set -CONFIG_ARCH_HAVE_VFORK=y -# CONFIG_ARCH_HAVE_MMU is not set -# CONFIG_ARCH_HAVE_MPU is not set -# CONFIG_ARCH_NAND_HWECC is not set -# CONFIG_ARCH_HAVE_EXTCLK is not set -CONFIG_ARCH_HAVE_POWEROFF=y -# CONFIG_ARCH_HAVE_RESET is not set -CONFIG_ARCH_STACKDUMP=y -# CONFIG_ENDIAN_BIG is not set -# CONFIG_ARCH_IDLE_CUSTOM is not set -# CONFIG_ARCH_HAVE_RAMFUNCS is not set -# CONFIG_ARCH_HAVE_RAMVECTORS is not set - -# -# Board Settings -# -CONFIG_BOARD_LOOPSPERMSEC=1250 -# CONFIG_ARCH_CALIBRATION is not set - -# -# Interrupt options -# -CONFIG_ARCH_HAVE_INTERRUPTSTACK=y -CONFIG_ARCH_INTERRUPTSTACK=1024 -# CONFIG_ARCH_HAVE_HIPRI_INTERRUPT is not set - -# -# Boot options -# -# CONFIG_BOOT_RUNFROMEXTSRAM is not set -# CONFIG_BOOT_RUNFROMFLASH is not set -CONFIG_BOOT_RUNFROMISRAM=y -# CONFIG_BOOT_RUNFROMSDRAM is not set -# CONFIG_BOOT_COPYTORAM is not set - -# -# Boot Memory Configuration -# -CONFIG_RAM_START=0 -CONFIG_RAM_SIZE=8650752 -# CONFIG_ARCH_HAVE_SDRAM is not set - -# -# Board Selection -# -# CONFIG_ARCH_BOARD_COMPALE86 is not set -CONFIG_ARCH_BOARD_COMPALE88=y -# CONFIG_ARCH_BOARD_COMPALE99 is not set -# CONFIG_ARCH_BOARD_PIRELLI_DPL10 is not set -# CONFIG_ARCH_BOARD_CUSTOM is not set -CONFIG_ARCH_BOARD="compal_e88" - -# -# Common Board Options -# -CONFIG_NSH_MMCSDMINOR=0 - -# -# Board-Specific Options -# -CONFIG_LIB_BOARDCTL=y -CONFIG_BOARDCTL_POWEROFF=y -# CONFIG_BOARDCTL_UNIQUEID is not set -# CONFIG_BOARDCTL_TSCTEST 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=y -# CONFIG_DISABLE_ENVIRON is not set - -# -# Clocks and Timers -# -CONFIG_USEC_PER_TICK=10000 -# CONFIG_SYSTEM_TIME64 is not set -# CONFIG_CLOCK_MONOTONIC is not set -# CONFIG_JULIAN_TIME is not set -CONFIG_START_YEAR=2007 -CONFIG_START_MONTH=2 -CONFIG_START_DAY=13 -CONFIG_MAX_WDOGPARMS=4 -CONFIG_PREALLOC_WDOGS=8 -CONFIG_WDOG_INTRESERVE=1 -CONFIG_PREALLOC_TIMERS=8 - -# -# Tasks and Scheduling -# -# CONFIG_INIT_NONE is not set -CONFIG_INIT_ENTRYPOINT=y -# CONFIG_INIT_FILEPATH is not set -CONFIG_USER_ENTRYPOINT="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 is not set - -# -# Pthread Options -# -# CONFIG_MUTEX_TYPES is not set -CONFIG_NPTHREAD_KEYS=4 - -# -# Performance Monitoring -# -# CONFIG_SCHED_CPULOAD is not set -# CONFIG_SCHED_INSTRUMENTATION is not set - -# -# Files and I/O -# -CONFIG_DEV_CONSOLE=y -# CONFIG_FDCLONE_DISABLE is not set -# CONFIG_FDCLONE_STDIO is not set -CONFIG_SDCLONE_DISABLE=y -CONFIG_NFILE_DESCRIPTORS=8 -CONFIG_NFILE_STREAMS=8 -CONFIG_NAME_MAX=32 -# CONFIG_PRIORITY_INHERITANCE is not set - -# -# RTOS hooks -# -# CONFIG_BOARD_INITIALIZE is not set -# CONFIG_SCHED_STARTHOOK is not set -# CONFIG_SCHED_ATEXIT is not set -# CONFIG_SCHED_ONEXIT is not set - -# -# Signal Numbers -# -CONFIG_SIG_SIGUSR1=1 -CONFIG_SIG_SIGUSR2=2 -CONFIG_SIG_SIGALARM=3 -CONFIG_SIG_SIGCONDTIMEDOUT=16 -# 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=4096 -# CONFIG_LIB_SYSCALL is not set - -# -# Device Drivers -# -CONFIG_DISABLE_POLL=y -CONFIG_DEV_NULL=y -# CONFIG_DEV_ZERO is not set -# CONFIG_DEV_LOOP is not set - -# -# Buffering -# -# CONFIG_DRVR_WRITEBUFFER is not set -# CONFIG_DRVR_READAHEAD is not set -# CONFIG_RAMDISK is not set -# CONFIG_CAN is not set -# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set -# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set -# CONFIG_PWM is not set -# CONFIG_ARCH_HAVE_I2CRESET is not set -# CONFIG_I2C is not set -CONFIG_SPI=y -# CONFIG_SPI_SLAVE is not set -CONFIG_SPI_EXCHANGE=y -# CONFIG_SPI_CMDDATA is not set -# CONFIG_SPI_CALLBACK is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_HWFEATURES is not set -# CONFIG_SPI_CRCGENERATION is not set -# CONFIG_SPI_CS_CONTROL is not set -# CONFIG_SPI_CS_DELAY_CONTROL is not set -# CONFIG_I2S is not set - -# -# Timer Driver Support -# -# CONFIG_TIMER is not set -# CONFIG_RTC is not set -# CONFIG_WATCHDOG is not set -# CONFIG_ANALOG is not set -# CONFIG_AUDIO_DEVICES is not set -# CONFIG_VIDEO_DEVICES is not set -# CONFIG_BCH is not set -# CONFIG_INPUT is not set -# CONFIG_IOEXPANDER is not set - -# -# LCD Driver Support -# -# CONFIG_LCD is not set -# CONFIG_SLCD is not set - -# -# LED Support -# -# CONFIG_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=y -CONFIG_MCU_SERIAL=y -# CONFIG_STANDARD_SERIAL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set -# CONFIG_SERIAL_DMA is not set -# CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set -CONFIG_OTHER_SERIAL_CONSOLE=y -# CONFIG_NO_SERIAL_CONSOLE is not set -# CONFIG_USBDEV is not set -# CONFIG_USBHOST is not set -# CONFIG_DRIVERS_WIRELESS is not set - -# -# System Logging -# -# CONFIG_ARCH_SYSLOG is not set -# CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_INTBUFFER is not set -# CONFIG_SYSLOG_TIMESTAMP is not set -CONFIG_SYSLOG_SERIAL_CONSOLE=y -# CONFIG_SYSLOG_CHAR is not set -CONFIG_SYSLOG_CONSOLE=y -# CONFIG_SYSLOG_NONE is not set -# CONFIG_SYSLOG_FILE is not set - -# -# Networking Support -# -# CONFIG_ARCH_HAVE_NET is not set -# CONFIG_ARCH_HAVE_PHY is not set -# CONFIG_NET is not set - -# -# Crypto API -# -# CONFIG_CRYPTO is not set - -# -# File Systems -# - -# -# File system configuration -# -# CONFIG_DISABLE_MOUNTPOINT is not set -# CONFIG_FS_AUTOMOUNTER is not set -# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set -# CONFIG_FS_READABLE is not set -# CONFIG_FS_WRITABLE is not set -# CONFIG_FS_NAMED_SEMAPHORES is not set -# 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=y -CONFIG_HEAP2_BASE=0x00000000 -CONFIG_HEAP2_SIZE=0 -# CONFIG_GRAN is not set - -# -# Audio Support -# -# CONFIG_AUDIO is not set - -# -# Wireless Support -# - -# -# Binary Loader -# -# CONFIG_BINFMT_DISABLE is not set -# CONFIG_BINFMT_EXEPATH is not set -# CONFIG_NXFLAT is not set -# CONFIG_ELF is not set -CONFIG_BUILTIN=y -# CONFIG_PIC is not set -# CONFIG_SYMTAB_ORDEREDBYNAME is not set - -# -# Library Routines -# - -# -# Standard C Library Options -# -CONFIG_STDIO_BUFFER_SIZE=64 -CONFIG_STDIO_LINEBUFFER=y -CONFIG_NUNGET_CHARS=2 -CONFIG_LIB_HOMEDIR="/" -# CONFIG_LIBM is not set -# CONFIG_NOPRINTF_FIELDWIDTH is not set -# CONFIG_LIBC_FLOATINGPOINT is not set -CONFIG_LIBC_LONG_LONG=y -# CONFIG_LIBC_IOCTL_VARIADIC is not set -CONFIG_LIB_RAND_ORDER=1 -# CONFIG_EOL_IS_CR is not set -# CONFIG_EOL_IS_LF is not set -# CONFIG_EOL_IS_BOTH_CRLF is not set -CONFIG_EOL_IS_EITHER_CRLF=y -# CONFIG_LIBC_EXECFUNCS is not set -CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 -CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 -# CONFIG_LIBC_STRERROR is not set -# CONFIG_LIBC_PERROR_STDOUT is not set -CONFIG_ARCH_LOWPUTC=y -# CONFIG_LIBC_LOCALTIME is not set -# CONFIG_TIME_EXTENDED is not set -CONFIG_LIB_SENDFILE_BUFSIZE=512 -# CONFIG_ARCH_ROMGETC is not set -# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set -CONFIG_ARCH_HAVE_TLS=y -# CONFIG_TLS is not set -# CONFIG_LIBC_NETDB is not set - -# -# Non-standard Library Support -# -# CONFIG_LIB_CRC64_FAST is not set -# CONFIG_LIB_KBDCODEC is not set -# CONFIG_LIB_SLCDCODEC is not set - -# -# Basic CXX Support -# -# CONFIG_C99_BOOL8 is not set -# CONFIG_HAVE_CXX is not set - -# -# Application Configuration -# - -# -# Built-In Applications -# -CONFIG_BUILTIN_PROXY_STACKSIZE=1024 - -# -# CAN Utilities -# - -# -# Examples -# -# CONFIG_EXAMPLES_CHAT is not set -# CONFIG_EXAMPLES_CONFIGDATA is not set -# CONFIG_EXAMPLES_CPUHOG is not set -# CONFIG_EXAMPLES_DHCPD is not set -# CONFIG_EXAMPLES_ELF is not set -# CONFIG_EXAMPLES_FTPC is not set -# CONFIG_EXAMPLES_FTPD is not set -CONFIG_EXAMPLES_HELLO=y -CONFIG_EXAMPLES_HELLO_PRIORITY=100 -CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 -# CONFIG_EXAMPLES_HIDKBD is not set -# CONFIG_EXAMPLES_IGMP is not set -# CONFIG_EXAMPLES_JSON is not set -# CONFIG_EXAMPLES_KEYPADTEST is not set -# CONFIG_EXAMPLES_MEDIA is not set -# CONFIG_EXAMPLES_MM is not set -# CONFIG_EXAMPLES_MODBUS is not set -# CONFIG_EXAMPLES_MOUNT is not set -# CONFIG_EXAMPLES_NRF24L01TERM is not set -CONFIG_EXAMPLES_NSH=y -# CONFIG_EXAMPLES_NULL is not set -# CONFIG_EXAMPLES_NX is not set -# CONFIG_EXAMPLES_NXFFS is not set -# CONFIG_EXAMPLES_NXHELLO is not set -# CONFIG_EXAMPLES_NXIMAGE is not set -# CONFIG_EXAMPLES_NXLINES is not set -# CONFIG_EXAMPLES_NXTERM is not set -# CONFIG_EXAMPLES_NXTEXT is not set -# CONFIG_EXAMPLES_OSTEST is not set -# CONFIG_EXAMPLES_PCA9635 is not set -# CONFIG_EXAMPLES_PIPE is not set -# CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_PPPD is not set -# CONFIG_EXAMPLES_RGBLED is not set -# CONFIG_EXAMPLES_SENDMAIL is not set -# CONFIG_EXAMPLES_SERIALBLASTER is not set -# CONFIG_EXAMPLES_SERIALRX is not set -# CONFIG_EXAMPLES_SERLOOP is not set -# CONFIG_EXAMPLES_SLCD is not set -# CONFIG_EXAMPLES_SMART is not set -# CONFIG_EXAMPLES_SMART_TEST is not set -# CONFIG_EXAMPLES_SMP is not set -# CONFIG_EXAMPLES_TCPECHO is not set -# CONFIG_EXAMPLES_TELNETD is not set -# CONFIG_EXAMPLES_TIFF is not set -# CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBTERM is not set -# CONFIG_EXAMPLES_WATCHDOG is not set -# CONFIG_EXAMPLES_WEBSERVER is not set - -# -# File System Utilities -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# GPS Utilities -# -# CONFIG_GPSUTILS_MINMEA_LIB is not set - -# -# Graphics Support -# -# CONFIG_TIFF is not set -# CONFIG_GRAPHICS_TRAVELER is not set - -# -# Interpreters -# -# CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_MICROPYTHON is not set -# CONFIG_INTERPRETERS_PCODE is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set - -# -# Network Utilities -# -# CONFIG_NETUTILS_CODECS is not set -# CONFIG_NETUTILS_ESP8266 is not set -# CONFIG_NETUTILS_FTPC is not set -# CONFIG_NETUTILS_JSON is not set -# CONFIG_NETUTILS_SMTP is not set - -# -# NSH Library -# -CONFIG_NSH_LIBRARY=y -# CONFIG_NSH_MOTD is not set - -# -# Command Line Configuration -# -CONFIG_NSH_READLINE=y -# CONFIG_NSH_CLE is not set -CONFIG_NSH_LINELEN=64 -# CONFIG_NSH_DISABLE_SEMICOLON is not set -# CONFIG_NSH_CMDPARMS is not set -CONFIG_NSH_MAXARGUMENTS=6 -# CONFIG_NSH_ARGCAT is not set -CONFIG_NSH_NESTDEPTH=3 -# CONFIG_NSH_DISABLEBG is not set -CONFIG_NSH_BUILTIN_APPS=y - -# -# Disable Individual commands -# -# CONFIG_NSH_DISABLE_ADDROUTE is not set -# CONFIG_NSH_DISABLE_BASENAME is not set -# CONFIG_NSH_DISABLE_CAT is not set -# CONFIG_NSH_DISABLE_CD is not set -# CONFIG_NSH_DISABLE_CP is not set -# CONFIG_NSH_DISABLE_CMP is not set -CONFIG_NSH_DISABLE_DATE=y -# CONFIG_NSH_DISABLE_DD is not set -# CONFIG_NSH_DISABLE_DF is not set -# CONFIG_NSH_DISABLE_DELROUTE is not set -# CONFIG_NSH_DISABLE_DIRNAME is not set -# CONFIG_NSH_DISABLE_ECHO is not set -# CONFIG_NSH_DISABLE_EXEC is not set -# CONFIG_NSH_DISABLE_EXIT is not set -# CONFIG_NSH_DISABLE_FREE is not set -# CONFIG_NSH_DISABLE_GET is not set -# CONFIG_NSH_DISABLE_HELP is not set -# CONFIG_NSH_DISABLE_HEXDUMP is not set -# CONFIG_NSH_DISABLE_IFCONFIG is not set -CONFIG_NSH_DISABLE_IFUPDOWN=y -# CONFIG_NSH_DISABLE_KILL is not set -# CONFIG_NSH_DISABLE_LOSETUP is not set -CONFIG_NSH_DISABLE_LOSMART=y -# CONFIG_NSH_DISABLE_LS is not set -# CONFIG_NSH_DISABLE_MB is not set -# CONFIG_NSH_DISABLE_MKDIR is not set -# CONFIG_NSH_DISABLE_MKFIFO is not set -# CONFIG_NSH_DISABLE_MKRD is not set -# CONFIG_NSH_DISABLE_MH is not set -# CONFIG_NSH_DISABLE_MOUNT is not set -# CONFIG_NSH_DISABLE_MV is not set -# CONFIG_NSH_DISABLE_MW is not set -# CONFIG_NSH_DISABLE_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 - -# -# Configure Command Options -# -CONFIG_NSH_CMDOPT_DF_H=y -CONFIG_NSH_CODECS_BUFSIZE=128 -CONFIG_NSH_CMDOPT_HEXDUMP=y -CONFIG_NSH_FILEIOSIZE=512 - -# -# Scripting Support -# -# CONFIG_NSH_DISABLESCRIPT is not set -# CONFIG_NSH_DISABLE_ITEF is not set -# CONFIG_NSH_DISABLE_LOOPS is not set - -# -# Console Configuration -# -CONFIG_NSH_CONSOLE=y -# CONFIG_NSH_ALTCONDEV is not set -# CONFIG_NSH_ARCHINIT is not set -# CONFIG_NSH_LOGIN is not set -# CONFIG_NSH_CONSOLE_LOGIN is not set - -# -# NxWidgets/NxWM -# - -# -# Platform-specific Support -# -# CONFIG_PLATFORM_CONFIGDATA is not set - -# -# System Libraries and NSH Add-Ons -# -# CONFIG_SYSTEM_CLE is not set -# CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_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/compal_e88/nsh_highram/setenv.sh b/configs/compal_e88/nsh_highram/setenv.sh deleted file mode 100755 index 0693ede0ac2..00000000000 --- a/configs/compal_e88/nsh_highram/setenv.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# c5471evm/nsh/setenv.sh -# -# Copyright (C) 2007, 2008, 2011 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 - -WD=`pwd` -export BUILDROOT_BIN=${WD}/../buildroot/build_arm_nofpu/staging_dir/bin -export PATH=${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG} - -echo "PATH : ${PATH}" diff --git a/configs/compal_e88/scripts/ld.script b/configs/compal_e88/scripts/ld.script deleted file mode 100644 index 35fa847284e..00000000000 --- a/configs/compal_e88/scripts/ld.script +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Linker script for running from internal SRAM on Compal phones - * - * This script is tailored specifically to the requirements imposed - * on us by the Compal bootloader. - * - */ - -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -OUTPUT_ARCH(arm) -ENTRY(__start) -MEMORY -{ - /* 0x800000-0x83ffff */ - /* compal-loaded binary: our text, initialized data */ - LRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x00020000 - TRAM (rw) : ORIGIN = 0x00820000, LENGTH = 0x00010000 - /* compal-loaded binary: our unitialized data, stacks, heap */ - IRAM (rw) : ORIGIN = 0x00830000, LENGTH = 0x00010000 -} -SECTIONS -{ - . = 0x800000; - - /* romloader data section, contains passthru interrupt vectors */ - .compal.loader (NOLOAD) : { . = 0x100; } > LRAM - - /* image signature (prepended by osmocon according to phone type) */ - .compal.header (NOLOAD) : { . = 4; } > LRAM - - /* initialization code */ - . = ALIGN(4); - .text.start : { - PROVIDE(__start = .); - KEEP(*(.text.start)) - *(.text.start) - } > TRAM - - /* exception vectors from 0x80001c to 0x800034 */ - .text.exceptions 0x80001c : AT (LOADADDR(.text.start) + SIZEOF(.text.start)) { - KEEP(*(.text.exceptions)) - * (.text.exceptions) - . = ALIGN(4); - } > LRAM - PROVIDE(_exceptions = LOADADDR(.text.exceptions)); - - /* code */ - . = ALIGN(4); - .text (LOADADDR(.text.exceptions) + SIZEOF(.text.exceptions)) : - AT (LOADADDR(.text.exceptions) + SIZEOF(.text.exceptions)) { - /* regular code */ - *(.text*) - /* always-in-ram code */ - *(.ramtext*) - /* gcc voodoo */ - *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx) - . = ALIGN(4); - } > TRAM - PROVIDE(_text_start = LOADADDR(.text)); - PROVIDE(_text_end = LOADADDR(.text) + SIZEOF(.text)); - - /* constructor pointers */ - .ctors : { - /* ctor count */ - LONG(SIZEOF(.ctors) / 4 - 2) - /* ctor pointers */ - KEEP(*(SORT(.ctors))) - /* end of list */ - LONG(0) - } > TRAM - PROVIDE(_ctor_start = LOADADDR(.ctors)); - PROVIDE(_ctor_end = LOADADDR(.ctors) + SIZEOF(.ctors)); - - /* destructor pointers */ - .dtors : { - /* dtor count */ - LONG(SIZEOF(.dtors) / 4 - 2) - /* dtor pointers */ - KEEP(*(SORT(.dtors))) - /* end of list */ - LONG(0) - } > TRAM - PROVIDE(_dtor_start = LOADADDR(.dtors)); - PROVIDE(_dtor_end = LOADADDR(.dtors) + SIZEOF(.dtors)); - - /* read-only data */ - . = ALIGN(4); - .rodata : { - *(.rodata*) - } > TRAM - PROVIDE(_rodata_start = LOADADDR(.rodata)); - PROVIDE(_rodata_end = LOADADDR(.rodata) + SIZEOF(.rodata)); - - /* initialized data */ - . = ALIGN(4); - .data : { - *(.data) - } > TRAM - PROVIDE(_data_start = LOADADDR(.data)); - PROVIDE(_data_end = LOADADDR(.data) + SIZEOF(.data)); - - /* pic offset tables */ - . = ALIGN(4); - .got : { - *(.got) - *(.got.plt) *(.igot.plt) *(.got) *(.igot) - } > TRAM - PROVIDE(_got_start = LOADADDR(.got)); - PROVIDE(_got_end = LOADADDR(.got) + SIZEOF(.got)); - - /* uninitialized data */ - .bss (NOLOAD) : { - . = ALIGN(4); - __bss_start = .; - _sbss = ABSOLUTE(.); - *(.bss) - _ebss = ABSOLUTE(.); - } > IRAM - . = ALIGN(4); - __bss_end = .; - PROVIDE(_bss_start = __bss_start); - PROVIDE(_bss_end = __bss_end); - - /* end of image */ - . = ALIGN(4); - _end = .; - PROVIDE(end = .); -} diff --git a/configs/compal_e88/src/.gitignore b/configs/compal_e88/src/.gitignore deleted file mode 100644 index 726d936e1e3..00000000000 --- a/configs/compal_e88/src/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/.depend -/Make.dep diff --git a/configs/compal_e88/src/Makefile b/configs/compal_e88/src/Makefile deleted file mode 100644 index e4703f9a0a8..00000000000 --- a/configs/compal_e88/src/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################ -# configs/compal_e88/src/Makefile -# -# Copyright (C) 2007, 2008, 2015 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Copyright (C) 2011 Stefan Richter. All rights reserved. -# Author: Stefan Richter -# -# 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 = boot.c - -include $(TOPDIR)/configs/Board.mk diff --git a/configs/compal_e99/Kconfig b/configs/compal_e99/Kconfig deleted file mode 100644 index e7d03fb148d..00000000000 --- a/configs/compal_e99/Kconfig +++ /dev/null @@ -1,13 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -if ARCH_BOARD_COMPALE99 - -config COMPALE99_LCD_SSD1783 - bool "SSD1783 LCD support" - default y - select LCD - -endif diff --git a/configs/compal_e99/README.txt b/configs/compal_e99/README.txt deleted file mode 100644 index 646cdcf59cb..00000000000 --- a/configs/compal_e99/README.txt +++ /dev/null @@ -1,81 +0,0 @@ -compal_e99 -========== - -This directory contains the board support for compal e99 phones. - -This port is based on patches contributed by Denis Carikli for both the -compal e99 and e88. At the time of initial check-in, the following phones -were tested: - -* Motorola c155 (compal e99) with the compalram and highram configuration -* Motorola W220 (compal e88) -* The openmoko freerunner baseband(compal e88) - -The patches were made by Alan Carvalho de Assis and Denis Carikli using -the Stefan Richter's patches that can be found here: - -http://cgit.osmocom.org/cgit/nuttx-bb/log/?h=lputt%2Ftesting - -Osmocom-BB Dependencies and Sercomm -=================================== - -The build environment assumes that you have the osmocom-bb project -directory at same level as the nuttx project: - - |- nuttx - |- apps - `- osmocom-bb - -If you attempt to build this configuration without osmocom-bb, and that -you added support for sercomm in your configuration(CONFIG_SERCOMM_CONSOLE=y) -you will get compilation errors in drivers/sercomm due to header files that -are needed from the osmocom-bb directory. - -By default, NuttX will not use sercomm (HDLC protocol) to communicate with -the host system. Sercomm is the transport used by osmocom-bb that runs on top -of serial. See http://bb.osmocom.org/trac/wiki/nuttx-bb/run for detailed -the usage of nuttx with sercomm. - -Loading NuttX -============= - -The osmocom-bb wiki describes how to load NuttX. See -http://bb.osmocom.org/trac/wiki/nuttx-bb for detailed information. -The way that nuttx is loaded depends on the configuration (highram/compalram) -and phone: - -o compalram is for the ramloader(for phone having a bootloader on flash) -o highram is for phones having the romloader(if the phone has a bootrom) - or for loading in the ram trough a special loader(loaded first on ram - by talking to the ramloader) when having a ramloader(which can only - load 64k). - -Configurations -============== - - 1. Each Compal E99 configuration is maintained in a sub-directory and - can be selected as follow: - - cd tools - ./configure.sh compal_e99/ - cd - - . ./setenv.sh - - Where is one of the configuration sub-directories under - nuttx/configs/compal_e99. - - 2. These configurations use the mconf-based configuration tool. To - change a configurations using that tool, you should: - - a. Build and install the kconfig-mconf tool. See nuttx/README.txt - see additional README.txt files in the NuttX tools repository. - - b. Execute 'make menuconfig' in nuttx/ in order to start the - reconfiguration process. - - 3. By default, all configurations assume the NuttX Buildroot toolchain - under Linux (should work under Windows with Cygwin as well). This - is easily reconfigured: - - CONFIG_HOST_LINUX=y - CONFIG_ARM_TOOLCHAIN_BUILDROOT=y diff --git a/configs/compal_e99/include/board.h b/configs/compal_e99/include/board.h deleted file mode 100644 index 5855614184f..00000000000 --- a/configs/compal_e99/include/board.h +++ /dev/null @@ -1,6 +0,0 @@ -/**************************************************************************** - * arch/board.h - * - * Supposed to be empty - * - ****************************************************************************/ diff --git a/configs/compal_e99/nsh_compalram/Make.defs b/configs/compal_e99/nsh_compalram/Make.defs deleted file mode 100644 index ce04422ec83..00000000000 --- a/configs/compal_e99/nsh_compalram/Make.defs +++ /dev/null @@ -1,125 +0,0 @@ -############################################################################ -# configs/c5471evm/nsh/Make.defs -# -# Copyright (C) 2007, 2008, 2011 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/arm/Toolchain.defs - -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/compalram.ld}" -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/compalram.ld -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 ($(ARCHCCMAJOR),4) -ifneq ($(HOSTOS),Cygwin) - OBJCOPYARGS = -R .note -R .note.gnu.build-id -R .comment -endif -endif - -ifeq ("${CONFIG_DEBUG_FEATURES}","y") - ARCHOPTIMIZATION = -g -endif - -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -endif - -ifeq ($(ARCHCCMAJOR),4) - ARCHCPUFLAGS = -mcpu=arm7tdmi -mfloat-abi=soft -else - ARCHCPUFLAGS = -mapcs-32 -mcpu=arm7tdmi -msoft-float -endif - -ARCHCFLAGS = -fno-builtin -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 -ARCHDEFINES = - -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_FEATURES),y) - LDFLAGS += -g -endif - -HOSTCC = gcc -HOSTINCLUDES = -I. -HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe -HOSTLDFLAGS = diff --git a/configs/compal_e99/nsh_compalram/defconfig b/configs/compal_e99/nsh_compalram/defconfig deleted file mode 100644 index f5dc463da47..00000000000 --- a/configs/compal_e99/nsh_compalram/defconfig +++ /dev/null @@ -1,841 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Nuttx/ Configuration -# - -# -# Build Setup -# -# CONFIG_EXPERIMENTAL is not set -# CONFIG_DEFAULT_SMALL is not set -CONFIG_HOST_LINUX=y -# CONFIG_HOST_OSX is not set -# CONFIG_HOST_WINDOWS is not set -# CONFIG_HOST_OTHER is not set - -# -# Build Configuration -# -# CONFIG_APPS_DIR="../apps" -CONFIG_BUILD_FLAT=y -# CONFIG_BUILD_2PASS is not set - -# -# Binary Output Formats -# -# CONFIG_RRLOAD_BINARY is not set -# CONFIG_INTELHEX_BINARY is not set -# CONFIG_MOTOROLA_SREC is not set -CONFIG_RAW_BINARY=y -# CONFIG_UBOOT_UIMAGE is not set - -# -# Customize Header Files -# -# CONFIG_ARCH_STDINT_H is not set -# CONFIG_ARCH_STDBOOL_H is not set -# CONFIG_ARCH_MATH_H is not set -# CONFIG_ARCH_FLOAT_H is not set -# CONFIG_ARCH_STDARG_H is not set -# CONFIG_ARCH_DEBUG_H is not set - -# -# Debug Options -# -CONFIG_DEBUG_ALERT=y -# CONFIG_DEBUG_FEATURES is not set -CONFIG_ARCH_HAVE_STACKCHECK=y -# CONFIG_STACK_COLORATION is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_SYMBOLS is not set -CONFIG_ARCH_HAVE_CUSTOMOPT=y -# CONFIG_DEBUG_NOOPT is not set -# CONFIG_DEBUG_CUSTOMOPT is not set -CONFIG_DEBUG_FULLOPT=y - -# -# System Type -# -CONFIG_ARCH_ARM=y -# CONFIG_ARCH_AVR is not set -# CONFIG_ARCH_HC is not set -# CONFIG_ARCH_MIPS is not set -# CONFIG_ARCH_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=y -# CONFIG_ARCH_CHIP_DM320 is not set -# CONFIG_ARCH_CHIP_EFM32 is not set -# CONFIG_ARCH_CHIP_IMX1 is not set -# CONFIG_ARCH_CHIP_IMX6 is not set -# CONFIG_ARCH_CHIP_KINETIS is not set -# CONFIG_ARCH_CHIP_KL is not set -# CONFIG_ARCH_CHIP_LM is not set -# CONFIG_ARCH_CHIP_TIVA is not set -# CONFIG_ARCH_CHIP_LPC11XX is not set -# CONFIG_ARCH_CHIP_LPC17XX is not set -# CONFIG_ARCH_CHIP_LPC214X is not set -# CONFIG_ARCH_CHIP_LPC2378 is not set -# CONFIG_ARCH_CHIP_LPC31XX is not set -# CONFIG_ARCH_CHIP_LPC43XX is not set -# CONFIG_ARCH_CHIP_NUC1XX is not set -# CONFIG_ARCH_CHIP_SAMA5 is not set -# CONFIG_ARCH_CHIP_SAMD is not set -# CONFIG_ARCH_CHIP_SAML is not set -# CONFIG_ARCH_CHIP_SAM34 is not set -# CONFIG_ARCH_CHIP_SAMV7 is not set -# CONFIG_ARCH_CHIP_STM32 is not set -# CONFIG_ARCH_CHIP_STM32F7 is not set -# CONFIG_ARCH_CHIP_STM32L4 is not set -# CONFIG_ARCH_CHIP_STR71X is not set -# CONFIG_ARCH_CHIP_TMS570 is not set -# CONFIG_ARCH_CHIP_MOXART is not set -CONFIG_ARCH_ARM7TDMI=y -# CONFIG_ARCH_ARM926EJS is not set -# CONFIG_ARCH_ARM920T is not set -# CONFIG_ARCH_CORTEXM0 is not set -# CONFIG_ARCH_CORTEXM3 is not set -# CONFIG_ARCH_CORTEXM4 is not set -# CONFIG_ARCH_CORTEXM7 is not set -# CONFIG_ARCH_CORTEXA5 is not set -# CONFIG_ARCH_CORTEXA8 is not set -# CONFIG_ARCH_CORTEXA9 is not set -# CONFIG_ARCH_CORTEXR4 is not set -# CONFIG_ARCH_CORTEXR4F is not set -# CONFIG_ARCH_CORTEXR5 is not set -# CONFIG_ARCH_CORTEX5F is not set -# CONFIG_ARCH_CORTEXR7 is not set -# CONFIG_ARCH_CORTEXR7F is not set -CONFIG_ARCH_FAMILY="arm" -CONFIG_ARCH_CHIP="calypso" -# CONFIG_ARM_TOOLCHAIN_IAR is not set -# CONFIG_ARM_TOOLCHAIN_GNU is not set -# CONFIG_ARCH_HAVE_FPU is not set -# CONFIG_ARCH_HAVE_DPFPU is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set -# CONFIG_ARM_HAVE_MPU_UNIFIED is not set -CONFIG_ARCH_HAVE_LOWVECTORS=y -# CONFIG_ARCH_LOWVECTORS is not set - -# -# ARM Configuration Options -# -CONFIG_ARM_TOOLCHAIN_BUILDROOT=y -# CONFIG_ARM_TOOLCHAIN_CODESOURCERYL is not set -# CONFIG_ARM_TOOLCHAIN_GNU_EABIL is not set -# CONFIG_ARM_TOOLCHAIN_GNU_OABI is not set -# CONFIG_ARM_OABI_TOOLCHAIN is not set -CONFIG_UART_IRDA_BAUD=115200 -CONFIG_UART_IRDA_PARITY=0 -CONFIG_UART_IRDA_BITS=8 -CONFIG_UART_IRDA_2STOP=0 -CONFIG_UART_IRDA_RXBUFSIZE=256 -CONFIG_UART_IRDA_TXBUFSIZE=256 -CONFIG_UART_MODEM_BAUD=115200 -CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_MODEM_BITS=8 -CONFIG_UART_MODEM_2STOP=0 -CONFIG_UART_MODEM_RXBUFSIZE=256 -CONFIG_UART_MODEM_TXBUFSIZE=256 - -# -# Calypso Configuration Options -# - -# -# Modem UART Configuration -# -# CONFIG_UART_MODEM_HWFLOWCONTROL is not set - -# -# IrDA UART Configuration -# -# CONFIG_UART_IRDA_HWFLOWCONTROL is not set -# CONFIG_USE_SERCOMM_CONSOLE is not set -# CONFIG_SERIAL_MODEM_CONSOLE is not set -# CONFIG_SERIAL_IRDA_CONSOLE is not set -CONFIG_SERIAL_CONSOLE_NONE=y - -# -# Architecture Options -# -# CONFIG_ARCH_NOINTC is not set -# CONFIG_ARCH_VECNOTIRQ is not set -# CONFIG_ARCH_DMA is not set -# CONFIG_ARCH_HAVE_IRQPRIO is not set -# CONFIG_ARCH_L2CACHE is not set -# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set -# CONFIG_ARCH_HAVE_ADDRENV is not set -# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set -# CONFIG_ARCH_HAVE_MULTICPU is not set -CONFIG_ARCH_HAVE_VFORK=y -# CONFIG_ARCH_HAVE_MMU is not set -# CONFIG_ARCH_HAVE_MPU is not set -# CONFIG_ARCH_NAND_HWECC is not set -# CONFIG_ARCH_HAVE_EXTCLK is not set -CONFIG_ARCH_HAVE_POWEROFF=y -# CONFIG_ARCH_HAVE_RESET is not set -CONFIG_ARCH_STACKDUMP=y -# CONFIG_ENDIAN_BIG is not set -# CONFIG_ARCH_IDLE_CUSTOM is not set -# CONFIG_ARCH_HAVE_RAMFUNCS is not set -# CONFIG_ARCH_HAVE_RAMVECTORS is not set - -# -# Board Settings -# -CONFIG_BOARD_LOOPSPERMSEC=1250 -# CONFIG_ARCH_CALIBRATION is not set - -# -# Interrupt options -# -CONFIG_ARCH_HAVE_INTERRUPTSTACK=y -CONFIG_ARCH_INTERRUPTSTACK=1024 -# CONFIG_ARCH_HAVE_HIPRI_INTERRUPT is not set - -# -# Boot options -# -# CONFIG_BOOT_RUNFROMEXTSRAM is not set -# CONFIG_BOOT_RUNFROMFLASH is not set -CONFIG_BOOT_RUNFROMISRAM=y -# CONFIG_BOOT_RUNFROMSDRAM is not set -# CONFIG_BOOT_COPYTORAM is not set - -# -# Boot Memory Configuration -# -CONFIG_RAM_START=0 -CONFIG_RAM_SIZE=8650752 -# CONFIG_ARCH_HAVE_SDRAM is not set - -# -# Board Selection -# -# CONFIG_ARCH_BOARD_COMPALE86 is not set -# CONFIG_ARCH_BOARD_COMPALE88 is not set -CONFIG_ARCH_BOARD_COMPALE99=y -# CONFIG_ARCH_BOARD_PIRELLI_DPL10 is not set -# CONFIG_ARCH_BOARD_CUSTOM is not set -CONFIG_ARCH_BOARD="compal_e99" - -# -# Common Board Options -# -CONFIG_NSH_MMCSDMINOR=0 - -# -# Board-Specific Options -# -CONFIG_COMPALE99_LCD_SSD1783=y -CONFIG_LIB_BOARDCTL=y -CONFIG_BOARDCTL_POWEROFF=y -# CONFIG_BOARDCTL_UNIQUEID is not set -# CONFIG_BOARDCTL_TSCTEST is not set -# CONFIG_BOARDCTL_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=y -# CONFIG_DISABLE_ENVIRON is not set - -# -# Clocks and Timers -# -CONFIG_USEC_PER_TICK=10000 -# CONFIG_SYSTEM_TIME64 is not set -# CONFIG_CLOCK_MONOTONIC is not set -# CONFIG_JULIAN_TIME is not set -CONFIG_START_YEAR=2007 -CONFIG_START_MONTH=2 -CONFIG_START_DAY=13 -CONFIG_MAX_WDOGPARMS=4 -CONFIG_PREALLOC_WDOGS=8 -CONFIG_WDOG_INTRESERVE=1 -CONFIG_PREALLOC_TIMERS=8 - -# -# Tasks and Scheduling -# -# CONFIG_INIT_NONE is not set -CONFIG_INIT_ENTRYPOINT=y -# CONFIG_INIT_FILEPATH is not set -CONFIG_USER_ENTRYPOINT="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 is not set - -# -# Pthread Options -# -# CONFIG_MUTEX_TYPES is not set -CONFIG_NPTHREAD_KEYS=4 - -# -# Performance Monitoring -# -# CONFIG_SCHED_CPULOAD is not set -# CONFIG_SCHED_INSTRUMENTATION is not set - -# -# Files and I/O -# -CONFIG_DEV_CONSOLE=y -# CONFIG_FDCLONE_DISABLE is not set -# CONFIG_FDCLONE_STDIO is not set -CONFIG_SDCLONE_DISABLE=y -CONFIG_NFILE_DESCRIPTORS=8 -CONFIG_NFILE_STREAMS=8 -CONFIG_NAME_MAX=32 -# CONFIG_PRIORITY_INHERITANCE is not set - -# -# RTOS hooks -# -# CONFIG_BOARD_INITIALIZE is not set -# CONFIG_SCHED_STARTHOOK is not set -# CONFIG_SCHED_ATEXIT is not set -# CONFIG_SCHED_ONEXIT is not set - -# -# Signal Numbers -# -CONFIG_SIG_SIGUSR1=1 -CONFIG_SIG_SIGUSR2=2 -CONFIG_SIG_SIGALARM=3 -CONFIG_SIG_SIGCONDTIMEDOUT=16 -# 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=4096 -# CONFIG_LIB_SYSCALL is not set - -# -# Device Drivers -# -CONFIG_DISABLE_POLL=y -CONFIG_DEV_NULL=y -# CONFIG_DEV_ZERO is not set -# CONFIG_DEV_LOOP is not set - -# -# Buffering -# -# CONFIG_DRVR_WRITEBUFFER is not set -# CONFIG_DRVR_READAHEAD is not set -# CONFIG_RAMDISK is not set -# CONFIG_CAN is not set -# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set -# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set -# CONFIG_PWM is not set -# CONFIG_ARCH_HAVE_I2CRESET is not set -# CONFIG_I2C is not set -CONFIG_SPI=y -# CONFIG_SPI_SLAVE is not set -CONFIG_SPI_EXCHANGE=y -# CONFIG_SPI_CMDDATA is not set -# CONFIG_SPI_CALLBACK is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_HWFEATURES is not set -# CONFIG_SPI_CRCGENERATION is not set -# CONFIG_SPI_CS_CONTROL is not set -# CONFIG_SPI_CS_DELAY_CONTROL is not set -# CONFIG_I2S is not set - -# -# Timer Driver Support -# -# CONFIG_TIMER is not set -# CONFIG_RTC is not set -# CONFIG_WATCHDOG is not set -# CONFIG_ANALOG is not set -# CONFIG_AUDIO_DEVICES is not set -# CONFIG_VIDEO_DEVICES is not set -# CONFIG_BCH is not set -# CONFIG_INPUT is not set -# CONFIG_IOEXPANDER is not set - -# -# LCD Driver Support -# -CONFIG_LCD=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_UG2864HSWEG01 is not set -# CONFIG_LCD_UG2832HSWEG04 is not set -# CONFIG_LCD_SSD1351 is not set -# CONFIG_LCD_ST7565 is not set -# CONFIG_LCD_ST7567 is not set -# CONFIG_LCD_UG2864AMBAG01 is not set -# 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_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=y -CONFIG_MCU_SERIAL=y -# CONFIG_STANDARD_SERIAL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set -# CONFIG_SERIAL_DMA is not set -# CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set -CONFIG_OTHER_SERIAL_CONSOLE=y -# CONFIG_NO_SERIAL_CONSOLE is not set -# CONFIG_USBDEV is not set -# CONFIG_USBHOST is not set -# CONFIG_DRIVERS_WIRELESS is not set - -# -# System Logging -# -# CONFIG_ARCH_SYSLOG is not set -# CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_INTBUFFER is not set -# CONFIG_SYSLOG_TIMESTAMP is not set -CONFIG_SYSLOG_SERIAL_CONSOLE=y -# CONFIG_SYSLOG_CHAR is not set -CONFIG_SYSLOG_CONSOLE=y -# CONFIG_SYSLOG_NONE is not set -# CONFIG_SYSLOG_FILE is not set - -# -# Networking Support -# -# CONFIG_ARCH_HAVE_NET is not set -# CONFIG_ARCH_HAVE_PHY is not set -# CONFIG_NET is not set - -# -# Crypto API -# -# CONFIG_CRYPTO is not set - -# -# File Systems -# - -# -# File system configuration -# -# CONFIG_DISABLE_MOUNTPOINT is not set -# CONFIG_FS_AUTOMOUNTER is not set -# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set -# CONFIG_FS_READABLE is not set -# CONFIG_FS_WRITABLE is not set -# CONFIG_FS_NAMED_SEMAPHORES is not set -# CONFIG_FS_RAMMAP is not set -# CONFIG_FS_FAT is not set -# CONFIG_FS_NXFFS is not set -# CONFIG_FS_ROMFS is not set -# CONFIG_FS_TMPFS is not set -# CONFIG_FS_SMARTFS is not set -# CONFIG_FS_BINFS is not set -# CONFIG_FS_PROCFS is not set -# CONFIG_FS_UNIONFS is not set - -# -# Graphics Support -# -# CONFIG_NX is not set - -# -# Memory Management -# -# CONFIG_MM_SMALL is not set -CONFIG_MM_REGIONS=2 -CONFIG_ARCH_HAVE_HEAP2=y -CONFIG_HEAP2_BASE=0x01000000 -CONFIG_HEAP2_SIZE=2097152 -# CONFIG_GRAN is not set - -# -# Audio Support -# -# CONFIG_AUDIO is not set - -# -# Wireless Support -# - -# -# Binary Loader -# -# CONFIG_BINFMT_DISABLE is not set -# CONFIG_BINFMT_EXEPATH is not set -# CONFIG_NXFLAT is not set -# CONFIG_ELF is not set -CONFIG_BUILTIN=y -# CONFIG_PIC is not set -# CONFIG_SYMTAB_ORDEREDBYNAME is not set - -# -# Library Routines -# - -# -# Standard C Library Options -# -CONFIG_STDIO_BUFFER_SIZE=64 -CONFIG_STDIO_LINEBUFFER=y -CONFIG_NUNGET_CHARS=2 -CONFIG_LIB_HOMEDIR="/" -# CONFIG_LIBM is not set -# CONFIG_NOPRINTF_FIELDWIDTH is not set -# CONFIG_LIBC_FLOATINGPOINT is not set -CONFIG_LIBC_LONG_LONG=y -# CONFIG_LIBC_IOCTL_VARIADIC is not set -CONFIG_LIB_RAND_ORDER=1 -# CONFIG_EOL_IS_CR is not set -# CONFIG_EOL_IS_LF is not set -# CONFIG_EOL_IS_BOTH_CRLF is not set -CONFIG_EOL_IS_EITHER_CRLF=y -# CONFIG_LIBC_EXECFUNCS is not set -CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 -CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 -# CONFIG_LIBC_STRERROR is not set -# CONFIG_LIBC_PERROR_STDOUT is not set -CONFIG_ARCH_LOWPUTC=y -# CONFIG_LIBC_LOCALTIME is not set -# CONFIG_TIME_EXTENDED is not set -CONFIG_LIB_SENDFILE_BUFSIZE=512 -# CONFIG_ARCH_ROMGETC is not set -# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set -CONFIG_ARCH_HAVE_TLS=y -# CONFIG_TLS is not set -# CONFIG_LIBC_NETDB is not set - -# -# Non-standard Library Support -# -# CONFIG_LIB_CRC64_FAST is not set -# CONFIG_LIB_KBDCODEC is not set -# CONFIG_LIB_SLCDCODEC is not set - -# -# Basic CXX Support -# -# CONFIG_C99_BOOL8 is not set -# CONFIG_HAVE_CXX is not set - -# -# Application Configuration -# - -# -# Built-In Applications -# -CONFIG_BUILTIN_PROXY_STACKSIZE=1024 - -# -# CAN Utilities -# - -# -# Examples -# -# CONFIG_EXAMPLES_CHAT is not set -# CONFIG_EXAMPLES_CONFIGDATA is not set -# CONFIG_EXAMPLES_CPUHOG is not set -# CONFIG_EXAMPLES_DHCPD is not set -# CONFIG_EXAMPLES_ELF is not set -# CONFIG_EXAMPLES_FTPC is not set -# CONFIG_EXAMPLES_FTPD is not set -CONFIG_EXAMPLES_HELLO=y -CONFIG_EXAMPLES_HELLO_PRIORITY=100 -CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 -# CONFIG_EXAMPLES_HIDKBD is not set -# CONFIG_EXAMPLES_IGMP is not set -# CONFIG_EXAMPLES_JSON is not set -# CONFIG_EXAMPLES_KEYPADTEST is not set -# CONFIG_EXAMPLES_MEDIA is not set -# CONFIG_EXAMPLES_MM is not set -# CONFIG_EXAMPLES_MODBUS is not set -# CONFIG_EXAMPLES_MOUNT is not set -# CONFIG_EXAMPLES_NRF24L01TERM is not set -CONFIG_EXAMPLES_NSH=y -# CONFIG_EXAMPLES_NULL is not set -# CONFIG_EXAMPLES_NX is not set -# CONFIG_EXAMPLES_NXFFS is not set -# CONFIG_EXAMPLES_NXHELLO is not set -# CONFIG_EXAMPLES_NXIMAGE is not set -# CONFIG_EXAMPLES_NXLINES is not set -# CONFIG_EXAMPLES_NXTERM is not set -# CONFIG_EXAMPLES_NXTEXT is not set -# CONFIG_EXAMPLES_OSTEST is not set -# CONFIG_EXAMPLES_PCA9635 is not set -# CONFIG_EXAMPLES_PIPE is not set -# CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_PPPD is not set -# CONFIG_EXAMPLES_RGBLED is not set -# CONFIG_EXAMPLES_SENDMAIL is not set -# CONFIG_EXAMPLES_SERIALBLASTER is not set -# CONFIG_EXAMPLES_SERIALRX is not set -# CONFIG_EXAMPLES_SERLOOP is not set -# CONFIG_EXAMPLES_SLCD is not set -# CONFIG_EXAMPLES_SMART is not set -# CONFIG_EXAMPLES_SMART_TEST is not set -# CONFIG_EXAMPLES_SMP is not set -# CONFIG_EXAMPLES_TCPECHO is not set -# CONFIG_EXAMPLES_TELNETD is not set -# CONFIG_EXAMPLES_TIFF is not set -# CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBTERM is not set -# CONFIG_EXAMPLES_WATCHDOG is not set -# CONFIG_EXAMPLES_WEBSERVER is not set - -# -# File System Utilities -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# GPS Utilities -# -# CONFIG_GPSUTILS_MINMEA_LIB is not set - -# -# Graphics Support -# -# CONFIG_TIFF is not set -# CONFIG_GRAPHICS_TRAVELER is not set - -# -# Interpreters -# -# CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_MICROPYTHON is not set -# CONFIG_INTERPRETERS_PCODE is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set - -# -# Network Utilities -# -# CONFIG_NETUTILS_CODECS is not set -# CONFIG_NETUTILS_ESP8266 is not set -# CONFIG_NETUTILS_FTPC is not set -# CONFIG_NETUTILS_JSON is not set -# CONFIG_NETUTILS_SMTP is not set - -# -# NSH Library -# -CONFIG_NSH_LIBRARY=y -# CONFIG_NSH_MOTD is not set - -# -# Command Line Configuration -# -CONFIG_NSH_READLINE=y -# CONFIG_NSH_CLE is not set -CONFIG_NSH_LINELEN=64 -# CONFIG_NSH_DISABLE_SEMICOLON is not set -CONFIG_NSH_CMDPARMS=y -CONFIG_NSH_MAXARGUMENTS=6 -CONFIG_NSH_ARGCAT=y -CONFIG_NSH_NESTDEPTH=3 -# CONFIG_NSH_DISABLEBG is not set -CONFIG_NSH_BUILTIN_APPS=y - -# -# Disable Individual commands -# -# CONFIG_NSH_DISABLE_ADDROUTE is not set -# CONFIG_NSH_DISABLE_BASENAME is not set -# CONFIG_NSH_DISABLE_CAT is not set -# CONFIG_NSH_DISABLE_CD is not set -# CONFIG_NSH_DISABLE_CP is not set -# CONFIG_NSH_DISABLE_CMP is not set -CONFIG_NSH_DISABLE_DATE=y -# CONFIG_NSH_DISABLE_DD is not set -# CONFIG_NSH_DISABLE_DF is not set -# CONFIG_NSH_DISABLE_DELROUTE is not set -# CONFIG_NSH_DISABLE_DIRNAME is not set -# CONFIG_NSH_DISABLE_ECHO is not set -# CONFIG_NSH_DISABLE_EXEC is not set -# CONFIG_NSH_DISABLE_EXIT is not set -# CONFIG_NSH_DISABLE_FREE is not set -# CONFIG_NSH_DISABLE_GET is not set -# CONFIG_NSH_DISABLE_HELP is not set -# CONFIG_NSH_DISABLE_HEXDUMP is not set -# CONFIG_NSH_DISABLE_IFCONFIG is not set -CONFIG_NSH_DISABLE_IFUPDOWN=y -# CONFIG_NSH_DISABLE_KILL is not set -# CONFIG_NSH_DISABLE_LOSETUP is not set -CONFIG_NSH_DISABLE_LOSMART=y -# CONFIG_NSH_DISABLE_LS is not set -# CONFIG_NSH_DISABLE_MB is not set -# CONFIG_NSH_DISABLE_MKDIR is not set -# CONFIG_NSH_DISABLE_MKFIFO is not set -# CONFIG_NSH_DISABLE_MKRD is not set -# CONFIG_NSH_DISABLE_MH is not set -# CONFIG_NSH_DISABLE_MOUNT is not set -# CONFIG_NSH_DISABLE_MV is not set -# CONFIG_NSH_DISABLE_MW is not set -# CONFIG_NSH_DISABLE_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 - -# -# Configure Command Options -# -CONFIG_NSH_CMDOPT_DF_H=y -CONFIG_NSH_CODECS_BUFSIZE=128 -CONFIG_NSH_CMDOPT_HEXDUMP=y -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 - -# -# Console Configuration -# -CONFIG_NSH_CONSOLE=y -# CONFIG_NSH_ALTCONDEV is not set -# CONFIG_NSH_ARCHINIT is not set -# CONFIG_NSH_LOGIN is not set -# CONFIG_NSH_CONSOLE_LOGIN is not set - -# -# NxWidgets/NxWM -# - -# -# Platform-specific Support -# -# CONFIG_PLATFORM_CONFIGDATA is not set - -# -# System Libraries and NSH Add-Ons -# -# CONFIG_SYSTEM_CLE is not set -# CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_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/compal_e99/nsh_compalram/setenv.sh b/configs/compal_e99/nsh_compalram/setenv.sh deleted file mode 100755 index 16a2fe30fa8..00000000000 --- a/configs/compal_e99/nsh_compalram/setenv.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# c5471evm/nsh/setenv.sh -# -# Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -if [ "$_" = "$0" ] ; then - echo "You must source this script, not run it!" 1>&2 - exit 1 -fi - -WD=`pwd` -if [ ! -x "setenv.sh" ]; then - echo "This script must be executed from the top-level NuttX build directory" - exit 1 -fi - -if [ -z "${PATH_ORIG}" ]; then - export PATH_ORIG="${PATH}" -fi - -# This is the Cygwin path to the location where I installed the CodeSourcery -# toolchain under windows. You will also have to edit this if you install -# the CodeSourcery toolchain in any other location -# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" -# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" - -# 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/compal_e99/nsh_highram/Make.defs b/configs/compal_e99/nsh_highram/Make.defs deleted file mode 100644 index 7eaac99e8bb..00000000000 --- a/configs/compal_e99/nsh_highram/Make.defs +++ /dev/null @@ -1,125 +0,0 @@ -############################################################################ -# configs/c5471evm/nsh/Make.defs -# -# Copyright (C) 2007, 2008, 2011, 2014 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/arm/Toolchain.defs - -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/highram.ld}" -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/highram.ld -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 ($(ARCHCCMAJOR),4) -ifneq ($(HOSTOS),Cygwin) - OBJCOPYARGS = -R .note -R .note.gnu.build-id -R .comment -endif -endif - -ifeq ("${CONFIG_DEBUG_FEATURES}","y") - ARCHOPTIMIZATION = -g -endif - -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -endif - -ifeq ($(ARCHCCMAJOR),4) - ARCHCPUFLAGS = -mcpu=arm7tdmi -mfloat-abi=soft -else - ARCHCPUFLAGS = -mapcs-32 -mcpu=arm7tdmi -msoft-float -endif - -ARCHCFLAGS = -fno-builtin -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 -ARCHDEFINES = - -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_FEATURES),y) - LDFLAGS += -g -endif - -HOSTCC = gcc -HOSTINCLUDES = -I. -HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe -HOSTLDFLAGS = diff --git a/configs/compal_e99/nsh_highram/defconfig b/configs/compal_e99/nsh_highram/defconfig deleted file mode 100644 index 6129f41748e..00000000000 --- a/configs/compal_e99/nsh_highram/defconfig +++ /dev/null @@ -1,1006 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Nuttx/ Configuration -# - -# -# Build Setup -# -# CONFIG_EXPERIMENTAL is not set -# CONFIG_DEFAULT_SMALL is not set -CONFIG_HOST_LINUX=y -# CONFIG_HOST_OSX is not set -# CONFIG_HOST_WINDOWS is not set -# CONFIG_HOST_OTHER is not set - -# -# Build Configuration -# -# CONFIG_APPS_DIR="../apps" -CONFIG_BUILD_FLAT=y -# CONFIG_BUILD_2PASS is not set - -# -# Binary Output Formats -# -# CONFIG_RRLOAD_BINARY is not set -# CONFIG_INTELHEX_BINARY is not set -# CONFIG_MOTOROLA_SREC is not set -CONFIG_RAW_BINARY=y -# CONFIG_UBOOT_UIMAGE is not set - -# -# Customize Header Files -# -# CONFIG_ARCH_STDINT_H is not set -# CONFIG_ARCH_STDBOOL_H is not set -# CONFIG_ARCH_MATH_H is not set -# CONFIG_ARCH_FLOAT_H is not set -# CONFIG_ARCH_STDARG_H is not set -# CONFIG_ARCH_DEBUG_H is not set - -# -# Debug Options -# -CONFIG_DEBUG_ALERT=y -# CONFIG_DEBUG_FEATURES is not set -CONFIG_ARCH_HAVE_STACKCHECK=y -# CONFIG_STACK_COLORATION is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_SYMBOLS is not set -CONFIG_ARCH_HAVE_CUSTOMOPT=y -# CONFIG_DEBUG_NOOPT is not set -# CONFIG_DEBUG_CUSTOMOPT is not set -CONFIG_DEBUG_FULLOPT=y - -# -# System Type -# -CONFIG_ARCH_ARM=y -# CONFIG_ARCH_AVR is not set -# CONFIG_ARCH_HC is not set -# CONFIG_ARCH_MIPS is not set -# CONFIG_ARCH_MISOC is not set -# CONFIG_ARCH_RENESAS is not set -# CONFIG_ARCH_RISCV is not set -# CONFIG_ARCH_SIM is not set -# CONFIG_ARCH_X86 is not set -# CONFIG_ARCH_XTENSA 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=y -# CONFIG_ARCH_CHIP_DM320 is not set -# CONFIG_ARCH_CHIP_EFM32 is not set -# CONFIG_ARCH_CHIP_IMX1 is not set -# CONFIG_ARCH_CHIP_IMX6 is not set -# CONFIG_ARCH_CHIP_KINETIS is not set -# CONFIG_ARCH_CHIP_KL is not set -# CONFIG_ARCH_CHIP_LM is not set -# CONFIG_ARCH_CHIP_TIVA is not set -# CONFIG_ARCH_CHIP_LPC11XX is not set -# CONFIG_ARCH_CHIP_LPC17XX is not set -# CONFIG_ARCH_CHIP_LPC214X is not set -# CONFIG_ARCH_CHIP_LPC2378 is not set -# CONFIG_ARCH_CHIP_LPC31XX is not set -# CONFIG_ARCH_CHIP_LPC43XX is not set -# CONFIG_ARCH_CHIP_NUC1XX is not set -# CONFIG_ARCH_CHIP_SAMA5 is not set -# CONFIG_ARCH_CHIP_SAMD is not set -# CONFIG_ARCH_CHIP_SAML is not set -# CONFIG_ARCH_CHIP_SAM34 is not set -# CONFIG_ARCH_CHIP_SAMV7 is not set -# CONFIG_ARCH_CHIP_STM32 is not set -# CONFIG_ARCH_CHIP_STM32F7 is not set -# CONFIG_ARCH_CHIP_STM32L4 is not set -# CONFIG_ARCH_CHIP_STR71X is not set -# CONFIG_ARCH_CHIP_TMS570 is not set -# CONFIG_ARCH_CHIP_MOXART is not set -CONFIG_ARCH_ARM7TDMI=y -# CONFIG_ARCH_ARM926EJS is not set -# CONFIG_ARCH_ARM920T is not set -# CONFIG_ARCH_CORTEXM0 is not set -# CONFIG_ARCH_CORTEXM3 is not set -# CONFIG_ARCH_CORTEXM4 is not set -# CONFIG_ARCH_CORTEXM7 is not set -# CONFIG_ARCH_CORTEXA5 is not set -# CONFIG_ARCH_CORTEXA8 is not set -# CONFIG_ARCH_CORTEXA9 is not set -# CONFIG_ARCH_CORTEXR4 is not set -# CONFIG_ARCH_CORTEXR4F is not set -# CONFIG_ARCH_CORTEXR5 is not set -# CONFIG_ARCH_CORTEX5F is not set -# CONFIG_ARCH_CORTEXR7 is not set -# CONFIG_ARCH_CORTEXR7F is not set -CONFIG_ARCH_FAMILY="arm" -CONFIG_ARCH_CHIP="calypso" -# CONFIG_ARM_TOOLCHAIN_IAR is not set -# CONFIG_ARM_TOOLCHAIN_GNU is not set -# CONFIG_ARCH_HAVE_FPU is not set -# CONFIG_ARCH_HAVE_DPFPU is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set -# CONFIG_ARM_HAVE_MPU_UNIFIED is not set -CONFIG_ARCH_HAVE_LOWVECTORS=y -# CONFIG_ARCH_LOWVECTORS is not set - -# -# ARM Configuration Options -# -# CONFIG_ARM_TOOLCHAIN_BUILDROOT is not set -# CONFIG_ARM_TOOLCHAIN_CODESOURCERYL is not set -CONFIG_ARM_TOOLCHAIN_GNU_EABIL=y -# CONFIG_ARM_TOOLCHAIN_GNU_OABI is not set -CONFIG_UART_IRDA_BAUD=115200 -CONFIG_UART_IRDA_PARITY=0 -CONFIG_UART_IRDA_BITS=8 -CONFIG_UART_IRDA_2STOP=0 -CONFIG_UART_IRDA_RXBUFSIZE=256 -CONFIG_UART_IRDA_TXBUFSIZE=256 -CONFIG_UART_MODEM_BAUD=115200 -CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_MODEM_BITS=8 -CONFIG_UART_MODEM_2STOP=0 -CONFIG_UART_MODEM_RXBUFSIZE=256 -CONFIG_UART_MODEM_TXBUFSIZE=256 - -# -# Calypso Configuration Options -# - -# -# Modem UART Configuration -# -# CONFIG_UART_MODEM_HWFLOWCONTROL is not set - -# -# IrDA UART Configuration -# -# CONFIG_UART_IRDA_HWFLOWCONTROL is not set -# CONFIG_USE_SERCOMM_CONSOLE is not set -# CONFIG_SERIAL_MODEM_CONSOLE is not set -# CONFIG_SERIAL_IRDA_CONSOLE is not set -CONFIG_SERIAL_CONSOLE_NONE=y - -# -# Architecture Options -# -# CONFIG_ARCH_NOINTC is not set -# CONFIG_ARCH_VECNOTIRQ is not set -# CONFIG_ARCH_DMA is not set -# CONFIG_ARCH_HAVE_IRQPRIO is not set -# CONFIG_ARCH_L2CACHE is not set -# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set -# CONFIG_ARCH_HAVE_ADDRENV is not set -# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set -# CONFIG_ARCH_HAVE_MULTICPU is not set -CONFIG_ARCH_HAVE_VFORK=y -# CONFIG_ARCH_HAVE_MMU is not set -# CONFIG_ARCH_HAVE_MPU is not set -# CONFIG_ARCH_NAND_HWECC is not set -# CONFIG_ARCH_HAVE_EXTCLK is not set -CONFIG_ARCH_HAVE_POWEROFF=y -# CONFIG_ARCH_HAVE_RESET is not set -CONFIG_ARCH_STACKDUMP=y -# CONFIG_ENDIAN_BIG is not set -# CONFIG_ARCH_IDLE_CUSTOM is not set -# CONFIG_ARCH_HAVE_RAMFUNCS is not set -# CONFIG_ARCH_HAVE_RAMVECTORS is not set - -# -# Board Settings -# -CONFIG_BOARD_LOOPSPERMSEC=1250 -# CONFIG_ARCH_CALIBRATION is not set - -# -# Interrupt options -# -CONFIG_ARCH_HAVE_INTERRUPTSTACK=y -CONFIG_ARCH_INTERRUPTSTACK=1024 -# CONFIG_ARCH_HAVE_HIPRI_INTERRUPT is not set - -# -# Boot options -# -# CONFIG_BOOT_RUNFROMEXTSRAM is not set -# CONFIG_BOOT_RUNFROMFLASH is not set -CONFIG_BOOT_RUNFROMISRAM=y -# CONFIG_BOOT_RUNFROMSDRAM is not set -# CONFIG_BOOT_COPYTORAM is not set - -# -# Boot Memory Configuration -# -CONFIG_RAM_START=0 -CONFIG_RAM_SIZE=8650752 -# CONFIG_ARCH_HAVE_SDRAM is not set - -# -# Board Selection -# -# CONFIG_ARCH_BOARD_COMPALE86 is not set -# CONFIG_ARCH_BOARD_COMPALE88 is not set -CONFIG_ARCH_BOARD_COMPALE99=y -# CONFIG_ARCH_BOARD_PIRELLI_DPL10 is not set -# CONFIG_ARCH_BOARD_CUSTOM is not set -CONFIG_ARCH_BOARD="compal_e99" - -# -# Common Board Options -# - -# -# Board-Specific Options -# -CONFIG_COMPALE99_LCD_SSD1783=y -# CONFIG_BOARD_CRASHDUMP is not set -CONFIG_LIB_BOARDCTL=y -CONFIG_BOARDCTL_POWEROFF=y -# CONFIG_BOARDCTL_UNIQUEID is not set -# CONFIG_BOARDCTL_TSCTEST 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=y -# CONFIG_DISABLE_ENVIRON is not set - -# -# Clocks and Timers -# -CONFIG_USEC_PER_TICK=10000 -# CONFIG_SYSTEM_TIME64 is not set -# CONFIG_CLOCK_MONOTONIC is not set -# CONFIG_ARCH_HAVE_TIMEKEEPING is not set -# CONFIG_JULIAN_TIME is not set -CONFIG_START_YEAR=2007 -CONFIG_START_MONTH=2 -CONFIG_START_DAY=13 -CONFIG_MAX_WDOGPARMS=4 -CONFIG_PREALLOC_WDOGS=8 -CONFIG_WDOG_INTRESERVE=1 -CONFIG_PREALLOC_TIMERS=8 - -# -# Tasks and Scheduling -# -# CONFIG_INIT_NONE is not set -CONFIG_INIT_ENTRYPOINT=y -# CONFIG_INIT_FILEPATH is not set -CONFIG_USER_ENTRYPOINT="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 is not set - -# -# Pthread Options -# -# CONFIG_MUTEX_TYPES is not set -CONFIG_NPTHREAD_KEYS=4 - -# -# Performance Monitoring -# -# CONFIG_SCHED_CPULOAD is not set -# CONFIG_SCHED_INSTRUMENTATION is not set - -# -# Files and I/O -# -CONFIG_DEV_CONSOLE=y -# CONFIG_FDCLONE_DISABLE is not set -# CONFIG_FDCLONE_STDIO is not set -CONFIG_SDCLONE_DISABLE=y -CONFIG_NFILE_DESCRIPTORS=8 -CONFIG_NFILE_STREAMS=8 -CONFIG_NAME_MAX=32 -# CONFIG_PRIORITY_INHERITANCE is not set - -# -# RTOS hooks -# -# CONFIG_BOARD_INITIALIZE is not set -# CONFIG_SCHED_STARTHOOK is not set -# CONFIG_SCHED_ATEXIT is not set -# CONFIG_SCHED_ONEXIT is not set - -# -# Signal Numbers -# -CONFIG_SIG_SIGUSR1=1 -CONFIG_SIG_SIGUSR2=2 -CONFIG_SIG_SIGALARM=3 -CONFIG_SIG_SIGCONDTIMEDOUT=16 -# 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=4096 -# CONFIG_LIB_SYSCALL is not set - -# -# Device Drivers -# -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 - -# -# Buffering -# -# CONFIG_DRVR_WRITEBUFFER is not set -# CONFIG_DRVR_READAHEAD is not set -# CONFIG_RAMDISK is not set -# CONFIG_CAN is not set -# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set -# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set -# CONFIG_PWM is not set -# CONFIG_ARCH_HAVE_I2CRESET is not set -# CONFIG_I2C is not set -CONFIG_SPI=y -# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set -# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set -# CONFIG_ARCH_HAVE_SPI_BITORDER is not set -# 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_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=y -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 is not set -# 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_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=y -CONFIG_MCU_SERIAL=y -# CONFIG_STANDARD_SERIAL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set -# CONFIG_SERIAL_DMA is not set -# CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set -CONFIG_OTHER_SERIAL_CONSOLE=y -# CONFIG_NO_SERIAL_CONSOLE is not set -# 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 -# CONFIG_DRIVERS_CONTACTLESS 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 is not set -# CONFIG_FS_WRITABLE is not set -# CONFIG_FS_NAMED_SEMAPHORES is not set -# 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=y -CONFIG_NX_DISABLE_2BPP=y -CONFIG_NX_DISABLE_4BPP=y -CONFIG_NX_DISABLE_8BPP=y -# CONFIG_NX_DISABLE_16BPP is not set -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=y - -# -# Framed Window Borders -# -CONFIG_NXTK_BORDERWIDTH=4 -CONFIG_NXTK_DEFAULT_BORDERCOLORS=y -# CONFIG_NXTK_AUTORAISE is not set - -# -# Font Selections -# -CONFIG_NXFONTS_CHARBITS=7 -# CONFIG_NXFONT_MONO5X8 is not set -CONFIG_NXFONT_SANS17X22=y -# 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=2 -CONFIG_ARCH_HAVE_HEAP2=y -CONFIG_HEAP2_BASE=0x01000000 -CONFIG_HEAP2_SIZE=2097152 -# 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_LIBC_WCHAR is not set -# CONFIG_LIBC_LOCALE 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_CCTYPE is not set -# 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=y -CONFIG_EXAMPLES_KEYPAD_DEVNAME="/dev/keypad" -# CONFIG_EXAMPLES_KEYPADTEST_ENCODED 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_NX 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=16 - -# -# 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=y -CONFIG_EXAMPLES_NXIMAGE_VPLANE=0 -CONFIG_EXAMPLES_NXIMAGE_DEVNO=0 -CONFIG_EXAMPLES_NXIMAGE_BPP=16 -# CONFIG_EXAMPLES_NXIMAGE_GREYSCALE is not set -CONFIG_EXAMPLES_NXIMAGE_XSCALEp5=y -CONFIG_EXAMPLES_NXIMAGE_XSCALE1p0=y -# CONFIG_EXAMPLES_NXIMAGE_XSCALE1p5 is not set -# CONFIG_EXAMPLES_NXIMAGE_XSCALE2p0 is not set -CONFIG_EXAMPLES_NXIMAGE_YSCALEp5=y -CONFIG_EXAMPLES_NXIMAGE_YSCALE1p0=y -# CONFIG_EXAMPLES_NXIMAGE_YSCALE1p5 is not set -# CONFIG_EXAMPLES_NXIMAGE_YSCALE2p0 is not set -CONFIG_EXAMPLES_NXLINES=y -CONFIG_EXAMPLES_NXLINES_VPLANE=0 -CONFIG_EXAMPLES_NXLINES_DEVNO=0 -CONFIG_EXAMPLES_NXLINES_DEFAULT_COLORS=y -CONFIG_EXAMPLES_NXLINES_LINEWIDTH=4 -CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=2 -CONFIG_EXAMPLES_NXLINES_BPP=16 -# CONFIG_EXAMPLES_NXLINES_EXTERNINIT is not set -# CONFIG_EXAMPLES_NXTERM is not set -CONFIG_EXAMPLES_NXTEXT=y - -# -# Basic Configuration of the example -# -CONFIG_EXAMPLES_NXTEXT_VPLANE=0 -CONFIG_EXAMPLES_NXTEXT_DEVNO=0 -CONFIG_EXAMPLES_NXTEXT_BPP=16 -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 is not set -CONFIG_EXAMPLES_NXTEXT_BGFONTID=14 -CONFIG_EXAMPLES_NXTEXT_PUFONTID=0 -# CONFIG_EXAMPLES_NXTEXT_EXTERNINIT is not set -# CONFIG_EXAMPLES_OSTEST is not set -# CONFIG_EXAMPLES_PCA9635 is not set -# CONFIG_EXAMPLES_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_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_CODECS is not set -# CONFIG_NETUTILS_ESP8266 is not set -# CONFIG_NETUTILS_FTPC is not set -# CONFIG_NETUTILS_JSON is not set -# CONFIG_NETUTILS_SMTP is not set - -# -# NSH Library -# -CONFIG_NSH_LIBRARY=y -# CONFIG_NSH_MOTD is not set - -# -# Command Line Configuration -# -CONFIG_NSH_READLINE=y -# CONFIG_NSH_CLE is not set -CONFIG_NSH_LINELEN=64 -# CONFIG_NSH_DISABLE_SEMICOLON is not set -CONFIG_NSH_CMDPARMS=y -CONFIG_NSH_MAXARGUMENTS=6 -CONFIG_NSH_ARGCAT=y -CONFIG_NSH_NESTDEPTH=3 -# CONFIG_NSH_DISABLEBG is not set -CONFIG_NSH_BUILTIN_APPS=y - -# -# Disable Individual commands -# -# CONFIG_NSH_DISABLE_ADDROUTE is not set -# CONFIG_NSH_DISABLE_BASENAME is not set -# CONFIG_NSH_DISABLE_CAT is not set -# CONFIG_NSH_DISABLE_CD is not set -# CONFIG_NSH_DISABLE_CP is not set -# CONFIG_NSH_DISABLE_CMP is not set -CONFIG_NSH_DISABLE_DATE=y -# CONFIG_NSH_DISABLE_DD is not set -# CONFIG_NSH_DISABLE_DF is not set -# CONFIG_NSH_DISABLE_DELROUTE is not set -# CONFIG_NSH_DISABLE_DIRNAME is not set -# CONFIG_NSH_DISABLE_ECHO is not set -# CONFIG_NSH_DISABLE_EXEC is not set -# CONFIG_NSH_DISABLE_EXIT is not set -# CONFIG_NSH_DISABLE_FREE is not set -# CONFIG_NSH_DISABLE_GET is not set -# CONFIG_NSH_DISABLE_HELP is not set -# CONFIG_NSH_DISABLE_HEXDUMP is not set -# CONFIG_NSH_DISABLE_IFCONFIG is not set -CONFIG_NSH_DISABLE_IFUPDOWN=y -# CONFIG_NSH_DISABLE_KILL is not set -# CONFIG_NSH_DISABLE_LOSETUP is not set -CONFIG_NSH_DISABLE_LOSMART=y -# CONFIG_NSH_DISABLE_LS is not set -# CONFIG_NSH_DISABLE_MB is not set -# CONFIG_NSH_DISABLE_MKDIR is not set -# CONFIG_NSH_DISABLE_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_PRINTF=y -# CONFIG_NSH_DISABLE_PS is not set -# CONFIG_NSH_DISABLE_PUT is not set -# CONFIG_NSH_DISABLE_PWD is not set -# CONFIG_NSH_DISABLE_RM is not set -# 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=y -CONFIG_NSH_CODECS_BUFSIZE=128 -CONFIG_NSH_CMDOPT_HEXDUMP=y -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 - -# -# Console Configuration -# -CONFIG_NSH_CONSOLE=y -# CONFIG_NSH_ALTCONDEV is not set -# CONFIG_NSH_ARCHINIT is not set -# CONFIG_NSH_LOGIN is not set -# CONFIG_NSH_CONSOLE_LOGIN is not set - -# -# NxWidgets/NxWM -# - -# -# Platform-specific Support -# -# CONFIG_PLATFORM_CONFIGDATA is not set - -# -# System Libraries and NSH Add-Ons -# -# CONFIG_SYSTEM_CLE is not set -# CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_FREE is not set -# CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_SYSTEM_HEXED is not set -# CONFIG_SYSTEM_INSTALL is not set -# CONFIG_SYSTEM_RAMTEST is not set -CONFIG_READLINE_HAVE_EXTMATCH=y -CONFIG_SYSTEM_READLINE=y -CONFIG_READLINE_ECHO=y -# CONFIG_READLINE_TABCOMPLETION is not set -# CONFIG_READLINE_CMD_HISTORY is not set -# CONFIG_SYSTEM_SUDOKU is not set -# CONFIG_SYSTEM_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/compal_e99/nsh_highram/setenv.sh b/configs/compal_e99/nsh_highram/setenv.sh deleted file mode 100755 index 16a2fe30fa8..00000000000 --- a/configs/compal_e99/nsh_highram/setenv.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# c5471evm/nsh/setenv.sh -# -# Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -if [ "$_" = "$0" ] ; then - echo "You must source this script, not run it!" 1>&2 - exit 1 -fi - -WD=`pwd` -if [ ! -x "setenv.sh" ]; then - echo "This script must be executed from the top-level NuttX build directory" - exit 1 -fi - -if [ -z "${PATH_ORIG}" ]; then - export PATH_ORIG="${PATH}" -fi - -# This is the Cygwin path to the location where I installed the CodeSourcery -# toolchain under windows. You will also have to edit this if you install -# the CodeSourcery toolchain in any other location -# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" -# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" - -# 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/compal_e99/scripts/compalram.ld b/configs/compal_e99/scripts/compalram.ld deleted file mode 100644 index 52554ddacbd..00000000000 --- a/configs/compal_e99/scripts/compalram.ld +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Linker script for running from internal SRAM on Compal phones - * - * This script is tailored specifically to the requirements imposed - * on us by the Compal bootloader. - * - */ - -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -OUTPUT_ARCH(arm) -ENTRY(__start) -MEMORY -{ - /* compal-loaded binary: our text, initialized data */ - LRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x00020000 - /* compal-loaded binary: our unitialized data, stacks, heap */ - IRAM (rw) : ORIGIN = 0x00820000, LENGTH = 0x00020000 -} -SECTIONS -{ - . = 0x800000; - - /* romloader data section, contains passthru interrupt vectors */ - .compal.loader (NOLOAD) : { . = 0x100; } > LRAM - - /* image signature (prepended by osmocon according to phone type) */ - .compal.header (NOLOAD) : { . = 4; } > LRAM - - /* initialization code */ - . = ALIGN(4); - .text.start : { - PROVIDE(__start = .); - KEEP(*(.text.start)) - *(.text.start) - } > LRAM - - /* exception vectors from 0x80001c to 0x800034 */ - .text.exceptions 0x80001c : AT (LOADADDR(.text.start) + SIZEOF(.text.start)) { - KEEP(*(.text.exceptions)) - * (.text.exceptions) - . = ALIGN(4); - } > LRAM - PROVIDE(_exceptions = LOADADDR(.text.exceptions)); - - /* code */ - . = ALIGN(4); - .text (LOADADDR(.text.exceptions) + SIZEOF(.text.exceptions)) : - AT (LOADADDR(.text.exceptions) + SIZEOF(.text.exceptions)) { - /* regular code */ - *(.text*) - /* always-in-ram code */ - *(.ramtext*) - /* gcc voodoo */ - *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx) - . = ALIGN(4); - } > LRAM - PROVIDE(_text_start = LOADADDR(.text)); - PROVIDE(_text_end = LOADADDR(.text) + SIZEOF(.text)); - - /* constructor pointers */ - .ctors : { - /* ctor count */ - LONG(SIZEOF(.ctors) / 4 - 2) - /* ctor pointers */ - KEEP(*(SORT(.ctors))) - /* end of list */ - LONG(0) - } > LRAM - PROVIDE(_ctor_start = LOADADDR(.ctors)); - PROVIDE(_ctor_end = LOADADDR(.ctors) + SIZEOF(.ctors)); - - /* destructor pointers */ - .dtors : { - /* dtor count */ - LONG(SIZEOF(.dtors) / 4 - 2) - /* dtor pointers */ - KEEP(*(SORT(.dtors))) - /* end of list */ - LONG(0) - } > LRAM - PROVIDE(_dtor_start = LOADADDR(.dtors)); - PROVIDE(_dtor_end = LOADADDR(.dtors) + SIZEOF(.dtors)); - - /* read-only data */ - . = ALIGN(4); - .rodata : { - *(.rodata*) - } > LRAM - PROVIDE(_rodata_start = LOADADDR(.rodata)); - PROVIDE(_rodata_end = LOADADDR(.rodata) + SIZEOF(.rodata)); - - /* initialized data */ - . = ALIGN(4); - .data : { - *(.data) - } > LRAM - PROVIDE(_data_start = LOADADDR(.data)); - PROVIDE(_data_end = LOADADDR(.data) + SIZEOF(.data)); - - /* pic offset tables */ - . = ALIGN(4); - .got : { - *(.got) - *(.got.plt) *(.igot.plt) *(.got) *(.igot) - } > LRAM - PROVIDE(_got_start = LOADADDR(.got)); - PROVIDE(_got_end = LOADADDR(.got) + SIZEOF(.got)); - - /* uninitialized data */ - .bss (NOLOAD) : { - . = ALIGN(4); - __bss_start = .; - _sbss = ABSOLUTE(.); - *(.bss) - _ebss = ABSOLUTE(.); - } > IRAM - . = ALIGN(4); - __bss_end = .; - PROVIDE(_bss_start = __bss_start); - PROVIDE(_bss_end = __bss_end); - - /* end of image */ - . = ALIGN(4); - _end = .; - PROVIDE(end = .); -} diff --git a/configs/compal_e99/scripts/highram.ld b/configs/compal_e99/scripts/highram.ld deleted file mode 100644 index db72f251aa2..00000000000 --- a/configs/compal_e99/scripts/highram.ld +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Linker script for running from internal SRAM on Compal phones - * - * This script is tailored specifically to the requirements imposed - * on us by the Compal bootloader. - * - */ - -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -OUTPUT_ARCH(arm) -ENTRY(__start) -MEMORY -{ - /* 0x800000-0xa00000 */ - /* compal-loaded binary: our text, initialized data */ - LRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x00020000 - TRAM (rw) : ORIGIN = 0x00820000, LENGTH = 0x0001d000 - /* compal-loaded binary: our unitialized data, stacks, heap */ - IRAM (rw) : ORIGIN = 0x0083d000, LENGTH = 0x00002000 -} -SECTIONS -{ - . = 0x800000; - - /* romloader data section, contains passthru interrupt vectors */ - .compal.loader (NOLOAD) : { . = 0x100; } > LRAM - - /* image signature (prepended by osmocon according to phone type) */ - .compal.header (NOLOAD) : { . = 4; } > LRAM - - /* initialization code */ - . = ALIGN(4); - .text.start : { - PROVIDE(__start = .); - KEEP(*(.text.start)) - *(.text.start) - } > TRAM - - /* exception vectors from 0x80001c to 0x800034 */ - .text.exceptions 0x80001c : AT (LOADADDR(.text.start) + SIZEOF(.text.start)) { - KEEP(*(.text.exceptions)) - * (.text.exceptions) - . = ALIGN(4); - } > LRAM - PROVIDE(_exceptions = LOADADDR(.text.exceptions)); - - /* code */ - . = ALIGN(4); - .text (LOADADDR(.text.exceptions) + SIZEOF(.text.exceptions)) : - AT (LOADADDR(.text.exceptions) + SIZEOF(.text.exceptions)) { - /* regular code */ - *(.text*) - /* always-in-ram code */ - *(.ramtext*) - /* gcc voodoo */ - *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx) - . = ALIGN(4); - } > TRAM - PROVIDE(_text_start = LOADADDR(.text)); - PROVIDE(_text_end = LOADADDR(.text) + SIZEOF(.text)); - - /* constructor pointers */ - .ctors : { - /* ctor count */ - LONG(SIZEOF(.ctors) / 4 - 2) - /* ctor pointers */ - KEEP(*(SORT(.ctors))) - /* end of list */ - LONG(0) - } > TRAM - PROVIDE(_ctor_start = LOADADDR(.ctors)); - PROVIDE(_ctor_end = LOADADDR(.ctors) + SIZEOF(.ctors)); - - /* destructor pointers */ - .dtors : { - /* dtor count */ - LONG(SIZEOF(.dtors) / 4 - 2) - /* dtor pointers */ - KEEP(*(SORT(.dtors))) - /* end of list */ - LONG(0) - } > TRAM - PROVIDE(_dtor_start = LOADADDR(.dtors)); - PROVIDE(_dtor_end = LOADADDR(.dtors) + SIZEOF(.dtors)); - - /* read-only data */ - . = ALIGN(4); - .rodata : { - *(.rodata*) - } > TRAM - PROVIDE(_rodata_start = LOADADDR(.rodata)); - PROVIDE(_rodata_end = LOADADDR(.rodata) + SIZEOF(.rodata)); - - /* initialized data */ - . = ALIGN(4); - .data : { - *(.data) - } > TRAM - PROVIDE(_data_start = LOADADDR(.data)); - PROVIDE(_data_end = LOADADDR(.data) + SIZEOF(.data)); - - /* pic offset tables */ - . = ALIGN(4); - .got : { - *(.got) - *(.got.plt) *(.igot.plt) *(.got) *(.igot) - } > TRAM - PROVIDE(_got_start = LOADADDR(.got)); - PROVIDE(_got_end = LOADADDR(.got) + SIZEOF(.got)); - - /* uninitialized data */ - .bss (NOLOAD) : { - . = ALIGN(4); - __bss_start = .; - _sbss = ABSOLUTE(.); - *(.bss) - _ebss = ABSOLUTE(.); - } > IRAM - . = ALIGN(4); - __bss_end = .; - PROVIDE(_bss_start = __bss_start); - PROVIDE(_bss_end = __bss_end); - - /* end of image */ - . = ALIGN(4); - _end = .; - PROVIDE(end = .); -} diff --git a/configs/compal_e99/src/.gitignore b/configs/compal_e99/src/.gitignore deleted file mode 100644 index 726d936e1e3..00000000000 --- a/configs/compal_e99/src/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/.depend -/Make.dep diff --git a/configs/compal_e99/src/boot.c b/configs/compal_e99/src/boot.c deleted file mode 100644 index 8bc7061daf3..00000000000 --- a/configs/compal_e99/src/boot.c +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** - * configs/compal_e99/boot.c - * - * 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. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: board_app_initialize - * - * Description: - * Perform architecture specific initialization - * - * Input Parameters: - * arg - The boardctl() argument is passed to the board_app_initialize() - * implementation without modification. The argument has no - * meaning to NuttX; the meaning of the argument is a contract - * between the board-specific initalization logic and the the - * matching application logic. The value cold be such things as a - * mode enumeration value, a set of DIP switch switch settings, a - * pointer to configuration data read from a file or serial FLASH, - * or whatever you would like to do with it. Every implementation - * should accept zero/NULL as a default configuration. - * - * Returned Value: - * Zero (OK) is returned on success; a negated errno value is returned on - * any failure to indicate the nature of the failure. - * - ****************************************************************************/ - -#ifdef CONFIG_LIB_BOARDCTL -int board_app_initialize(uintptr_t arg) -{ - return 0; -} -#endif /* CONFIG_LIB_BOARDCTL */ diff --git a/configs/compal_e99/src/ssd1783.c b/configs/compal_e99/src/ssd1783.c deleted file mode 100644 index 75725fc9204..00000000000 --- a/configs/compal_e99/src/ssd1783.c +++ /dev/null @@ -1,542 +0,0 @@ -/************************************************************************************ - * nuttx/configs/compal_e99/src/ssd1783.c - * - * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * Laurent Latil - * Denis 'GNUtoo' Carikli - * Alan Carvalho de Assis - * - * This driver for SSD1783 used part of SSD1783 driver developed by - * Christian Vogel for Osmocom-BB and relicensed - * to BSD with permission from author. - * - * 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_arch.h" -#include "ssd1783.h" - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/* Color depth and format */ - -#define LCD_BPP 16 -#define LCD_COLORFMT FB_FMT_RGB16_555 - -/* Display Resolution */ - -#define LCD_XRES 98 -#define LCD_YRES 67 - -/* This should be put elsewhere */ - -#ifdef __CC_ARM /* ARM Compiler */ -#define lcd_inline static __inline -#elif defined (__ICCARM__) /* for IAR Compiler */ -#define lcd_inline inline -#elif defined (__GNUC__) /* GNU GCC Compiler */ -#define lcd_inline static __inline -#else -#define lcd_inline static -#endif - -static void lcd_clear(void); -static void fb_ssd1783_send_cmdlist(const struct ssd1783_cmdlist *p); - -/* LCD Data Transfer Methods */ -int lcd_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer, - size_t npixels); -int lcd_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, - size_t npixels); - -/* LCD Configuration */ -static int lcd_getvideoinfo(FAR struct lcd_dev_s *dev, - FAR struct fb_videoinfo_s *vinfo); -static int lcd_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, - FAR struct lcd_planeinfo_s *pinfo); - -/* LCD RGB Mapping */ -#ifdef CONFIG_FB_CMAP -# error "RGB color mapping not supported by this driver" -#endif - -/* Cursor Controls */ -#ifdef CONFIG_FB_HWCURSOR -# error "Cursor control not supported by this driver" -#endif - -/* LCD Specific Controls */ -static int lcd_getpower(struct lcd_dev_s *dev); -static int lcd_setpower(struct lcd_dev_s *dev, int power); -static int lcd_getcontrast(struct lcd_dev_s *dev); -static int lcd_setcontrast(struct lcd_dev_s *dev, unsigned int contrast); - -/* Initialization (LCD ctrl / backlight) */ -static inline void lcd_initialize(void); - -/************************************************************************************** - * Private Data - **************************************************************************************/ - -/* This is working memory allocated by the LCD driver for each LCD device - * and for each color plane. This memory will hold one raster line of data. - * The size of the allocated run buffer must therefore be at least - * (bpp * xres / 8). Actual alignment of the buffer must conform to the - * bitwidth of the underlying pixel type. - * - * If there are multiple planes, they may share the same working buffer - * because different planes will not be operate on concurrently. However, - * if there are multiple LCD devices, they must each have unique run buffers. - */ - -static uint16_t g_runbuffer[LCD_XRES]; - -/* This structure describes the overall LCD video controller */ - -static const struct fb_videoinfo_s g_videoinfo = -{ - .fmt = LCD_COLORFMT, /* Color format: RGB16-565: RRRR RGGG GGGB BBBB */ - .xres = LCD_XRES, /* Horizontal resolution in pixel columns */ - .yres = LCD_YRES, /* Vertical resolutiSend a command list to the LCD panelon in pixel rows */ - .nplanes = 1, /* Number of color planes supported */ -}; - -/* This is the standard, NuttX Plane information object */ - -static const struct lcd_planeinfo_s g_planeinfo = -{ - .putrun = lcd_putrun, /* Put a run into LCD memory */ -// .getrun = lcd_getrun, /* Get a run from LCD memory */ - .buffer = (uint8_t*) g_runbuffer, /* Run scratch buffer */ - .bpp = LCD_BPP, /* Bits-per-pixel */ -}; - -/* This is the standard, NuttX LCD driver object */ - -static struct ssd1783_dev_s g_lcddev = -{ - .dev = - { - /* LCD Configuration */ - - .getvideoinfo = lcd_getvideoinfo, - .getplaneinfo = lcd_getplaneinfo, - -/* LCD RGB Mapping -- Not supported */ -/* Cursor Controls -- Not supported */ - -/* LCD Specific Controls */ - .getpower = lcd_getpower, - .setpower = lcd_setpower, -// .getcontrast = lcd_getcontrast, -// .setcontrast = lcd_setcontrast, - }, - .power=0 -}; - -/* we trust gcc to move this expensive bitshifting out of - * the loops in the drawing funtcions - */ - -static uint8_t rgb_to_pixel(uint16_t color) -{ - uint8_t ret; - - ret = (FB_COLOR_TO_R(color) & 0xe0); /* 765 = RRR */ - ret |= (FB_COLOR_TO_G(color) & 0xe0) >> 3; /* 432 = GGG */ - ret |= (FB_COLOR_TO_B(color) & 0xc0) >> 6; /* 10 = BB */ - - return ret; -} - -/* somehow the palette is messed up, RRR seems to have the - * bits reversed! R0 R1 R2 G G G B B ---> R2 R1 R0 G G G B B - */ - -uint8_t fix_rrr(uint8_t v) -{ - return (v & 0x5f) | (v & 0x80) >> 2 | (v & 0x20) << 2; -} - - -lcd_inline void write_data(uint16_t datain) -{ - uint16_t dataout = 0x0100 | fix_rrr(rgb_to_pixel(datain)); - uwire_xfer(SSD1783_DEV_ID,SSD1783_UWIRE_BITLEN,&dataout, NULL); -} - -static void fb_ssd1783_send_cmdlist(const struct ssd1783_cmdlist *p) -{ - int i=0; - - while (p->is_cmd != END) - { - uint16_t sendcmd = p->data; - if (p->is_cmd == DATA) - { - sendcmd |= 0x0100; /* 9th bit is cmd/data flag */ - } - - uwire_xfer(SSD1783_DEV_ID, SSD1783_UWIRE_BITLEN, &sendcmd, NULL); - p++; - i++; - } -} - -static void lcd_write_prepare(unsigned int x1, unsigned int x2, unsigned int y1, unsigned int y2) -{; - DEBUGASSERT( (x1 < x2 )&& (y1 < y2)); - struct ssd1783_cmdlist prepare_disp_write_cmds[] = { - { CMD, 0x15 }, /* set column address */ - { DATA, x1 }, - { DATA, x2 }, - { CMD, 0x75 }, /* set page address (Y) */ - { DATA, y1 }, - { DATA, y2 }, - { CMD, 0x5c }, /* enter write display ram mode */ - { END, 0x00 } - }; - - _info("x1:%d, x2:%d, y1:%d, y2:%d\n",x1, x2,y1, y2); - fb_ssd1783_send_cmdlist(prepare_disp_write_cmds); -} - -/************************************************************************************** - * Name: lcd_putrun - * - * Description: - * This method can be used to write a partial raster line to the LCD: - * - * row - Starting row to write to (range: 0 <= row < yres) - * col - Starting column to write to (range: 0 <= col <= xres-npixels) - * buffer - The buffer containing the run to be written to the LCD - * npixels - The number of pixels to write to the LCD - * (range: 0 < npixels <= xres-col) - * - **************************************************************************************/ - -int lcd_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer, - size_t npixels) -{ - int i; - FAR const uint16_t *src = (FAR const uint16_t*) buffer; - - /* Buffer must be provided and aligned to a 16-bit address boundary */ - DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0); - - - /* Write the run to GRAM. */ - lcd_write_prepare(col,col+npixels, row,row+1); - - for (i = 0; i < npixels; i++) - { - write_data(*src++); - } - fb_ssd1783_send_cmdlist(nop); - - return OK; -} - -/************************************************************************************** - * Name: lcd_getrun - * - * Description: - * This method can be used to read a partial raster line from the LCD: - * - * row - Starting row to read from (range: 0 <= row < yres) - * col - Starting column to read read (range: 0 <= col <= xres-npixels) - * buffer - The buffer in which to return the run read from the LCD - * npixels - The number of pixels to read from the LCD - * (range: 0 < npixels <= xres-col) - * - **************************************************************************************/ - -int lcd_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer, - size_t npixels) -{ - ginfo("Not implemented\n"); - return -ENOSYS; -} - -/************************************************************************************** - * Name: lcd_getvideoinfo - * - * Description: - * Get information about the LCD video controller configuration. - * - **************************************************************************************/ - -static int lcd_getvideoinfo(FAR struct lcd_dev_s *dev, - FAR struct fb_videoinfo_s *vinfo) -{ - DEBUGASSERT(dev && vinfo);ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n", - g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes); - memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s)); - return OK; -} - -/************************************************************************************** - * Name: lcd_getplaneinfo - * - * Description: - * Get information about the configuration of each LCD color plane. - * - **************************************************************************************/ - -static int lcd_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, - FAR struct lcd_planeinfo_s *pinfo) -{ - DEBUGASSERT(dev && pinfo && planeno == 0);ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp); - memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s)); - return OK; -} - -/************************************************************************************** - * Name: lcd_getpower - * - * Description: - * Get the LCD panel power status (0: full off - CONFIG_LCD_MAXPOWER: full on). On - * backlit LCDs, this setting may correspond to the backlight setting. - * - **************************************************************************************/ - -static int lcd_getpower(struct lcd_dev_s *dev) -{ - ginfo("power: %d\n", 0); - return g_lcddev.power; -} - -/************************************************************************************** - * Name: lcd_setpower - * - * Description: - * Enable/disable LCD panel power (0: full off - CONFIG_LCD_MAXPOWER: full on). - * Used here to set pwm duty on timer used for backlight. - * - **************************************************************************************/ - -static int lcd_setpower(struct lcd_dev_s *dev, int power) -{ - uint16_t reg; - - if (g_lcddev.power == power) { - return OK; - } - - ginfo("power: %d\n", power); - DEBUGASSERT(power <= CONFIG_LCD_MAXPOWER); - - /* Set new power level */ - reg = getreg16(ASIC_CONF_REG); - if (power) - { - reg = getreg16(ASIC_CONF_REG); - /* LCD Set I/O(3) / SA0 to I/O(3) mode */ - reg &= ~( (1 << 12) | (1 << 10) | (1 << 7) | (1 << 1)) ; - /* don't set function pins to I2C Mode, C155 uses UWire */ - /* TWL3025: Set SPI+RIF RX clock to rising edge */ - reg |= (1 << 13) | (1 << 14); - putreg16(reg, ASIC_CONF_REG); - - /* LCD Set I/O(3) to output mode and enable C155 backlight (IO1) */ - /* FIXME: Put the display backlight control to backlight.c */ - reg = getreg16(IO_CNTL_REG); - reg &= ~( (1 << 3) | (1 << 1)); - putreg16(reg, IO_CNTL_REG); - - /* LCD Set I/O(3) output low */ - reg = getreg16(ARMIO_LATCH_OUT); - reg &= ~(1 << 3); - reg |= (1 << 1); - putreg16(reg, ARMIO_LATCH_OUT); - } - else - { - ginfo("powering LCD off...\n"); - /* Switch pin from PWL to LT */ - reg &= ~ASCONF_PWL_ENA; - putreg8(reg, ASIC_CONF_REG); - /* Disable pwl */ - putreg8(0x00, PWL_REG(PWL_CTRL)); - } - return OK; -} - - -/************************************************************************************** - * Name: lcd_getcontrast - * - * Description: - * Get the current contrast setting (0-CONFIG_LCD_MAXCONTRAST). - * - **************************************************************************************/ - -static int lcd_getcontrast(struct lcd_dev_s *dev) -{ - ginfo("Not implemented\n"); - return -ENOSYS; -} - -/************************************************************************************** - * Name: lcd_setcontrast - * - * Description: - * Set LCD panel contrast (0-CONFIG_LCD_MAXCONTRAST). - * - **************************************************************************************/ - -static int lcd_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) -{ - ginfo("Not implemented\n"); - return -ENOSYS; -} - -/************************************************************************************** - * Name: lcd_lcdinitialize - * - * Description: - * Set LCD panel contrast (0-CONFIG_LCD_MAXCONTRAST). - * - **************************************************************************************/ -static inline void lcd_initialize(void) -{ - ginfo("%s: initializing LCD.\n",__FUNCTION__); - calypso_reset_set(RESET_EXT, 0); - usleep(5000); - uwire_init(); - usleep(5000); - fb_ssd1783_send_cmdlist(ssd1783_initdata); -} - -/************************************************************************************** - * Public Functions - **************************************************************************************/ - - -/************************************************************************************** - * Name: board_lcd_initialize - * - * Description: - * Initialize the LCD video hardware. The initial state of the LCD is fully - * initialized, display memory cleared, and the LCD ready to use, but with the power - * setting at 0 (full off). - * - **************************************************************************************/ - -int board_lcd_initialize(void) -{ - ginfo("Initializing\n"); - - lcd_initialize(); - - /* Clear the display */ - lcd_clear(); - - return OK; -} - -/************************************************************************************** - * Name: board_lcd_getdev - * - * Description: - * Return a a reference to the LCD object for the specified LCD. This allows support - * for multiple LCD devices. - * - **************************************************************************************/ - -FAR struct lcd_dev_s *board_lcd_getdev(int lcddev) -{ - DEBUGASSERT(lcddev == 0); - return &g_lcddev.dev; -} - - -/************************************************************************************** - * Name: board_lcd_uninitialize - * - * Description: - * Un-initialize the LCD support - * - **************************************************************************************/ - -void board_lcd_uninitialize(void) -{ - lcd_setpower(&g_lcddev.dev, 0); -} - -/************************************************************************************** - * Name: lcd_clear - * - * Description: - * Fill the LCD ctrl memory with given color - * - **************************************************************************************/ - -void lcd_clear() -{ - struct ssd1783_cmdlist prepare_disp_write_cmds[] = - { - { CMD, 0x8E }, - { DATA, 0x00 }, - { DATA, 0x00 }, - { DATA, LCD_XRES }, - { DATA, LCD_YRES }, - { END, 0x00 } - }; - - struct ssd1783_cmdlist nop_command[] = - { - { CMD, 0x25 }, // NOP command - { END, 0x00 } - }; - - fb_ssd1783_send_cmdlist(prepare_disp_write_cmds); - fb_ssd1783_send_cmdlist(nop_command); -} diff --git a/configs/compal_e99/src/ssd1783.h b/configs/compal_e99/src/ssd1783.h deleted file mode 100644 index 50ec4492590..00000000000 --- a/configs/compal_e99/src/ssd1783.h +++ /dev/null @@ -1,110 +0,0 @@ -#ifndef SSD1783_H_ -#define SSD1783_H_ - -#include - -#define FB_COLOR_TO_R(v) (((v)>>16) & 0xff) -#define FB_COLOR_TO_G(v) (((v)>> 8) & 0xff) -#define FB_COLOR_TO_B(v) ( (v) & 0xff) - -#define SSD1783_UWIRE_BITLEN 9 -#define SSD1783_DEV_ID 0 - -#define ARMIO_LATCH_OUT 0xfffe4802 -#define IO_CNTL_REG 0xfffe4804 -#define ASIC_CONF_REG 0xfffef008 - -#define ASCONF_PWL_ENA (1 << 4) - -/* begin backlight.c */ -#define BASE_ADDR_PWL 0xfffe8000 -#define PWL_REG(m) (BASE_ADDR_PWL + (m)) - -enum pwl_reg { - PWL_LEVEL = 0, - PWL_CTRL = 1, -}; - -enum ssd1783_cmdflag { CMD, DATA, END }; - -struct ssd1783_cmdlist { - enum ssd1783_cmdflag is_cmd:8; /* 1: is a command, 0: is data, 2: end marker! */ - uint8_t data; /* 8 bit to send to LC display */ -} __attribute__((packed)); - -static const struct ssd1783_cmdlist nop[] = { - { CMD, 0x25 }, // NOP command - { END, 0x00 } -}; - -static const struct ssd1783_cmdlist -ssd1783_initdata[] = { - { CMD, 0xD1 }, /* CMD set internal oscillator on */ - { CMD, 0x94 }, /* CMD leave sleep mode */ - { CMD, 0xbb }, /* CMD Set COM Output Scan Direction: */ - { DATA, 0x01 }, /* DATA: 01: COM0-79, then COM159-80 */ -/* -------- DIFFERENT FROM ORIGINAL CODE: -------------- */ -/* we use 8bit per pixel packed RGB 332 */ - { CMD, 0xbc }, /* CMD Set Data Output Scan Direction */ - { DATA, 0x00 }, /* DATA: column scan, normal rotation, normal display */ - { DATA, 0x00 }, /* DATA: RGB color arrangement R G B R G B ... */ -/*-->*/ { DATA, 0x01 }, /* DATA: 8 bit per pixel mode MSB LSB */ -/* --------- /DIFFERENT ---------- */ - { CMD, 0xce }, /* CMD Set 256 Color Look Up Table LUT */ - { DATA, 0x00 }, /* DATA red 000 */ - { DATA, 0x03 }, /* DATA red 001 */ - { DATA, 0x05 }, /* DATA red 010 */ - { DATA, 0x07 }, /* DATA red 011 */ - { DATA, 0x09 }, /* DATA red 100 */ - { DATA, 0x0b }, /* DATA red 101 */ - { DATA, 0x0d }, /* DATA red 110 */ - { DATA, 0x0f }, /* DATA red 111 */ - { DATA, 0x00 }, /* DATA green 000 */ - { DATA, 0x03 }, /* DATA green 001 */ - { DATA, 0x05 }, /* DATA green 010 */ - { DATA, 0x07 }, /* DATA green 011 */ - { DATA, 0x09 }, /* DATA green 100 */ - { DATA, 0x0b }, /* DATA green 101 */ - { DATA, 0x0d }, /* DATA green 110 */ - { DATA, 0x0f }, /* DATA green 111 */ - { DATA, 0x00 }, /* DATA blue 00 */ - { DATA, 0x05 }, /* DATA blue 01 */ - { DATA, 0x0a }, /* DATA blue 10 */ - { DATA, 0x0f }, /* DATA blue 11 */ - { CMD, 0xca }, /* CMD Set Display Control - Driver Duty Selection */ - { DATA, 0xff }, // can't find description of the values in the original - { DATA, 0x10 }, // display/ssd1783.c in my datasheet :-( - { DATA, 0x01 }, // - { CMD, 0xab }, /* CMD Set Scroll Start */ - { DATA, 0x00 }, /* DATA: Starting address at block 0 */ - { CMD, 0x20 }, /* CMD Set power control register */ - { DATA, 0x0b }, /* DATA: booster 6x, reference gen. & int regulator */ - { CMD, 0x81 }, /* CMD Contrast Lvl & Int. Regul. Resistor Ratio */ - { DATA, 0x29 }, /* DATA: contrast = 0x29 */ - { DATA, 0x05 }, /* DATA: 0x05 = 0b101 -> 1+R2/R1 = 11.37 */ - { CMD, 0xa7 }, /* CMD Invert Display */ - { CMD, 0x82 }, /* CMD Set Temperature Compensation Coefficient */ - { DATA, 0x00 }, /* DATA: Gradient is -0.10 % / degC */ - { CMD, 0xfb }, /* CMD Set Biasing Ratio */ - { DATA, 0x03 }, /* DATA: 1/10 bias */ - { CMD, 0xf2 }, /* CMD Set Frame Frequency and N-line inversion */ - { DATA, 0x08 }, /* DATA: 75 Hz (POR) */ - { DATA, 0x06 }, /* DATA: n-line inversion: 6 lines */ - { CMD, 0xf7 }, /* CMD Select PWM/FRC Select Full Col./8col mode */ - { DATA, 0x28 }, /* DATA: always 0x28 */ - { DATA, 0x8c }, /* DATA: 4bit PWM + 2 bit FRC */ - { DATA, 0x05 }, /* DATA: full color mode */ - { CMD, 0xaf }, /* CMD Display On */ - { END, 0x00 }, /* MARKER: end of list */ -}; - -struct ssd1783_dev_s -{ - /* Publicly visible device structure */ - struct lcd_dev_s dev; - - /* Private LCD-specific information follows */ - uint8_t power; /* Current power setting */ -}; - -#endif /* SSD1783_H_ */ diff --git a/configs/demo9s12ne64/ostest/defconfig b/configs/demo9s12ne64/ostest/defconfig index b571cf62e8b..c5f77d58a5f 100644 --- a/configs/demo9s12ne64/ostest/defconfig +++ b/configs/demo9s12ne64/ostest/defconfig @@ -242,7 +242,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set diff --git a/configs/dk-tm4c129x/ipv6/defconfig b/configs/dk-tm4c129x/ipv6/defconfig index cdbfd30b3db..83644a89c47 100644 --- a/configs/dk-tm4c129x/ipv6/defconfig +++ b/configs/dk-tm4c129x/ipv6/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -597,7 +596,6 @@ CONFIG_LM75_I2C_FREQUENCY=100000 # CONFIG_VEML6070 is not set # CONFIG_XEN1210 is not set # CONFIG_ZEROCROSS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/dk-tm4c129x/nsh/defconfig b/configs/dk-tm4c129x/nsh/defconfig index 48231e3d5e3..c9a9edac93a 100644 --- a/configs/dk-tm4c129x/nsh/defconfig +++ b/configs/dk-tm4c129x/nsh/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -599,7 +598,6 @@ CONFIG_LM75_I2C_FREQUENCY=100000 # CONFIG_VEML6070 is not set # CONFIG_XEN1210 is not set # CONFIG_ZEROCROSS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/ea3131/nsh/defconfig b/configs/ea3131/nsh/defconfig index c47bb4d67cd..b98a0b0c962 100644 --- a/configs/ea3131/nsh/defconfig +++ b/configs/ea3131/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -419,7 +418,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/ea3131/pgnsh/defconfig b/configs/ea3131/pgnsh/defconfig index 39c05cad928..8bb8ce29038 100644 --- a/configs/ea3131/pgnsh/defconfig +++ b/configs/ea3131/pgnsh/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -495,7 +494,6 @@ CONFIG_M25P_MEMORY_TYPE=0x20 # 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 diff --git a/configs/ea3131/usbserial/defconfig b/configs/ea3131/usbserial/defconfig index 69f48400c09..cf79f1ff54d 100644 --- a/configs/ea3131/usbserial/defconfig +++ b/configs/ea3131/usbserial/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -432,7 +431,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y CONFIG_SERIAL_REMOVABLE=y diff --git a/configs/ea3152/ostest/defconfig b/configs/ea3152/ostest/defconfig index cc289d76025..5222be557c7 100644 --- a/configs/ea3152/ostest/defconfig +++ b/configs/ea3152/ostest/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -414,7 +413,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/eagle100/httpd/defconfig b/configs/eagle100/httpd/defconfig index 3cae28f259c..10e1481b202 100644 --- a/configs/eagle100/httpd/defconfig +++ b/configs/eagle100/httpd/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -533,7 +532,6 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/eagle100/nettest/defconfig b/configs/eagle100/nettest/defconfig index 09a90f27591..2b2d08c871f 100644 --- a/configs/eagle100/nettest/defconfig +++ b/configs/eagle100/nettest/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -525,7 +524,6 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/eagle100/nsh/defconfig b/configs/eagle100/nsh/defconfig index fd7f6e6e4d4..31736a4493b 100644 --- a/configs/eagle100/nsh/defconfig +++ b/configs/eagle100/nsh/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -564,7 +563,6 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/eagle100/nxflat/defconfig b/configs/eagle100/nxflat/defconfig index 6db49bd1869..1d55be1648a 100644 --- a/configs/eagle100/nxflat/defconfig +++ b/configs/eagle100/nxflat/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -484,7 +483,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/eagle100/thttpd/defconfig b/configs/eagle100/thttpd/defconfig index 60d1f3ade75..e0e7a25e9f0 100644 --- a/configs/eagle100/thttpd/defconfig +++ b/configs/eagle100/thttpd/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -521,7 +520,6 @@ 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=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/efm32-g8xx-stk/nsh/defconfig b/configs/efm32-g8xx-stk/nsh/defconfig index f0a8e668c27..4c7b62ce8be 100644 --- a/configs/efm32-g8xx-stk/nsh/defconfig +++ b/configs/efm32-g8xx-stk/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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=y # CONFIG_ARCH_CHIP_IMX1 is not set @@ -458,7 +457,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/efm32gg-stk3700/nsh/defconfig b/configs/efm32gg-stk3700/nsh/defconfig index 3910296ef68..db3dbf7aa90 100644 --- a/configs/efm32gg-stk3700/nsh/defconfig +++ b/configs/efm32gg-stk3700/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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=y # CONFIG_ARCH_CHIP_IMX1 is not set @@ -458,7 +457,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/ekk-lm3s9b96/nsh/defconfig b/configs/ekk-lm3s9b96/nsh/defconfig index 9ab7bb58429..cca7bc60c5b 100644 --- a/configs/ekk-lm3s9b96/nsh/defconfig +++ b/configs/ekk-lm3s9b96/nsh/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -553,7 +552,6 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/esp32-core/Kconfig b/configs/esp32-core/Kconfig index 3f73b4052a2..79656051e99 100644 --- a/configs/esp32-core/Kconfig +++ b/configs/esp32-core/Kconfig @@ -23,8 +23,19 @@ config ESP32CORE_RUN_IRAM ---help--- The default configuration is set up run from IRAM. However, the current (2016-11-14) OpenOCD for ESP32 does not support writing to - FLASH. This option sets up the liner scripts to support execution + FLASH. This option sets up the linker scripts to support execution from IRAM. In this case, OpenOCD can be used to load directly into IRAM. + At this stage the nuttx image is small enough to be entirely memory- + resident. Once board support is more mature you can add flash cache + mapping code to run from SPI flash after initial boot. There are at + least two possible approaches you could take: You can add the flash + cache mapping code into nuttx directly, so it is self-contained - + early nuttx initialisation runs from IRAM and enables flash cache, + and then off you go. Or you can use the esp-idf software bootloader + and partition table scheme and have nuttx be an esp-idf "app" which + allows interoperability with the esp-idf system but makes you + reliant on the esp-idf design for these parts. Both are possible. + endif # ARCH_BOARD_ESP32CORE diff --git a/configs/esp32-core/README.txt b/configs/esp32-core/README.txt index 0688c2aad75..674fab89956 100644 --- a/configs/esp32-core/README.txt +++ b/configs/esp32-core/README.txt @@ -172,6 +172,9 @@ Serial Console UART0 is, by default, the serial console. It connects to the on-board CP2102 converter and is available on the USB connector USB CON8 (J1). + It will show up as /dev/ttypUSB[n] where [n] will probably be 0 (is it 1 + on my PC because I have a another device at ttyUSB0). + Buttons and LEDs ================ @@ -201,7 +204,16 @@ SMP CONFIG_SPINLOCK=y CONFIG_SMP=y CONFIG_SMP_NCPUS=2 - CONFIG_SMP_IDLETHREAD_STACKSIZE=2048 + CONFIG_SMP_IDLETHREAD_STACKSIZE=3072 + + Debug Tip: During debug session, OpenOCD may mysteriously switch from one + CPU to another. This behavior can be eliminated by uncommenting one of the + following in scripts/esp32.cfg + + # Only configure the PRO CPU + #set ESP32_ONLYCPU 1 + # Only configure the APP CPU + #set ESP32_ONLYCPU 2 Open Issues: @@ -446,7 +458,7 @@ OpenOCD for the ESP32 To FLASH an ELF via the command line is a two step process, something like this: - esptool.py --chip esp32 elf2image --flash_mode dio --flash_size 4MB -o ./nuttx.bin nuttx.elf + esptool.py --chip esp32 elf2image --flash_mode dio --flash_size 4MB -o ./nuttx.bin nuttx esptool.py --chip esp32 --port COMx write_flash 0x1000 bootloader.bin 0x4000 partition_table.bin 0x10000 nuttx.bin The first step converts an ELF image into an ESP32-compatible binary @@ -465,10 +477,17 @@ OpenOCD for the ESP32 See https://github.com/espressif/esp-idf/tree/master/components/bootloader and https://github.com/espressif/esp-idf/tree/master/components/partition_table. - Running from IRAM - ----------------- - Running from IRAM is a good debug option. You should be able to load the ELF directly via JTAG in this case, and you may not need the bootloader. The one "gotcha" for needing the bootloader is disabling the initial watchdog, there is code in bootloader_start.c that does this. + Running from IRAM with OpenOCD + ------------------------------ + Running from IRAM is a good debug option. You should be able to load the + ELF directly via JTAG in this case, and you may not need the bootloader. + NuttX supports a configuration option, CONFIG_ESP32CORE_RUN_IRAM, that may be + selected for execution from IRAM. This option simply selects the correct + linker script for IRAM execution. + + Skipping the Secondary Bootloader + --------------------------------- It is possible to skip the secondary bootloader and run out of IRAM using only the primary bootloader if your application of small enough (< 128KiB code, <180KiB data), then you can simplify initial bring-up by avoiding second stage @@ -481,10 +500,6 @@ OpenOCD for the ESP32 2. Use "esptool.py" utility found in ESP-IDF to convert application .elf file into binary format which can be loaded by first stage bootloader. - NuttX supports a configuration option, CONFIG_ESP32CORE_RUN_IRAM, that may be - selected for execution from IRAM. This option simply selects the correct - linker script for IRAM execution. - Again you would need to link the ELF file and convert it to binary format suitable for flashing into the board. The command should to convert ELF file to binary image looks as follows: @@ -506,6 +521,58 @@ OpenOCD for the ESP32 would I be able to run directly out of IRAM without a bootloader? That might be a simpler bring-up. + Sample OpenOCD Debug Steps + -------------------------- + I did the initial bring-up using the IRAM configuration and OpenOCD. Here + is a synopsis of my debug steps: + + configs/esp32-core/nsh with + + CONFIG_DEBUG_ASSERTIONS=y + CONFIG_DEBUG_FEATURES=y + CONFIG_DEBUG_SYMBOLS=y + CONFIG_ESP32CORE_RUN_IRAM=y + + I also made this change which will eliminate all attempts to re-configure + serial. It will just use the serial settings as they were left by the + bootloader: + + diff --git a/arch/xtensa/src/common/xtensa.h b/arch/xtensa/src/common/xtensa.h + index 422ec0b..8707d7c 100644 + --- a/arch/xtensa/src/common/xtensa.h + +++ b/arch/xtensa/src/common/xtensa.h + @@ -60,7 +60,7 @@ + #undef CONFIG_SUPPRESS_INTERRUPTS /* DEFINED: Do not enable interrupts */ + #undef CONFIG_SUPPRESS_TIMER_INTS /* DEFINED: No timer */ + #undef CONFIG_SUPPRESS_SERIAL_INTS /* DEFINED: Console will poll */ + -#undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfigure UART */ + +#define CONFIG_SUPPRESS_UART_CONFIG 1 /* DEFINED: Do not reconfigure UART */ + #define CONFIG_SUPPRESS_CLOCK_CONFIG 1 /* DEFINED: Do not reconfigure clocking */ + #undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */ + + Start OpenOCD: + + cd ../openocde-esp32 + cp ../nuttx/configs/esp32-core/scripts/esp32.cfg . + sudo ./src/openocd -s ./tcl/ -f tcl/interface/ftdi/olimex-arm-usb-ocd.cfg -f ./esp32.cfg + + Start GDB and load code: + + cd ../nuttx + xtensa-esp32-elf-gdb -ex 'target remote localhost:3333' nuttx + (gdb) load nuttx + (gdb) mon reg pc [value report by load for entry point] + (gdb) s + + Single stepping works fine for me as do breakpoints: + + Breakpoint 1, xtensa_timer_initialize () at chip/esp32_timerisr.c:172 + 72 { + (gdb) n + esp32.cpu0: Target halted, pc=0x400835BF + 187 g_tick_divisor = divisor; + (gdb) ... + Configurations ============== @@ -575,12 +642,69 @@ NOTES: NOTES: + 1. Uses the CP2102 USB/Serial converter for the serial console. + + 2. I have only tested this in IRAM with UART reconfiguration disabled. + See "Sample Debug Steps". In that case, NuttX is started via GDB. + It has, however, been reported to me that this configuration also + runs when written to address 0x1000 of FLASH with the esptool.py + (as described above). Then NuttX is started via the second level + bootloader. I cannot vouch for that since I have never tried it. + + 3. There are open clocking issues. Currently clock configuration + logic is disabled because I don't have the technical information + to provide that logic -- hopefully that is coming. As a + consequence, whatever clock setup was left when NuttX started is + used. For the case of execution out of IRAM with GDB, the + settings in configs/esp32-core/include/board.h work. To check + the timing, I use a stop watch and: + + nsh> sleep 60 + + If the timing is correct in the board.h header file, the value + timed with the stop watch should be about 60 seconds. If not, + change the frequency in the board.h header file. + smp: Another NSH configuration, similar to nsh, but also enables - SMP operation. + SMP operation. It differs from the nsh configuration only in these + addtional settings: + + SMP is enabled: + + CONFIG_SMP=y + CONFIG_SMP_IDLETHREAD_STACKSIZE=3072 + CONFIG_SMP_NCPUS=2 + CONFIG_SPINLOCK=y + + The apps/examples/smp test is included: + + CONFIG_EXAMPLES_SMP=y + CONFIG_EXAMPLES_SMP_NBARRIER_THREADS=8 + CONFIG_EXAMPLES_SMP_PRIORITY=100 + CONFIG_EXAMPLES_SMP_STACKSIZE=2048 NOTES: + 1. See NOTES for the nsh configuration. + + ostest: + + This is the NuttX test at apps/examples/ostest that is run against all new + architecture ports to assure a correct implementation of the OS. The default + version is for a single CPU but can be modified for an SMP test by adding: + + CONFIG_SMP=y + CONFIG_SMP_IDLETHREAD_STACKSIZE=2048 + CONFIG_SMP_NCPUS=2 + CONFIG_SPINLOCK=y + + NOTES: + 1. See NOTES for the nsh configuration. + 2. 2016-12-23: Test appears to be fully functional in the single CPU mode. + 3. 2016-12-24: But when SMP is enabled, there is a consistent, repeatable + crash in the waitpid() test. At the time of the crash, there is + extensive memory corruption and a user exception occurrs (cause=28). Things to Do ============ @@ -616,3 +740,25 @@ Things to Do 5. See SMP-related issues above 6. See OpenOCD for the ESP32 above + + 7. Currently will not boot unless serial port initialization is disabled. + This will use the serial port settings as left by the preceding + bootloader: + + diff --git a/arch/xtensa/src/common/xtensa.h b/arch/xtensa/src/common/xtensa.h + index 422ec0b..8707d7c 100644 + --- a/arch/xtensa/src/common/xtensa.h + +++ b/arch/xtensa/src/common/xtensa.h + @@ -60,7 +60,7 @@ + #undef CONFIG_SUPPRESS_INTERRUPTS /* DEFINED: Do not enable interrupts */ + #undef CONFIG_SUPPRESS_TIMER_INTS /* DEFINED: No timer */ + #undef CONFIG_SUPPRESS_SERIAL_INTS /* DEFINED: Console will poll */ + -#undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfigure UART */ + +#define CONFIG_SUPPRESS_UART_CONFIG 1 /* DEFINED: Do not reconfigure UART */ + #define CONFIG_SUPPRESS_CLOCK_CONFIG 1 /* DEFINED: Do not reconfigure clocking */ + #undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */ + + I have not debugged this in detail, but this appears to be an issue with the + impelentation of esp32_configgpio() and/or gpio_matrix_out() when called from + the setup logic in arch/xtensa/src/esp32/esp32_serial.c. I am not inclined + to invest a lot in driver debug until the clock configuration is finalized. diff --git a/configs/esp32-core/include/board.h b/configs/esp32-core/include/board.h index e3b2e85a87e..45e3d109af2 100644 --- a/configs/esp32-core/include/board.h +++ b/configs/esp32-core/include/board.h @@ -50,11 +50,20 @@ #endif /* Clock reconfiguration is currently disabled, so the CPU will be running - * at the XTAL frequency. + * at the XTAL frequency or at two times the XTAL frequency, depending upon + * how we load the code: + * + * - If we load the code into FLASH at address 0x1000 where it is started by + * the second level bootloader, then the frequency is the crystal + * frequency. + * - If we load the code into IRAM after the second level bootloader has run + * this frequency will be twice the crystal frequency. + * + * Don't ask me for an explanation. */ -#if 0 -# define BOARD_CLOCK_FREQUENCY 80000000 +#ifdef CONFIG_ESP32CORE_RUN_IRAM +# define BOARD_CLOCK_FREQUENCY (2 * BOARD_XTAL_FREQUENCY) #else # define BOARD_CLOCK_FREQUENCY BOARD_XTAL_FREQUENCY #endif diff --git a/configs/esp32-core/nsh/defconfig b/configs/esp32-core/nsh/defconfig index 5c75b76887a..5eba1f4980e 100644 --- a/configs/esp32-core/nsh/defconfig +++ b/configs/esp32-core/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 @@ -51,8 +47,9 @@ CONFIG_DEBUG_ALERT=y # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set -# CONFIG_ARCH_HAVE_CUSTOMOPT is not set +CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set +# CONFIG_DEBUG_CUSTOMOPT is not set CONFIG_DEBUG_FULLOPT=y # @@ -77,6 +74,10 @@ CONFIG_ARCH_CHIP_ESP32=y CONFIG_ARCH_FAMILY_LX6=y # CONFIG_XTENSA_USE_OVLY is not set CONFIG_XTENSA_CP_INITSET=0x0001 + +# +# ESP32 Peripheral Selection +# CONFIG_ESP32_UART=y # CONFIG_ESP32_SPI2 is not set # CONFIG_XTENSA_TIMER1 is not set @@ -84,24 +85,20 @@ CONFIG_ESP32_UART=y CONFIG_ESP32_UART0=y # CONFIG_ESP32_UART1 is not set # CONFIG_ESP32_UART2 is not set -CONFIG_ESP32_BT_RESERVE_DRAM=0 -CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0 -CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=0 -# CONFIG_ESP32_GPIO_IRQ is not set -CONFIG_ESP32_UART0_TXPIN=0 -CONFIG_ESP32_UART0_RXPIN=0 - -# -# ESP32 Peripheral Selection -# # # Memory Configuration # +CONFIG_ESP32_BT_RESERVE_DRAM=0 +CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0 +CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=0 +# CONFIG_ESP32_GPIO_IRQ is not set # # UART configuration # +CONFIG_ESP32_UART0_TXPIN=0 +CONFIG_ESP32_UART0_RXPIN=0 # # Architecture Options @@ -174,7 +171,11 @@ CONFIG_ESP32CORE_XTAL_40MZ=y # CONFIG_ESP32CORE_XTAL_26MHz is not set # CONFIG_ESP32CORE_RUN_IRAM is not set # CONFIG_BOARD_CRASHDUMP is not set -# CONFIG_LIB_BOARDCTL is not set +CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_UNIQUEID is not set +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set # # RTOS Features @@ -205,6 +206,7 @@ CONFIG_PREALLOC_TIMERS=4 # # Tasks and Scheduling # +# CONFIG_SPINLOCK is not set # CONFIG_SMP is not set # CONFIG_INIT_NONE is not set CONFIG_INIT_ENTRYPOINT=y @@ -222,6 +224,8 @@ CONFIG_SCHED_WAITPID=y # # CONFIG_MUTEX_TYPES is not set CONFIG_NPTHREAD_KEYS=4 +# CONFIG_PTHREAD_CLEANUP is not set +# CONFIG_CANCELLATION_POINTS is not set # # Performance Monitoring @@ -354,7 +358,6 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set @@ -537,6 +540,8 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set # CONFIG_ARCH_HAVE_TLS is not set +# CONFIG_LIBC_IPv4_ADDRCONV is not set +# CONFIG_LIBC_IPv6_ADDRCONV is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -599,10 +604,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 @@ -624,6 +629,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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 @@ -745,6 +751,7 @@ CONFIG_NSH_MMCSDMINOR=0 # Configure Command Options # # CONFIG_NSH_CMDOPT_DF_H is not set +# CONFIG_NSH_CMDOPT_DD_STATS is not set CONFIG_NSH_CODECS_BUFSIZE=128 # CONFIG_NSH_CMDOPT_HEXDUMP is not set CONFIG_NSH_PROC_MOUNTPOINT="/proc" @@ -762,7 +769,7 @@ CONFIG_NSH_FILEIOSIZE=512 # CONFIG_NSH_CONSOLE=y # CONFIG_NSH_ALTCONDEV is not set -# CONFIG_NSH_ARCHINIT is not set +CONFIG_NSH_ARCHINIT=y # CONFIG_NSH_LOGIN is not set # CONFIG_NSH_CONSOLE_LOGIN is not set diff --git a/configs/freedom-kl26z/minnsh/Make.defs b/configs/esp32-core/ostest/Make.defs similarity index 77% rename from configs/freedom-kl26z/minnsh/Make.defs rename to configs/esp32-core/ostest/Make.defs index 380541961dc..6361bd33c43 100644 --- a/configs/freedom-kl26z/minnsh/Make.defs +++ b/configs/esp32-core/ostest/Make.defs @@ -1,7 +1,7 @@ ############################################################################ -# configs/freedom-kl26z/minnsh/Make.defs +# configs/esp32-core/ostest/Make.defs # -# Copyright (C) 2015 Gregory Nutt. All rights reserved. +# Copyright (C) 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -35,20 +35,35 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk -include ${TOPDIR}/arch/arm/src/armv6-m/Toolchain.defs +include ${TOPDIR}/arch/xtensa/src/lx6/Toolchain.defs -LDSCRIPT = ld.script +LDSCRIPT1 = $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/esp32_out.ld +LDSCRIPT3 = $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/esp32_rom.ld +LDSCRIPT4 = $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/esp32_peripherals.ld + +ifeq ($(CONFIG_ESP32CORE_RUN_IRAM),y) + LDSCRIPT2 = $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/esp32_iram.ld +else + LDSCRIPT2 = $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/esp32_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)}" + ARCHSCRIPT = -T "${shell cygpath -w $(LDSCRIPT1)}" + ARCHSCRIPT += -T "${shell cygpath -w $(LDSCRIPT2)}" + ARCHSCRIPT += -T "${shell cygpath -w $(LDSCRIPT3)}" + ARCHSCRIPT += -T "${shell cygpath -w $(LDSCRIPT4)}" 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) + ARCHSCRIPT = -T$(LDSCRIPT1) -T$(LDSCRIPT2) -T$(LDSCRIPT3) -T$(LDSCRIPT4) endif CC = $(CROSSDEV)gcc @@ -60,9 +75,6 @@ NM = $(ARCROSSDEV)nm OBJCOPY = $(CROSSDEV)objcopy OBJDUMP = $(CROSSDEV)objdump -ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} -ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} - ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g endif @@ -71,12 +83,12 @@ 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 +ARCHCFLAGS = -fno-builtin -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -MMD -MP +ARCHCXXFLAGS = $(ARCHCFLAGS) -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 +ARCHPICFLAGS = -fpic CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) @@ -94,9 +106,7 @@ OBJEXT = .o LIBEXT = .a EXEEXT = -ifneq ($(CROSSDEV),arm-nuttx-elf-) - LDFLAGS += -nostartfiles -nodefaultlibs -endif +LDFLAGS += -nostartfiles -nodefaultlibs ifeq ($(CONFIG_DEBUG_SYMBOLS),y) LDFLAGS += -g endif @@ -106,19 +116,4 @@ HOSTCC = gcc HOSTINCLUDES = -I. HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe HOSTLDFLAGS = -ifeq ($(CONFIG_HOST_WINDOWS),y) - HOSTEXEEXT = .exe -else - HOSTEXEEXT = -endif - -ifeq ($(WINTOOL),y) - # Windows-native host tools - DIRLINK = $(TOPDIR)/tools/copydir.sh - DIRUNLINK = $(TOPDIR)/tools/unlink.sh - MKDEP = $(TOPDIR)/tools/mkwindeps.sh -else - # Linux/Cygwin-native host tools - MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) -endif diff --git a/configs/compal_e86/nsh_highram/defconfig b/configs/esp32-core/ostest/defconfig similarity index 62% rename from configs/compal_e86/nsh_highram/defconfig rename to configs/esp32-core/ostest/defconfig index 7ea34d54da6..4dfe49cf9ed 100644 --- a/configs/compal_e86/nsh_highram/defconfig +++ b/configs/esp32-core/ostest/defconfig @@ -24,7 +24,7 @@ CONFIG_BUILD_FLAT=y # Binary Output Formats # # CONFIG_RRLOAD_BINARY is not set -# CONFIG_INTELHEX_BINARY is not set +CONFIG_INTELHEX_BINARY=y # CONFIG_MOTOROLA_SREC is not set CONFIG_RAW_BINARY=y # CONFIG_UBOOT_UIMAGE is not set @@ -44,8 +44,7 @@ CONFIG_RAW_BINARY=y # CONFIG_DEBUG_ALERT=y # CONFIG_DEBUG_FEATURES is not set -CONFIG_ARCH_HAVE_STACKCHECK=y -# CONFIG_STACK_COLORATION is not set +# CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set CONFIG_ARCH_HAVE_CUSTOMOPT=y @@ -56,113 +55,50 @@ CONFIG_DEBUG_FULLOPT=y # # System Type # -CONFIG_ARCH_ARM=y +# 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_MISOC is not set # CONFIG_ARCH_RENESAS is not set +# CONFIG_ARCH_RISCV is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set +CONFIG_ARCH_XTENSA=y # CONFIG_ARCH_Z16 is not set # CONFIG_ARCH_Z80 is not set -CONFIG_ARCH="arm" +CONFIG_ARCH="xtensa" +CONFIG_ARCH_CHIP="esp32" +# CONFIG_SERIAL_TERMIOS is not set +CONFIG_ARCH_CHIP_ESP32=y +CONFIG_ARCH_FAMILY_LX6=y +# CONFIG_XTENSA_USE_OVLY is not set +CONFIG_XTENSA_CP_INITSET=0x0001 # -# ARM Options +# ESP32 Peripheral Selection # -# CONFIG_ARCH_CHIP_A1X is not set -# CONFIG_ARCH_CHIP_C5471 is not set -CONFIG_ARCH_CHIP_CALYPSO=y -# CONFIG_ARCH_CHIP_DM320 is not set -# CONFIG_ARCH_CHIP_EFM32 is not set -# CONFIG_ARCH_CHIP_IMX1 is not set -# CONFIG_ARCH_CHIP_IMX6 is not set -# CONFIG_ARCH_CHIP_KINETIS is not set -# CONFIG_ARCH_CHIP_KL is not set -# CONFIG_ARCH_CHIP_LM is not set -# CONFIG_ARCH_CHIP_TIVA is not set -# CONFIG_ARCH_CHIP_LPC11XX is not set -# CONFIG_ARCH_CHIP_LPC17XX is not set -# CONFIG_ARCH_CHIP_LPC214X is not set -# CONFIG_ARCH_CHIP_LPC2378 is not set -# CONFIG_ARCH_CHIP_LPC31XX is not set -# CONFIG_ARCH_CHIP_LPC43XX is not set -# CONFIG_ARCH_CHIP_NUC1XX is not set -# CONFIG_ARCH_CHIP_SAMA5 is not set -# CONFIG_ARCH_CHIP_SAMD is not set -# CONFIG_ARCH_CHIP_SAML is not set -# CONFIG_ARCH_CHIP_SAM34 is not set -# CONFIG_ARCH_CHIP_SAMV7 is not set -# CONFIG_ARCH_CHIP_STM32 is not set -# CONFIG_ARCH_CHIP_STM32F7 is not set -# CONFIG_ARCH_CHIP_STM32L4 is not set -# CONFIG_ARCH_CHIP_STR71X is not set -# CONFIG_ARCH_CHIP_TMS570 is not set -# CONFIG_ARCH_CHIP_MOXART is not set -CONFIG_ARCH_ARM7TDMI=y -# CONFIG_ARCH_ARM926EJS is not set -# CONFIG_ARCH_ARM920T is not set -# CONFIG_ARCH_CORTEXM0 is not set -# CONFIG_ARCH_CORTEXM3 is not set -# CONFIG_ARCH_CORTEXM4 is not set -# CONFIG_ARCH_CORTEXM7 is not set -# CONFIG_ARCH_CORTEXA5 is not set -# CONFIG_ARCH_CORTEXA8 is not set -# CONFIG_ARCH_CORTEXA9 is not set -# CONFIG_ARCH_CORTEXR4 is not set -# CONFIG_ARCH_CORTEXR4F is not set -# CONFIG_ARCH_CORTEXR5 is not set -# CONFIG_ARCH_CORTEX5F is not set -# CONFIG_ARCH_CORTEXR7 is not set -# CONFIG_ARCH_CORTEXR7F is not set -CONFIG_ARCH_FAMILY="arm" -CONFIG_ARCH_CHIP="calypso" -# CONFIG_ARM_TOOLCHAIN_IAR is not set -# CONFIG_ARM_TOOLCHAIN_GNU is not set -# CONFIG_ARCH_HAVE_FPU is not set -# CONFIG_ARCH_HAVE_DPFPU is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set -# CONFIG_ARM_HAVE_MPU_UNIFIED is not set -CONFIG_ARCH_HAVE_LOWVECTORS=y -# CONFIG_ARCH_LOWVECTORS is not set +CONFIG_ESP32_UART=y +# CONFIG_ESP32_SPI2 is not set +# CONFIG_XTENSA_TIMER1 is not set +# CONFIG_XTENSA_TIMER2 is not set +CONFIG_ESP32_UART0=y +# CONFIG_ESP32_UART1 is not set +# CONFIG_ESP32_UART2 is not set # -# ARM Configuration Options +# Memory Configuration # -# CONFIG_ARM_TOOLCHAIN_BUILDROOT is not set -# CONFIG_ARM_TOOLCHAIN_CODESOURCERYL is not set -CONFIG_ARM_TOOLCHAIN_GNU_EABIL=y -# CONFIG_ARM_TOOLCHAIN_GNU_OABI is not set -CONFIG_UART_IRDA_BAUD=115200 -CONFIG_UART_IRDA_PARITY=0 -CONFIG_UART_IRDA_BITS=8 -CONFIG_UART_IRDA_2STOP=0 -CONFIG_UART_IRDA_RXBUFSIZE=256 -CONFIG_UART_IRDA_TXBUFSIZE=256 -CONFIG_UART_MODEM_BAUD=115200 -CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_MODEM_BITS=8 -CONFIG_UART_MODEM_2STOP=0 -CONFIG_UART_MODEM_RXBUFSIZE=256 -CONFIG_UART_MODEM_TXBUFSIZE=256 +CONFIG_ESP32_BT_RESERVE_DRAM=0 +CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0 +CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=0 +# CONFIG_ESP32_GPIO_IRQ is not set # -# Calypso Configuration Options +# UART configuration # - -# -# Modem UART Configuration -# -# CONFIG_UART_MODEM_HWFLOWCONTROL is not set - -# -# IrDA UART Configuration -# -# CONFIG_UART_IRDA_HWFLOWCONTROL is not set -# CONFIG_USE_SERCOMM_CONSOLE is not set -# CONFIG_SERIAL_MODEM_CONSOLE is not set -# CONFIG_SERIAL_IRDA_CONSOLE is not set -CONFIG_SERIAL_CONSOLE_NONE=y +CONFIG_ESP32_UART0_TXPIN=0 +CONFIG_ESP32_UART0_RXPIN=0 # # Architecture Options @@ -175,13 +111,13 @@ CONFIG_SERIAL_CONSOLE_NONE=y # CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set # CONFIG_ARCH_HAVE_ADDRENV is not set # CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set -# CONFIG_ARCH_HAVE_MULTICPU is not set -CONFIG_ARCH_HAVE_VFORK=y +CONFIG_ARCH_HAVE_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_POWEROFF is not set # CONFIG_ARCH_HAVE_RESET is not set CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set @@ -192,14 +128,13 @@ CONFIG_ARCH_STACKDUMP=y # # Board Settings # -CONFIG_BOARD_LOOPSPERMSEC=1250 +CONFIG_BOARD_LOOPSPERMSEC=16717 # CONFIG_ARCH_CALIBRATION is not set # # Interrupt options # -CONFIG_ARCH_HAVE_INTERRUPTSTACK=y -CONFIG_ARCH_INTERRUPTSTACK=1024 +# CONFIG_ARCH_HAVE_INTERRUPTSTACK is not set # CONFIG_ARCH_HAVE_HIPRI_INTERRUPT is not set # @@ -214,30 +149,29 @@ CONFIG_BOOT_RUNFROMFLASH=y # # Boot Memory Configuration # -CONFIG_RAM_START=0 -CONFIG_RAM_SIZE=8650752 +CONFIG_RAM_START=0x20000000 +CONFIG_RAM_SIZE=114688 # CONFIG_ARCH_HAVE_SDRAM is not set # # Board Selection # -CONFIG_ARCH_BOARD_COMPALE86=y -# CONFIG_ARCH_BOARD_COMPALE88 is not set -# CONFIG_ARCH_BOARD_COMPALE99 is not set -# CONFIG_ARCH_BOARD_PIRELLI_DPL10 is not set +CONFIG_ARCH_BOARD_ESP32CORE=y # CONFIG_ARCH_BOARD_CUSTOM is not set -CONFIG_ARCH_BOARD="compal_e86" +CONFIG_ARCH_BOARD="esp32-core" # # Common Board Options # -CONFIG_NSH_MMCSDMINOR=0 # # Board-Specific Options # +CONFIG_ESP32CORE_XTAL_40MZ=y +# CONFIG_ESP32CORE_XTAL_26MHz is not set +# CONFIG_ESP32CORE_RUN_IRAM is not set +# CONFIG_BOARD_CRASHDUMP is not set CONFIG_LIB_BOARDCTL=y -CONFIG_BOARDCTL_POWEROFF=y # CONFIG_BOARDCTL_UNIQUEID is not set # CONFIG_BOARDCTL_TSCTEST is not set # CONFIG_BOARDCTL_GRAPHICS is not set @@ -250,7 +184,7 @@ CONFIG_DISABLE_OS_API=y # CONFIG_DISABLE_POSIX_TIMERS is not set # CONFIG_DISABLE_PTHREAD is not set # CONFIG_DISABLE_SIGNALS is not set -CONFIG_DISABLE_MQUEUE=y +# CONFIG_DISABLE_MQUEUE is not set # CONFIG_DISABLE_ENVIRON is not set # @@ -259,34 +193,39 @@ CONFIG_DISABLE_MQUEUE=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=2007 -CONFIG_START_MONTH=2 -CONFIG_START_DAY=13 -CONFIG_MAX_WDOGPARMS=4 -CONFIG_PREALLOC_WDOGS=8 -CONFIG_WDOG_INTRESERVE=1 -CONFIG_PREALLOC_TIMERS=8 +CONFIG_START_YEAR=2011 +CONFIG_START_MONTH=12 +CONFIG_START_DAY=6 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=16 +CONFIG_WDOG_INTRESERVE=4 +CONFIG_PREALLOC_TIMERS=4 # # Tasks and Scheduling # +# CONFIG_SPINLOCK is not set +# CONFIG_SMP is not set # CONFIG_INIT_NONE is not set CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set -CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_USER_ENTRYPOINT="ostest_main" CONFIG_RR_INTERVAL=200 # CONFIG_SCHED_SPORADIC is not set -CONFIG_TASK_NAME_SIZE=0 +CONFIG_TASK_NAME_SIZE=31 CONFIG_MAX_TASKS=16 # CONFIG_SCHED_HAVE_PARENT is not set -# CONFIG_SCHED_WAITPID is not set +CONFIG_SCHED_WAITPID=y # # Pthread Options # # CONFIG_MUTEX_TYPES is not set CONFIG_NPTHREAD_KEYS=4 +# CONFIG_PTHREAD_CLEANUP is not set +# CONFIG_CANCELLATION_POINTS is not set # # Performance Monitoring @@ -321,6 +260,12 @@ CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGCONDTIMEDOUT=16 + +# +# POSIX Message Queue Options +# +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 # CONFIG_MODULE is not set # @@ -333,7 +278,7 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # # Stack and heap information # -CONFIG_IDLETHREAD_STACKSIZE=2048 +CONFIG_IDLETHREAD_STACKSIZE=3072 CONFIG_USERMAIN_STACKSIZE=2048 CONFIG_PTHREAD_STACK_MIN=256 CONFIG_PTHREAD_STACK_DEFAULT=2048 @@ -345,6 +290,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 # @@ -360,21 +306,24 @@ CONFIG_DEV_NULL=y # CONFIG_ARCH_HAVE_I2CRESET is not set # CONFIG_I2C is not set CONFIG_SPI=y +# CONFIG_ARCH_HAVE_SPI_CRCGENERATION is not set +# CONFIG_ARCH_HAVE_SPI_CS_CONTROL is not set +# CONFIG_ARCH_HAVE_SPI_BITORDER is not set # CONFIG_SPI_SLAVE is not set CONFIG_SPI_EXCHANGE=y # CONFIG_SPI_CMDDATA is not set # CONFIG_SPI_CALLBACK is not set -# CONFIG_SPI_BITBANG is not set # CONFIG_SPI_HWFEATURES is not set -# CONFIG_SPI_CRCGENERATION is not set -# CONFIG_SPI_CS_CONTROL is not set # CONFIG_SPI_CS_DELAY_CONTROL is not set +# CONFIG_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 @@ -382,7 +331,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 @@ -404,14 +358,13 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set # CONFIG_UART_SERIALDRIVER is not set -# CONFIG_UART0_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y # CONFIG_UART1_SERIALDRIVER is not set # CONFIG_UART2_SERIALDRIVER is not set # CONFIG_UART3_SERIALDRIVER is not set @@ -431,18 +384,35 @@ CONFIG_SERIAL_CONSOLE=y # CONFIG_USART6_SERIALDRIVER is not set # CONFIG_USART7_SERIALDRIVER is not set # CONFIG_USART8_SERIALDRIVER is not set -CONFIG_OTHER_UART_SERIALDRIVER=y +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y -# CONFIG_STANDARD_SERIAL is not set +CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set # CONFIG_SERIAL_DMA is not set -# CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set -CONFIG_OTHER_SERIAL_CONSOLE=y +CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y +CONFIG_UART0_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set + +# +# UART0 Configuration +# +CONFIG_UART0_RXBUFSIZE=256 +CONFIG_UART0_TXBUFSIZE=256 +CONFIG_UART0_BAUD=115200 +CONFIG_UART0_BITS=8 +CONFIG_UART0_PARITY=0 +CONFIG_UART0_2STOP=0 +# CONFIG_UART0_IFLOWCONTROL is not set +# CONFIG_UART0_OFLOWCONTROL is not set +# CONFIG_UART0_DMA is not set +# CONFIG_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 +# CONFIG_DRIVERS_CONTACTLESS is not set # # System Logging @@ -456,6 +426,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 @@ -479,9 +450,10 @@ CONFIG_SYSLOG_CONSOLE=y # CONFIG_DISABLE_MOUNTPOINT is not set # CONFIG_FS_AUTOMOUNTER is not set # CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set -# CONFIG_FS_READABLE is not set +CONFIG_FS_READABLE=y # CONFIG_FS_WRITABLE is not set # CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_RAMMAP is not set # CONFIG_FS_FAT is not set # CONFIG_FS_NXFFS is not set @@ -489,7 +461,15 @@ CONFIG_SYSLOG_CONSOLE=y # CONFIG_FS_TMPFS is not set # CONFIG_FS_SMARTFS is not set # CONFIG_FS_BINFS is not set -# CONFIG_FS_PROCFS is not set +CONFIG_FS_PROCFS=y +# CONFIG_FS_PROCFS_REGISTER is not set + +# +# Exclude individual procfs entries +# +# CONFIG_FS_PROCFS_EXCLUDE_PROCESS is not set +# CONFIG_FS_PROCFS_EXCLUDE_UPTIME is not set +# CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set # CONFIG_FS_UNIONFS is not set # @@ -501,10 +481,8 @@ CONFIG_SYSLOG_CONSOLE=y # Memory Management # # CONFIG_MM_SMALL is not set -CONFIG_MM_REGIONS=1 -CONFIG_ARCH_HAVE_HEAP2=y -CONFIG_HEAP2_BASE=0x00000000 -CONFIG_HEAP2_SIZE=0 +CONFIG_MM_REGIONS=2 +# CONFIG_ARCH_HAVE_HEAP2 is not set # CONFIG_GRAN is not set # @@ -534,7 +512,7 @@ CONFIG_BUILTIN=y # # Standard C Library Options # -CONFIG_STDIO_BUFFER_SIZE=1024 +CONFIG_STDIO_BUFFER_SIZE=64 CONFIG_STDIO_LINEBUFFER=y CONFIG_NUNGET_CHARS=2 CONFIG_LIB_HOMEDIR="/" @@ -543,6 +521,8 @@ CONFIG_LIB_HOMEDIR="/" # CONFIG_LIBC_FLOATINGPOINT is not set CONFIG_LIBC_LONG_LONG=y # CONFIG_LIBC_IOCTL_VARIADIC is not set +# CONFIG_LIBC_WCHAR is not set +# CONFIG_LIBC_LOCALE is not set CONFIG_LIB_RAND_ORDER=1 # CONFIG_EOL_IS_CR is not set # CONFIG_EOL_IS_LF is not set @@ -559,9 +539,11 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set -CONFIG_ARCH_HAVE_TLS=y -# CONFIG_TLS is not set +# CONFIG_ARCH_HAVE_TLS is not set +# CONFIG_LIBC_IPv4_ADDRCONV is not set +# CONFIG_LIBC_IPv6_ADDRCONV is not set # CONFIG_LIBC_NETDB is not set +# CONFIG_NETDB_HOSTFILE is not set # # Non-standard Library Support @@ -569,12 +551,20 @@ 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 # # CONFIG_C99_BOOL8 is not set -# CONFIG_HAVE_CXX is not set +CONFIG_HAVE_CXX=y +CONFIG_HAVE_CXXINITIALIZE=y +# CONFIG_CXX_NEWLONG is not set + +# +# uClibc++ Standard C++ Library +# +# CONFIG_UCLIBCXX is not set # # Application Configuration @@ -592,16 +582,16 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # +# CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set # CONFIG_EXAMPLES_CONFIGDATA is not set -# CONFIG_EXAMPLES_CPUHOG is not set +# CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FTPC is not set # CONFIG_EXAMPLES_FTPD is not set -CONFIG_EXAMPLES_HELLO=y -CONFIG_EXAMPLES_HELLO_PRIORITY=100 -CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 +# CONFIG_EXAMPLES_HELLO is not set +# CONFIG_EXAMPLES_HELLOXX is not set # CONFIG_EXAMPLES_HIDKBD is not set # CONFIG_EXAMPLES_IGMP is not set # CONFIG_EXAMPLES_JSON is not set @@ -611,7 +601,7 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # CONFIG_EXAMPLES_MODBUS is not set # CONFIG_EXAMPLES_MOUNT is not set # CONFIG_EXAMPLES_NRF24L01TERM is not set -CONFIG_EXAMPLES_NSH=y +# CONFIG_EXAMPLES_NSH is not set # CONFIG_EXAMPLES_NULL is not set # CONFIG_EXAMPLES_NX is not set # CONFIG_EXAMPLES_NXFFS is not set @@ -620,11 +610,17 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_NXLINES is not set # CONFIG_EXAMPLES_NXTERM is not set # CONFIG_EXAMPLES_NXTEXT is not set -# CONFIG_EXAMPLES_OSTEST is not set +CONFIG_EXAMPLES_OSTEST=y +CONFIG_EXAMPLES_OSTEST_LOOPS=10 +CONFIG_EXAMPLES_OSTEST_STACKSIZE=6114 +CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=8 +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_RFID_READUID is not set # CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_SENDMAIL is not set # CONFIG_EXAMPLES_SERIALBLASTER is not set @@ -632,7 +628,6 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_SERLOOP is not set # CONFIG_EXAMPLES_SLCD is not set # CONFIG_EXAMPLES_SMART is not set -# CONFIG_EXAMPLES_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set @@ -647,6 +642,7 @@ CONFIG_EXAMPLES_NSH=y # File System Utilities # # CONFIG_FSUTILS_INIFILE is not set +# CONFIG_FSUTILS_PASSWD is not set # # GPS Utilities @@ -662,8 +658,10 @@ CONFIG_EXAMPLES_NSH=y # # 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 # @@ -683,100 +681,7 @@ CONFIG_EXAMPLES_NSH=y # # NSH Library # -CONFIG_NSH_LIBRARY=y -# CONFIG_NSH_MOTD is not set - -# -# Command Line Configuration -# -CONFIG_NSH_READLINE=y -# CONFIG_NSH_CLE is not set -CONFIG_NSH_LINELEN=80 -# CONFIG_NSH_DISABLE_SEMICOLON is not set -CONFIG_NSH_CMDPARMS=y -CONFIG_NSH_MAXARGUMENTS=6 -CONFIG_NSH_ARGCAT=y -CONFIG_NSH_NESTDEPTH=3 -# CONFIG_NSH_DISABLEBG is not set -CONFIG_NSH_BUILTIN_APPS=y - -# -# Disable Individual commands -# -# CONFIG_NSH_DISABLE_ADDROUTE is not set -# CONFIG_NSH_DISABLE_BASENAME is not set -# CONFIG_NSH_DISABLE_CAT is not set -# CONFIG_NSH_DISABLE_CD is not set -# CONFIG_NSH_DISABLE_CP is not set -# CONFIG_NSH_DISABLE_CMP is not set -CONFIG_NSH_DISABLE_DATE=y -# CONFIG_NSH_DISABLE_DD is not set -# CONFIG_NSH_DISABLE_DF is not set -# CONFIG_NSH_DISABLE_DELROUTE is not set -# CONFIG_NSH_DISABLE_DIRNAME is not set -# CONFIG_NSH_DISABLE_ECHO is not set -# CONFIG_NSH_DISABLE_EXEC is not set -# CONFIG_NSH_DISABLE_EXIT is not set -# CONFIG_NSH_DISABLE_FREE is not set -# CONFIG_NSH_DISABLE_GET is not set -# CONFIG_NSH_DISABLE_HELP is not set -# CONFIG_NSH_DISABLE_HEXDUMP is not set -# CONFIG_NSH_DISABLE_IFCONFIG is not set -CONFIG_NSH_DISABLE_IFUPDOWN=y -# CONFIG_NSH_DISABLE_KILL is not set -# CONFIG_NSH_DISABLE_LOSETUP is not set -CONFIG_NSH_DISABLE_LOSMART=y -# CONFIG_NSH_DISABLE_LS is not set -# CONFIG_NSH_DISABLE_MB is not set -# CONFIG_NSH_DISABLE_MKDIR is not set -# CONFIG_NSH_DISABLE_MKFIFO is not set -# CONFIG_NSH_DISABLE_MKRD is not set -# CONFIG_NSH_DISABLE_MH is not set -# CONFIG_NSH_DISABLE_MOUNT is not set -# CONFIG_NSH_DISABLE_MV is not set -# CONFIG_NSH_DISABLE_MW is not set -# CONFIG_NSH_DISABLE_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 - -# -# Configure Command Options -# -# CONFIG_NSH_CMDOPT_DF_H is not set -CONFIG_NSH_CODECS_BUFSIZE=128 -CONFIG_NSH_CMDOPT_HEXDUMP=y -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 - -# -# Console Configuration -# -CONFIG_NSH_CONSOLE=y -# CONFIG_NSH_ALTCONDEV is not set -# CONFIG_NSH_ARCHINIT is not set -# CONFIG_NSH_LOGIN is not set -# CONFIG_NSH_CONSOLE_LOGIN is not set +# CONFIG_NSH_LIBRARY is not set # # NxWidgets/NxWM @@ -793,16 +698,17 @@ 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 -CONFIG_READLINE_HAVE_EXTMATCH=y +# CONFIG_READLINE_HAVE_EXTMATCH is not set CONFIG_SYSTEM_READLINE=y CONFIG_READLINE_ECHO=y # CONFIG_READLINE_TABCOMPLETION is not set # CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_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/pirelli_dpl10/nsh_highram/setenv.sh b/configs/esp32-core/ostest/setenv.sh old mode 100755 new mode 100644 similarity index 73% rename from configs/pirelli_dpl10/nsh_highram/setenv.sh rename to configs/esp32-core/ostest/setenv.sh index 56d2c4cf94e..5c52d030818 --- a/configs/pirelli_dpl10/nsh_highram/setenv.sh +++ b/configs/esp32-core/ostest/setenv.sh @@ -1,8 +1,8 @@ #!/bin/bash -# configs/pirelli_dpl10/nsh/setenv.sh +# configs/esp32-core/ostest/setenv.sh # -# Copyright (C) 2007, 2008, 2011, 2013 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -47,16 +47,11 @@ 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" +# This is the path to the location where I installed the Expressif crosstools-NG +# toolchaing +export TOOLCHAIN_BIN="/home/patacongo/projects/nuttx/crosstool-NG/builds/xtensa-esp32-elf/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 +# Add the path to the toolchain to the PATH variable export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" echo "PATH : ${PATH}" diff --git a/configs/esp32-core/scripts/esp32.cfg b/configs/esp32-core/scripts/esp32.cfg index 0bd581f40a0..a9f94d37dc8 100644 --- a/configs/esp32-core/scripts/esp32.cfg +++ b/configs/esp32-core/scripts/esp32.cfg @@ -44,8 +44,6 @@ source [find target/esp32.cfg] # voltage greatly. # Enable this for 1.8V SPI flash -esp108 flashbootstrap 1.8 +# esp108 flashbootstrap 1.8 # Enable this for 3.3V SPI flash -#esp108 flashbootstrap 3.3 - - +esp108 flashbootstrap 3.3 diff --git a/configs/esp32-core/scripts/esp32_flash.ld b/configs/esp32-core/scripts/esp32_flash.ld index 5a1ffe05622..e11f2f954a7 100644 --- a/configs/esp32-core/scripts/esp32_flash.ld +++ b/configs/esp32-core/scripts/esp32_flash.ld @@ -19,25 +19,25 @@ SECTIONS /* Vectors according to builds/RF-2015.2-win32/esp108_v1_2_s5_512int_2/config.html */ . = 0x0; - KEEP(*(.window_vectors.text)); + KEEP (*(.window_vectors.text)); . = 0x180; - KEEP(*(.xtensa_level2_vector.text)); + KEEP (*(.xtensa_level2_vector.text)); . = 0x1c0; - KEEP(*(.xtensa_level3_vector.text)); + KEEP (*(.xtensa_level3_vector.text)); . = 0x200; - KEEP(*(.xtensa_level4_vector.text)); + KEEP (*(.xtensa_level4_vector.text)); . = 0x240; - KEEP(*(.xtensa_level5_vector.text)); + KEEP (*(.xtensa_level5_vector.text)); . = 0x280; - KEEP(*(.debug_exception_vector.text)); + KEEP (*(.debug_exception_vector.text)); . = 0x2c0; - KEEP(*(.nmi_vector.text)); + KEEP (*(.nmi_vector.text)); . = 0x300; - KEEP(*(.kernel_exception_vector.text)); + KEEP (*(.kernel_exception_vector.text)); . = 0x340; - KEEP(*(.user_exception_vector.text)); + KEEP (*(.user_exception_vector.text)); . = 0x3c0; - KEEP(*(.double_exception_vector.text)); + KEEP (*(.double_exception_vector.text)); . = 0x400; *(.*_vector.literal) @@ -78,7 +78,7 @@ SECTIONS *(.sbss2.*) *(.gnu.linkonce.sb2.*) *(.dynbss) - KEEP(*(.bss)) + KEEP (*(.bss)) *(.bss.*) *(.share.mem) *(.gnu.linkonce.b.*) @@ -96,17 +96,17 @@ SECTIONS /* .data initialized on power-up in ROMed configurations. */ _sdata = ABSOLUTE(.); - KEEP(*(.data)) - KEEP(*(.data.*)) - KEEP(*(.gnu.linkonce.d.*)) - KEEP(*(.data1)) - KEEP(*(.sdata)) - KEEP(*(.sdata.*)) - KEEP(*(.gnu.linkonce.s.*)) - KEEP(*(.sdata2)) - KEEP(*(.sdata2.*)) - KEEP(*(.gnu.linkonce.s2.*)) - KEEP(*(.jcr)) + KEEP (*(.data)) + KEEP (*(.data.*)) + KEEP (*(.gnu.linkonce.d.*)) + KEEP (*(.data1)) + KEEP (*(.sdata)) + KEEP (*(.sdata.*)) + KEEP (*(.gnu.linkonce.s.*)) + KEEP (*(.sdata2)) + KEEP (*(.sdata2.*)) + KEEP (*(.gnu.linkonce.s2.*)) + KEEP (*(.jcr)) *(.dram1 .dram1.*) _edata = ABSOLUTE(.); . = ALIGN(4); diff --git a/configs/esp32-core/scripts/esp32_iram.ld b/configs/esp32-core/scripts/esp32_iram.ld index 605ea54e5a3..2df0a5355aa 100644 --- a/configs/esp32-core/scripts/esp32_iram.ld +++ b/configs/esp32-core/scripts/esp32_iram.ld @@ -19,25 +19,25 @@ SECTIONS /* Vectors according to builds/RF-2015.2-win32/esp108_v1_2_s5_512int_2/config.html */ . = 0x0; - KEEP(*(.window_vectors.text)); + KEEP (*(.window_vectors.text)); . = 0x180; - KEEP(*(.xtensa_level2_vector.text)); + KEEP (*(.xtensa_level2_vector.text)); . = 0x1c0; - KEEP(*(.xtensa_level3_vector.text)); + KEEP (*(.xtensa_level3_vector.text)); . = 0x200; - KEEP(*(.xtensa_level4_vector.text)); + KEEP (*(.xtensa_level4_vector.text)); . = 0x240; - KEEP(*(.xtensa_level5_vector.text)); + KEEP (*(.xtensa_level5_vector.text)); . = 0x280; - KEEP(*(.debug_exception_vector.text)); + KEEP (*(.debug_exception_vector.text)); . = 0x2c0; - KEEP(*(.nmi_vector.text)); + KEEP (*(.nmi_vector.text)); . = 0x300; - KEEP(*(.kernel_exception_vector.text)); + KEEP (*(.kernel_exception_vector.text)); . = 0x340; - KEEP(*(.user_exception_vector.text)); + KEEP (*(.user_exception_vector.text)); . = 0x3c0; - KEEP(*(.double_exception_vector.text)); + KEEP (*(.double_exception_vector.text)); . = 0x400; *(.*_vector.literal) @@ -89,7 +89,7 @@ SECTIONS *(.sbss2.*) *(.gnu.linkonce.sb2.*) *(.dynbss) - KEEP(*(.bss)) + KEEP (*(.bss)) *(.bss.*) *(.share.mem) *(.gnu.linkonce.b.*) @@ -107,17 +107,17 @@ SECTIONS /* .data initialized on power-up in ROMed configurations. */ _sdata = ABSOLUTE(.); - KEEP(*(.data)) - KEEP(*(.data.*)) - KEEP(*(.gnu.linkonce.d.*)) - KEEP(*(.data1)) - KEEP(*(.sdata)) - KEEP(*(.sdata.*)) - KEEP(*(.gnu.linkonce.s.*)) - KEEP(*(.sdata2)) - KEEP(*(.sdata2.*)) - KEEP(*(.gnu.linkonce.s2.*)) - KEEP(*(.jcr)) + KEEP (*(.data)) + KEEP (*(.data.*)) + KEEP (*(.gnu.linkonce.d.*)) + KEEP (*(.data1)) + KEEP (*(.sdata)) + KEEP (*(.sdata.*)) + KEEP (*(.gnu.linkonce.s.*)) + KEEP (*(.sdata2)) + KEEP (*(.sdata2.*)) + KEEP (*(.gnu.linkonce.s2.*)) + KEEP (*(.jcr)) *(.dram1 .dram1.*) _edata = ABSOLUTE(.); . = ALIGN(4); @@ -173,10 +173,6 @@ SECTIONS _sheap = ABSOLUTE(.); } >dram0_0_seg - .flash.rodata : - { - } >drom0_0_seg - .rtc.text : { . = ALIGN(4); diff --git a/configs/esp32-core/smp/defconfig b/configs/esp32-core/smp/defconfig index 9db1561de7b..56422d52b10 100644 --- a/configs/esp32-core/smp/defconfig +++ b/configs/esp32-core/smp/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 @@ -51,8 +47,9 @@ CONFIG_DEBUG_ALERT=y # CONFIG_ARCH_HAVE_STACKCHECK is not set # CONFIG_ARCH_HAVE_HEAPCHECK is not set # CONFIG_DEBUG_SYMBOLS is not set -# CONFIG_ARCH_HAVE_CUSTOMOPT is not set +CONFIG_ARCH_HAVE_CUSTOMOPT=y # CONFIG_DEBUG_NOOPT is not set +# CONFIG_DEBUG_CUSTOMOPT is not set CONFIG_DEBUG_FULLOPT=y # @@ -77,6 +74,10 @@ CONFIG_ARCH_CHIP_ESP32=y CONFIG_ARCH_FAMILY_LX6=y # CONFIG_XTENSA_USE_OVLY is not set CONFIG_XTENSA_CP_INITSET=0x0001 + +# +# ESP32 Peripheral Selection +# CONFIG_ESP32_UART=y # CONFIG_ESP32_SPI2 is not set # CONFIG_XTENSA_TIMER1 is not set @@ -84,24 +85,20 @@ CONFIG_ESP32_UART=y CONFIG_ESP32_UART0=y # CONFIG_ESP32_UART1 is not set # CONFIG_ESP32_UART2 is not set -CONFIG_ESP32_BT_RESERVE_DRAM=0 -CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0 -CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=0 -# CONFIG_ESP32_GPIO_IRQ is not set -CONFIG_ESP32_UART0_TXPIN=0 -CONFIG_ESP32_UART0_RXPIN=0 - -# -# ESP32 Peripheral Selection -# # # Memory Configuration # +CONFIG_ESP32_BT_RESERVE_DRAM=0 +CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0 +CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=0 +# CONFIG_ESP32_GPIO_IRQ is not set # # UART configuration # +CONFIG_ESP32_UART0_TXPIN=0 +CONFIG_ESP32_UART0_RXPIN=0 # # Architecture Options @@ -174,7 +171,11 @@ CONFIG_ESP32CORE_XTAL_40MZ=y # CONFIG_ESP32CORE_XTAL_26MHz is not set # CONFIG_ESP32CORE_RUN_IRAM is not set # CONFIG_BOARD_CRASHDUMP is not set -# CONFIG_LIB_BOARDCTL is not set +CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_UNIQUEID is not set +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set # # RTOS Features @@ -225,6 +226,8 @@ CONFIG_SCHED_WAITPID=y # # CONFIG_MUTEX_TYPES is not set CONFIG_NPTHREAD_KEYS=4 +# CONFIG_PTHREAD_CLEANUP is not set +# CONFIG_CANCELLATION_POINTS is not set # # Performance Monitoring @@ -357,7 +360,6 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set @@ -540,6 +542,8 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set # CONFIG_ARCH_HAVE_TLS is not set +# CONFIG_LIBC_IPv4_ADDRCONV is not set +# CONFIG_LIBC_IPv6_ADDRCONV is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -602,10 +606,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 @@ -630,6 +634,7 @@ CONFIG_EXAMPLES_SMP_STACKSIZE=2048 # 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 @@ -751,6 +756,7 @@ CONFIG_NSH_MMCSDMINOR=0 # Configure Command Options # # CONFIG_NSH_CMDOPT_DF_H is not set +# CONFIG_NSH_CMDOPT_DD_STATS is not set CONFIG_NSH_CODECS_BUFSIZE=128 # CONFIG_NSH_CMDOPT_HEXDUMP is not set CONFIG_NSH_PROC_MOUNTPOINT="/proc" @@ -768,7 +774,7 @@ CONFIG_NSH_FILEIOSIZE=512 # CONFIG_NSH_CONSOLE=y # CONFIG_NSH_ALTCONDEV is not set -# CONFIG_NSH_ARCHINIT is not set +CONFIG_NSH_ARCHINIT=y # CONFIG_NSH_LOGIN is not set # CONFIG_NSH_CONSOLE_LOGIN is not set diff --git a/configs/esp32-core/src/Makefile b/configs/esp32-core/src/Makefile index 2e23d2db4b6..46ed73e5c3e 100644 --- a/configs/esp32-core/src/Makefile +++ b/configs/esp32-core/src/Makefile @@ -42,7 +42,7 @@ ASRCS = CSRCS = esp32_boot.c esp32_bringup.c ifeq ($(CONFIG_LIB_BOARDCTL),y) -CONFIG_CSRCS += esp32_appinit.c +CSRCS += esp32_appinit.c endif SCRIPTIN = $(SCRIPTDIR)$(DELIM)esp32.template diff --git a/configs/esp32-core/src/esp32_appinit.c b/configs/esp32-core/src/esp32_appinit.c index b352aa2fd26..ff8d1eb9570 100644 --- a/configs/esp32-core/src/esp32_appinit.c +++ b/configs/esp32-core/src/esp32_appinit.c @@ -42,7 +42,7 @@ #include #include -#include "esp32_core.h" +#include "esp32-core.h" #ifdef CONFIG_LIB_BOARDCTL diff --git a/configs/esp32-core/src/esp32_bringup.c b/configs/esp32-core/src/esp32_bringup.c index 0267217785b..b5121b2a4dd 100644 --- a/configs/esp32-core/src/esp32_bringup.c +++ b/configs/esp32-core/src/esp32_bringup.c @@ -38,7 +38,11 @@ ****************************************************************************/ #include + #include +#include +#include + #include "esp32-core.h" /**************************************************************************** @@ -65,5 +69,23 @@ int esp32_bringup(void) { + int ret; + +#ifdef CONFIG_FS_PROCFS + /* Mount the procfs file system */ + + ret = mount(NULL, "/proc", "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %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. + */ + + UNUSED(ret); return OK; } diff --git a/configs/ez80f910200kitg/ostest/defconfig b/configs/ez80f910200kitg/ostest/defconfig index fcfe07a33ba..4a79e9765ab 100644 --- a/configs/ez80f910200kitg/ostest/defconfig +++ b/configs/ez80f910200kitg/ostest/defconfig @@ -369,7 +369,6 @@ CONFIG_MMCSD_HAVECARDDETECT=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/ez80f910200zco/dhcpd/defconfig b/configs/ez80f910200zco/dhcpd/defconfig index 72dcc5ecfae..d48a15c6f25 100644 --- a/configs/ez80f910200zco/dhcpd/defconfig +++ b/configs/ez80f910200zco/dhcpd/defconfig @@ -424,7 +424,6 @@ CONFIG_ETH0_PHY_AM79C874=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/ez80f910200zco/httpd/defconfig b/configs/ez80f910200zco/httpd/defconfig index b74d62ba788..7ef42bdffa4 100644 --- a/configs/ez80f910200zco/httpd/defconfig +++ b/configs/ez80f910200zco/httpd/defconfig @@ -433,7 +433,6 @@ CONFIG_ETH0_PHY_AM79C874=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/ez80f910200zco/nettest/defconfig b/configs/ez80f910200zco/nettest/defconfig index e4fe5af40f8..e9b3d8c54ff 100644 --- a/configs/ez80f910200zco/nettest/defconfig +++ b/configs/ez80f910200zco/nettest/defconfig @@ -425,7 +425,6 @@ CONFIG_ETH0_PHY_AM79C874=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/ez80f910200zco/nsh/defconfig b/configs/ez80f910200zco/nsh/defconfig index 2b235129216..72a9774dd9b 100644 --- a/configs/ez80f910200zco/nsh/defconfig +++ b/configs/ez80f910200zco/nsh/defconfig @@ -435,7 +435,6 @@ CONFIG_ETH0_PHY_AM79C874=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/ez80f910200zco/poll/defconfig b/configs/ez80f910200zco/poll/defconfig index a7b22914de9..b806a20f748 100644 --- a/configs/ez80f910200zco/poll/defconfig +++ b/configs/ez80f910200zco/poll/defconfig @@ -435,7 +435,6 @@ 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=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/fire-stm32v2/nsh/defconfig b/configs/fire-stm32v2/nsh/defconfig index 12ea15117cc..4abebec236a 100644 --- a/configs/fire-stm32v2/nsh/defconfig +++ b/configs/fire-stm32v2/nsh/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -843,7 +842,6 @@ CONFIG_ENC28J60_HPWORK=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/freedom-k64f/netnsh/defconfig b/configs/freedom-k64f/netnsh/defconfig index 7a174609d41..a16d6eae3f5 100644 --- a/configs/freedom-k64f/netnsh/defconfig +++ b/configs/freedom-k64f/netnsh/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -565,7 +564,6 @@ CONFIG_ETH0_PHY_KSZ8081=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/freedom-k64f/nsh/defconfig b/configs/freedom-k64f/nsh/defconfig index 1a570c533fa..d32846b6427 100644 --- a/configs/freedom-k64f/nsh/defconfig +++ b/configs/freedom-k64f/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -513,7 +512,6 @@ CONFIG_SDIO_BLOCKSETUP=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/freedom-kl25z/README.txt b/configs/freedom-kl25z/README.txt index a4a806dd482..b5114b4d43c 100644 --- a/configs/freedom-kl25z/README.txt +++ b/configs/freedom-kl25z/README.txt @@ -294,98 +294,6 @@ instead of configure.sh: Where is one of the following: - minnsh: - ------ - - This is a experiment to see just how small we can get a usable NSH - configuration. This configuration has far fewer features than the nsh - configuration but is also a fraction of the size. - - 2016-06-21: - $ arm-none-eabi-size nuttx - text data bss dec hex filename - 12282 196 736 13214 339e nuttx - - This minnsh configuration is a "proof-of-concept" and not very usable in - its current state. This configuration was created by disabling - everything possible INCLUDING file system support. Without file system - support, NuttX is pretty much crippled. Here are some of the - consequences of disabling the file system: - - - All features that depend on the file system are lost: device drivers, - mountpoints, message queues, named semaphores. - - - Without device drivers, you cannot interact with the RTOS using POSIX - interfaces. You would have to work with NuttX as with those other - tiny RTOSs: As a scheduler and a callable hardare abstraction layer - (HAL). - - - You cannot use any of the NuttX upper half device drivers since they - depend on the pseudo-file system and device nodes. You can, of - course, continue to use the lower half drivers either directly. Or, - perhaps, you could write some custom minnsh upper half drivers that - do not depend on a file system and expose a HAL interface. - - There is a special version of readline() the NSH uses when there is no - file system. It uses a special up_putc() to write data to the console - and a special function up_getc() to read data from the console. - - - The current up_getc() implementationsa are a kludge. They are - analogous to the up_putc() implementations: They directly poll the - hardware for serial availability, locking up all lower priority tasks - in the entire system while they poll. So a version of NSH that uses - up_getc() essentially blocks the system until a character is received. - - This, of course, could be fixed by creating a special, upper half - implementation of the interrupt-driven serial lower half (like - stm32_serial) that just supports single character console I/O - (perhaps called up_putc and up_getc?). The NSH could wait for serial - input without blocking the system. But then that would increase the - footprint too. - - So although the minnsh configurations are a good starting point for - making things small, they not are really very practical. Why might - you want a NuttX minnsh solution? Perhaps you have software that runs - on a family of chips including some very tiny MCUs. Then perhaps having - the RTOS compatibility would justify the loss of functionality? - - You can re-enable the file system and (true) serial console with - these settings: - - Enable the file system: - CONFIG_NFILE_DESCRIPTORS=5 - CONFIG_NFILE_STREAMS=5 - - Enable the console device: - CONFIG_DEV_CONSOLE=y - - Disable most new NSH commands. Some like 'ls' are really mandatory - with a file system: - CONFIG_NSH_DISABLE_xxx=y - - Enable the upper half serial driver: - CONFIG_SERIAL=y - CONFIG_STANDARD_SERIAL=y - - Enable the USART1 serial driver: - CONFIG_STM32_USART1=y - CONFIG_STM32_USART1_SERIALDRIVER=y - CONFIG_USART1_SERIAL_CONSOLE=y - - CONFIG_USART1_2STOP=0 - CONFIG_USART1_BAUD=115200 - CONFIG_USART1_BITS=8 - CONFIG_USART1_PARITY=0 - CONFIG_USART1_RXBUFSIZE=16 - CONFIG_USART1_TXBUFSIZE=16 - - With these changes, NSH should behave better and we preserve the device - driver interface. But this result in a total size increase of about - 7KB: That is about 5KB of additional OS support for the file system and - serial console PLUS about 2KB for the 'ls' command logic (including OS - support for opendir(), readdir(), closedir(), stat(), and probably other - things). - nsh: --- Configures the NuttShell (nsh) located at apps/examples/nsh. The diff --git a/configs/freedom-kl25z/minnsh/Make.defs b/configs/freedom-kl25z/minnsh/Make.defs deleted file mode 100644 index 453b86e4cfa..00000000000 --- a/configs/freedom-kl25z/minnsh/Make.defs +++ /dev/null @@ -1,124 +0,0 @@ -############################################################################ -# configs/freedom-kl25z/minnsh/Make.defs -# -# 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. -# -############################################################################ - -include ${TOPDIR}/.config -include ${TOPDIR}/tools/Config.mk -include ${TOPDIR}/arch/arm/src/armv6-m/Toolchain.defs - -LDSCRIPT = ld.script - -ifeq ($(WINTOOL),y) - # Windows-native toolchains - 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 - ARCHINCLUDES = -I. -isystem $(TOPDIR)/include - ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) -endif - -CC = $(CROSSDEV)gcc -CXX = $(CROSSDEV)g++ -CPP = $(CROSSDEV)gcc -E -LD = $(CROSSDEV)ld -AR = $(ARCROSSDEV)ar rcs -NM = $(ARCROSSDEV)nm -OBJCOPY = $(CROSSDEV)objcopy -OBJDUMP = $(CROSSDEV)objdump - -ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} -ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} - -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION = -g -endif - -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -endif - -ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -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-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 = -ifeq ($(CONFIG_HOST_WINDOWS),y) - HOSTEXEEXT = .exe -else - HOSTEXEEXT = -endif - -ifeq ($(WINTOOL),y) - # Windows-native host tools - DIRLINK = $(TOPDIR)/tools/copydir.sh - DIRUNLINK = $(TOPDIR)/tools/unlink.sh - MKDEP = $(TOPDIR)/tools/mkwindeps.sh -else - # Linux/Cygwin-native host tools - MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) -endif - diff --git a/configs/freedom-kl25z/minnsh/defconfig b/configs/freedom-kl25z/minnsh/defconfig deleted file mode 100644 index 1e47ae567a1..00000000000 --- a/configs/freedom-kl25z/minnsh/defconfig +++ /dev/null @@ -1,799 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Nuttx/ Configuration -# - -# -# Build Setup -# -CONFIG_EXPERIMENTAL=y -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=y -CONFIG_RAW_BINARY=y -# CONFIG_UBOOT_UIMAGE is not set - -# -# Customize Header Files -# -# CONFIG_ARCH_STDINT_H is not set -# CONFIG_ARCH_STDBOOL_H is not set -# CONFIG_ARCH_MATH_H is not set -# CONFIG_ARCH_FLOAT_H is not set -# CONFIG_ARCH_STDARG_H is not set -# CONFIG_ARCH_DEBUG_H is not set - -# -# Debug Options -# -# CONFIG_DEBUG_ALERT is not set -# CONFIG_DEBUG_FEATURES is not set -CONFIG_ARCH_HAVE_STACKCHECK=y -# CONFIG_STACK_COLORATION is not set -# CONFIG_ARCH_HAVE_HEAPCHECK 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_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=y -# CONFIG_ARCH_CHIP_LM is not set -# CONFIG_ARCH_CHIP_TIVA is not set -# CONFIG_ARCH_CHIP_LPC11XX is not set -# CONFIG_ARCH_CHIP_LPC17XX is not set -# CONFIG_ARCH_CHIP_LPC214X is not set -# CONFIG_ARCH_CHIP_LPC2378 is not set -# CONFIG_ARCH_CHIP_LPC31XX is not set -# CONFIG_ARCH_CHIP_LPC43XX is not set -# CONFIG_ARCH_CHIP_NUC1XX is not set -# CONFIG_ARCH_CHIP_SAMA5 is not set -# CONFIG_ARCH_CHIP_SAMD is not set -# CONFIG_ARCH_CHIP_SAML is not set -# CONFIG_ARCH_CHIP_SAM34 is not set -# CONFIG_ARCH_CHIP_SAMV7 is not set -# CONFIG_ARCH_CHIP_STM32 is not set -# CONFIG_ARCH_CHIP_STM32F7 is not set -# CONFIG_ARCH_CHIP_STM32L4 is not set -# CONFIG_ARCH_CHIP_STR71X is not set -# CONFIG_ARCH_CHIP_TMS570 is not set -# CONFIG_ARCH_CHIP_MOXART is not set -# CONFIG_ARCH_ARM7TDMI is not set -# CONFIG_ARCH_ARM926EJS is not set -# CONFIG_ARCH_ARM920T is not set -CONFIG_ARCH_CORTEXM0=y -# CONFIG_ARCH_CORTEXM3 is not set -# CONFIG_ARCH_CORTEXM4 is not set -# CONFIG_ARCH_CORTEXM7 is not set -# CONFIG_ARCH_CORTEXA5 is not set -# CONFIG_ARCH_CORTEXA8 is not set -# CONFIG_ARCH_CORTEXA9 is not set -# CONFIG_ARCH_CORTEXR4 is not set -# CONFIG_ARCH_CORTEXR4F is not set -# CONFIG_ARCH_CORTEXR5 is not set -# CONFIG_ARCH_CORTEX5F is not set -# CONFIG_ARCH_CORTEXR7 is not set -# CONFIG_ARCH_CORTEXR7F is not set -CONFIG_ARCH_FAMILY="armv6-m" -CONFIG_ARCH_CHIP="kl" -# CONFIG_ARM_TOOLCHAIN_IAR is not set -# CONFIG_ARM_TOOLCHAIN_GNU is not set -CONFIG_ARCH_HAVE_CMNVECTOR=y -# CONFIG_ARMV7M_CMNVECTOR is not set -# CONFIG_ARMV7M_LAZYFPU is not set -# CONFIG_ARCH_HAVE_FPU is not set -# CONFIG_ARCH_HAVE_DPFPU is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set -# CONFIG_ARM_HAVE_MPU_UNIFIED is not set - -# -# ARMV6M Configuration Options -# -# CONFIG_ARMV6M_TOOLCHAIN_BUILDROOT is not set -# 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 -# -# CONFIG_ARCH_CHIP_MKL25Z64 is not set -CONFIG_ARCH_CHIP_MKL25Z128=y -# CONFIG_ARCH_CHIP_MKL26Z128 is not set -CONFIG_ARCH_FAMILY_KL2X=y - -# -# Kinetis Peripheral Support -# -# CONFIG_KL_TRACE is not set -# CONFIG_KL_FLEXBUS is not set -CONFIG_KL_UART0=y -# CONFIG_KL_UART1 is not set -# CONFIG_KL_UART2 is not set -# CONFIG_KL_FLEXCAN0 is not set -# CONFIG_KL_FLEXCAN1 is not set -CONFIG_KL_SPI0=y -CONFIG_KL_SPI1=y -# CONFIG_KL_SPI2 is not set -# CONFIG_KL_I2C0 is not set -# CONFIG_KL_I2C1 is not set -# CONFIG_KL_I2S is not set -# CONFIG_KL_DAC0 is not set -# CONFIG_KL_DAC1 is not set -# CONFIG_KL_ADC0 is not set -# CONFIG_KL_ADC1 is not set -# CONFIG_KL_CMP is not set -# CONFIG_KL_VREF is not set -# CONFIG_KL_TPM0 is not set -# CONFIG_KL_TPM1 is not set -# CONFIG_KL_TPM2 is not set -# CONFIG_KL_LPTIMER is not set -# CONFIG_KL_RTC is not set -# CONFIG_KL_EWM is not set -# CONFIG_KL_CMT is not set -# CONFIG_KL_USBOTG is not set -# CONFIG_KL_USBDCD is not set -# CONFIG_KL_LLWU is not set -# CONFIG_KL_TSI is not set -# CONFIG_KL_FTFL is not set -# CONFIG_KL_DMA is not set -# CONFIG_KL_CRC is not set -# CONFIG_KL_PDB is not set -# CONFIG_KL_PIT is not set -CONFIG_KL_SYSTICK_CORECLK=y -# CONFIG_KL_SYSTICK_CORECLK_DIV16 is not set - -# -# Kinetis GPIO Interrupt 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 is not set -# CONFIG_ARCH_NAND_HWECC is not set -# CONFIG_ARCH_HAVE_EXTCLK is not set -# CONFIG_ARCH_HAVE_POWEROFF is not set -CONFIG_ARCH_HAVE_RESET=y -# CONFIG_ARCH_IRQPRIO is not set -# CONFIG_ARCH_STACKDUMP is not set -# CONFIG_ENDIAN_BIG is not set -# CONFIG_ARCH_IDLE_CUSTOM is not set -# CONFIG_ARCH_HAVE_RAMFUNCS is not set -# CONFIG_ARCH_HAVE_RAMVECTORS is not set - -# -# Board Settings -# -CONFIG_BOARD_LOOPSPERMSEC=2988 -# CONFIG_ARCH_CALIBRATION is not set - -# -# Interrupt options -# -CONFIG_ARCH_HAVE_INTERRUPTSTACK=y -CONFIG_ARCH_INTERRUPTSTACK=0 -# CONFIG_ARCH_HAVE_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=0x1FFFF000 -CONFIG_RAM_SIZE=16384 -# CONFIG_ARCH_HAVE_SDRAM is not set - -# -# Board Selection -# -CONFIG_ARCH_BOARD_FREEDOM_KL25Z=y -# CONFIG_ARCH_BOARD_CUSTOM is not set -CONFIG_ARCH_BOARD="freedom-kl25z" - -# -# Common Board Options -# -CONFIG_ARCH_HAVE_LEDS=y -CONFIG_ARCH_LEDS=y -CONFIG_NSH_MMCSDMINOR=0 - -# -# Board-Specific Options -# -# CONFIG_LIB_BOARDCTL is not set - -# -# RTOS Features -# -CONFIG_DISABLE_OS_API=y -CONFIG_DISABLE_POSIX_TIMERS=y -CONFIG_DISABLE_PTHREAD=y -CONFIG_DISABLE_SIGNALS=y -CONFIG_DISABLE_MQUEUE=y -CONFIG_DISABLE_ENVIRON=y - -# -# Clocks and Timers -# -CONFIG_USEC_PER_TICK=10000 -# CONFIG_SYSTEM_TIME64 is not set -# CONFIG_CLOCK_MONOTONIC is not set -# CONFIG_JULIAN_TIME is not set -CONFIG_START_YEAR=2013 -CONFIG_START_MONTH=2 -CONFIG_START_DAY=26 -CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=4 -CONFIG_WDOG_INTRESERVE=0 -CONFIG_PREALLOC_TIMERS=0 - -# -# Tasks and Scheduling -# -# CONFIG_SPINLOCK is not set -# CONFIG_INIT_NONE is not set -CONFIG_INIT_ENTRYPOINT=y -# CONFIG_INIT_FILEPATH is not set -CONFIG_USER_ENTRYPOINT="nsh_main" -CONFIG_RR_INTERVAL=0 -# CONFIG_SCHED_SPORADIC is not set -CONFIG_TASK_NAME_SIZE=0 -CONFIG_MAX_TASKS=8 -# CONFIG_SCHED_HAVE_PARENT is not set -# CONFIG_SCHED_WAITPID is not set - -# -# Performance Monitoring -# -# CONFIG_SCHED_CPULOAD is not set -# CONFIG_SCHED_INSTRUMENTATION is not set - -# -# Files and I/O -# -# CONFIG_DEV_CONSOLE is not set -CONFIG_FDCLONE_DISABLE=y -# CONFIG_FDCLONE_STDIO is not set -CONFIG_SDCLONE_DISABLE=y -CONFIG_NFILE_DESCRIPTORS=0 -CONFIG_NFILE_STREAMS=0 -CONFIG_NAME_MAX=32 -# CONFIG_PRIORITY_INHERITANCE is not set - -# -# RTOS hooks -# -# CONFIG_BOARD_INITIALIZE is not set -# CONFIG_SCHED_STARTHOOK is not set -# CONFIG_SCHED_ATEXIT is not set -# CONFIG_SCHED_ONEXIT is not set -# CONFIG_MODULE is not set - -# -# Work queue support -# - -# -# Stack and heap information -# -CONFIG_IDLETHREAD_STACKSIZE=1024 -CONFIG_USERMAIN_STACKSIZE=1536 -CONFIG_PTHREAD_STACK_MIN=256 -CONFIG_PTHREAD_STACK_DEFAULT=1536 -# CONFIG_LIB_SYSCALL is not set - -# -# Device Drivers -# -CONFIG_DISABLE_POLL=y -# CONFIG_DEV_NULL is not set -# CONFIG_DEV_ZERO is not set -# CONFIG_DEV_LOOP is not set - -# -# Buffering -# -# CONFIG_DRVR_WRITEBUFFER is not set -# CONFIG_DRVR_READAHEAD is not set -# CONFIG_RAMDISK is not set -# CONFIG_CAN is not set -# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set -# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set -# CONFIG_PWM is not set -# CONFIG_ARCH_HAVE_I2CRESET is not set -# CONFIG_I2C is not set -CONFIG_SPI=y -# CONFIG_SPI_SLAVE is not set -CONFIG_SPI_EXCHANGE=y -# CONFIG_SPI_CMDDATA is not set -# CONFIG_SPI_CALLBACK is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_HWFEATURES is not set -# CONFIG_SPI_CRCGENERATION is not set -# CONFIG_SPI_CS_CONTROL is not set -# CONFIG_SPI_CS_DELAY_CONTROL is not set -# CONFIG_I2S is not set - -# -# Timer Driver Support -# -# CONFIG_TIMER is not set -# CONFIG_RTC is not set -# CONFIG_WATCHDOG is not set -# CONFIG_ANALOG is not set -# CONFIG_AUDIO_DEVICES is not set -# CONFIG_VIDEO_DEVICES is not set -# CONFIG_BCH is not set -# CONFIG_INPUT is not set -# CONFIG_IOEXPANDER is not set - -# -# LCD Driver Support -# -# CONFIG_LCD is not set -# CONFIG_SLCD is not set - -# -# LED Support -# -# CONFIG_USERLED is not set -# CONFIG_RGBLED is not set -# CONFIG_PCA9635PW is not set -# CONFIG_NCP5623C is not set -# CONFIG_MMCSD is not set -# CONFIG_MODEM is not set -# CONFIG_MTD is not set -# CONFIG_EEPROM is not set -# CONFIG_PIPES is not set -# CONFIG_PM is not set -# CONFIG_POWER is not set -# CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set -CONFIG_SERIAL=y -# CONFIG_SERIAL_REMOVABLE is not set -CONFIG_SERIAL_CONSOLE=y -# CONFIG_16550_UART is not set -# CONFIG_UART_SERIALDRIVER is not set -CONFIG_UART0_SERIALDRIVER=y -# CONFIG_UART1_SERIALDRIVER is not set -# CONFIG_UART2_SERIALDRIVER is not set -# CONFIG_UART3_SERIALDRIVER is not set -# CONFIG_UART4_SERIALDRIVER is not set -# CONFIG_UART5_SERIALDRIVER is not set -# CONFIG_UART6_SERIALDRIVER is not set -# CONFIG_UART7_SERIALDRIVER is not set -# CONFIG_UART8_SERIALDRIVER is not set -# CONFIG_SCI0_SERIALDRIVER is not set -# CONFIG_SCI1_SERIALDRIVER is not set -# CONFIG_USART0_SERIALDRIVER is not set -# CONFIG_USART1_SERIALDRIVER is not set -# CONFIG_USART2_SERIALDRIVER is not set -# CONFIG_USART3_SERIALDRIVER is not set -# CONFIG_USART4_SERIALDRIVER is not set -# CONFIG_USART5_SERIALDRIVER is not set -# CONFIG_USART6_SERIALDRIVER is not set -# CONFIG_USART7_SERIALDRIVER is not set -# CONFIG_USART8_SERIALDRIVER is not set -# CONFIG_OTHER_UART_SERIALDRIVER is not set -CONFIG_MCU_SERIAL=y -# CONFIG_STANDARD_SERIAL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set -# CONFIG_SERIAL_DMA is not set -# CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set -CONFIG_UART0_SERIAL_CONSOLE=y -# CONFIG_OTHER_SERIAL_CONSOLE is not set -# CONFIG_NO_SERIAL_CONSOLE is not set - -# -# UART0 Configuration -# -CONFIG_UART0_RXBUFSIZE=256 -CONFIG_UART0_TXBUFSIZE=256 -CONFIG_UART0_BAUD=115200 -CONFIG_UART0_BITS=8 -CONFIG_UART0_PARITY=0 -CONFIG_UART0_2STOP=0 -# CONFIG_UART0_IFLOWCONTROL is not set -# CONFIG_UART0_OFLOWCONTROL is not set -# CONFIG_UART0_DMA is not set -# CONFIG_USBDEV is not set -# CONFIG_USBHOST is not set -# CONFIG_DRIVERS_WIRELESS is not set - -# -# System Logging -# -# CONFIG_ARCH_SYSLOG is not set -# CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_INTBUFFER is not set -# CONFIG_SYSLOG_TIMESTAMP is not set -# CONFIG_SYSLOG_SERIAL_CONSOLE is not set -# CONFIG_SYSLOG_CHAR is not set -CONFIG_SYSLOG_NONE=y -# CONFIG_SYSLOG_FILE is not set - -# -# Networking Support -# -# CONFIG_ARCH_HAVE_NET is not set -# CONFIG_ARCH_HAVE_PHY is not set -# CONFIG_NET is not set - -# -# Crypto API -# -# CONFIG_CRYPTO is not set - -# -# File Systems -# - -# -# File system configuration -# -CONFIG_DISABLE_MOUNTPOINT=y -CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y -# CONFIG_FS_READABLE is not set -# CONFIG_FS_WRITABLE is not set -# CONFIG_FS_NAMED_SEMAPHORES is not set -# CONFIG_FS_RAMMAP is not set -# CONFIG_FS_PROCFS is not set -# CONFIG_FS_UNIONFS is not set - -# -# Graphics Support -# -# CONFIG_NX is not set - -# -# Memory Management -# -CONFIG_MM_SMALL=y -CONFIG_MM_REGIONS=1 -# CONFIG_ARCH_HAVE_HEAP2 is not set -# CONFIG_GRAN is not set - -# -# Audio Support -# -# CONFIG_AUDIO is not set - -# -# Wireless Support -# -# CONFIG_WIRELESS is not set - -# -# Binary Loader -# -# CONFIG_BINFMT_DISABLE is not set -# CONFIG_NXFLAT is not set -# CONFIG_ELF is not set -# CONFIG_BUILTIN is not set -# CONFIG_PIC is not set -# CONFIG_SYMTAB_ORDEREDBYNAME is not set - -# -# Library Routines -# - -# -# Standard C Library Options -# -CONFIG_STDIO_BUFFER_SIZE=0 -CONFIG_STDIO_LINEBUFFER=y -CONFIG_NUNGET_CHARS=0 -# CONFIG_LIBM is not set -CONFIG_NOPRINTF_FIELDWIDTH=y -# CONFIG_LIBC_FLOATINGPOINT is not set -# CONFIG_LIBC_LONG_LONG is not set -# CONFIG_LIBC_IOCTL_VARIADIC is not set -CONFIG_LIB_RAND_ORDER=1 -# CONFIG_EOL_IS_CR is not set -# CONFIG_EOL_IS_LF is not set -# CONFIG_EOL_IS_BOTH_CRLF is not set -CONFIG_EOL_IS_EITHER_CRLF=y -# CONFIG_LIBC_EXECFUNCS is not set -CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 -CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=1536 -# CONFIG_LIBC_STRERROR is not set -# CONFIG_LIBC_PERROR_STDOUT is not set -CONFIG_ARCH_LOWPUTC=y -# CONFIG_TIME_EXTENDED is not set -CONFIG_LIB_SENDFILE_BUFSIZE=512 -# CONFIG_ARCH_ROMGETC is not set -# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set -CONFIG_ARCH_HAVE_TLS=y -# CONFIG_TLS is not set -# CONFIG_LIBC_NETDB is not set - -# -# Non-standard Library Support -# -# CONFIG_LIB_CRC64_FAST is not set -# CONFIG_LIB_KBDCODEC is not set -# CONFIG_LIB_SLCDCODEC is not set - -# -# Basic CXX Support -# -# CONFIG_C99_BOOL8 is not set -# CONFIG_HAVE_CXX is not set - -# -# Application Configuration -# - -# -# CAN Utilities -# - -# -# Examples -# -# CONFIG_EXAMPLES_CHAT is not set -# CONFIG_EXAMPLES_CONFIGDATA is not set -# CONFIG_EXAMPLES_CPUHOG is not set -# CONFIG_EXAMPLES_DHCPD is not set -# CONFIG_EXAMPLES_ELF is not set -# CONFIG_EXAMPLES_FTPC is not set -# CONFIG_EXAMPLES_FTPD is not set -# CONFIG_EXAMPLES_HELLO is not set -# CONFIG_EXAMPLES_HIDKBD is not set -# CONFIG_EXAMPLES_IGMP is not set -# CONFIG_EXAMPLES_JSON is not set -# CONFIG_EXAMPLES_KEYPADTEST is not set -# CONFIG_EXAMPLES_MEDIA is not set -# CONFIG_EXAMPLES_MM is not set -# CONFIG_EXAMPLES_MODBUS is not set -# CONFIG_EXAMPLES_MOUNT is not set -# CONFIG_EXAMPLES_NRF24L01TERM is not set -CONFIG_EXAMPLES_NSH=y -# CONFIG_EXAMPLES_NULL is not set -# CONFIG_EXAMPLES_NX is not set -# CONFIG_EXAMPLES_NXFFS is not set -# CONFIG_EXAMPLES_NXHELLO is not set -# CONFIG_EXAMPLES_NXIMAGE is not set -# CONFIG_EXAMPLES_NXLINES is not set -# CONFIG_EXAMPLES_NXTERM is not set -# CONFIG_EXAMPLES_NXTEXT is not set -# CONFIG_EXAMPLES_OSTEST is not set -# CONFIG_EXAMPLES_PCA9635 is not set -# CONFIG_EXAMPLES_PIPE is not set -# CONFIG_EXAMPLES_POLL is not set -# CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_PPPD is not set -# CONFIG_EXAMPLES_RGBLED is not set -# CONFIG_EXAMPLES_SENDMAIL is not set -# CONFIG_EXAMPLES_SERIALBLASTER is not set -# CONFIG_EXAMPLES_SERIALRX is not set -# CONFIG_EXAMPLES_SERLOOP is not set -# CONFIG_EXAMPLES_SLCD is not set -# CONFIG_EXAMPLES_SMART is not set -# CONFIG_EXAMPLES_SMP is not set -# CONFIG_EXAMPLES_TCPECHO is not set -# CONFIG_EXAMPLES_TELNETD is not set -# CONFIG_EXAMPLES_TIFF is not set -# CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_USBTERM is not set -# CONFIG_EXAMPLES_WATCHDOG is not set -# CONFIG_EXAMPLES_WEBSERVER is not set - -# -# File System Utilities -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# GPS Utilities -# -# CONFIG_GPSUTILS_MINMEA_LIB is not set - -# -# Graphics Support -# -# CONFIG_TIFF is not set -# CONFIG_GRAPHICS_TRAVELER is not set - -# -# Interpreters -# -# CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_MICROPYTHON is not set -# CONFIG_INTERPRETERS_PCODE is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set - -# -# Network Utilities -# -# CONFIG_NETUTILS_CODECS is not set -# CONFIG_NETUTILS_ESP8266 is not set -# CONFIG_NETUTILS_FTPC is not set -# CONFIG_NETUTILS_JSON is not set -# CONFIG_NETUTILS_SMTP is not set - -# -# NSH Library -# -CONFIG_NSH_LIBRARY=y -# CONFIG_NSH_MOTD is not set - -# -# Command Line Configuration -# -CONFIG_NSH_READLINE=y -# CONFIG_NSH_CLE is not set -CONFIG_NSH_LINELEN=80 -CONFIG_NSH_DISABLE_SEMICOLON=y -CONFIG_NSH_MAXARGUMENTS=6 -# CONFIG_NSH_ARGCAT is not set -CONFIG_NSH_NESTDEPTH=3 -# CONFIG_NSH_DISABLEBG is not set - -# -# Disable Individual commands -# -CONFIG_NSH_DISABLE_ADDROUTE=y -CONFIG_NSH_DISABLE_BASENAME=y -# CONFIG_NSH_DISABLE_CAT is not set -CONFIG_NSH_DISABLE_CD=y -CONFIG_NSH_DISABLE_CP=y -# CONFIG_NSH_DISABLE_CMP is not set -CONFIG_NSH_DISABLE_DATE=y -CONFIG_NSH_DISABLE_DD=y -CONFIG_NSH_DISABLE_DF=y -CONFIG_NSH_DISABLE_DELROUTE=y -CONFIG_NSH_DISABLE_DIRNAME=y -# CONFIG_NSH_DISABLE_ECHO is not set -# CONFIG_NSH_DISABLE_EXEC is not set -# CONFIG_NSH_DISABLE_EXIT is not set -# CONFIG_NSH_DISABLE_FREE is not set -CONFIG_NSH_DISABLE_GET=y -# CONFIG_NSH_DISABLE_HELP is not set -# CONFIG_NSH_DISABLE_HEXDUMP is not set -CONFIG_NSH_DISABLE_IFCONFIG=y -CONFIG_NSH_DISABLE_IFUPDOWN=y -# CONFIG_NSH_DISABLE_KILL is not set -CONFIG_NSH_DISABLE_LOSETUP=y -CONFIG_NSH_DISABLE_LOSMART=y -# CONFIG_NSH_DISABLE_LS is not set -# CONFIG_NSH_DISABLE_MB is not set -CONFIG_NSH_DISABLE_MKDIR=y -# CONFIG_NSH_DISABLE_MKFIFO is not set -CONFIG_NSH_DISABLE_MKRD=y -# CONFIG_NSH_DISABLE_MH is not set -CONFIG_NSH_DISABLE_MOUNT=y -# CONFIG_NSH_DISABLE_MV is not set -# CONFIG_NSH_DISABLE_MW is not set -# CONFIG_NSH_DISABLE_PS is not set -CONFIG_NSH_DISABLE_PUT=y -# CONFIG_NSH_DISABLE_PWD is not set -CONFIG_NSH_DISABLE_RM=y -CONFIG_NSH_DISABLE_RMDIR=y -# CONFIG_NSH_DISABLE_SET is not set -# CONFIG_NSH_DISABLE_SH is not set -# CONFIG_NSH_DISABLE_SLEEP is not set -CONFIG_NSH_DISABLE_TIME=y -# CONFIG_NSH_DISABLE_TEST is not set -CONFIG_NSH_DISABLE_UMOUNT=y -CONFIG_NSH_DISABLE_UNAME=y -# CONFIG_NSH_DISABLE_UNSET is not set -# CONFIG_NSH_DISABLE_USLEEP is not set -CONFIG_NSH_DISABLE_WGET=y -# CONFIG_NSH_DISABLE_XD is not set - -# -# Configure Command Options -# -CONFIG_NSH_CODECS_BUFSIZE=128 -# CONFIG_NSH_CMDOPT_HEXDUMP is not set -CONFIG_NSH_FILEIOSIZE=64 - -# -# Scripting Support -# -CONFIG_NSH_DISABLESCRIPT=y - -# -# Console Configuration -# -CONFIG_NSH_CONSOLE=y -# CONFIG_NSH_ALTCONDEV is not set -# CONFIG_NSH_ARCHINIT is not set -# CONFIG_NSH_LOGIN is not set -# CONFIG_NSH_CONSOLE_LOGIN is not set - -# -# NxWidgets/NxWM -# - -# -# Platform-specific Support -# -# CONFIG_PLATFORM_CONFIGDATA is not set - -# -# System Libraries and NSH Add-Ons -# -# CONFIG_SYSTEM_CLE is not set -# CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_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/freedom-kl25z/minnsh/setenv.sh b/configs/freedom-kl25z/minnsh/setenv.sh deleted file mode 100755 index 2541df62fdf..00000000000 --- a/configs/freedom-kl25z/minnsh/setenv.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash -# configs/freedom-kl25z/minnsh/setenv.sh -# -# 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. -# - -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" - -# 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/freedom-kl25z/nsh/defconfig b/configs/freedom-kl25z/nsh/defconfig index 25a5f7e7e94..4ce766e4e74 100644 --- a/configs/freedom-kl25z/nsh/defconfig +++ b/configs/freedom-kl25z/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -429,7 +428,6 @@ CONFIG_PWM=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/freedom-kl26z/README.txt b/configs/freedom-kl26z/README.txt index 55f593c7d07..6237f71ad9f 100644 --- a/configs/freedom-kl26z/README.txt +++ b/configs/freedom-kl26z/README.txt @@ -272,93 +272,6 @@ instead of configure.sh: Where is one of the following: - minnsh: - ------ - - This is a experiment to see just how small we can get a usable NSH - configuration. This configuration has far fewer features than the nsh - configuration but is also a fraction of the size. - - This minnsh configuration is a "proof-of-concept" and not very usable in - its current state. This configuration was created by disabling - everything possible INCLUDING file system support. Without file system - support, NuttX is pretty much crippled. Here are some of the - consequences of disabling the file system: - - - All features that depend on the file system are lost: device drivers, - mountpoints, message queues, named semaphores. - - - Without device drivers, you cannot interact with the RTOS using POSIX - interfaces. You would have to work with NuttX as with those other - tiny RTOSs: As a scheduler and a callable hardare abstraction layer - (HAL). - - - You cannot use any of the NuttX upper half device drivers since they - depend on the pseudo-file system and device nodes. You can, of - course, continue to use the lower half drivers either directly. Or, - perhaps, you could write some custom minnsh upper half drivers that - do not depend on a file system and expose a HAL interface. - - There is a special version of readline() the NSH uses when there is no - file system. It uses a special up_putc() to write data to the console - and a special function up_getc() to read data from the console. - - - The current up_getc() implementationsa are a kludge. They are - analogous to the up_putc() implementations: They directly poll the - hardware for serial availability, locking up all lower priority tasks - in the entire system while they poll. So a version of NSH that uses - up_getc() essentially blocks the system until a character is received. - - This, of course, could be fixed by creating a special, upper half - implementation of the interrupt-driven serial lower half (like - stm32_serial) that just supports single character console I/O - (perhaps called up_putc and up_getc?). The NSH could wait for serial - input without blocking the system. But then that would increase the - footprint too. - - So although the minnsh configurations are a good starting point for - making things small, they not are really very practical. Why might - you want a NuttX minnsh solution? Perhaps you have software that runs - on a family of chips including some very tiny MCUs. Then perhaps having - the RTOS compatibility would justify the loss of functionality? - - You can re-enable the file system and (true) serial console with - these settings: - - Enable the file system: - CONFIG_NFILE_DESCRIPTORS=5 - CONFIG_NFILE_STREAMS=5 - - Enable the console device: - CONFIG_DEV_CONSOLE=y - - Disable most new NSH commands. Some like 'ls' are really mandatory - with a file system: - CONFIG_NSH_DISABLE_xxx=y - - Enable the upper half serial driver: - CONFIG_SERIAL=y - CONFIG_STANDARD_SERIAL=y - - Enable the USART1 serial driver: - CONFIG_STM32_USART1=y - CONFIG_STM32_USART1_SERIALDRIVER=y - CONFIG_USART1_SERIAL_CONSOLE=y - - CONFIG_USART1_2STOP=0 - CONFIG_USART1_BAUD=115200 - CONFIG_USART1_BITS=8 - CONFIG_USART1_PARITY=0 - CONFIG_USART1_RXBUFSIZE=16 - CONFIG_USART1_TXBUFSIZE=16 - - With these changes, NSH should behave better and we preserve the device - driver interface. But this result in a total size increase of about - 7KB: That is about 5KB of additional OS support for the file system and - serial console PLUS about 2KB for the 'ls' command logic (including OS - support for opendir(), readdir(), closedir(), stat(), and probably other - things). - nsh: --- Configures the NuttShell (nsh) located at apps/examples/nsh. The diff --git a/configs/freedom-kl26z/minnsh/defconfig b/configs/freedom-kl26z/minnsh/defconfig deleted file mode 100644 index 480cd09801a..00000000000 --- a/configs/freedom-kl26z/minnsh/defconfig +++ /dev/null @@ -1,799 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Nuttx/ Configuration -# - -# -# Build Setup -# -CONFIG_EXPERIMENTAL=y -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=y -CONFIG_RAW_BINARY=y -# CONFIG_UBOOT_UIMAGE is not set - -# -# Customize Header Files -# -# CONFIG_ARCH_STDINT_H is not set -# CONFIG_ARCH_STDBOOL_H is not set -# CONFIG_ARCH_MATH_H is not set -# CONFIG_ARCH_FLOAT_H is not set -# CONFIG_ARCH_STDARG_H is not set -# CONFIG_ARCH_DEBUG_H is not set - -# -# Debug Options -# -# CONFIG_DEBUG_ALERT is not set -# CONFIG_DEBUG_FEATURES is not set -CONFIG_ARCH_HAVE_STACKCHECK=y -# CONFIG_STACK_COLORATION is not set -# CONFIG_ARCH_HAVE_HEAPCHECK 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_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=y -# CONFIG_ARCH_CHIP_LM is not set -# CONFIG_ARCH_CHIP_TIVA is not set -# CONFIG_ARCH_CHIP_LPC11XX is not set -# CONFIG_ARCH_CHIP_LPC17XX is not set -# CONFIG_ARCH_CHIP_LPC214X is not set -# CONFIG_ARCH_CHIP_LPC2378 is not set -# CONFIG_ARCH_CHIP_LPC31XX is not set -# CONFIG_ARCH_CHIP_LPC43XX is not set -# CONFIG_ARCH_CHIP_NUC1XX is not set -# CONFIG_ARCH_CHIP_SAMA5 is not set -# CONFIG_ARCH_CHIP_SAMD is not set -# CONFIG_ARCH_CHIP_SAML is not set -# CONFIG_ARCH_CHIP_SAM34 is not set -# CONFIG_ARCH_CHIP_SAMV7 is not set -# CONFIG_ARCH_CHIP_STM32 is not set -# CONFIG_ARCH_CHIP_STM32F7 is not set -# CONFIG_ARCH_CHIP_STM32L4 is not set -# CONFIG_ARCH_CHIP_STR71X is not set -# CONFIG_ARCH_CHIP_TMS570 is not set -# CONFIG_ARCH_CHIP_MOXART is not set -# CONFIG_ARCH_ARM7TDMI is not set -# CONFIG_ARCH_ARM926EJS is not set -# CONFIG_ARCH_ARM920T is not set -CONFIG_ARCH_CORTEXM0=y -# CONFIG_ARCH_CORTEXM3 is not set -# CONFIG_ARCH_CORTEXM4 is not set -# CONFIG_ARCH_CORTEXM7 is not set -# CONFIG_ARCH_CORTEXA5 is not set -# CONFIG_ARCH_CORTEXA8 is not set -# CONFIG_ARCH_CORTEXA9 is not set -# CONFIG_ARCH_CORTEXR4 is not set -# CONFIG_ARCH_CORTEXR4F is not set -# CONFIG_ARCH_CORTEXR5 is not set -# CONFIG_ARCH_CORTEX5F is not set -# CONFIG_ARCH_CORTEXR7 is not set -# CONFIG_ARCH_CORTEXR7F is not set -CONFIG_ARCH_FAMILY="armv6-m" -CONFIG_ARCH_CHIP="kl" -# CONFIG_ARM_TOOLCHAIN_IAR is not set -# CONFIG_ARM_TOOLCHAIN_GNU is not set -CONFIG_ARCH_HAVE_CMNVECTOR=y -# CONFIG_ARMV7M_CMNVECTOR is not set -# CONFIG_ARMV7M_LAZYFPU is not set -# CONFIG_ARCH_HAVE_FPU is not set -# CONFIG_ARCH_HAVE_DPFPU is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set -# CONFIG_ARM_HAVE_MPU_UNIFIED is not set - -# -# ARMV6M Configuration Options -# -# CONFIG_ARMV6M_TOOLCHAIN_BUILDROOT is not set -# 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 -# -# CONFIG_ARCH_CHIP_MKL25Z64 is not set -# CONFIG_ARCH_CHIP_MKL25Z128 is not set -CONFIG_ARCH_CHIP_MKL26Z128=y -CONFIG_ARCH_FAMILY_KL2X=y - -# -# Kinetis Peripheral Support -# -# CONFIG_KL_TRACE is not set -# CONFIG_KL_FLEXBUS is not set -CONFIG_KL_UART0=y -# CONFIG_KL_UART1 is not set -# CONFIG_KL_UART2 is not set -# CONFIG_KL_FLEXCAN0 is not set -# CONFIG_KL_FLEXCAN1 is not set -CONFIG_KL_SPI0=y -CONFIG_KL_SPI1=y -# CONFIG_KL_SPI2 is not set -# CONFIG_KL_I2C0 is not set -# CONFIG_KL_I2C1 is not set -# CONFIG_KL_I2S is not set -# CONFIG_KL_DAC0 is not set -# CONFIG_KL_DAC1 is not set -# CONFIG_KL_ADC0 is not set -# CONFIG_KL_ADC1 is not set -# CONFIG_KL_CMP is not set -# CONFIG_KL_VREF is not set -# CONFIG_KL_TPM0 is not set -# CONFIG_KL_TPM1 is not set -# CONFIG_KL_TPM2 is not set -# CONFIG_KL_LPTIMER is not set -# CONFIG_KL_RTC is not set -# CONFIG_KL_EWM is not set -# CONFIG_KL_CMT is not set -# CONFIG_KL_USBOTG is not set -# CONFIG_KL_USBDCD is not set -# CONFIG_KL_LLWU is not set -# CONFIG_KL_TSI is not set -# CONFIG_KL_FTFL is not set -# CONFIG_KL_DMA is not set -# CONFIG_KL_CRC is not set -# CONFIG_KL_PDB is not set -# CONFIG_KL_PIT is not set -CONFIG_KL_SYSTICK_CORECLK=y -# CONFIG_KL_SYSTICK_CORECLK_DIV16 is not set - -# -# Kinetis GPIO Interrupt 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 is not set -# CONFIG_ARCH_NAND_HWECC is not set -# CONFIG_ARCH_HAVE_EXTCLK is not set -# CONFIG_ARCH_HAVE_POWEROFF is not set -CONFIG_ARCH_HAVE_RESET=y -# CONFIG_ARCH_IRQPRIO is not set -# CONFIG_ARCH_STACKDUMP is not set -# CONFIG_ENDIAN_BIG is not set -# CONFIG_ARCH_IDLE_CUSTOM is not set -# CONFIG_ARCH_HAVE_RAMFUNCS is not set -# CONFIG_ARCH_HAVE_RAMVECTORS is not set - -# -# Board Settings -# -CONFIG_BOARD_LOOPSPERMSEC=2988 -# CONFIG_ARCH_CALIBRATION is not set - -# -# Interrupt options -# -CONFIG_ARCH_HAVE_INTERRUPTSTACK=y -CONFIG_ARCH_INTERRUPTSTACK=0 -# CONFIG_ARCH_HAVE_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=0x1FFFF000 -CONFIG_RAM_SIZE=16384 -# CONFIG_ARCH_HAVE_SDRAM is not set - -# -# Board Selection -# -CONFIG_ARCH_BOARD_FREEDOM_KL26Z=y -# CONFIG_ARCH_BOARD_CUSTOM is not set -CONFIG_ARCH_BOARD="freedom-kl26z" - -# -# Common Board Options -# -CONFIG_ARCH_HAVE_LEDS=y -CONFIG_ARCH_LEDS=y -CONFIG_NSH_MMCSDMINOR=0 - -# -# Board-Specific Options -# -# CONFIG_LIB_BOARDCTL is not set - -# -# RTOS Features -# -CONFIG_DISABLE_OS_API=y -CONFIG_DISABLE_POSIX_TIMERS=y -CONFIG_DISABLE_PTHREAD=y -CONFIG_DISABLE_SIGNALS=y -CONFIG_DISABLE_MQUEUE=y -CONFIG_DISABLE_ENVIRON=y - -# -# Clocks and Timers -# -CONFIG_USEC_PER_TICK=10000 -# CONFIG_SYSTEM_TIME64 is not set -# CONFIG_CLOCK_MONOTONIC is not set -# CONFIG_JULIAN_TIME is not set -CONFIG_START_YEAR=2013 -CONFIG_START_MONTH=2 -CONFIG_START_DAY=26 -CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=4 -CONFIG_WDOG_INTRESERVE=0 -CONFIG_PREALLOC_TIMERS=0 - -# -# Tasks and Scheduling -# -# CONFIG_SPINLOCK is not set -# CONFIG_INIT_NONE is not set -CONFIG_INIT_ENTRYPOINT=y -# CONFIG_INIT_FILEPATH is not set -CONFIG_USER_ENTRYPOINT="nsh_main" -CONFIG_RR_INTERVAL=0 -# CONFIG_SCHED_SPORADIC is not set -CONFIG_TASK_NAME_SIZE=0 -CONFIG_MAX_TASKS=8 -# CONFIG_SCHED_HAVE_PARENT is not set -# CONFIG_SCHED_WAITPID is not set - -# -# Performance Monitoring -# -# CONFIG_SCHED_CPULOAD is not set -# CONFIG_SCHED_INSTRUMENTATION is not set - -# -# Files and I/O -# -# CONFIG_DEV_CONSOLE is not set -CONFIG_FDCLONE_DISABLE=y -# CONFIG_FDCLONE_STDIO is not set -CONFIG_SDCLONE_DISABLE=y -CONFIG_NFILE_DESCRIPTORS=0 -CONFIG_NFILE_STREAMS=0 -CONFIG_NAME_MAX=32 -# CONFIG_PRIORITY_INHERITANCE is not set - -# -# RTOS hooks -# -# CONFIG_BOARD_INITIALIZE is not set -# CONFIG_SCHED_STARTHOOK is not set -# CONFIG_SCHED_ATEXIT is not set -# CONFIG_SCHED_ONEXIT is not set -# CONFIG_MODULE is not set - -# -# Work queue support -# - -# -# Stack and heap information -# -CONFIG_IDLETHREAD_STACKSIZE=1024 -CONFIG_USERMAIN_STACKSIZE=1536 -CONFIG_PTHREAD_STACK_MIN=256 -CONFIG_PTHREAD_STACK_DEFAULT=1536 -# CONFIG_LIB_SYSCALL is not set - -# -# Device Drivers -# -CONFIG_DISABLE_POLL=y -# CONFIG_DEV_NULL is not set -# CONFIG_DEV_ZERO is not set -# CONFIG_DEV_LOOP is not set - -# -# Buffering -# -# CONFIG_DRVR_WRITEBUFFER is not set -# CONFIG_DRVR_READAHEAD is not set -# CONFIG_RAMDISK is not set -# CONFIG_CAN is not set -# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set -# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set -# CONFIG_PWM is not set -# CONFIG_ARCH_HAVE_I2CRESET is not set -# CONFIG_I2C is not set -CONFIG_SPI=y -# CONFIG_SPI_SLAVE is not set -CONFIG_SPI_EXCHANGE=y -# CONFIG_SPI_CMDDATA is not set -# CONFIG_SPI_CALLBACK is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_HWFEATURES is not set -# CONFIG_SPI_CRCGENERATION is not set -# CONFIG_SPI_CS_CONTROL is not set -# CONFIG_SPI_CS_DELAY_CONTROL is not set -# CONFIG_I2S is not set - -# -# Timer Driver Support -# -# CONFIG_TIMER is not set -# CONFIG_RTC is not set -# CONFIG_WATCHDOG is not set -# CONFIG_ANALOG is not set -# CONFIG_AUDIO_DEVICES is not set -# CONFIG_VIDEO_DEVICES is not set -# CONFIG_BCH is not set -# CONFIG_INPUT is not set -# CONFIG_IOEXPANDER is not set - -# -# LCD Driver Support -# -# CONFIG_LCD is not set -# CONFIG_SLCD is not set - -# -# LED Support -# -# CONFIG_USERLED is not set -# CONFIG_RGBLED is not set -# CONFIG_PCA9635PW is not set -# CONFIG_NCP5623C is not set -# CONFIG_MMCSD is not set -# CONFIG_MODEM is not set -# CONFIG_MTD is not set -# CONFIG_EEPROM is not set -# CONFIG_PIPES is not set -# CONFIG_PM is not set -# CONFIG_POWER is not set -# CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set -CONFIG_SERIAL=y -# CONFIG_SERIAL_REMOVABLE is not set -CONFIG_SERIAL_CONSOLE=y -# CONFIG_16550_UART is not set -# CONFIG_UART_SERIALDRIVER is not set -CONFIG_UART0_SERIALDRIVER=y -# CONFIG_UART1_SERIALDRIVER is not set -# CONFIG_UART2_SERIALDRIVER is not set -# CONFIG_UART3_SERIALDRIVER is not set -# CONFIG_UART4_SERIALDRIVER is not set -# CONFIG_UART5_SERIALDRIVER is not set -# CONFIG_UART6_SERIALDRIVER is not set -# CONFIG_UART7_SERIALDRIVER is not set -# CONFIG_UART8_SERIALDRIVER is not set -# CONFIG_SCI0_SERIALDRIVER is not set -# CONFIG_SCI1_SERIALDRIVER is not set -# CONFIG_USART0_SERIALDRIVER is not set -# CONFIG_USART1_SERIALDRIVER is not set -# CONFIG_USART2_SERIALDRIVER is not set -# CONFIG_USART3_SERIALDRIVER is not set -# CONFIG_USART4_SERIALDRIVER is not set -# CONFIG_USART5_SERIALDRIVER is not set -# CONFIG_USART6_SERIALDRIVER is not set -# CONFIG_USART7_SERIALDRIVER is not set -# CONFIG_USART8_SERIALDRIVER is not set -# CONFIG_OTHER_UART_SERIALDRIVER is not set -CONFIG_MCU_SERIAL=y -# CONFIG_STANDARD_SERIAL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set -# CONFIG_SERIAL_DMA is not set -# CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set -CONFIG_UART0_SERIAL_CONSOLE=y -# CONFIG_OTHER_SERIAL_CONSOLE is not set -# CONFIG_NO_SERIAL_CONSOLE is not set - -# -# UART0 Configuration -# -CONFIG_UART0_RXBUFSIZE=256 -CONFIG_UART0_TXBUFSIZE=256 -CONFIG_UART0_BAUD=115200 -CONFIG_UART0_BITS=8 -CONFIG_UART0_PARITY=0 -CONFIG_UART0_2STOP=0 -# CONFIG_UART0_IFLOWCONTROL is not set -# CONFIG_UART0_OFLOWCONTROL is not set -# CONFIG_UART0_DMA is not set -# CONFIG_USBDEV is not set -# CONFIG_USBHOST is not set -# CONFIG_DRIVERS_WIRELESS is not set - -# -# System Logging -# -# CONFIG_ARCH_SYSLOG is not set -# CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_INTBUFFER is not set -# CONFIG_SYSLOG_TIMESTAMP is not set -# CONFIG_SYSLOG_SERIAL_CONSOLE is not set -# CONFIG_SYSLOG_CHAR is not set -CONFIG_SYSLOG_NONE=y -# CONFIG_SYSLOG_FILE is not set - -# -# Networking Support -# -# CONFIG_ARCH_HAVE_NET is not set -# CONFIG_ARCH_HAVE_PHY is not set -# CONFIG_NET is not set - -# -# Crypto API -# -# CONFIG_CRYPTO is not set - -# -# File Systems -# - -# -# File system configuration -# -CONFIG_DISABLE_MOUNTPOINT=y -CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y -# CONFIG_FS_READABLE is not set -# CONFIG_FS_WRITABLE is not set -# CONFIG_FS_NAMED_SEMAPHORES is not set -# CONFIG_FS_RAMMAP is not set -# CONFIG_FS_PROCFS is not set -# CONFIG_FS_UNIONFS is not set - -# -# Graphics Support -# -# CONFIG_NX is not set - -# -# Memory Management -# -CONFIG_MM_SMALL=y -CONFIG_MM_REGIONS=1 -# CONFIG_ARCH_HAVE_HEAP2 is not set -# CONFIG_GRAN is not set - -# -# Audio Support -# -# CONFIG_AUDIO is not set - -# -# Wireless Support -# -# CONFIG_WIRELESS is not set - -# -# Binary Loader -# -# CONFIG_BINFMT_DISABLE is not set -# CONFIG_NXFLAT is not set -# CONFIG_ELF is not set -# CONFIG_BUILTIN is not set -# CONFIG_PIC is not set -# CONFIG_SYMTAB_ORDEREDBYNAME is not set - -# -# Library Routines -# - -# -# Standard C Library Options -# -CONFIG_STDIO_BUFFER_SIZE=0 -CONFIG_STDIO_LINEBUFFER=y -CONFIG_NUNGET_CHARS=0 -# CONFIG_LIBM is not set -CONFIG_NOPRINTF_FIELDWIDTH=y -# CONFIG_LIBC_FLOATINGPOINT is not set -# CONFIG_LIBC_LONG_LONG is not set -# CONFIG_LIBC_IOCTL_VARIADIC is not set -CONFIG_LIB_RAND_ORDER=1 -# CONFIG_EOL_IS_CR is not set -# CONFIG_EOL_IS_LF is not set -# CONFIG_EOL_IS_BOTH_CRLF is not set -CONFIG_EOL_IS_EITHER_CRLF=y -# CONFIG_LIBC_EXECFUNCS is not set -CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 -CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=1536 -# CONFIG_LIBC_STRERROR is not set -# CONFIG_LIBC_PERROR_STDOUT is not set -CONFIG_ARCH_LOWPUTC=y -# CONFIG_TIME_EXTENDED is not set -CONFIG_LIB_SENDFILE_BUFSIZE=512 -# CONFIG_ARCH_ROMGETC is not set -# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set -CONFIG_ARCH_HAVE_TLS=y -# CONFIG_TLS is not set -# CONFIG_LIBC_NETDB is not set - -# -# Non-standard Library Support -# -# CONFIG_LIB_CRC64_FAST is not set -# CONFIG_LIB_KBDCODEC is not set -# CONFIG_LIB_SLCDCODEC is not set - -# -# Basic CXX Support -# -# CONFIG_C99_BOOL8 is not set -# CONFIG_HAVE_CXX is not set - -# -# Application Configuration -# - -# -# CAN Utilities -# - -# -# Examples -# -# CONFIG_EXAMPLES_CHAT is not set -# CONFIG_EXAMPLES_CONFIGDATA is not set -# CONFIG_EXAMPLES_CPUHOG is not set -# CONFIG_EXAMPLES_DHCPD is not set -# CONFIG_EXAMPLES_ELF is not set -# CONFIG_EXAMPLES_FTPC is not set -# CONFIG_EXAMPLES_FTPD is not set -# CONFIG_EXAMPLES_HELLO is not set -# CONFIG_EXAMPLES_HIDKBD is not set -# CONFIG_EXAMPLES_IGMP is not set -# CONFIG_EXAMPLES_JSON is not set -# CONFIG_EXAMPLES_KEYPADTEST is not set -# CONFIG_EXAMPLES_MEDIA is not set -# CONFIG_EXAMPLES_MM is not set -# CONFIG_EXAMPLES_MODBUS is not set -# CONFIG_EXAMPLES_MOUNT is not set -# CONFIG_EXAMPLES_NRF24L01TERM is not set -CONFIG_EXAMPLES_NSH=y -# CONFIG_EXAMPLES_NULL is not set -# CONFIG_EXAMPLES_NX is not set -# CONFIG_EXAMPLES_NXFFS is not set -# CONFIG_EXAMPLES_NXHELLO is not set -# CONFIG_EXAMPLES_NXIMAGE is not set -# CONFIG_EXAMPLES_NXLINES is not set -# CONFIG_EXAMPLES_NXTERM is not set -# CONFIG_EXAMPLES_NXTEXT is not set -# CONFIG_EXAMPLES_OSTEST is not set -# CONFIG_EXAMPLES_PCA9635 is not set -# CONFIG_EXAMPLES_PIPE is not set -# CONFIG_EXAMPLES_POLL is not set -# CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_PPPD is not set -# CONFIG_EXAMPLES_RGBLED is not set -# CONFIG_EXAMPLES_SENDMAIL is not set -# CONFIG_EXAMPLES_SERIALBLASTER is not set -# CONFIG_EXAMPLES_SERIALRX is not set -# CONFIG_EXAMPLES_SERLOOP is not set -# CONFIG_EXAMPLES_SLCD is not set -# CONFIG_EXAMPLES_SMART is not set -# CONFIG_EXAMPLES_SMP is not set -# CONFIG_EXAMPLES_TCPECHO is not set -# CONFIG_EXAMPLES_TELNETD is not set -# CONFIG_EXAMPLES_TIFF is not set -# CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_USBTERM is not set -# CONFIG_EXAMPLES_WATCHDOG is not set -# CONFIG_EXAMPLES_WEBSERVER is not set - -# -# File System Utilities -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# GPS Utilities -# -# CONFIG_GPSUTILS_MINMEA_LIB is not set - -# -# Graphics Support -# -# CONFIG_TIFF is not set -# CONFIG_GRAPHICS_TRAVELER is not set - -# -# Interpreters -# -# CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_MICROPYTHON is not set -# CONFIG_INTERPRETERS_PCODE is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set - -# -# Network Utilities -# -# CONFIG_NETUTILS_CODECS is not set -# CONFIG_NETUTILS_ESP8266 is not set -# CONFIG_NETUTILS_FTPC is not set -# CONFIG_NETUTILS_JSON is not set -# CONFIG_NETUTILS_SMTP is not set - -# -# NSH Library -# -CONFIG_NSH_LIBRARY=y -# CONFIG_NSH_MOTD is not set - -# -# Command Line Configuration -# -CONFIG_NSH_READLINE=y -# CONFIG_NSH_CLE is not set -CONFIG_NSH_LINELEN=80 -CONFIG_NSH_DISABLE_SEMICOLON=y -CONFIG_NSH_MAXARGUMENTS=6 -# CONFIG_NSH_ARGCAT is not set -CONFIG_NSH_NESTDEPTH=3 -# CONFIG_NSH_DISABLEBG is not set - -# -# Disable Individual commands -# -CONFIG_NSH_DISABLE_ADDROUTE=y -CONFIG_NSH_DISABLE_BASENAME=y -# CONFIG_NSH_DISABLE_CAT is not set -CONFIG_NSH_DISABLE_CD=y -CONFIG_NSH_DISABLE_CP=y -# CONFIG_NSH_DISABLE_CMP is not set -CONFIG_NSH_DISABLE_DATE=y -CONFIG_NSH_DISABLE_DD=y -CONFIG_NSH_DISABLE_DF=y -CONFIG_NSH_DISABLE_DELROUTE=y -CONFIG_NSH_DISABLE_DIRNAME=y -# CONFIG_NSH_DISABLE_ECHO is not set -# CONFIG_NSH_DISABLE_EXEC is not set -# CONFIG_NSH_DISABLE_EXIT is not set -# CONFIG_NSH_DISABLE_FREE is not set -CONFIG_NSH_DISABLE_GET=y -# CONFIG_NSH_DISABLE_HELP is not set -# CONFIG_NSH_DISABLE_HEXDUMP is not set -CONFIG_NSH_DISABLE_IFCONFIG=y -CONFIG_NSH_DISABLE_IFUPDOWN=y -# CONFIG_NSH_DISABLE_KILL is not set -CONFIG_NSH_DISABLE_LOSETUP=y -CONFIG_NSH_DISABLE_LOSMART=y -# CONFIG_NSH_DISABLE_LS is not set -# CONFIG_NSH_DISABLE_MB is not set -CONFIG_NSH_DISABLE_MKDIR=y -# CONFIG_NSH_DISABLE_MKFIFO is not set -CONFIG_NSH_DISABLE_MKRD=y -# CONFIG_NSH_DISABLE_MH is not set -CONFIG_NSH_DISABLE_MOUNT=y -# CONFIG_NSH_DISABLE_MV is not set -# CONFIG_NSH_DISABLE_MW is not set -# CONFIG_NSH_DISABLE_PS is not set -CONFIG_NSH_DISABLE_PUT=y -# CONFIG_NSH_DISABLE_PWD is not set -CONFIG_NSH_DISABLE_RM=y -CONFIG_NSH_DISABLE_RMDIR=y -# CONFIG_NSH_DISABLE_SET is not set -# CONFIG_NSH_DISABLE_SH is not set -# CONFIG_NSH_DISABLE_SLEEP is not set -CONFIG_NSH_DISABLE_TIME=y -# CONFIG_NSH_DISABLE_TEST is not set -CONFIG_NSH_DISABLE_UMOUNT=y -CONFIG_NSH_DISABLE_UNAME=y -# CONFIG_NSH_DISABLE_UNSET is not set -# CONFIG_NSH_DISABLE_USLEEP is not set -CONFIG_NSH_DISABLE_WGET=y -# CONFIG_NSH_DISABLE_XD is not set - -# -# Configure Command Options -# -CONFIG_NSH_CODECS_BUFSIZE=128 -# CONFIG_NSH_CMDOPT_HEXDUMP is not set -CONFIG_NSH_FILEIOSIZE=64 - -# -# Scripting Support -# -CONFIG_NSH_DISABLESCRIPT=y - -# -# Console Configuration -# -CONFIG_NSH_CONSOLE=y -# CONFIG_NSH_ALTCONDEV is not set -# CONFIG_NSH_ARCHINIT is not set -# CONFIG_NSH_LOGIN is not set -# CONFIG_NSH_CONSOLE_LOGIN is not set - -# -# NxWidgets/NxWM -# - -# -# Platform-specific Support -# -# CONFIG_PLATFORM_CONFIGDATA is not set - -# -# System Libraries and NSH Add-Ons -# -# CONFIG_SYSTEM_CLE is not set -# CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_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/freedom-kl26z/minnsh/setenv.sh b/configs/freedom-kl26z/minnsh/setenv.sh deleted file mode 100755 index 755c02b4b6b..00000000000 --- a/configs/freedom-kl26z/minnsh/setenv.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash -# configs/freedom-kl26z/minnsh/setenv.sh -# -# Copyright (C) 2015 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -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/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/freedom-kl26z/nsh/defconfig b/configs/freedom-kl26z/nsh/defconfig index cfd523f6c26..34ecf777454 100644 --- a/configs/freedom-kl26z/nsh/defconfig +++ b/configs/freedom-kl26z/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -423,7 +422,6 @@ CONFIG_PWM=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/hymini-stm32v/nsh/defconfig b/configs/hymini-stm32v/nsh/defconfig index 6b5e138135a..54662444e90 100644 --- a/configs/hymini-stm32v/nsh/defconfig +++ b/configs/hymini-stm32v/nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -741,7 +740,6 @@ CONFIG_SDIO_PREFLIGHT=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/hymini-stm32v/nsh2/defconfig b/configs/hymini-stm32v/nsh2/defconfig index 32def3b8bf2..6998b185dc0 100644 --- a/configs/hymini-stm32v/nsh2/defconfig +++ b/configs/hymini-stm32v/nsh2/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -838,7 +837,6 @@ CONFIG_SDIO_PREFLIGHT=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/hymini-stm32v/usbmsc/defconfig b/configs/hymini-stm32v/usbmsc/defconfig index b85dca84bcc..9d5759bf6cd 100644 --- a/configs/hymini-stm32v/usbmsc/defconfig +++ b/configs/hymini-stm32v/usbmsc/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -747,7 +746,6 @@ CONFIG_SDIO_PREFLIGHT=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/hymini-stm32v/usbnsh/defconfig b/configs/hymini-stm32v/usbnsh/defconfig index a806aa165c2..2d2497ca471 100644 --- a/configs/hymini-stm32v/usbnsh/defconfig +++ b/configs/hymini-stm32v/usbnsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -734,7 +733,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y diff --git a/configs/hymini-stm32v/usbserial/defconfig b/configs/hymini-stm32v/usbserial/defconfig index e8e85f29337..13be18558cd 100644 --- a/configs/hymini-stm32v/usbserial/defconfig +++ b/configs/hymini-stm32v/usbserial/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -721,7 +720,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y diff --git a/configs/kwikstik-k40/ostest/defconfig b/configs/kwikstik-k40/ostest/defconfig index f0d1a49614c..4ea31a1c0f7 100644 --- a/configs/kwikstik-k40/ostest/defconfig +++ b/configs/kwikstik-k40/ostest/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -464,7 +463,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/launchxl-tms57004/nsh/defconfig b/configs/launchxl-tms57004/nsh/defconfig index c10cf4fdf6a..d59a2f60f5b 100644 --- a/configs/launchxl-tms57004/nsh/defconfig +++ b/configs/launchxl-tms57004/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -434,7 +433,6 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lincoln60/netnsh/defconfig b/configs/lincoln60/netnsh/defconfig index 4a351f8fbac..8e9cdf53c6c 100644 --- a/configs/lincoln60/netnsh/defconfig +++ b/configs/lincoln60/netnsh/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -544,7 +543,6 @@ CONFIG_ETH0_PHY_KSZ8041=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lincoln60/nsh/defconfig b/configs/lincoln60/nsh/defconfig index 9dbec58c1d0..31e8eae34ac 100644 --- a/configs/lincoln60/nsh/defconfig +++ b/configs/lincoln60/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -463,7 +462,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lincoln60/thttpd-binfs/defconfig b/configs/lincoln60/thttpd-binfs/defconfig index 90f3ac8b549..f1d8ab9bbfc 100644 --- a/configs/lincoln60/thttpd-binfs/defconfig +++ b/configs/lincoln60/thttpd-binfs/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -526,7 +525,6 @@ 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=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lm3s6432-s2e/nsh/defconfig b/configs/lm3s6432-s2e/nsh/defconfig index afd56298329..6212b42fab1 100644 --- a/configs/lm3s6432-s2e/nsh/defconfig +++ b/configs/lm3s6432-s2e/nsh/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -530,7 +529,6 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lm3s6965-ek/discover/defconfig b/configs/lm3s6965-ek/discover/defconfig index defeaed79ca..265299c608e 100644 --- a/configs/lm3s6965-ek/discover/defconfig +++ b/configs/lm3s6965-ek/discover/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -558,7 +557,6 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lm3s6965-ek/nsh/defconfig b/configs/lm3s6965-ek/nsh/defconfig index defeaed79ca..265299c608e 100644 --- a/configs/lm3s6965-ek/nsh/defconfig +++ b/configs/lm3s6965-ek/nsh/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -558,7 +557,6 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lm3s6965-ek/nx/defconfig b/configs/lm3s6965-ek/nx/defconfig index 0350c0ac987..fdc5c9c6328 100644 --- a/configs/lm3s6965-ek/nx/defconfig +++ b/configs/lm3s6965-ek/nx/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -542,7 +541,6 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lm3s6965-ek/tcpecho/defconfig b/configs/lm3s6965-ek/tcpecho/defconfig index 2142ed9137e..96af39bd221 100644 --- a/configs/lm3s6965-ek/tcpecho/defconfig +++ b/configs/lm3s6965-ek/tcpecho/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -529,7 +528,6 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lm3s8962-ek/nsh/defconfig b/configs/lm3s8962-ek/nsh/defconfig index 49acf3dc8c1..d834d65af4a 100644 --- a/configs/lm3s8962-ek/nsh/defconfig +++ b/configs/lm3s8962-ek/nsh/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -568,7 +567,6 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lm3s8962-ek/nx/defconfig b/configs/lm3s8962-ek/nx/defconfig index 4506f553cb2..92d68b951ce 100644 --- a/configs/lm3s8962-ek/nx/defconfig +++ b/configs/lm3s8962-ek/nx/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -552,7 +551,6 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lm4f120-launchpad/nsh/defconfig b/configs/lm4f120-launchpad/nsh/defconfig index 3f6d35f8259..759d63075b9 100644 --- a/configs/lm4f120-launchpad/nsh/defconfig +++ b/configs/lm4f120-launchpad/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -493,7 +492,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lpc4330-xplorer/nsh/defconfig b/configs/lpc4330-xplorer/nsh/defconfig index dd91ed8a783..6d0df578a25 100644 --- a/configs/lpc4330-xplorer/nsh/defconfig +++ b/configs/lpc4330-xplorer/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -481,7 +480,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lpc4337-ws/nsh/defconfig b/configs/lpc4337-ws/nsh/defconfig index 31c1ac48fe4..a462d6a1e4a 100644 --- a/configs/lpc4337-ws/nsh/defconfig +++ b/configs/lpc4337-ws/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -500,7 +499,6 @@ CONFIG_ADC_FIFOSIZE=8 # 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 diff --git a/configs/lpc4357-evb/nsh/defconfig b/configs/lpc4357-evb/nsh/defconfig index 7b59831c7bd..fda9ffd04cc 100644 --- a/configs/lpc4357-evb/nsh/defconfig +++ b/configs/lpc4357-evb/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -473,7 +472,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lpc4370-link2/nsh/defconfig b/configs/lpc4370-link2/nsh/defconfig index a7408155311..605c8168850 100644 --- a/configs/lpc4370-link2/nsh/defconfig +++ b/configs/lpc4370-link2/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -497,7 +496,6 @@ CONFIG_SPI=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y diff --git a/configs/lpcxpresso-lpc1115/README.txt b/configs/lpcxpresso-lpc1115/README.txt index bfe29dc6d50..168bed5198d 100644 --- a/configs/lpcxpresso-lpc1115/README.txt +++ b/configs/lpcxpresso-lpc1115/README.txt @@ -680,144 +680,6 @@ selected as follow: Where is one of the following: - minnsh: - ------ - - This is a experiment to see just how small we can get a usable NSH - configuration. This configuration has far fewer features than the nsh - configuration but is also a fraction of the size. - - This minnsh configuration is a "proof-of-concept" and not very usable in - its current state. This configuration was created by disabling - everything possible INCLUDING file system support. Without file system - support, NuttX is pretty much crippled. Here are some of the - consequences of disabling the file system: - - - All features that depend on the file system are lost: device drivers, - mountpoints, message queues, named semaphores. - - - Without device drivers, you cannot interact with the RTOS using POSIX - interfaces. You would have to work with NuttX as with those other - tiny RTOSs: As a scheduler and a callable hardare abstraction layer - (HAL). - - - You cannot use any of the NuttX upper half device drivers since they - depend on the pseudo-file system and device nodes. You can, of - course, continue to use the lower half drivers either directly. Or, - perhaps, you could write some custom minnsh upper half drivers that - do not depend on a file system and expose a HAL interface. - - There is a special version of readline() the NSH uses when there is no - file system. It uses a special up_putc() to write data to the console - and a special function up_getc() to read data from the console. - - - The current up_getc() implementationsa are a kludge. They are - analogous to the up_putc() implementations: They directly poll the - hardware for serial availability, locking up all lower priority tasks - in the entire system while they poll. So a version of NSH that uses - up_getc() essentially blocks the system until a character is received. - - This, of course, could be fixed by creating a special, upper half - implementation of the interrupt-driven serial lower half (like - stm32_serial) that just supports single character console I/O - (perhaps called up_putc and up_getc?). The NSH could wait for serial - input without blocking the system. But then that would increase the - footprint too. - - So although the minnsh configurations are a good starting point for - making things small, they not are really very practical. Why might - you want a NuttX minnsh solution? Perhaps you have software that runs - on a family of chips including some very tiny MCUs. Then perhaps having - the RTOS compatibility would justify the loss of functionality? - - You can re-enable the file system and (true) serial console with - these settings: - - Enable the file system: - CONFIG_NFILE_DESCRIPTORS=5 - CONFIG_NFILE_STREAMS=5 - - Enable the console device: - CONFIG_DEV_CONSOLE=y - - Disable most new NSH commands. Some like 'ls' are really mandatory - with a file system: - CONFIG_NSH_DISABLE_xxx=y - - Enable the upper half serial driver: - CONFIG_SERIAL=y - CONFIG_STANDARD_SERIAL=y - - Enable the USART1 serial driver: - CONFIG_STM32_USART1=y - CONFIG_STM32_USART1_SERIALDRIVER=y - CONFIG_USART1_SERIAL_CONSOLE=y - - CONFIG_USART1_2STOP=0 - CONFIG_USART1_BAUD=115200 - CONFIG_USART1_BITS=8 - CONFIG_USART1_PARITY=0 - CONFIG_USART1_RXBUFSIZE=16 - CONFIG_USART1_TXBUFSIZE=16 - - With these changes, NSH should behave better and we preserve the device - driver interface. But this result in a total size increase of about - 7KB: That is about 5KB of additional OS support for the file system and - serial console PLUS about 2KB for the 'ls' command logic (including OS - support for opendir(), readdir(), closedir(), stat(), and probably other - things). - - STATUS: - 2015-6-10 - The nuttx.bin minnsh firmware file size: - - $ ls -l nuttx.bin - -rwxr-xr-x 1 alan alan 13859 Jun 10 08:54 nuttx.bin - - $ arm-none-eabi-size nuttx - text data bss dec hex filename - 12818 193 704 13715 3593 nuttx - - This is serial console output (and input) : - - NuttShell (NSH) - nsh> ls /dev - nsh: ls: command not found - - No filesystem, no "ls" command :-) - - nsh> ? - help usage: help [-v] [] - - ? exec free mb mw xd - echo exit help mh ps - nsh> free - total used free largest - Mem: 6464 1816 4648 4648 - - nsh> echo "NuttX is magic!" - NuttX is magic! - nsh> - - Replace NSH with apps/examples/hello: - - $ ls -l nuttx.bin - -rwxr-xr-x 1 alan alan 9318 Jun 10 09:02 nuttx.bin - - $ arm-none-eabi-size nuttx - text data bss dec hex filename - 8277 193 704 9174 23d6 nuttx - - Some additional commits from Alan reduce this FLASH size by - about another kilobyte. That changes: (1) disable stack - dumping on assertions,and (2) make some FLASH data structures - smaller. - - Almost 2Kb of the remaining size was due to some arithmetic - "long long" (64 bits) operations drawn from libgcc.a. - Alan changed vsprintf to make "long long" support optional. - This change reduced the NuttX kernel to less than 8KiB! - nsh: --- diff --git a/configs/lpcxpresso-lpc1115/minnsh/Make.defs b/configs/lpcxpresso-lpc1115/minnsh/Make.defs deleted file mode 100644 index 5024dbe9ca5..00000000000 --- a/configs/lpcxpresso-lpc1115/minnsh/Make.defs +++ /dev/null @@ -1,123 +0,0 @@ -############################################################################ -# configs/lpcxpresso-lpc1115/minnsh/Make.defs -# -# Copyright (C) 2015 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -include ${TOPDIR}/.config -include ${TOPDIR}/tools/Config.mk -include ${TOPDIR}/arch/arm/src/armv6-m/Toolchain.defs - -LDSCRIPT = ld.script - -ifeq ($(WINTOOL),y) - # Windows-native toolchains - 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 - ARCHINCLUDES = -I. -isystem $(TOPDIR)/include - ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) -endif - -CC = $(CROSSDEV)gcc -CXX = $(CROSSDEV)g++ -CPP = $(CROSSDEV)gcc -E -LD = $(CROSSDEV)ld -AR = $(ARCROSSDEV)ar rcs -NM = $(ARCROSSDEV)nm -OBJCOPY = $(CROSSDEV)objcopy -OBJDUMP = $(CROSSDEV)objdump - -ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} -ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} - -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION = -g -endif - -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -endif - -ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -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-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 = -ifeq ($(CONFIG_HOST_WINDOWS),y) - HOSTEXEEXT = .exe -else - HOSTEXEEXT = -endif - -ifeq ($(WINTOOL),y) - # Windows-native host tools - DIRLINK = $(TOPDIR)/tools/copydir.sh - DIRUNLINK = $(TOPDIR)/tools/unlink.sh - MKDEP = $(TOPDIR)/tools/mkwindeps.sh -else - # Linux/Cygwin-native host tools - MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) -endif diff --git a/configs/lpcxpresso-lpc1115/minnsh/defconfig b/configs/lpcxpresso-lpc1115/minnsh/defconfig deleted file mode 100644 index 8480de14cb3..00000000000 --- a/configs/lpcxpresso-lpc1115/minnsh/defconfig +++ /dev/null @@ -1,767 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Nuttx/ Configuration -# - -# -# Build Setup -# -# CONFIG_EXPERIMENTAL is not set -CONFIG_DEFAULT_SMALL=y -CONFIG_HOST_LINUX=y -# CONFIG_HOST_OSX is not set -# CONFIG_HOST_WINDOWS is not set -# CONFIG_HOST_OTHER is not set - -# -# Build Configuration -# -# CONFIG_APPS_DIR="../apps" -CONFIG_BUILD_FLAT=y -# CONFIG_BUILD_2PASS is not set - -# -# Binary Output Formats -# -# CONFIG_RRLOAD_BINARY is not set -# CONFIG_INTELHEX_BINARY is not set -# CONFIG_MOTOROLA_SREC is not set -CONFIG_RAW_BINARY=y -# CONFIG_UBOOT_UIMAGE is not set - -# -# Customize Header Files -# -# CONFIG_ARCH_STDINT_H is not set -# CONFIG_ARCH_STDBOOL_H is not set -# CONFIG_ARCH_MATH_H is not set -# CONFIG_ARCH_FLOAT_H is not set -# CONFIG_ARCH_STDARG_H is not set -# CONFIG_ARCH_DEBUG_H is not set - -# -# Debug Options -# -# CONFIG_DEBUG_ALERT is not set -# CONFIG_DEBUG_FEATURES is not set -CONFIG_ARCH_HAVE_STACKCHECK=y -# CONFIG_STACK_COLORATION is not set -# CONFIG_ARCH_HAVE_HEAPCHECK 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_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=y -# CONFIG_ARCH_CHIP_LPC17XX is not set -# CONFIG_ARCH_CHIP_LPC214X is not set -# CONFIG_ARCH_CHIP_LPC2378 is not set -# CONFIG_ARCH_CHIP_LPC31XX is not set -# CONFIG_ARCH_CHIP_LPC43XX is not set -# CONFIG_ARCH_CHIP_NUC1XX is not set -# CONFIG_ARCH_CHIP_SAMA5 is not set -# CONFIG_ARCH_CHIP_SAMD is not set -# CONFIG_ARCH_CHIP_SAML is not set -# CONFIG_ARCH_CHIP_SAM34 is not set -# CONFIG_ARCH_CHIP_SAMV7 is not set -# CONFIG_ARCH_CHIP_STM32 is not set -# CONFIG_ARCH_CHIP_STM32F7 is not set -# CONFIG_ARCH_CHIP_STM32L4 is not set -# CONFIG_ARCH_CHIP_STR71X is not set -# CONFIG_ARCH_CHIP_TMS570 is not set -# CONFIG_ARCH_CHIP_MOXART is not set -# CONFIG_ARCH_ARM7TDMI is not set -# CONFIG_ARCH_ARM926EJS is not set -# CONFIG_ARCH_ARM920T is not set -CONFIG_ARCH_CORTEXM0=y -# CONFIG_ARCH_CORTEXM3 is not set -# CONFIG_ARCH_CORTEXM4 is not set -# CONFIG_ARCH_CORTEXM7 is not set -# CONFIG_ARCH_CORTEXA5 is not set -# CONFIG_ARCH_CORTEXA8 is not set -# CONFIG_ARCH_CORTEXA9 is not set -# CONFIG_ARCH_CORTEXR4 is not set -# CONFIG_ARCH_CORTEXR4F is not set -# CONFIG_ARCH_CORTEXR5 is not set -# CONFIG_ARCH_CORTEX5F is not set -# CONFIG_ARCH_CORTEXR7 is not set -# CONFIG_ARCH_CORTEXR7F is not set -CONFIG_ARCH_FAMILY="armv6-m" -CONFIG_ARCH_CHIP="lpc11xx" -# CONFIG_ARM_TOOLCHAIN_IAR is not set -# CONFIG_ARM_TOOLCHAIN_GNU is not set -CONFIG_ARCH_HAVE_CMNVECTOR=y -# CONFIG_ARMV7M_CMNVECTOR is not set -# CONFIG_ARMV7M_LAZYFPU is not set -# CONFIG_ARCH_HAVE_FPU is not set -# CONFIG_ARCH_HAVE_DPFPU is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set -# CONFIG_ARM_HAVE_MPU_UNIFIED is not set - -# -# ARMV6M Configuration Options -# -# CONFIG_ARMV6M_TOOLCHAIN_BUILDROOT is not set -# CONFIG_ARMV6M_TOOLCHAIN_CODEREDL is not set -# CONFIG_ARMV6M_TOOLCHAIN_CODESOURCERYL is not set -CONFIG_ARMV6M_TOOLCHAIN_GNU_EABIL=y -# CONFIG_LPC11_GPIOIRQ is not set - -# -# LPC11xx Configuration Options -# -# CONFIG_ARCH_CHIP_LPC1114 is not set -CONFIG_ARCH_CHIP_LPC1115=y -CONFIG_ARCH_FAMILY_LPC111X=y - -# -# LPC11xx Peripheral Support -# -CONFIG_LPC11_INTRCOSC=y -# CONFIG_LPC11_MAINOSC is not set -CONFIG_LPC11_SYSTICK_CORECLK=y -# CONFIG_LPC11_SYSTICK_CORECLK_DIV16 is not set -CONFIG_LPC11_PLL=y -CONFIG_LPC11_UART0=y -# CONFIG_LPC11_CAN0 is not set -# CONFIG_LPC11_SPI is not set -# CONFIG_LPC11_SSP0 is not set -# CONFIG_LPC11_SSP1 is not set -# CONFIG_LPC11_I2C0 is not set -# CONFIG_LPC11_TMR0 is not set -# CONFIG_LPC11_TMR1 is not set -# CONFIG_LPC11_WDT is not set -# CONFIG_LPC11_ADC is not set -# CONFIG_LPC11_FLASH is not set - -# -# Serial driver options -# -# CONFIG_SERIAL_TERMIOS is not set - -# -# Architecture Options -# -# CONFIG_ARCH_NOINTC is not set -# CONFIG_ARCH_VECNOTIRQ is not set -# CONFIG_ARCH_DMA is not set -CONFIG_ARCH_HAVE_IRQPRIO=y -# CONFIG_ARCH_L2CACHE is not set -# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set -# CONFIG_ARCH_HAVE_ADDRENV is not set -# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set -# CONFIG_ARCH_HAVE_MULTICPU is not set -CONFIG_ARCH_HAVE_VFORK=y -# CONFIG_ARCH_HAVE_MMU is not set -# CONFIG_ARCH_HAVE_MPU is not set -# CONFIG_ARCH_NAND_HWECC is not set -# CONFIG_ARCH_HAVE_EXTCLK is not set -# CONFIG_ARCH_HAVE_POWEROFF is not set -CONFIG_ARCH_HAVE_RESET=y -# CONFIG_ARCH_IRQPRIO is not set -# CONFIG_ARCH_STACKDUMP is not set -# CONFIG_ENDIAN_BIG is not set -# CONFIG_ARCH_IDLE_CUSTOM is not set -# CONFIG_ARCH_HAVE_RAMFUNCS is not set -# CONFIG_ARCH_HAVE_RAMVECTORS is not set - -# -# Board Settings -# -CONFIG_BOARD_LOOPSPERMSEC=2988 -# CONFIG_ARCH_CALIBRATION is not set - -# -# Interrupt options -# -CONFIG_ARCH_HAVE_INTERRUPTSTACK=y -CONFIG_ARCH_INTERRUPTSTACK=0 -# CONFIG_ARCH_HAVE_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=0x10000000 -CONFIG_RAM_SIZE=8192 -# CONFIG_ARCH_HAVE_SDRAM is not set - -# -# Board Selection -# -CONFIG_ARCH_BOARD_LPCXPRESSO_LPC1115=y -# CONFIG_ARCH_BOARD_CUSTOM is not set -CONFIG_ARCH_BOARD="lpcxpresso-lpc1115" - -# -# Common Board Options -# -CONFIG_ARCH_HAVE_LEDS=y -CONFIG_ARCH_LEDS=y -CONFIG_NSH_MMCSDMINOR=0 - -# -# Board-Specific Options -# -# CONFIG_LIB_BOARDCTL is not set - -# -# RTOS Features -# -CONFIG_DISABLE_OS_API=y -CONFIG_DISABLE_POSIX_TIMERS=y -CONFIG_DISABLE_PTHREAD=y -CONFIG_DISABLE_SIGNALS=y -CONFIG_DISABLE_MQUEUE=y -CONFIG_DISABLE_ENVIRON=y - -# -# Clocks and Timers -# -CONFIG_USEC_PER_TICK=10000 -# CONFIG_SYSTEM_TIME64 is not set -# CONFIG_CLOCK_MONOTONIC is not set -# CONFIG_JULIAN_TIME is not set -CONFIG_START_YEAR=2013 -CONFIG_START_MONTH=2 -CONFIG_START_DAY=26 -CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=4 -CONFIG_WDOG_INTRESERVE=0 -CONFIG_PREALLOC_TIMERS=0 - -# -# Tasks and Scheduling -# -# CONFIG_INIT_NONE is not set -CONFIG_INIT_ENTRYPOINT=y -# CONFIG_INIT_FILEPATH is not set -CONFIG_USER_ENTRYPOINT="nsh_main" -CONFIG_RR_INTERVAL=0 -# CONFIG_SCHED_SPORADIC is not set -CONFIG_TASK_NAME_SIZE=0 -CONFIG_MAX_TASKS=4 -# CONFIG_SCHED_HAVE_PARENT is not set -# CONFIG_SCHED_WAITPID is not set - -# -# Performance Monitoring -# -# CONFIG_SCHED_CPULOAD is not set -# CONFIG_SCHED_INSTRUMENTATION is not set - -# -# Files and I/O -# -# CONFIG_DEV_CONSOLE is not set -CONFIG_FDCLONE_DISABLE=y -# CONFIG_FDCLONE_STDIO is not set -CONFIG_SDCLONE_DISABLE=y -CONFIG_NFILE_DESCRIPTORS=0 -CONFIG_NFILE_STREAMS=0 -CONFIG_NAME_MAX=32 -# CONFIG_PRIORITY_INHERITANCE is not set - -# -# RTOS hooks -# -# CONFIG_BOARD_INITIALIZE is not set -# CONFIG_SCHED_STARTHOOK is not set -# CONFIG_SCHED_ATEXIT is not set -# CONFIG_SCHED_ONEXIT is not set -# CONFIG_MODULE is not set - -# -# Work queue support -# - -# -# Stack and heap information -# -CONFIG_IDLETHREAD_STACKSIZE=1024 -CONFIG_USERMAIN_STACKSIZE=1536 -CONFIG_PTHREAD_STACK_MIN=256 -CONFIG_PTHREAD_STACK_DEFAULT=1536 -# CONFIG_LIB_SYSCALL is not set - -# -# Device Drivers -# -CONFIG_DISABLE_POLL=y -# CONFIG_DEV_NULL is not set -# CONFIG_DEV_ZERO is not set -# CONFIG_DEV_LOOP is not set - -# -# Buffering -# -# CONFIG_DRVR_WRITEBUFFER is not set -# CONFIG_DRVR_READAHEAD is not set -# CONFIG_RAMDISK is not set -# CONFIG_CAN is not set -# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set -# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set -# CONFIG_PWM is not set -# CONFIG_ARCH_HAVE_I2CRESET is not set -# CONFIG_I2C is not set -# CONFIG_SPI is not set -# CONFIG_I2S is not set - -# -# Timer Driver Support -# -# CONFIG_TIMER is not set -# CONFIG_RTC is not set -# CONFIG_WATCHDOG is not set -# CONFIG_ANALOG is not set -# CONFIG_AUDIO_DEVICES is not set -# CONFIG_VIDEO_DEVICES is not set -# CONFIG_BCH is not set -# CONFIG_INPUT is not set -# CONFIG_IOEXPANDER is not set - -# -# LCD Driver Support -# -# CONFIG_LCD is not set -# CONFIG_SLCD is not set - -# -# LED Support -# -# CONFIG_USERLED is not set -# CONFIG_RGBLED is not set -# CONFIG_PCA9635PW is not set -# CONFIG_NCP5623C is not set -# CONFIG_MMCSD is not set -# CONFIG_MODEM is not set -# CONFIG_MTD is not set -# CONFIG_EEPROM is not set -# CONFIG_PIPES is not set -# CONFIG_PM is not set -# CONFIG_POWER is not set -# CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set -CONFIG_SERIAL=y -# CONFIG_SERIAL_REMOVABLE is not set -CONFIG_SERIAL_CONSOLE=y -# CONFIG_16550_UART is not set -# CONFIG_UART_SERIALDRIVER is not set -CONFIG_UART0_SERIALDRIVER=y -# CONFIG_UART1_SERIALDRIVER is not set -# CONFIG_UART2_SERIALDRIVER is not set -# CONFIG_UART3_SERIALDRIVER is not set -# CONFIG_UART4_SERIALDRIVER is not set -# CONFIG_UART5_SERIALDRIVER is not set -# CONFIG_UART6_SERIALDRIVER is not set -# CONFIG_UART7_SERIALDRIVER is not set -# CONFIG_UART8_SERIALDRIVER is not set -# CONFIG_SCI0_SERIALDRIVER is not set -# CONFIG_SCI1_SERIALDRIVER is not set -# CONFIG_USART0_SERIALDRIVER is not set -# CONFIG_USART1_SERIALDRIVER is not set -# CONFIG_USART2_SERIALDRIVER is not set -# CONFIG_USART3_SERIALDRIVER is not set -# CONFIG_USART4_SERIALDRIVER is not set -# CONFIG_USART5_SERIALDRIVER is not set -# CONFIG_USART6_SERIALDRIVER is not set -# CONFIG_USART7_SERIALDRIVER is not set -# CONFIG_USART8_SERIALDRIVER is not set -# CONFIG_OTHER_UART_SERIALDRIVER is not set -CONFIG_MCU_SERIAL=y -# CONFIG_STANDARD_SERIAL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set -# CONFIG_SERIAL_DMA is not set -# CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set -CONFIG_UART0_SERIAL_CONSOLE=y -# CONFIG_OTHER_SERIAL_CONSOLE is not set -# CONFIG_NO_SERIAL_CONSOLE is not set - -# -# UART0 Configuration -# -CONFIG_UART0_RXBUFSIZE=64 -CONFIG_UART0_TXBUFSIZE=64 -CONFIG_UART0_BAUD=115200 -CONFIG_UART0_BITS=8 -CONFIG_UART0_PARITY=0 -CONFIG_UART0_2STOP=0 -# CONFIG_UART0_IFLOWCONTROL is not set -# CONFIG_UART0_OFLOWCONTROL is not set -# CONFIG_UART0_DMA is not set -# CONFIG_USBDEV is not set -# CONFIG_USBHOST is not set -# CONFIG_DRIVERS_WIRELESS is not set - -# -# System Logging -# -# CONFIG_ARCH_SYSLOG is not set -# CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_INTBUFFER is not set -# CONFIG_SYSLOG_TIMESTAMP is not set -# CONFIG_SYSLOG_SERIAL_CONSOLE is not set -# CONFIG_SYSLOG_CHAR is not set -CONFIG_SYSLOG_NONE=y -# CONFIG_SYSLOG_FILE is not set - -# -# Networking Support -# -# CONFIG_ARCH_HAVE_NET is not set -# CONFIG_ARCH_HAVE_PHY is not set -# CONFIG_NET is not set - -# -# Crypto API -# -# CONFIG_CRYPTO is not set - -# -# File Systems -# - -# -# File system configuration -# -CONFIG_DISABLE_MOUNTPOINT=y -CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y -# CONFIG_FS_READABLE is not set -# CONFIG_FS_WRITABLE is not set -# CONFIG_FS_NAMED_SEMAPHORES is not set -# CONFIG_FS_RAMMAP is not set -# CONFIG_FS_PROCFS is not set -# CONFIG_FS_UNIONFS is not set - -# -# Graphics Support -# -# CONFIG_NX is not set - -# -# Memory Management -# -CONFIG_MM_SMALL=y -CONFIG_MM_REGIONS=1 -# CONFIG_ARCH_HAVE_HEAP2 is not set -# CONFIG_GRAN is not set - -# -# Audio Support -# -# CONFIG_AUDIO is not set - -# -# Wireless Support -# - -# -# Binary Loader -# -# CONFIG_BINFMT_DISABLE is not set -# CONFIG_NXFLAT is not set -# CONFIG_ELF is not set -# CONFIG_BUILTIN is not set -# CONFIG_PIC is not set -# CONFIG_SYMTAB_ORDEREDBYNAME is not set - -# -# Library Routines -# - -# -# Standard C Library Options -# -CONFIG_STDIO_BUFFER_SIZE=0 -CONFIG_STDIO_LINEBUFFER=y -CONFIG_NUNGET_CHARS=0 -# CONFIG_LIBM is not set -CONFIG_NOPRINTF_FIELDWIDTH=y -# CONFIG_LIBC_FLOATINGPOINT is not set -# CONFIG_LIBC_LONG_LONG is not set -# CONFIG_LIBC_IOCTL_VARIADIC is not set -CONFIG_LIB_RAND_ORDER=1 -# CONFIG_EOL_IS_CR is not set -# CONFIG_EOL_IS_LF is not set -# CONFIG_EOL_IS_BOTH_CRLF is not set -CONFIG_EOL_IS_EITHER_CRLF=y -# CONFIG_LIBC_EXECFUNCS is not set -CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 -CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=1536 -# CONFIG_LIBC_STRERROR is not set -# CONFIG_LIBC_PERROR_STDOUT is not set -CONFIG_ARCH_LOWPUTC=y -# CONFIG_TIME_EXTENDED is not set -CONFIG_LIB_SENDFILE_BUFSIZE=512 -# CONFIG_ARCH_ROMGETC is not set -# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set -CONFIG_ARCH_HAVE_TLS=y -# CONFIG_TLS is not set -# CONFIG_LIBC_NETDB is not set - -# -# Non-standard Library Support -# -# CONFIG_LIB_CRC64_FAST is not set -# CONFIG_LIB_KBDCODEC is not set -# CONFIG_LIB_SLCDCODEC is not set - -# -# Basic CXX Support -# -# CONFIG_C99_BOOL8 is not set -# CONFIG_HAVE_CXX is not set - -# -# Application Configuration -# - -# -# CAN Utilities -# - -# -# Examples -# -# CONFIG_EXAMPLES_CHAT is not set -# CONFIG_EXAMPLES_CONFIGDATA is not set -# CONFIG_EXAMPLES_CPUHOG is not set -# CONFIG_EXAMPLES_DHCPD is not set -# CONFIG_EXAMPLES_ELF is not set -# CONFIG_EXAMPLES_FTPC is not set -# CONFIG_EXAMPLES_FTPD is not set -# CONFIG_EXAMPLES_HELLO is not set -# CONFIG_EXAMPLES_HIDKBD is not set -# CONFIG_EXAMPLES_IGMP is not set -# CONFIG_EXAMPLES_JSON is not set -# CONFIG_EXAMPLES_KEYPADTEST is not set -# CONFIG_EXAMPLES_MEDIA is not set -# CONFIG_EXAMPLES_MM is not set -# CONFIG_EXAMPLES_MODBUS is not set -# CONFIG_EXAMPLES_MOUNT is not set -# CONFIG_EXAMPLES_NRF24L01TERM is not set -CONFIG_EXAMPLES_NSH=y -# CONFIG_EXAMPLES_NULL is not set -# CONFIG_EXAMPLES_NX is not set -# CONFIG_EXAMPLES_NXFFS is not set -# CONFIG_EXAMPLES_NXHELLO is not set -# CONFIG_EXAMPLES_NXIMAGE is not set -# CONFIG_EXAMPLES_NXLINES is not set -# CONFIG_EXAMPLES_NXTERM is not set -# CONFIG_EXAMPLES_NXTEXT is not set -# CONFIG_EXAMPLES_OSTEST is not set -# CONFIG_EXAMPLES_PCA9635 is not set -# CONFIG_EXAMPLES_PIPE is not set -# CONFIG_EXAMPLES_POLL is not set -# CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_PPPD is not set -# CONFIG_EXAMPLES_RGBLED is not set -# CONFIG_EXAMPLES_SENDMAIL is not set -# CONFIG_EXAMPLES_SERIALBLASTER is not set -# CONFIG_EXAMPLES_SERIALRX is not set -# CONFIG_EXAMPLES_SERLOOP is not set -# CONFIG_EXAMPLES_SLCD is not set -# CONFIG_EXAMPLES_SMART is not set -# CONFIG_EXAMPLES_SMP is not set -# CONFIG_EXAMPLES_TCPECHO is not set -# CONFIG_EXAMPLES_TELNETD is not set -# CONFIG_EXAMPLES_TIFF is not set -# CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_USBTERM is not set -# CONFIG_EXAMPLES_WATCHDOG is not set -# CONFIG_EXAMPLES_WEBSERVER is not set - -# -# File System Utilities -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# GPS Utilities -# -# CONFIG_GPSUTILS_MINMEA_LIB is not set - -# -# Graphics Support -# -# CONFIG_TIFF is not set -# CONFIG_GRAPHICS_TRAVELER is not set - -# -# Interpreters -# -# CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_MICROPYTHON is not set -# CONFIG_INTERPRETERS_PCODE is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set - -# -# Network Utilities -# -# CONFIG_NETUTILS_CODECS is not set -# CONFIG_NETUTILS_ESP8266 is not set -# CONFIG_NETUTILS_FTPC is not set -# CONFIG_NETUTILS_JSON is not set -# CONFIG_NETUTILS_SMTP is not set - -# -# NSH Library -# -CONFIG_NSH_LIBRARY=y -# CONFIG_NSH_MOTD is not set - -# -# Command Line Configuration -# -CONFIG_NSH_READLINE=y -# CONFIG_NSH_CLE is not set -CONFIG_NSH_LINELEN=80 -CONFIG_NSH_DISABLE_SEMICOLON=y -CONFIG_NSH_MAXARGUMENTS=6 -# CONFIG_NSH_ARGCAT is not set -CONFIG_NSH_NESTDEPTH=3 -# CONFIG_NSH_DISABLEBG is not set - -# -# Disable Individual commands -# -CONFIG_NSH_DISABLE_ADDROUTE=y -CONFIG_NSH_DISABLE_BASENAME=y -# CONFIG_NSH_DISABLE_CAT is not set -CONFIG_NSH_DISABLE_CD=y -CONFIG_NSH_DISABLE_CP=y -# CONFIG_NSH_DISABLE_CMP is not set -CONFIG_NSH_DISABLE_DATE=y -CONFIG_NSH_DISABLE_DD=y -CONFIG_NSH_DISABLE_DF=y -CONFIG_NSH_DISABLE_DELROUTE=y -CONFIG_NSH_DISABLE_DIRNAME=y -# CONFIG_NSH_DISABLE_ECHO is not set -# CONFIG_NSH_DISABLE_EXEC is not set -# CONFIG_NSH_DISABLE_EXIT is not set -# CONFIG_NSH_DISABLE_FREE is not set -CONFIG_NSH_DISABLE_GET=y -# CONFIG_NSH_DISABLE_HELP is not set -# CONFIG_NSH_DISABLE_HEXDUMP is not set -CONFIG_NSH_DISABLE_IFCONFIG=y -CONFIG_NSH_DISABLE_IFUPDOWN=y -# CONFIG_NSH_DISABLE_KILL is not set -CONFIG_NSH_DISABLE_LOSETUP=y -CONFIG_NSH_DISABLE_LOSMART=y -# CONFIG_NSH_DISABLE_LS is not set -# CONFIG_NSH_DISABLE_MB is not set -CONFIG_NSH_DISABLE_MKDIR=y -# CONFIG_NSH_DISABLE_MKFIFO is not set -CONFIG_NSH_DISABLE_MKRD=y -# CONFIG_NSH_DISABLE_MH is not set -CONFIG_NSH_DISABLE_MOUNT=y -CONFIG_NSH_DISABLE_MV=y -# CONFIG_NSH_DISABLE_MW is not set -# CONFIG_NSH_DISABLE_PS is not set -CONFIG_NSH_DISABLE_PUT=y -# CONFIG_NSH_DISABLE_PWD is not set -CONFIG_NSH_DISABLE_RM=y -CONFIG_NSH_DISABLE_RMDIR=y -# CONFIG_NSH_DISABLE_SET is not set -# CONFIG_NSH_DISABLE_SH is not set -# CONFIG_NSH_DISABLE_SLEEP is not set -CONFIG_NSH_DISABLE_TIME=y -# CONFIG_NSH_DISABLE_TEST is not set -CONFIG_NSH_DISABLE_UMOUNT=y -CONFIG_NSH_DISABLE_UNAME=y -# CONFIG_NSH_DISABLE_UNSET is not set -# CONFIG_NSH_DISABLE_USLEEP is not set -CONFIG_NSH_DISABLE_WGET=y -# CONFIG_NSH_DISABLE_XD is not set - -# -# Configure Command Options -# -CONFIG_NSH_CODECS_BUFSIZE=128 -# CONFIG_NSH_CMDOPT_HEXDUMP is not set -CONFIG_NSH_FILEIOSIZE=64 - -# -# Scripting Support -# -CONFIG_NSH_DISABLESCRIPT=y - -# -# Console Configuration -# -CONFIG_NSH_CONSOLE=y -# CONFIG_NSH_ALTCONDEV is not set -# CONFIG_NSH_ARCHINIT is not set -# CONFIG_NSH_LOGIN is not set -# CONFIG_NSH_CONSOLE_LOGIN is not set - -# -# NxWidgets/NxWM -# - -# -# Platform-specific Support -# -# CONFIG_PLATFORM_CONFIGDATA is not set - -# -# System Libraries and NSH Add-Ons -# -# CONFIG_SYSTEM_CLE is not set -# CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_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/lpcxpresso-lpc1115/nsh/defconfig b/configs/lpcxpresso-lpc1115/nsh/defconfig index 5fbf61f2b83..8a66a48cc74 100644 --- a/configs/lpcxpresso-lpc1115/nsh/defconfig +++ b/configs/lpcxpresso-lpc1115/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -395,7 +394,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lpcxpresso-lpc1768/dhcpd/defconfig b/configs/lpcxpresso-lpc1768/dhcpd/defconfig index 8df48ef27ef..380604febfa 100644 --- a/configs/lpcxpresso-lpc1768/dhcpd/defconfig +++ b/configs/lpcxpresso-lpc1768/dhcpd/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -514,7 +513,6 @@ CONFIG_ETH0_PHY_LAN8720=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lpcxpresso-lpc1768/nsh/defconfig b/configs/lpcxpresso-lpc1768/nsh/defconfig index 6a6c05e5de5..fdbc186bc74 100644 --- a/configs/lpcxpresso-lpc1768/nsh/defconfig +++ b/configs/lpcxpresso-lpc1768/nsh/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -584,7 +583,6 @@ CONFIG_ETH0_PHY_LAN8720=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lpcxpresso-lpc1768/nx/defconfig b/configs/lpcxpresso-lpc1768/nx/defconfig index 7085ccd02bf..bb99255c2df 100644 --- a/configs/lpcxpresso-lpc1768/nx/defconfig +++ b/configs/lpcxpresso-lpc1768/nx/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -520,7 +519,6 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lpcxpresso-lpc1768/thttpd/defconfig b/configs/lpcxpresso-lpc1768/thttpd/defconfig index 4d16ce1734a..0020d90dbfc 100644 --- a/configs/lpcxpresso-lpc1768/thttpd/defconfig +++ b/configs/lpcxpresso-lpc1768/thttpd/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -518,7 +517,6 @@ 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=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/lpcxpresso-lpc1768/usbmsc/defconfig b/configs/lpcxpresso-lpc1768/usbmsc/defconfig index d02c4d951a0..608efd1c81b 100644 --- a/configs/lpcxpresso-lpc1768/usbmsc/defconfig +++ b/configs/lpcxpresso-lpc1768/usbmsc/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -493,7 +492,6 @@ CONFIG_MMCSD_SPIMODE=0 # 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 diff --git a/configs/maple/nsh/defconfig b/configs/maple/nsh/defconfig index dcf2229582f..3a9c485155f 100644 --- a/configs/maple/nsh/defconfig +++ b/configs/maple/nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -705,7 +704,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/maple/nx/defconfig b/configs/maple/nx/defconfig index 3e755396270..9936c99c3d1 100644 --- a/configs/maple/nx/defconfig +++ b/configs/maple/nx/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -800,7 +799,6 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y CONFIG_SERIAL_CONSOLE=y diff --git a/configs/maple/usbnsh/defconfig b/configs/maple/usbnsh/defconfig index 6976bf0eaa1..1a0485d7dc2 100644 --- a/configs/maple/usbnsh/defconfig +++ b/configs/maple/usbnsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -717,7 +716,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y CONFIG_SERIAL_CONSOLE=y diff --git a/configs/mbed/hidkbd/defconfig b/configs/mbed/hidkbd/defconfig index 5e58e588ae6..749e51ef049 100644 --- a/configs/mbed/hidkbd/defconfig +++ b/configs/mbed/hidkbd/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -477,7 +476,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/mbed/nsh/defconfig b/configs/mbed/nsh/defconfig index 257ca1a75c8..e58d828f5ea 100644 --- a/configs/mbed/nsh/defconfig +++ b/configs/mbed/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -515,7 +514,6 @@ CONFIG_MTD=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/mcu123-lpc214x/composite/defconfig b/configs/mcu123-lpc214x/composite/defconfig index defee1ad925..cffe65a216a 100644 --- a/configs/mcu123-lpc214x/composite/defconfig +++ b/configs/mcu123-lpc214x/composite/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -430,7 +429,6 @@ CONFIG_MMCSD_SPIMODE=0 # 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 diff --git a/configs/mcu123-lpc214x/nsh/defconfig b/configs/mcu123-lpc214x/nsh/defconfig index ed35e28cf96..16148fb70af 100644 --- a/configs/mcu123-lpc214x/nsh/defconfig +++ b/configs/mcu123-lpc214x/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -423,7 +422,6 @@ CONFIG_MMCSD_SPIMODE=0 # 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 diff --git a/configs/mcu123-lpc214x/usbmsc/defconfig b/configs/mcu123-lpc214x/usbmsc/defconfig index df52fa03bde..902c2e95933 100644 --- a/configs/mcu123-lpc214x/usbmsc/defconfig +++ b/configs/mcu123-lpc214x/usbmsc/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -430,7 +429,6 @@ CONFIG_MMCSD_SPIMODE=0 # 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 diff --git a/configs/mcu123-lpc214x/usbserial/defconfig b/configs/mcu123-lpc214x/usbserial/defconfig index 100d87fe956..d6293bc0cc3 100644 --- a/configs/mcu123-lpc214x/usbserial/defconfig +++ b/configs/mcu123-lpc214x/usbserial/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -410,7 +409,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y diff --git a/configs/micropendous3/hello/defconfig b/configs/micropendous3/hello/defconfig index 46d64c660ce..c11817790ba 100644 --- a/configs/micropendous3/hello/defconfig +++ b/configs/micropendous3/hello/defconfig @@ -241,7 +241,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set diff --git a/configs/mikroe-stm32f4/fulldemo/defconfig b/configs/mikroe-stm32f4/fulldemo/defconfig index 13ff1145881..ec1f44da769 100644 --- a/configs/mikroe-stm32f4/fulldemo/defconfig +++ b/configs/mikroe-stm32f4/fulldemo/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -902,7 +901,6 @@ CONFIG_MTD_SMART_WEAR_LEVEL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_SERIAL_CONSOLE is not set diff --git a/configs/mikroe-stm32f4/kostest/defconfig b/configs/mikroe-stm32f4/kostest/defconfig index 629d012addf..e8740c395b3 100644 --- a/configs/mikroe-stm32f4/kostest/defconfig +++ b/configs/mikroe-stm32f4/kostest/defconfig @@ -78,7 +78,6 @@ CONFIG_ARCH="arm" # # 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 @@ -846,7 +845,6 @@ CONFIG_MTD_SMART_WEAR_LEVEL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_SERIAL_CONSOLE is not set diff --git a/configs/mikroe-stm32f4/nsh/defconfig b/configs/mikroe-stm32f4/nsh/defconfig index 9291880ddf9..bd189e13d90 100644 --- a/configs/mikroe-stm32f4/nsh/defconfig +++ b/configs/mikroe-stm32f4/nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -813,7 +812,6 @@ CONFIG_MTD_SMART_WEAR_LEVEL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_SERIAL_REMOVABLE is not set CONFIG_SERIAL_CONSOLE=y diff --git a/configs/mikroe-stm32f4/nx/defconfig b/configs/mikroe-stm32f4/nx/defconfig index 478c440e147..51f178871d3 100644 --- a/configs/mikroe-stm32f4/nx/defconfig +++ b/configs/mikroe-stm32f4/nx/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -759,7 +758,6 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set diff --git a/configs/mikroe-stm32f4/nxlines/defconfig b/configs/mikroe-stm32f4/nxlines/defconfig index 67088d6ac0f..f0c6adcfea7 100644 --- a/configs/mikroe-stm32f4/nxlines/defconfig +++ b/configs/mikroe-stm32f4/nxlines/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -746,7 +745,6 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set diff --git a/configs/mikroe-stm32f4/nxtext/defconfig b/configs/mikroe-stm32f4/nxtext/defconfig index f6f131b9725..52933714d66 100644 --- a/configs/mikroe-stm32f4/nxtext/defconfig +++ b/configs/mikroe-stm32f4/nxtext/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -759,7 +758,6 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set diff --git a/configs/mikroe-stm32f4/usbnsh/defconfig b/configs/mikroe-stm32f4/usbnsh/defconfig index 45102afa4a0..6ebceb9c459 100644 --- a/configs/mikroe-stm32f4/usbnsh/defconfig +++ b/configs/mikroe-stm32f4/usbnsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -821,7 +820,6 @@ CONFIG_MTD_SMART_WEAR_LEVEL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_SERIAL_CONSOLE is not set diff --git a/configs/mirtoo/nsh/defconfig b/configs/mirtoo/nsh/defconfig index 8c8743a9ce1..3630f0f2232 100644 --- a/configs/mirtoo/nsh/defconfig +++ b/configs/mirtoo/nsh/defconfig @@ -499,7 +499,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/mirtoo/nxffs/defconfig b/configs/mirtoo/nxffs/defconfig index 6dbc62ca2b5..627d0b9e7aa 100644 --- a/configs/mirtoo/nxffs/defconfig +++ b/configs/mirtoo/nxffs/defconfig @@ -540,7 +540,6 @@ CONFIG_SST25_SPIFREQUENCY=20000000 # 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 diff --git a/configs/misoc/hello/defconfig b/configs/misoc/hello/defconfig index 3aef6631d19..a9a5dfc1384 100644 --- a/configs/misoc/hello/defconfig +++ b/configs/misoc/hello/defconfig @@ -407,7 +407,6 @@ CONFIG_ETH0_PHY_NONE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/misoc/nsh/defconfig b/configs/misoc/nsh/defconfig index 438198545af..75cf732f679 100644 --- a/configs/misoc/nsh/defconfig +++ b/configs/misoc/nsh/defconfig @@ -334,7 +334,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/moteino-mega/hello/defconfig b/configs/moteino-mega/hello/defconfig index 973aac4a8d7..ffadd04745b 100644 --- a/configs/moteino-mega/hello/defconfig +++ b/configs/moteino-mega/hello/defconfig @@ -269,7 +269,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set diff --git a/configs/moteino-mega/nsh/defconfig b/configs/moteino-mega/nsh/defconfig index 97bf0cf3e07..c3021fcbf75 100644 --- a/configs/moteino-mega/nsh/defconfig +++ b/configs/moteino-mega/nsh/defconfig @@ -277,7 +277,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set diff --git a/configs/moxa/nsh/defconfig b/configs/moxa/nsh/defconfig index d1cdfc6b401..fd951b047a1 100644 --- a/configs/moxa/nsh/defconfig +++ b/configs/moxa/nsh/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -428,7 +427,6 @@ CONFIG_FTMAC100_HPWORK=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/mx1ads/ostest/defconfig b/configs/mx1ads/ostest/defconfig index 6b9443b925e..04225dad730 100644 --- a/configs/mx1ads/ostest/defconfig +++ b/configs/mx1ads/ostest/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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=y @@ -391,7 +390,6 @@ CONFIG_SPI=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/ne64badge/ostest/defconfig b/configs/ne64badge/ostest/defconfig index 94d4e981c3f..2986223f0cd 100644 --- a/configs/ne64badge/ostest/defconfig +++ b/configs/ne64badge/ostest/defconfig @@ -242,7 +242,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set diff --git a/configs/nr5m100-nexys4/nsh/defconfig b/configs/nr5m100-nexys4/nsh/defconfig index eacb815a022..e2b6c7f66db 100644 --- a/configs/nr5m100-nexys4/nsh/defconfig +++ b/configs/nr5m100-nexys4/nsh/defconfig @@ -348,7 +348,6 @@ CONFIG_DEV_ZERO=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/ntosd-dm320/nettest/defconfig b/configs/ntosd-dm320/nettest/defconfig index bd68dc951a9..e1f95fe831e 100644 --- a/configs/ntosd-dm320/nettest/defconfig +++ b/configs/ntosd-dm320/nettest/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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=y # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set @@ -418,7 +417,6 @@ CONFIG_DM9X_HPWORK=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/ntosd-dm320/nsh/defconfig b/configs/ntosd-dm320/nsh/defconfig index a2c9d13163f..39868b6085d 100644 --- a/configs/ntosd-dm320/nsh/defconfig +++ b/configs/ntosd-dm320/nsh/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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=y # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set @@ -434,7 +433,6 @@ CONFIG_DM9X_HPWORK=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/ntosd-dm320/poll/defconfig b/configs/ntosd-dm320/poll/defconfig index 99ac30997cd..16cd6306ee3 100644 --- a/configs/ntosd-dm320/poll/defconfig +++ b/configs/ntosd-dm320/poll/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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=y # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set @@ -428,7 +427,6 @@ 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 is not set diff --git a/configs/ntosd-dm320/thttpd/defconfig b/configs/ntosd-dm320/thttpd/defconfig index b9cc758765c..5b9439f577e 100644 --- a/configs/ntosd-dm320/thttpd/defconfig +++ b/configs/ntosd-dm320/thttpd/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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=y # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set @@ -421,7 +420,6 @@ 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 is not set diff --git a/configs/ntosd-dm320/udp/defconfig b/configs/ntosd-dm320/udp/defconfig index b34efac745b..430d9c3d54f 100644 --- a/configs/ntosd-dm320/udp/defconfig +++ b/configs/ntosd-dm320/udp/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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=y # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set @@ -417,7 +416,6 @@ CONFIG_DM9X_HPWORK=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/ntosd-dm320/webserver/defconfig b/configs/ntosd-dm320/webserver/defconfig index 40ff3fe1bf7..5b9e96f8f25 100644 --- a/configs/ntosd-dm320/webserver/defconfig +++ b/configs/ntosd-dm320/webserver/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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=y # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set @@ -425,7 +424,6 @@ CONFIG_DM9X_HPWORK=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/nucleo-144/f746-evalos/defconfig b/configs/nucleo-144/f746-evalos/defconfig index e3ab70c2601..3372db8d005 100644 --- a/configs/nucleo-144/f746-evalos/defconfig +++ b/configs/nucleo-144/f746-evalos/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -629,7 +628,6 @@ CONFIG_USERLED_LOWER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/nucleo-144/f746-nsh/defconfig b/configs/nucleo-144/f746-nsh/defconfig index 69bc73ac3db..d034bff8ac9 100644 --- a/configs/nucleo-144/f746-nsh/defconfig +++ b/configs/nucleo-144/f746-nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -617,7 +616,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/nucleo-144/f767-evalos/defconfig b/configs/nucleo-144/f767-evalos/defconfig index 1a9d88032ea..bae0a8f84b9 100644 --- a/configs/nucleo-144/f767-evalos/defconfig +++ b/configs/nucleo-144/f767-evalos/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -633,7 +632,6 @@ CONFIG_USERLED_LOWER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/nucleo-144/f767-nsh/defconfig b/configs/nucleo-144/f767-nsh/defconfig index ee1f1ec6617..36e14b00937 100644 --- a/configs/nucleo-144/f767-nsh/defconfig +++ b/configs/nucleo-144/f767-nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -621,7 +620,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/nucleo-f303re/adc/defconfig b/configs/nucleo-f303re/adc/defconfig index c78821676c4..4fb368517ac 100644 --- a/configs/nucleo-f303re/adc/defconfig +++ b/configs/nucleo-f303re/adc/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -724,7 +723,6 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set diff --git a/configs/nucleo-f303re/can/defconfig b/configs/nucleo-f303re/can/defconfig index 868ad9be6aa..883c9c36681 100644 --- a/configs/nucleo-f303re/can/defconfig +++ b/configs/nucleo-f303re/can/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -725,7 +724,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set diff --git a/configs/nucleo-f303re/hello/defconfig b/configs/nucleo-f303re/hello/defconfig index 92ceeb51334..dffa050525e 100644 --- a/configs/nucleo-f303re/hello/defconfig +++ b/configs/nucleo-f303re/hello/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -727,7 +726,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/nucleo-f303re/nxlines/defconfig b/configs/nucleo-f303re/nxlines/defconfig index 0cf525b59ce..84d948c1022 100644 --- a/configs/nucleo-f303re/nxlines/defconfig +++ b/configs/nucleo-f303re/nxlines/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -789,7 +788,6 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set diff --git a/configs/nucleo-f303re/pwm/defconfig b/configs/nucleo-f303re/pwm/defconfig index df69cdde829..ca70a10f724 100644 --- a/configs/nucleo-f303re/pwm/defconfig +++ b/configs/nucleo-f303re/pwm/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -724,7 +723,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set diff --git a/configs/nucleo-f303re/serialrx/defconfig b/configs/nucleo-f303re/serialrx/defconfig index 894a6bcc59e..17f8c5f5e29 100644 --- a/configs/nucleo-f303re/serialrx/defconfig +++ b/configs/nucleo-f303re/serialrx/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -728,7 +727,6 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_SERIAL_REMOVABLE is not set # CONFIG_SERIAL_CONSOLE is not set diff --git a/configs/nucleo-f303re/uavcan/defconfig b/configs/nucleo-f303re/uavcan/defconfig index 8fa6320578e..21ffa461650 100644 --- a/configs/nucleo-f303re/uavcan/defconfig +++ b/configs/nucleo-f303re/uavcan/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -705,7 +704,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set diff --git a/configs/nucleo-f4x1re/f401-nsh/defconfig b/configs/nucleo-f4x1re/f401-nsh/defconfig index ce4f3cf3cca..5973a284e18 100644 --- a/configs/nucleo-f4x1re/f401-nsh/defconfig +++ b/configs/nucleo-f4x1re/f401-nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -724,7 +723,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/nucleo-f4x1re/f411-nsh/defconfig b/configs/nucleo-f4x1re/f411-nsh/defconfig index 238cb1564cd..a1fafd77d52 100644 --- a/configs/nucleo-f4x1re/f411-nsh/defconfig +++ b/configs/nucleo-f4x1re/f411-nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -726,7 +725,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/nucleo-l476rg/nsh/defconfig b/configs/nucleo-l476rg/nsh/defconfig index 730c7bb3a12..c8b4ec69005 100644 --- a/configs/nucleo-l476rg/nsh/defconfig +++ b/configs/nucleo-l476rg/nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -557,7 +556,6 @@ CONFIG_RTC_IOCTL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/nutiny-nuc120/nsh/defconfig b/configs/nutiny-nuc120/nsh/defconfig index d946b02f73a..a8d566fcc0e 100644 --- a/configs/nutiny-nuc120/nsh/defconfig +++ b/configs/nutiny-nuc120/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -445,7 +444,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-efm32g880f128-stk/nsh/defconfig b/configs/olimex-efm32g880f128-stk/nsh/defconfig index 1facde83624..284ccdf97a1 100644 --- a/configs/olimex-efm32g880f128-stk/nsh/defconfig +++ b/configs/olimex-efm32g880f128-stk/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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=y # CONFIG_ARCH_CHIP_IMX1 is not set @@ -451,7 +450,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-lpc-h3131/nsh/defconfig b/configs/olimex-lpc-h3131/nsh/defconfig index 816136a6799..589cbe3c03c 100644 --- a/configs/olimex-lpc-h3131/nsh/defconfig +++ b/configs/olimex-lpc-h3131/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -417,7 +416,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-lpc1766stk/ftpc/defconfig b/configs/olimex-lpc1766stk/ftpc/defconfig index 37340b18dde..fc0d118c62d 100644 --- a/configs/olimex-lpc1766stk/ftpc/defconfig +++ b/configs/olimex-lpc1766stk/ftpc/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -550,7 +549,6 @@ CONFIG_ETH0_PHY_KS8721=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-lpc1766stk/hidkbd/defconfig b/configs/olimex-lpc1766stk/hidkbd/defconfig index 438351bf1cf..f052dbade62 100644 --- a/configs/olimex-lpc1766stk/hidkbd/defconfig +++ b/configs/olimex-lpc1766stk/hidkbd/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -502,7 +501,6 @@ CONFIG_MMCSD_NSLOTS=1 # 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 diff --git a/configs/olimex-lpc1766stk/hidmouse/defconfig b/configs/olimex-lpc1766stk/hidmouse/defconfig index 7deaf52065f..a87a47d09e0 100644 --- a/configs/olimex-lpc1766stk/hidmouse/defconfig +++ b/configs/olimex-lpc1766stk/hidmouse/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -519,7 +518,6 @@ CONFIG_NETDEV_TELNET=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-lpc1766stk/nettest/defconfig b/configs/olimex-lpc1766stk/nettest/defconfig index 0e78b002597..187301717f9 100644 --- a/configs/olimex-lpc1766stk/nettest/defconfig +++ b/configs/olimex-lpc1766stk/nettest/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -516,7 +515,6 @@ CONFIG_ETH0_PHY_KS8721=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-lpc1766stk/nsh/defconfig b/configs/olimex-lpc1766stk/nsh/defconfig index a391c8b8b6d..061eb4cd36e 100644 --- a/configs/olimex-lpc1766stk/nsh/defconfig +++ b/configs/olimex-lpc1766stk/nsh/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -552,7 +551,6 @@ CONFIG_ETH0_PHY_KS8721=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-lpc1766stk/nx/defconfig b/configs/olimex-lpc1766stk/nx/defconfig index 5bfc733710b..498cc7c0044 100644 --- a/configs/olimex-lpc1766stk/nx/defconfig +++ b/configs/olimex-lpc1766stk/nx/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -530,7 +529,6 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-lpc1766stk/slip-httpd/defconfig b/configs/olimex-lpc1766stk/slip-httpd/defconfig index ad62a7308b1..6ccd8a93a4a 100644 --- a/configs/olimex-lpc1766stk/slip-httpd/defconfig +++ b/configs/olimex-lpc1766stk/slip-httpd/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -466,7 +465,6 @@ 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 is not set diff --git a/configs/olimex-lpc1766stk/thttpd-binfs/defconfig b/configs/olimex-lpc1766stk/thttpd-binfs/defconfig index 61584a923f2..ee3023b5077 100644 --- a/configs/olimex-lpc1766stk/thttpd-binfs/defconfig +++ b/configs/olimex-lpc1766stk/thttpd-binfs/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -526,7 +525,6 @@ 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=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-lpc1766stk/thttpd-nxflat/defconfig b/configs/olimex-lpc1766stk/thttpd-nxflat/defconfig index a3f8045c97b..9a9f8690828 100644 --- a/configs/olimex-lpc1766stk/thttpd-nxflat/defconfig +++ b/configs/olimex-lpc1766stk/thttpd-nxflat/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -519,7 +518,6 @@ 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=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-lpc1766stk/usbmsc/defconfig b/configs/olimex-lpc1766stk/usbmsc/defconfig index ac9781cd828..be389ce9404 100644 --- a/configs/olimex-lpc1766stk/usbmsc/defconfig +++ b/configs/olimex-lpc1766stk/usbmsc/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -494,7 +493,6 @@ CONFIG_MMCSD_SPIMODE=0 # 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 diff --git a/configs/olimex-lpc1766stk/usbserial/defconfig b/configs/olimex-lpc1766stk/usbserial/defconfig index 6ae2279feec..3941c38d2ce 100644 --- a/configs/olimex-lpc1766stk/usbserial/defconfig +++ b/configs/olimex-lpc1766stk/usbserial/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -475,7 +474,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y diff --git a/configs/olimex-lpc1766stk/zmodem/defconfig b/configs/olimex-lpc1766stk/zmodem/defconfig index 88aa69be376..7eca8a61a9a 100644 --- a/configs/olimex-lpc1766stk/zmodem/defconfig +++ b/configs/olimex-lpc1766stk/zmodem/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -554,7 +553,6 @@ CONFIG_ETH0_PHY_KS8721=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-lpc2378/nsh/defconfig b/configs/olimex-lpc2378/nsh/defconfig index 641e6078f0a..f5592ef7c92 100644 --- a/configs/olimex-lpc2378/nsh/defconfig +++ b/configs/olimex-lpc2378/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -389,7 +388,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-stm32-e407/discover/defconfig b/configs/olimex-stm32-e407/discover/defconfig index 069ce1dcb70..d4f6b116be5 100644 --- a/configs/olimex-stm32-e407/discover/defconfig +++ b/configs/olimex-stm32-e407/discover/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -824,7 +823,6 @@ CONFIG_ETH0_PHY_LAN8720=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-stm32-e407/netnsh/defconfig b/configs/olimex-stm32-e407/netnsh/defconfig index 1ba24512b93..5d71e695ec7 100644 --- a/configs/olimex-stm32-e407/netnsh/defconfig +++ b/configs/olimex-stm32-e407/netnsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -826,7 +825,6 @@ CONFIG_ETH0_PHY_LAN8720=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-stm32-e407/nsh/defconfig b/configs/olimex-stm32-e407/nsh/defconfig index cc0120fbc78..e65e8838115 100644 --- a/configs/olimex-stm32-e407/nsh/defconfig +++ b/configs/olimex-stm32-e407/nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -738,7 +737,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-stm32-e407/telnetd/defconfig b/configs/olimex-stm32-e407/telnetd/defconfig index 7eaea867bfd..f5410d63917 100644 --- a/configs/olimex-stm32-e407/telnetd/defconfig +++ b/configs/olimex-stm32-e407/telnetd/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -826,7 +825,6 @@ CONFIG_ETH0_PHY_LAN8720=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-stm32-e407/usbnsh/defconfig b/configs/olimex-stm32-e407/usbnsh/defconfig index a0a40840761..2f62bb28037 100644 --- a/configs/olimex-stm32-e407/usbnsh/defconfig +++ b/configs/olimex-stm32-e407/usbnsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -755,7 +754,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_SERIAL_CONSOLE is not set diff --git a/configs/olimex-stm32-e407/webserver/defconfig b/configs/olimex-stm32-e407/webserver/defconfig index 7fd7e60e353..5066117e880 100644 --- a/configs/olimex-stm32-e407/webserver/defconfig +++ b/configs/olimex-stm32-e407/webserver/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -824,7 +823,6 @@ CONFIG_ETH0_PHY_LAN8720=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-stm32-h405/usbnsh/defconfig b/configs/olimex-stm32-h405/usbnsh/defconfig index 37de3e08857..623dc403e6b 100644 --- a/configs/olimex-stm32-h405/usbnsh/defconfig +++ b/configs/olimex-stm32-h405/usbnsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -793,7 +792,6 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_SERIAL_CONSOLE is not set diff --git a/configs/olimex-stm32-h407/nsh/defconfig b/configs/olimex-stm32-h407/nsh/defconfig index 79915a1a72b..f6134cc73c8 100644 --- a/configs/olimex-stm32-h407/nsh/defconfig +++ b/configs/olimex-stm32-h407/nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -748,7 +747,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-stm32-p107/nsh/defconfig b/configs/olimex-stm32-p107/nsh/defconfig index 962d6ca2d92..a35f6c8abd1 100644 --- a/configs/olimex-stm32-p107/nsh/defconfig +++ b/configs/olimex-stm32-p107/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -827,7 +826,6 @@ CONFIG_ETH0_PHY_KS8721=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-stm32-p107/src/stm32_can.c b/configs/olimex-stm32-p107/src/stm32_can.c index 5402f7d44a6..9889f836b22 100644 --- a/configs/olimex-stm32-p107/src/stm32_can.c +++ b/configs/olimex-stm32-p107/src/stm32_can.c @@ -84,7 +84,7 @@ int stm32_can_setup(void) { -#if defined(CONFIG_STM32_CAN1) || defined(CONFIG_STM32_CAN2)) +#if defined(CONFIG_STM32_CAN1) || defined(CONFIG_STM32_CAN2) struct can_dev_s *can; int ret; diff --git a/configs/olimex-stm32-p207/nsh/defconfig b/configs/olimex-stm32-p207/nsh/defconfig index a4d0aa56e1e..5bb065a98b0 100644 --- a/configs/olimex-stm32-p207/nsh/defconfig +++ b/configs/olimex-stm32-p207/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -858,7 +857,6 @@ CONFIG_ETH0_PHY_KS8721=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/pirelli_dpl10/Kconfig b/configs/olimex-stm32-p407/Kconfig similarity index 77% rename from configs/pirelli_dpl10/Kconfig rename to configs/olimex-stm32-p407/Kconfig index f72f3c094ce..439485f15e3 100644 --- a/configs/pirelli_dpl10/Kconfig +++ b/configs/olimex-stm32-p407/Kconfig @@ -2,3 +2,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_OLIMEX_STM32P407 + +endif diff --git a/configs/olimex-stm32-p407/README.txt b/configs/olimex-stm32-p407/README.txt new file mode 100644 index 00000000000..7ddf756213c --- /dev/null +++ b/configs/olimex-stm32-p407/README.txt @@ -0,0 +1,45 @@ +README +====== + +The NuttX configuration for the Olimex STM32-P407 is derives more or less +directly from the Olimex STM32-P207 board support. The P207 and P407 seem +to share the same board design. Other code comes from the STM3240G board +support (which has the same crystal and clocking) and from the STM32 F4 +Discovery (which has the same STM32 part) + +Note that CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG is enabled so +that the JTAG connection is not disconnected by the idle loop. + +The following peripherals are enabled in this configuration. + + - LEDs: show the sytem status + + - Buttons: TAMPER-button, WKUP-button, J1-Joystick (consists of RIGHT-, + UP-, LEFT-, DOWN-, and CENTER-button). Built in app + 'buttons' works. + + - ADC: ADC1 samples the red trim potentiometer AN_TR + Built in app 'adc' works. + + - USB-FS-OTG: enabled but not really tested, since there is only a + USB-A-connector (host) connected to the full speed µC inputs. + The other connector (device) is connected to the high speed µC + inputs, but it seems that NuttX has currently no driver + for it. + + - CAN: Built in app 'can' works, but apart from that not really tested. + + - Ethernet: Ping to other station on the network works. + +STATUS: + +2016-12-21: This board configuration was ported from the Olimex STM32 P207 + port. Note that none of the above features have been verified. USB, CAN, + ADC, and Ethernet are disabled in the base NSH configuration until they + can be verified. These features should be functional but may required + some tweaks due to the different clock configurations. The Olimex STM32 + P207 nsh/defconfig would be a good starting place for restoring these + feature configurations. + + CCM memory is not included in the heap (CONFIG_STM32_CCMEXCLUDE=y) because + it does no suport DMA, leaving only 128KiB for program usage. diff --git a/configs/olimex-stm32-p407/include/board.h b/configs/olimex-stm32-p407/include/board.h new file mode 100644 index 00000000000..6bc7e8b345e --- /dev/null +++ b/configs/olimex-stm32-p407/include/board.h @@ -0,0 +1,315 @@ +/************************************************************************************ + * configs/olimex-stm32-p407/include/board.h + * + * Copyright (C) 2009, 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. + * + ************************************************************************************/ + +#ifndef __CONFIGS_OLIMEX_STM32_P407_INCLUDE_BOARD_H +#define __CONFIGS_OLIMEX_STM32_P407_INCLUDE_BOARD_H 1 + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#ifndef __ASSEMBLY__ +# include +#endif +#include "stm32_rcc.h" +#include "stm32.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Clocking *************************************************************************/ + +/* HSI - 16 MHz RC factory-trimmed + * LSI - 32 KHz RC (30-60KHz, uncalibrated) + * HSE - On-board crystal frequency is 25MHz + * LSE - 32.768 kHz + */ + +#define STM32_BOARD_XTAL 25000000ul + +#define STM32_HSI_FREQUENCY 16000000ul +#define STM32_LSI_FREQUENCY 32000 +#define STM32_HSE_FREQUENCY STM32_BOARD_XTAL +#define STM32_LSE_FREQUENCY 32768 + +/* Main PLL Configuration. + * + * PLL source is HSE + * PLL_VCO = (STM32_HSE_FREQUENCY / PLLM) * PLLN + * = (25,000,000 / 25) * 336 + * = 336,000,000 + * SYSCLK = PLL_VCO / PLLP + * = 336,000,000 / 2 = 168,000,000 + * USB OTG FS, SDIO and RNG Clock + * = PLL_VCO / PLLQ + * = 48,000,000 + */ + +#define STM32_PLLCFG_PLLM RCC_PLLCFG_PLLM(25) +#define STM32_PLLCFG_PLLN RCC_PLLCFG_PLLN(336) +#define STM32_PLLCFG_PLLP RCC_PLLCFG_PLLP_2 +#define STM32_PLLCFG_PLLQ RCC_PLLCFG_PLLQ(7) + +#define STM32_SYSCLK_FREQUENCY 168000000ul + +/* AHB clock (HCLK) is SYSCLK (168MHz) */ + +#define STM32_RCC_CFGR_HPRE RCC_CFGR_HPRE_SYSCLK /* HCLK = SYSCLK / 1 */ +#define STM32_HCLK_FREQUENCY STM32_SYSCLK_FREQUENCY +#define STM32_BOARD_HCLK STM32_HCLK_FREQUENCY /* same as above, to satisfy compiler */ + +/* APB1 clock (PCLK1) is HCLK/4 (42MHz) */ + +#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLKd4 /* PCLK1 = HCLK / 4 */ +#define STM32_PCLK1_FREQUENCY (STM32_HCLK_FREQUENCY/4) + +/* Timers driven from APB1 will be twice PCLK1 */ + +#define STM32_APB1_TIM2_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM3_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM4_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM5_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM6_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM7_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM12_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM13_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM14_CLKIN (2*STM32_PCLK1_FREQUENCY) + +/* APB2 clock (PCLK2) is HCLK/2 (84MHz) */ + +#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLKd2 /* PCLK2 = HCLK / 2 */ +#define STM32_PCLK2_FREQUENCY (STM32_HCLK_FREQUENCY/2) + +/* Timers driven from APB2 will be twice PCLK2 */ + +#define STM32_APB2_TIM1_CLKIN (2*STM32_PCLK2_FREQUENCY) +#define STM32_APB2_TIM8_CLKIN (2*STM32_PCLK2_FREQUENCY) +#define STM32_APB2_TIM9_CLKIN (2*STM32_PCLK2_FREQUENCY) +#define STM32_APB2_TIM10_CLKIN (2*STM32_PCLK2_FREQUENCY) +#define STM32_APB2_TIM11_CLKIN (2*STM32_PCLK2_FREQUENCY) + +/* Timer Frequencies, if APBx is set to 1, frequency is same to APBx + * otherwise frequency is 2xAPBx. + * Note: TIM1,8 are on APB2, others on APB1 + */ + +#define BOARD_TIM1_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM2_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM3_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM4_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM5_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM6_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM7_FREQUENCY STM32_HCLK_FREQUENCY +#define BOARD_TIM8_FREQUENCY STM32_HCLK_FREQUENCY + +/* SDIO dividers. Note that slower clocking is required when DMA is disabled + * in order to avoid RX overrun/TX underrun errors due to delayed responses + * to service FIFOs in interrupt driven mode. These values have not been + * tuned!!! + * + * SDIOCLK=48MHz, SDIO_CK=SDIOCLK/(118+2)=400 KHz + */ + +#define SDIO_INIT_CLKDIV (118 << SDIO_CLKCR_CLKDIV_SHIFT) + +/* DMA ON: SDIOCLK=48MHz, SDIO_CK=SDIOCLK/(1+2)=16 MHz + * DMA OFF: SDIOCLK=48MHz, SDIO_CK=SDIOCLK/(2+2)=12 MHz + */ + +#ifdef CONFIG_SDIO_DMA +# define SDIO_MMCXFR_CLKDIV (1 << SDIO_CLKCR_CLKDIV_SHIFT) +#else +# define SDIO_MMCXFR_CLKDIV (2 << SDIO_CLKCR_CLKDIV_SHIFT) +#endif + +/* DMA ON: SDIOCLK=48MHz, SDIO_CK=SDIOCLK/(1+2)=16 MHz + * DMA OFF: SDIOCLK=48MHz, SDIO_CK=SDIOCLK/(2+2)=12 MHz + */ + +#ifdef CONFIG_SDIO_DMA +# define SDIO_SDXFR_CLKDIV (1 << SDIO_CLKCR_CLKDIV_SHIFT) +#else +# define SDIO_SDXFR_CLKDIV (2 << SDIO_CLKCR_CLKDIV_SHIFT) +#endif + +/* LED definitions ******************************************************************/ +/* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in any + * way. The following definitions are used to access individual LEDs. + */ + +/* 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 + +#define BOARD_LED_GREEN1 BOARD_LED1 +#define BOARD_LED_YELLOW BOARD_LED2 +#define BOARD_LED_RED BOARD_LED3 +#define BOARD_LED_GREEN2 BOARD_LED4 + +/* 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) + +/* If CONFIG_ARCH_LEDs is defined, then NuttX will control the 4 LEDs on board the + * Olimex STM32-P407. The following definitions describe how NuttX controls the LEDs: + */ + +#define LED_STARTED 0 /* LED1 */ +#define LED_HEAPALLOCATE 1 /* LED2 */ +#define LED_IRQSENABLED 2 /* LED1 + LED2 */ +#define LED_STACKCREATED 3 /* LED3 */ +#define LED_INIRQ 4 /* LED1 + LED3 */ +#define LED_SIGNAL 5 /* LED2 + LED3 */ +#define LED_ASSERTION 6 /* LED1 + LED2 + LED3 */ +#define LED_PANIC 7 /* N/C + N/C + N/C + LED4 */ + +/* Button definitions ***************************************************************/ +/* The Olimex STM32-P407 supports seven buttons: */ + +#define BUTTON_TAMPER 0 +#define BUTTON_WKUP 1 +#define BUTTON_RIGHT 2 +#define BUTTON_UP 3 +#define BUTTON_LEFT 4 +#define BUTTON_DOWN 5 +#define BUTTON_CENTER 6 + +#define NUM_BUTTONS 7 + +#define BUTTON_TAMPER_BIT (1 << BUTTON_TAMPER) +#define BUTTON_WKUP_BIT (1 << BUTTON_WKUP) +#define BUTTON_RIGHT_BIT (1 << BUTTON_RIGHT) +#define BUTTON_UP_BIT (1 << BUTTON_UP) +#define BUTTON_LEFT_BIT (1 << BUTTON_LEFT) +#define BUTTON_DOWN_BIT (1 << BUTTON_DOWN) +#define BUTTON_CENTER_BIT (1 << BUTTON_CENTER) + +/* Alternate function pin selections ************************************************/ + +/* USART3: */ + +#define GPIO_USART3_RX GPIO_USART3_RX_3 /* PD9 */ +#define GPIO_USART3_TX GPIO_USART3_TX_3 /* PD8 */ +#define GPIO_USART3_CTS GPIO_USART3_CTS_2 /* PD11 */ +#define GPIO_USART3_RTS GPIO_USART3_RTS_2 /* PD12 */ + +/* CAN: */ + +#define GPIO_CAN1_RX GPIO_CAN1_RX_2 /* PB8 */ +#define GPIO_CAN1_TX GPIO_CAN1_TX_2 /* PB9 */ + +/* Ethernet: + * + * - PA2 is ETH_MDIO + * - PC1 is ETH_MDC + * - PB5 is ETH_PPS_OUT - NC (not connected) + * - PA0 is ETH_MII_CRS - NC + * - PA3 is ETH_MII_COL - NC + * - PB10 is ETH_MII_RX_ER - NC + * - PB0 is ETH_MII_RXD2 - NC + * - PH7 is ETH_MII_RXD3 - NC + * - PC3 is ETH_MII_TX_CLK - NC + * - PC2 is ETH_MII_TXD2 - NC + * - PB8 is ETH_MII_TXD3 - NC + * - PA1 is ETH_MII_RX_CLK/ETH_RMII_REF_CLK + * - PA7 is ETH_MII_RX_DV/ETH_RMII_CRS_DV + * - PC4 is ETH_MII_RXD0/ETH_RMII_RXD0 + * - PC5 is ETH_MII_RXD1/ETH_RMII_RXD1 + * - PB11 is ETH_MII_TX_EN/ETH_RMII_TX_EN + * - PG13 is ETH_MII_TXD0/ETH_RMII_TXD0 + * - PG14 is ETH_MII_TXD1/ETH_RMII_TXD1 + */ + +#define GPIO_ETH_PPS_OUT GPIO_ETH_PPS_OUT_1 +#define GPIO_ETH_MII_CRS GPIO_ETH_MII_CRS_1 +#define GPIO_ETH_MII_COL GPIO_ETH_MII_COL_1 +#define GPIO_ETH_MII_RX_ER GPIO_ETH_MII_RX_ER_1 +#define GPIO_ETH_MII_RXD2 GPIO_ETH_MII_RXD2_1 +#define GPIO_ETH_MII_RXD3 GPIO_ETH_MII_RXD3_1 +#define GPIO_ETH_MII_TXD3 GPIO_ETH_MII_TXD3_1 +#define GPIO_ETH_MII_TX_EN GPIO_ETH_MII_TX_EN_2 +#define GPIO_ETH_MII_TXD0 GPIO_ETH_MII_TXD0_2 +#define GPIO_ETH_MII_TXD1 GPIO_ETH_MII_TXD1_2 +#define GPIO_ETH_RMII_TX_EN GPIO_ETH_RMII_TX_EN_1 +#define GPIO_ETH_RMII_TXD0 GPIO_ETH_RMII_TXD0_2 +#define GPIO_ETH_RMII_TXD1 GPIO_ETH_RMII_TXD1_2 + +/************************************************************************************ + * 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 intitialization -- 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_OLIMEX_STM32_P407_INCLUDE_BOARD_H */ diff --git a/configs/stm32f103-minimum/minnsh/Make.defs b/configs/olimex-stm32-p407/nsh/Make.defs similarity index 95% rename from configs/stm32f103-minimum/minnsh/Make.defs rename to configs/olimex-stm32-p407/nsh/Make.defs index 8d3d4783053..d27844c30b2 100644 --- a/configs/stm32f103-minimum/minnsh/Make.defs +++ b/configs/olimex-stm32-p407/nsh/Make.defs @@ -1,7 +1,7 @@ ############################################################################ -# configs/stm32f103-minimum/nsh/Make.defs +# configs/olimex-stm32-p407/nsh/Make.defs # -# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -76,7 +76,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y) endif ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = @@ -90,7 +90,7 @@ 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 +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld -no-check-sections LDNXFLATFLAGS = -e main -s 2048 ASMEXT = .S @@ -105,9 +105,7 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y) LDFLAGS += -g endif - HOSTCC = gcc HOSTINCLUDES = -I. HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe HOSTLDFLAGS = - diff --git a/configs/stm32f103-minimum/minnsh/defconfig b/configs/olimex-stm32-p407/nsh/defconfig similarity index 76% rename from configs/stm32f103-minimum/minnsh/defconfig rename to configs/olimex-stm32-p407/nsh/defconfig index a150431a155..21dacf69cea 100644 --- a/configs/stm32f103-minimum/minnsh/defconfig +++ b/configs/olimex-stm32-p407/nsh/defconfig @@ -7,7 +7,7 @@ # Build Setup # # CONFIG_EXPERIMENTAL is not set -CONFIG_DEFAULT_SMALL=y +# CONFIG_DEFAULT_SMALL is not set CONFIG_HOST_LINUX=y # CONFIG_HOST_OSX is not set # CONFIG_HOST_WINDOWS is not set @@ -24,7 +24,7 @@ CONFIG_BUILD_FLAT=y # Binary Output Formats # # CONFIG_RRLOAD_BINARY is not set -# CONFIG_INTELHEX_BINARY is not set +CONFIG_INTELHEX_BINARY=y # CONFIG_MOTOROLA_SREC is not set CONFIG_RAW_BINARY=y # CONFIG_UBOOT_UIMAGE is not set @@ -42,7 +42,7 @@ CONFIG_RAW_BINARY=y # # Debug Options # -# CONFIG_DEBUG_ALERT is not set +CONFIG_DEBUG_ALERT=y # CONFIG_DEBUG_FEATURES is not set CONFIG_ARCH_HAVE_STACKCHECK=y # CONFIG_STACK_COLORATION is not set @@ -61,9 +61,12 @@ CONFIG_ARCH_ARM=y # CONFIG_ARCH_AVR is not set # CONFIG_ARCH_HC is not set # CONFIG_ARCH_MIPS is not set +# CONFIG_ARCH_MISOC is not set # CONFIG_ARCH_RENESAS is not set +# CONFIG_ARCH_RISCV is not set # CONFIG_ARCH_SIM is not set # CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_XTENSA is not set # CONFIG_ARCH_Z16 is not set # CONFIG_ARCH_Z80 is not set CONFIG_ARCH="arm" @@ -73,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -104,8 +106,8 @@ CONFIG_ARCH_CHIP_STM32=y # 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_CORTEXM3 is not set +CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXM7 is not set # CONFIG_ARCH_CORTEXA5 is not set # CONFIG_ARCH_CORTEXA8 is not set @@ -124,8 +126,9 @@ CONFIG_ARM_TOOLCHAIN_GNU=y CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_CMNVECTOR is not set # CONFIG_ARMV7M_LAZYFPU is not set -# CONFIG_ARCH_HAVE_FPU is not set +CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set +CONFIG_ARCH_FPU=y # CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -138,10 +141,11 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # 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_BUILDROOT=y # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set -CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y +# 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 @@ -186,7 +190,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # 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_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 @@ -252,7 +256,7 @@ CONFIG_ARCH_CHIP_STM32F103C8=y # 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_STM32F407ZG=y # CONFIG_ARCH_CHIP_STM32F407IE is not set # CONFIG_ARCH_CHIP_STM32F407IG is not set # CONFIG_ARCH_CHIP_STM32F427V is not set @@ -284,13 +288,13 @@ CONFIG_STM32_FLASH_CONFIG_DEFAULT=y # 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_STM32F10XX is not set # CONFIG_STM32_VALUELINE is not set # CONFIG_STM32_CONNECTIVITYLINE is not set -CONFIG_STM32_PERFORMANCELINE=y +# CONFIG_STM32_PERFORMANCELINE is not set # CONFIG_STM32_USBACCESSLINE is not set # CONFIG_STM32_HIGHDENSITY is not set -CONFIG_STM32_MEDIUMDENSITY=y +# CONFIG_STM32_MEDIUMDENSITY is not set # CONFIG_STM32_LOWDENSITY is not set # CONFIG_STM32_STM32F20XX is not set # CONFIG_STM32_STM32F205 is not set @@ -299,11 +303,11 @@ CONFIG_STM32_MEDIUMDENSITY=y # 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_STM32F40XX=y # 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_STM32F407=y # CONFIG_STM32_STM32F427 is not set # CONFIG_STM32_STM32F429 is not set # CONFIG_STM32_STM32F446 is not set @@ -313,31 +317,31 @@ CONFIG_STM32_MEDIUMDENSITY=y # # 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_CCM=y +# CONFIG_STM32_HAVE_USBDEV is not set +CONFIG_STM32_HAVE_OTGFS=y +CONFIG_STM32_HAVE_FSMC=y # 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_USART6=y # CONFIG_STM32_HAVE_UART7 is not set # CONFIG_STM32_HAVE_UART8 is not set CONFIG_STM32_HAVE_TIM1=y -# CONFIG_STM32_HAVE_TIM2 is not set +CONFIG_STM32_HAVE_TIM2=y 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_TIM9=y +CONFIG_STM32_HAVE_TIM10=y +CONFIG_STM32_HAVE_TIM11=y +CONFIG_STM32_HAVE_TIM12=y +CONFIG_STM32_HAVE_TIM13=y +CONFIG_STM32_HAVE_TIM14=y # CONFIG_STM32_HAVE_TIM15 is not set # CONFIG_STM32_HAVE_TIM16 is not set # CONFIG_STM32_HAVE_TIM17 is not set @@ -348,14 +352,20 @@ CONFIG_STM32_HAVE_ADC3=y # 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_SDADC1 is not set +# CONFIG_STM32_HAVE_SDADC2 is not set +# CONFIG_STM32_HAVE_SDADC3 is not set +# CONFIG_STM32_HAVE_SDADC1_DMA is not set +# CONFIG_STM32_HAVE_SDADC2_DMA is not set +# CONFIG_STM32_HAVE_SDADC3_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_CAN2=y +CONFIG_STM32_HAVE_DAC1=y +CONFIG_STM32_HAVE_DAC2=y +CONFIG_STM32_HAVE_RNG=y +CONFIG_STM32_HAVE_ETHMAC=y CONFIG_STM32_HAVE_I2C2=y -# CONFIG_STM32_HAVE_I2C3 is not set +CONFIG_STM32_HAVE_I2C3=y CONFIG_STM32_HAVE_SPI2=y CONFIG_STM32_HAVE_SPI3=y # CONFIG_STM32_HAVE_SPI4 is not set @@ -366,18 +376,32 @@ CONFIG_STM32_HAVE_SPI3=y # 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_BKPSRAM is not set # CONFIG_STM32_CAN1 is not set +# CONFIG_STM32_CAN2 is not set +# CONFIG_STM32_CCMDATARAM is not set # CONFIG_STM32_CRC is not set +# CONFIG_STM32_CRYP is not set # CONFIG_STM32_DMA1 is not set # CONFIG_STM32_DMA2 is not set +# CONFIG_STM32_DAC1 is not set +# CONFIG_STM32_DAC2 is not set +# CONFIG_STM32_DCMI is not set +# CONFIG_STM32_ETHMAC is not set +# CONFIG_STM32_FSMC is not set +# CONFIG_STM32_HASH is not set # CONFIG_STM32_I2C1 is not set # CONFIG_STM32_I2C2 is not set -# CONFIG_STM32_PWR is not set +# CONFIG_STM32_I2C3 is not set +# CONFIG_STM32_OTGFS is not set +# CONFIG_STM32_OTGHS is not set +CONFIG_STM32_PWR=y +# CONFIG_STM32_RNG 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_SYSCFG=y # CONFIG_STM32_TIM1 is not set # CONFIG_STM32_TIM2 is not set # CONFIG_STM32_TIM3 is not set @@ -386,12 +410,18 @@ CONFIG_STM32_HAVE_SPI3=y # CONFIG_STM32_TIM6 is not set # CONFIG_STM32_TIM7 is not set # CONFIG_STM32_TIM8 is not set -CONFIG_STM32_USART1=y +# CONFIG_STM32_TIM9 is not set +# CONFIG_STM32_TIM10 is not set +# CONFIG_STM32_TIM11 is not set +# CONFIG_STM32_TIM12 is not set +# CONFIG_STM32_TIM13 is not set +# CONFIG_STM32_TIM14 is not set +# CONFIG_STM32_USART1 is not set # CONFIG_STM32_USART2 is not set -# CONFIG_STM32_USART3 is not set +CONFIG_STM32_USART3=y # CONFIG_STM32_UART4 is not set # CONFIG_STM32_UART5 is not set -# CONFIG_STM32_USB is not set +# CONFIG_STM32_USART6 is not set # CONFIG_STM32_IWDG is not set # CONFIG_STM32_WWDG is not set # CONFIG_STM32_NOEXT_VECTORS is not set @@ -399,14 +429,15 @@ CONFIG_STM32_USART1=y # # Alternate Pin Mapping # -# CONFIG_STM32_USART1_REMAP is not set +# CONFIG_STM32_FLASH_PREFETCH is not set # CONFIG_STM32_JTAG_DISABLE is not set -CONFIG_STM32_JTAG_FULL_ENABLE=y +# CONFIG_STM32_JTAG_FULL_ENABLE is not set # CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set -# CONFIG_STM32_JTAG_SW_ENABLE is not set +CONFIG_STM32_JTAG_SW_ENABLE=y CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_STM32_FORCEPOWER is not set # CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set +CONFIG_STM32_CCMEXCLUDE=y # # Timer Configuration @@ -414,10 +445,17 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # 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 # CONFIG_STM32_TIM4_CAP is not set # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set +# CONFIG_STM32_TIM9_CAP is not set +# CONFIG_STM32_TIM10_CAP is not set +# CONFIG_STM32_TIM11_CAP is not set +# CONFIG_STM32_TIM12_CAP is not set +# CONFIG_STM32_TIM13_CAP is not set +# CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y CONFIG_STM32_SERIALDRIVER=y @@ -428,9 +466,9 @@ CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Device Configuration # -CONFIG_STM32_USART1_SERIALDRIVER=y -# CONFIG_STM32_USART1_1WIREDRIVER is not set -# CONFIG_USART1_RS485 is not set +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set +# CONFIG_USART3_RS485 is not set # # Serial Driver Configuration @@ -439,7 +477,7 @@ CONFIG_STM32_USART1_SERIALDRIVER=y # 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_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set # @@ -479,7 +517,7 @@ CONFIG_ARCH_HAVE_MPU=y CONFIG_ARCH_HAVE_RESET=y # CONFIG_ARCH_USE_MPU is not set # CONFIG_ARCH_IRQPRIO is not set -# CONFIG_ARCH_STACKDUMP is not set +CONFIG_ARCH_STACKDUMP=y # CONFIG_ENDIAN_BIG is not set # CONFIG_ARCH_IDLE_CUSTOM is not set # CONFIG_ARCH_HAVE_RAMFUNCS is not set @@ -489,7 +527,7 @@ CONFIG_ARCH_HAVE_RAMVECTORS=y # # Board Settings # -CONFIG_BOARD_LOOPSPERMSEC=5483 +CONFIG_BOARD_LOOPSPERMSEC=16717 # CONFIG_ARCH_CALIBRATION is not set # @@ -513,38 +551,48 @@ CONFIG_BOOT_RUNFROMFLASH=y # Boot Memory Configuration # CONFIG_RAM_START=0x20000000 -CONFIG_RAM_SIZE=20480 +CONFIG_RAM_SIZE=131072 # 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_OLIMEX_STM32H407 is not set +# CONFIG_ARCH_BOARD_OLIMEX_STM32E407 is not set +CONFIG_ARCH_BOARD_OLIMEX_STM32P407=y # CONFIG_ARCH_BOARD_CUSTOM is not set -CONFIG_ARCH_BOARD="stm32f103-minimum" +CONFIG_ARCH_BOARD="olimex-stm32-p407" # # Common Board Options # CONFIG_ARCH_HAVE_LEDS=y CONFIG_ARCH_LEDS=y +CONFIG_ARCH_HAVE_BUTTONS=y +CONFIG_ARCH_BUTTONS=y +CONFIG_ARCH_HAVE_IRQBUTTONS=y +CONFIG_ARCH_IRQBUTTONS=y # # Board-Specific Options # # CONFIG_BOARD_CRASHDUMP is not set -# CONFIG_LIB_BOARDCTL is not set +CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_RESET is not set +# CONFIG_BOARDCTL_UNIQUEID is not set +# CONFIG_BOARDCTL_TSCTEST 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=y -CONFIG_DISABLE_PTHREAD=y -CONFIG_DISABLE_SIGNALS=y -CONFIG_DISABLE_MQUEUE=y -CONFIG_DISABLE_ENVIRON=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 @@ -557,26 +605,35 @@ CONFIG_USEC_PER_TICK=10000 CONFIG_ARCH_HAVE_TIMEKEEPING=y # CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2013 -CONFIG_START_MONTH=2 -CONFIG_START_DAY=26 +CONFIG_START_MONTH=1 +CONFIG_START_DAY=1 CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=4 -CONFIG_WDOG_INTRESERVE=0 -CONFIG_PREALLOC_TIMERS=0 +CONFIG_PREALLOC_WDOGS=8 +CONFIG_WDOG_INTRESERVE=1 +CONFIG_PREALLOC_TIMERS=4 # # Tasks and Scheduling # +# CONFIG_SPINLOCK is not set # CONFIG_INIT_NONE is not set CONFIG_INIT_ENTRYPOINT=y # CONFIG_INIT_FILEPATH is not set CONFIG_USER_ENTRYPOINT="nsh_main" -CONFIG_RR_INTERVAL=0 +CONFIG_RR_INTERVAL=200 # CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=0 -CONFIG_MAX_TASKS=4 +CONFIG_MAX_TASKS=16 # CONFIG_SCHED_HAVE_PARENT is not set -# CONFIG_SCHED_WAITPID is not set +CONFIG_SCHED_WAITPID=y + +# +# Pthread Options +# +# CONFIG_MUTEX_TYPES is not set +CONFIG_NPTHREAD_KEYS=4 +# CONFIG_PTHREAD_CLEANUP is not set +# CONFIG_CANCELLATION_POINTS is not set # # Performance Monitoring @@ -587,27 +644,50 @@ CONFIG_MAX_TASKS=4 # # Files and I/O # -# CONFIG_DEV_CONSOLE is not set -CONFIG_FDCLONE_DISABLE=y +CONFIG_DEV_CONSOLE=y +# CONFIG_FDCLONE_DISABLE is not set # CONFIG_FDCLONE_STDIO is not set CONFIG_SDCLONE_DISABLE=y -CONFIG_NFILE_DESCRIPTORS=0 -CONFIG_NFILE_STREAMS=0 +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_BOARD_INITIALIZE=y +# CONFIG_BOARD_INITTHREAD is not set # CONFIG_SCHED_STARTHOOK is not set # CONFIG_SCHED_ATEXIT is not set # CONFIG_SCHED_ONEXIT is not set +# 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 @@ -622,7 +702,7 @@ CONFIG_PTHREAD_STACK_DEFAULT=2048 # Device Drivers # CONFIG_DISABLE_POLL=y -# CONFIG_DEV_NULL 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 @@ -640,6 +720,8 @@ CONFIG_DISABLE_POLL=y CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_I2C is not set # CONFIG_SPI 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_I2S is not set @@ -647,6 +729,7 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # 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 @@ -682,8 +765,8 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y +# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set CONFIG_SERIAL_CONSOLE=y # CONFIG_16550_UART is not set @@ -700,9 +783,9 @@ CONFIG_SERIAL_CONSOLE=y # CONFIG_SCI0_SERIALDRIVER is not set # CONFIG_SCI1_SERIALDRIVER is not set # CONFIG_USART0_SERIALDRIVER is not set -CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART1_SERIALDRIVER is not set # CONFIG_USART2_SERIALDRIVER is not set -# CONFIG_USART3_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y # CONFIG_USART4_SERIALDRIVER is not set # CONFIG_USART5_SERIALDRIVER is not set # CONFIG_USART6_SERIALDRIVER is not set @@ -710,32 +793,33 @@ CONFIG_USART1_SERIALDRIVER=y # CONFIG_USART8_SERIALDRIVER is not set # CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y -# CONFIG_STANDARD_SERIAL is not set +CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set # CONFIG_SERIAL_DMA is not set CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y -CONFIG_USART1_SERIAL_CONSOLE=y +CONFIG_USART3_SERIAL_CONSOLE=y # CONFIG_OTHER_SERIAL_CONSOLE is not set # CONFIG_NO_SERIAL_CONSOLE is not set # -# USART1 Configuration +# USART3 Configuration # -CONFIG_USART1_RXBUFSIZE=64 -CONFIG_USART1_TXBUFSIZE=64 -CONFIG_USART1_BAUD=115200 -CONFIG_USART1_BITS=8 -CONFIG_USART1_PARITY=0 -CONFIG_USART1_2STOP=0 -# CONFIG_USART1_IFLOWCONTROL is not set -# CONFIG_USART1_OFLOWCONTROL is not set -# CONFIG_USART1_DMA is not set +CONFIG_USART3_RXBUFSIZE=256 +CONFIG_USART3_TXBUFSIZE=256 +CONFIG_USART3_BAUD=115200 +CONFIG_USART3_BITS=8 +CONFIG_USART3_PARITY=0 +CONFIG_USART3_2STOP=0 +# CONFIG_USART3_IFLOWCONTROL is not set +# CONFIG_USART3_OFLOWCONTROL is not set +# CONFIG_USART3_DMA is not set # CONFIG_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 +# CONFIG_DRIVERS_CONTACTLESS is not set # # System Logging @@ -744,9 +828,10 @@ CONFIG_USART1_2STOP=0 # CONFIG_RAMLOG is not set # CONFIG_SYSLOG_INTBUFFER is not set # CONFIG_SYSLOG_TIMESTAMP is not set -# CONFIG_SYSLOG_SERIAL_CONSOLE is not set +CONFIG_SYSLOG_SERIAL_CONSOLE=y # CONFIG_SYSLOG_CHAR is not set -CONFIG_SYSLOG_NONE=y +CONFIG_SYSLOG_CONSOLE=y +# CONFIG_SYSLOG_NONE is not set # CONFIG_SYSLOG_FILE is not set # CONFIG_SYSLOG_CHARDEV is not set @@ -769,12 +854,20 @@ CONFIG_SYSLOG_NONE=y # # File system configuration # -CONFIG_DISABLE_MOUNTPOINT=y -CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set # CONFIG_FS_READABLE is not set # CONFIG_FS_WRITABLE is not set # CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_RAMMAP is not set +# CONFIG_FS_FAT is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set +# CONFIG_FS_TMPFS is not set +# CONFIG_FS_SMARTFS is not set +# CONFIG_FS_BINFS is not set # CONFIG_FS_PROCFS is not set # CONFIG_FS_UNIONFS is not set @@ -786,7 +879,7 @@ CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y # # Memory Management # -CONFIG_MM_SMALL=y +# CONFIG_MM_SMALL is not set CONFIG_MM_REGIONS=1 # CONFIG_ARCH_HAVE_HEAP2 is not set # CONFIG_GRAN is not set @@ -804,9 +897,10 @@ 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 is not set +CONFIG_BUILTIN=y # CONFIG_PIC is not set # CONFIG_SYMTAB_ORDEREDBYNAME is not set @@ -817,14 +911,17 @@ CONFIG_MM_REGIONS=1 # # Standard C Library Options # -CONFIG_STDIO_BUFFER_SIZE=0 +CONFIG_STDIO_BUFFER_SIZE=64 CONFIG_STDIO_LINEBUFFER=y -CONFIG_NUNGET_CHARS=0 +CONFIG_NUNGET_CHARS=2 +CONFIG_LIB_HOMEDIR="/" # CONFIG_LIBM is not set -CONFIG_NOPRINTF_FIELDWIDTH=y +# CONFIG_NOPRINTF_FIELDWIDTH is not set # CONFIG_LIBC_FLOATINGPOINT is not set -# CONFIG_LIBC_LONG_LONG is not set +CONFIG_LIBC_LONG_LONG=y # CONFIG_LIBC_IOCTL_VARIADIC is not set +# CONFIG_LIBC_WCHAR is not set +# CONFIG_LIBC_LOCALE is not set CONFIG_LIB_RAND_ORDER=1 # CONFIG_EOL_IS_CR is not set # CONFIG_EOL_IS_LF is not set @@ -836,12 +933,15 @@ 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_IPv4_ADDRCONV is not set +# CONFIG_LIBC_IPv6_ADDRCONV is not set # CONFIG_LIBC_NETDB is not set # @@ -856,12 +956,24 @@ CONFIG_ARCH_HAVE_TLS=y # Basic CXX Support # # CONFIG_C99_BOOL8 is not set -# CONFIG_HAVE_CXX is not set +CONFIG_HAVE_CXX=y +CONFIG_HAVE_CXXINITIALIZE=y +# CONFIG_CXX_NEWLONG is not set + +# +# uClibc++ Standard C++ Library +# +# CONFIG_UCLIBCXX is not set # # Application Configuration # +# +# Built-In Applications +# +CONFIG_BUILTIN_PROXY_STACKSIZE=1024 + # # CAN Utilities # @@ -869,13 +981,17 @@ CONFIG_ARCH_HAVE_TLS=y # # Examples # +# CONFIG_EXAMPLES_BUTTONS is not set +# CONFIG_EXAMPLES_CCTYPE is not set # CONFIG_EXAMPLES_CHAT is not set # CONFIG_EXAMPLES_CONFIGDATA is not set +# CONFIG_EXAMPLES_CXXTEST is not set # CONFIG_EXAMPLES_DHCPD is not set # CONFIG_EXAMPLES_ELF is not set # CONFIG_EXAMPLES_FTPC is not set # CONFIG_EXAMPLES_FTPD is not set # CONFIG_EXAMPLES_HELLO is not set +# CONFIG_EXAMPLES_HELLOXX is not set # CONFIG_EXAMPLES_HIDKBD is not set # CONFIG_EXAMPLES_IGMP is not set # CONFIG_EXAMPLES_JSON is not set @@ -886,6 +1002,7 @@ CONFIG_ARCH_HAVE_TLS=y # CONFIG_EXAMPLES_MOUNT is not set # CONFIG_EXAMPLES_NRF24L01TERM is not set CONFIG_EXAMPLES_NSH=y +CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_NULL is not set # CONFIG_EXAMPLES_NX is not set # CONFIG_EXAMPLES_NXFFS is not set @@ -906,11 +1023,13 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_SERLOOP is not set # CONFIG_EXAMPLES_SLCD is not set # CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_SMART_TEST is not set # CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set +# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WEBSERVER is not set @@ -936,6 +1055,7 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_INTERPRETERS_FICL is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set +# CONFIG_INTERPRETERS_MINIBASIC is not set # CONFIG_INTERPRETERS_PCODE is not set # @@ -963,27 +1083,29 @@ CONFIG_NSH_LIBRARY=y # CONFIG_NSH_READLINE=y # CONFIG_NSH_CLE is not set -CONFIG_NSH_LINELEN=80 -CONFIG_NSH_DISABLE_SEMICOLON=y +CONFIG_NSH_LINELEN=64 +# CONFIG_NSH_DISABLE_SEMICOLON is not set +CONFIG_NSH_CMDPARMS=y CONFIG_NSH_MAXARGUMENTS=6 -# CONFIG_NSH_ARGCAT is not set +CONFIG_NSH_ARGCAT=y CONFIG_NSH_NESTDEPTH=3 # CONFIG_NSH_DISABLEBG is not set +CONFIG_NSH_BUILTIN_APPS=y # # Disable Individual commands # -CONFIG_NSH_DISABLE_ADDROUTE=y -CONFIG_NSH_DISABLE_BASENAME=y +# 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=y -CONFIG_NSH_DISABLE_CP=y +# CONFIG_NSH_DISABLE_CD is not set +# CONFIG_NSH_DISABLE_CP is not set # CONFIG_NSH_DISABLE_CMP is not set CONFIG_NSH_DISABLE_DATE=y -CONFIG_NSH_DISABLE_DD=y -CONFIG_NSH_DISABLE_DF=y -CONFIG_NSH_DISABLE_DELROUTE=y -CONFIG_NSH_DISABLE_DIRNAME=y +# CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_DF is not set +# CONFIG_NSH_DISABLE_DELROUTE is not set +# CONFIG_NSH_DISABLE_DIRNAME is not set # CONFIG_NSH_DISABLE_ECHO is not set # CONFIG_NSH_DISABLE_EXEC is not set # CONFIG_NSH_DISABLE_EXIT is not set @@ -991,31 +1113,32 @@ CONFIG_NSH_DISABLE_DIRNAME=y CONFIG_NSH_DISABLE_GET=y # CONFIG_NSH_DISABLE_HELP is not set # CONFIG_NSH_DISABLE_HEXDUMP is not set -CONFIG_NSH_DISABLE_IFCONFIG=y +# CONFIG_NSH_DISABLE_IFCONFIG is not set CONFIG_NSH_DISABLE_IFUPDOWN=y # CONFIG_NSH_DISABLE_KILL is not set -CONFIG_NSH_DISABLE_LOSETUP=y +# CONFIG_NSH_DISABLE_LOSETUP is not set CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_LS is not set # CONFIG_NSH_DISABLE_MB is not set -CONFIG_NSH_DISABLE_MKDIR=y -CONFIG_NSH_DISABLE_MKRD=y +# 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=y -CONFIG_NSH_DISABLE_MV=y +# CONFIG_NSH_DISABLE_MOUNT is not set +# CONFIG_NSH_DISABLE_MV is not set # CONFIG_NSH_DISABLE_MW is not set +CONFIG_NSH_DISABLE_PRINTF=y # CONFIG_NSH_DISABLE_PS is not set CONFIG_NSH_DISABLE_PUT=y # CONFIG_NSH_DISABLE_PWD is not set -CONFIG_NSH_DISABLE_RM=y -CONFIG_NSH_DISABLE_RMDIR=y +# CONFIG_NSH_DISABLE_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_TIME is not set # CONFIG_NSH_DISABLE_TEST is not set -CONFIG_NSH_DISABLE_UMOUNT=y -CONFIG_NSH_DISABLE_UNAME=y +# CONFIG_NSH_DISABLE_UMOUNT is not set +# CONFIG_NSH_DISABLE_UNAME is not set # CONFIG_NSH_DISABLE_UNSET is not set # CONFIG_NSH_DISABLE_USLEEP is not set CONFIG_NSH_DISABLE_WGET=y @@ -1025,14 +1148,18 @@ CONFIG_NSH_MMCSDMINOR=0 # # Configure Command Options # +# CONFIG_NSH_CMDOPT_DF_H is not set +# CONFIG_NSH_CMDOPT_DD_STATS is not set CONFIG_NSH_CODECS_BUFSIZE=128 -# CONFIG_NSH_CMDOPT_HEXDUMP is not set -CONFIG_NSH_FILEIOSIZE=64 +CONFIG_NSH_CMDOPT_HEXDUMP=y +CONFIG_NSH_FILEIOSIZE=512 # # Scripting Support # -CONFIG_NSH_DISABLESCRIPT=y +# CONFIG_NSH_DISABLESCRIPT is not set +# CONFIG_NSH_DISABLE_ITEF is not set +# CONFIG_NSH_DISABLE_LOOPS is not set # # Console Configuration @@ -1068,6 +1195,8 @@ CONFIG_READLINE_ECHO=y # CONFIG_READLINE_TABCOMPLETION is not set # CONFIG_READLINE_CMD_HISTORY is not set # CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_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/lpcxpresso-lpc1115/minnsh/setenv.sh b/configs/olimex-stm32-p407/nsh/setenv.sh old mode 100755 new mode 100644 similarity index 76% rename from configs/lpcxpresso-lpc1115/minnsh/setenv.sh rename to configs/olimex-stm32-p407/nsh/setenv.sh index f47c395c1c7..196f907e5e7 --- a/configs/lpcxpresso-lpc1115/minnsh/setenv.sh +++ b/configs/olimex-stm32-p407/nsh/setenv.sh @@ -1,7 +1,7 @@ #!/bin/bash -# configs/lpcxpresso-lpc1115/minnsh/setenv.sh +# configs/olimex-stm32-p407/nsh/setenv.sh # -# Copyright (C) 2015 Gregory Nutt. All rights reserved. +# Copyright (C) 2009 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -32,14 +32,20 @@ # POSSIBILITY OF SUCH DAMAGE. # -if [ "$(basename $0)" = "setenv.sh" ] ; then +if [ "$_" = "$0" ] ; then echo "You must source this script, not run it!" 1>&2 exit 1 fi -if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi - WD=`pwd` +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 @@ -56,11 +62,13 @@ export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/GNU Tools ARM Embedded/4.9 # 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 default install location for Code Red on Linux -# export TOOLCHAIN_BIN="/usr/local/LPCXpresso/tools/bin" - -# This is the Cygwin path to the LPCXpresso 3.6 install location under Windows -#export TOOLCHAIN_BIN="/cygdrive/c/nxp/lpcxpresso_3.6/Tools/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. diff --git a/configs/olimex-stm32-p407/scripts/ld.script b/configs/olimex-stm32-p407/scripts/ld.script new file mode 100644 index 00000000000..5132280a203 --- /dev/null +++ b/configs/olimex-stm32-p407/scripts/ld.script @@ -0,0 +1,121 @@ +/**************************************************************************** + * configs/olimex-stm32-p407/scripts/ld.script + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/* The STM32F407VG has 1024Kb of FLASH beginning at address 0x0800:0000 and + * 192Kb of SRAM. SRAM is split up into three blocks: + * + * 1) 112Kb of SRAM beginning at address 0x2000:0000 + * 2) 16Kb of SRAM beginning at address 0x2001:c000 + * 3) 64Kb of CCM SRAM beginning at address 0x1000:0000 + * + * When booting from FLASH, FLASH memory is aliased to address 0x0000:0000 + * where the code expects to begin execution by jumping to the entry point in + * the 0x0800:0000 address range. + */ + +MEMORY +{ + flash (rx) : ORIGIN = 0x08000000, LENGTH = 1024K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 112K +} + +OUTPUT_ARCH(arm) +ENTRY(_stext) +SECTIONS +{ + .text : { + _stext = ABSOLUTE(.); + *(.vectors) + *(.text .text.*) + *(.fixup) + *(.gnu.warning) + *(.rodata .rodata.*) + *(.gnu.linkonce.t.*) + *(.glue_7) + *(.glue_7t) + *(.got) + *(.gcc_except_table) + *(.gnu.linkonce.r.*) + _etext = ABSOLUTE(.); + } > flash + + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + + _eronly = ABSOLUTE(.); + + .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/compal_e99/src/Makefile b/configs/olimex-stm32-p407/src/Makefile similarity index 77% rename from configs/compal_e99/src/Makefile rename to configs/olimex-stm32-p407/src/Makefile index c2ad1cc7769..fa543389eb4 100644 --- a/configs/compal_e99/src/Makefile +++ b/configs/olimex-stm32-p407/src/Makefile @@ -1,12 +1,9 @@ ############################################################################ -# configs/compal_e99/src/Makefile +# configs/olimex-stm32-p407/src/Makefile # -# Copyright (C) 2007, 2008, 2015 Gregory Nutt. All rights reserved. +# Copyright (C) 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # -# Copyright (C) 2011 Stefan Richter. All rights reserved. -# Author: Stefan Richter -# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: @@ -39,6 +36,32 @@ -include $(TOPDIR)/Make.defs ASRCS = -CSRCS = boot.c ssd1783.c +CSRCS = stm32_boot.c stm32_bringup.c + +ifeq ($(CONFIG_ARCH_LEDS),y) +CSRCS += stm32_autoleds.c +else +CSRCS += stm32_userleds.c +endif + +ifeq ($(CONFIG_ARCH_BUTTONS),y) +CSRCS += stm32_buttons.c +endif + +ifeq ($(CONFIG_STM32_OTGFS),y) +CSRCS += stm32_usb.c +endif + +ifeq ($(CONFIG_LIB_BOARDCTL),y) +CSRCS += stm32_appinit.c +endif + +ifeq ($(CONFIG_ADC),y) +CSRCS += stm32_adc.c +endif + +ifeq ($(CONFIG_CAN),y) +CSRCS += stm32_can.c +endif include $(TOPDIR)/configs/Board.mk diff --git a/configs/olimex-stm32-p407/src/olimex-stm32-p407.h b/configs/olimex-stm32-p407/src/olimex-stm32-p407.h new file mode 100644 index 00000000000..3ba7d536acc --- /dev/null +++ b/configs/olimex-stm32-p407/src/olimex-stm32-p407.h @@ -0,0 +1,207 @@ +/**************************************************************************** + * configs/olimex-stm32-p107/src/olimex-stm32-p407.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Derives from a file of a similar name for the Olimex STM32 P207: + * + * Copyright (C) 2013 Max Holtzberg. All rights reserved. + * Author: Max Holtzberg + * + * 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_OLIMEX_STM32_P407_SRC_H +#define __CONFIGS_OLIMEX_STM32_P407_SRC_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#define HAVE_USBDEV 1 +#define HAVE_USBHOST 1 +#define HAVE_USBMONITOR 1 + +/* Can't support USB host or device features if USB OTG FS is not enabled */ + +#ifndef CONFIG_STM32_OTGFS +# undef HAVE_USBDEV +# undef HAVE_USBHOST +# undef HAVE_USBMONITOR +#endif + +/* Can't support USB device monitor if USB device is not enabled */ + +#ifndef CONFIG_USBDEV +# undef HAVE_USBDEV +# undef HAVE_USBMONITOR +#endif + +/* Can't support USB host is USB host is not enabled */ + +#ifndef CONFIG_USBHOST +# undef HAVE_USBHOST +#endif + +/* Check if we should enable the USB monitor before starting NSH */ + +#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_USBMONITOR) +# undef HAVE_USBMONITOR +#endif + + +/* Olimex-STM32-P407 GPIOs **************************************************/ +/* LEDs */ + +#define GPIO_LED1 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\ + GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN6) +#define GPIO_LED2 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\ + GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN7) +#define GPIO_LED3 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\ + GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN8) +#define GPIO_LED4 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\ + GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN9) + +/* BUTTONS -- NOTE that all have EXTI interrupts configured */ + +#define MIN_IRQBUTTON BUTTON_TAMPER +#define MAX_IRQBUTTON BUTTON_CENTER +#define NUM_IRQBUTTONS 7 + +#define GPIO_BTN_TAMPER (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTC|GPIO_PIN13) +#define GPIO_BTN_WKUP (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTA|GPIO_PIN0) +#define GPIO_BTN_RIGHT (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTG|GPIO_PIN6) +#define GPIO_BTN_UP (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTG|GPIO_PIN7) +#define GPIO_BTN_LEFT (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTG|GPIO_PIN11) +#define GPIO_BTN_DOWN (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTG|GPIO_PIN8) +#define GPIO_BTN_CENTER (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTG|GPIO_PIN15) + +/* USB OTG FS + * + * PA9 OTG_FS_VBUS VBUS sensing (also connected to the green LED) + * PC2 OTG_FS_PowerSwitchOn + * PB10 OTG_FS_Overcurrent + */ + +#define GPIO_OTGFS_VBUS (GPIO_INPUT|GPIO_FLOAT|GPIO_PORTA|GPIO_PIN9) +#define GPIO_OTGFS_PWRON (GPIO_OUTPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN2) + +#ifdef CONFIG_USBHOST +# define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTB|GPIO_PIN10) + +#else +# define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_PORTB|GPIO_PIN10) +#endif + +#ifndef __ASSEMBLY__ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_bringup + * + * Description: + * Perform architecture-specific initialization + * + * CONFIG_BOARD_INITIALIZE=y : + * Called from board_initialize(). + * + * CONFIG_BOARD_INITIALIZE=y && CONFIG_LIB_BOARDCTL=y : + * Called from the NSH library + * + ************************************************************************************/ + +int stm32_bringup(void); + +/************************************************************************************ + * Name: stm32_usb_configure + * + * Description: + * Called from stm32_boardinitialize very early in inialization to setup USB-related + * GPIO pins for the STM32F4Discovery board. + * + ************************************************************************************/ + +#ifdef CONFIG_STM32_OTGFS +void weak_function stm32_usb_configure(void); +#endif + +/************************************************************************************ + * Name: stm32_usbhost_setup + * + * Description: + * Called at application startup time to initialize the USB host functionality. + * This function will start a thread that will monitor for device connection/ + * disconnection events. + * + ************************************************************************************/ + +#if defined(CONFIG_STM32_OTGFS) && defined(CONFIG_USBHOST) +int stm32_usbhost_setup(void); +#endif + +/************************************************************************************ + * Name: stm32_adc_setup + * + * Description: + * Initialize ADC and register the ADC driver. + * + ************************************************************************************/ + +#ifdef CONFIG_ADC +int stm32_adc_setup(void); +#endif + +/**************************************************************************** + * Name: stm32_can_setup + * + * Description: + * Initialize CAN and register the CAN device + * + ****************************************************************************/ + +#ifdef CONFIG_CAN +int stm32_can_setup(void); +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __CONFIGS_OLIMEX_STM32_P407_SRC_H */ diff --git a/configs/olimex-stm32-p407/src/stm32_adc.c b/configs/olimex-stm32-p407/src/stm32_adc.c new file mode 100644 index 00000000000..ec5af2576fa --- /dev/null +++ b/configs/olimex-stm32-p407/src/stm32_adc.c @@ -0,0 +1,161 @@ +/************************************************************************************ + * configs/olimex-stm32-p407/src/stm32_adc.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include + +#include +#include +#include + +#include "chip.h" +#include "stm32_adc.h" +#include "olimex-stm32-p407.h" + +#ifdef CONFIG_ADC + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Configuration ********************************************************************/ +/* Up to 3 ADC interfaces are supported */ + +#if STM32_NADC < 3 +# undef CONFIG_STM32_ADC3 +#endif + +#if STM32_NADC < 2 +# undef CONFIG_STM32_ADC2 +#endif + +#if STM32_NADC < 1 +# undef CONFIG_STM32_ADC1 +#endif + +#if defined(CONFIG_STM32_ADC1) || defined(CONFIG_STM32_ADC2) || defined(CONFIG_STM32_ADC3) +#ifndef CONFIG_STM32_ADC1 +# warning "Channel information only available for ADC1" +#endif + +/* The number of ADC channels in the conversion list */ + +#define ADC1_NCHANNELS 1 + +/************************************************************************************ + * Private Data + ************************************************************************************/ +/* The Olimex STM32-P407 has a 10 Kohm potentiometer AN_TR connected to PC0 + * ADC123_IN10 + */ + +/* Identifying number of each ADC channel: Variable Resistor. */ + +#ifdef CONFIG_STM32_ADC1 +static const uint8_t g_chanlist[ADC1_NCHANNELS] = {10}; + +/* Configurations of pins used byte each ADC channels */ + +static const uint32_t g_pinlist[ADC1_NCHANNELS] = {GPIO_ADC1_IN10}; +#endif + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_adc_setup + * + * Description: + * Initialize ADC and register the ADC driver. + * + ************************************************************************************/ + +int stm32_adc_setup(void) +{ +#ifdef CONFIG_STM32_ADC1 + static bool initialized = false; + struct adc_dev_s *adc; + int ret; + int i; + + /* Check if we have already initialized */ + + if (!initialized) + { + /* Configure the pins as analog inputs for the selected channels */ + + for (i = 0; i < ADC1_NCHANNELS; i++) + { + stm32_configgpio(g_pinlist[i]); + } + + /* Call stm32_adcinitialize() to get an instance of the ADC interface */ + + adc = stm32_adcinitialize(1, g_chanlist, ADC1_NCHANNELS); + if (adc == NULL) + { + aerr("ERROR: Failed to get ADC interface\n"); + return -ENODEV; + } + + /* Register the ADC driver at "/dev/adc0" */ + + ret = adc_register("/dev/adc0", adc); + if (ret < 0) + { + aerr("ERROR: adc_register failed: %d\n", ret); + return ret; + } + + /* Now we are initialized */ + + initialized = true; + } + + return OK; +#else + return -ENOSYS; +#endif +} + +#endif /* CONFIG_STM32_ADC1 || CONFIG_STM32_ADC2 || CONFIG_STM32_ADC3 */ +#endif /* CONFIG_ADC */ diff --git a/configs/pirelli_dpl10/src/boot.c b/configs/olimex-stm32-p407/src/stm32_appinit.c similarity index 85% rename from configs/pirelli_dpl10/src/boot.c rename to configs/olimex-stm32-p407/src/stm32_appinit.c index 38d1fe8ac2b..a0a6d02d0f1 100644 --- a/configs/pirelli_dpl10/src/boot.c +++ b/configs/olimex-stm32-p407/src/stm32_appinit.c @@ -1,8 +1,8 @@ /**************************************************************************** - * configs/pirelli_dpl10/boot.c + * config/olimex-stm32-p407/src/stm32_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * 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 @@ -38,8 +38,16 @@ ****************************************************************************/ #include + +#include +#include + #include +#include "olimex-stm32-p407.h" + +#ifdef CONFIG_LIB_BOARDCTL + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -52,6 +60,13 @@ * called directly from application code, but only indirectly via the * (non-standard) boardctl() interface using the command BOARDIOC_INIT. * + * CONFIG_LIB_BOARDCTL=y : + * Called from the NSH library + * + * CONFIG_BOARD_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && + * CONFIG_LIB_BOARDCTL=n : + * Called from board_initialize(). + * * Input Parameters: * arg - The boardctl() argument is passed to the board_app_initialize() * implementation without modification. The argument has no @@ -69,9 +84,15 @@ * ****************************************************************************/ -#ifdef CONFIG_LIB_BOARDCTL int board_app_initialize(uintptr_t arg) { - return 0; + /* Did we already initialize via board_initialize()? */ + +#ifndef CONFIG_BOARD_INITIALIZE + return stm32_bringup(); +#else + return OK; +#endif } + #endif /* CONFIG_LIB_BOARDCTL */ diff --git a/configs/olimex-stm32-p407/src/stm32_autoleds.c b/configs/olimex-stm32-p407/src/stm32_autoleds.c new file mode 100644 index 00000000000..200c827012f --- /dev/null +++ b/configs/olimex-stm32-p407/src/stm32_autoleds.c @@ -0,0 +1,172 @@ +/**************************************************************************** + * configs/olimex-stm32-p407/src/stm32_autoleds.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "stm32.h" +#include "olimex-stm32-p407.h" + +#ifdef CONFIG_ARCH_LEDS + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* The following definitions map the encoded LED setting to GPIO settings */ + +#define LED_STARTED_BITS (BOARD_LED1_BIT) +#define LED_HEAPALLOCATE_BITS (BOARD_LED2_BIT) +#define LED_IRQSENABLED_BITS (BOARD_LED1_BIT | BOARD_LED2_BIT) +#define LED_STACKCREATED_BITS (BOARD_LED3_BIT) +#define LED_INIRQ_BITS (BOARD_LED1_BIT | BOARD_LED3_BIT) +#define LED_SIGNAL_BITS (BOARD_LED2_BIT | BOARD_LED3_BIT) +#define LED_ASSERTION_BITS (BOARD_LED1_BIT | BOARD_LED2_BIT | BOARD_LED3_BIT) +#define LED_PANIC_BITS (BOARD_LED4_BIT) + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const unsigned int g_ledbits[8] = +{ + LED_STARTED_BITS, + LED_HEAPALLOCATE_BITS, + LED_IRQSENABLED_BITS, + LED_STACKCREATED_BITS, + LED_INIRQ_BITS, + LED_SIGNAL_BITS, + LED_ASSERTION_BITS, + LED_PANIC_BITS +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +static inline void led_clrbits(unsigned int clrbits) +{ + if ((clrbits & BOARD_LED1_BIT) != 0) + { + stm32_gpiowrite(GPIO_LED1, false); + } + + if ((clrbits & BOARD_LED2_BIT) != 0) + { + stm32_gpiowrite(GPIO_LED2, false); + } + + if ((clrbits & BOARD_LED3_BIT) != 0) + { + stm32_gpiowrite(GPIO_LED3, false); + } + + if ((clrbits & BOARD_LED4_BIT) != 0) + { + stm32_gpiowrite(GPIO_LED4, false); + } +} + +static inline void led_setbits(unsigned int setbits) +{ + if ((setbits & BOARD_LED1_BIT) != 0) + { + stm32_gpiowrite(GPIO_LED1, true); + } + + if ((setbits & BOARD_LED2_BIT) != 0) + { + stm32_gpiowrite(GPIO_LED2, true); + } + + if ((setbits & BOARD_LED3_BIT) != 0) + { + stm32_gpiowrite(GPIO_LED3, true); + } + + if ((setbits & BOARD_LED4_BIT) != 0) + { + stm32_gpiowrite(GPIO_LED4, true); + } +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: board_autoled_initialize + ****************************************************************************/ + +void board_autoled_initialize(void) +{ + /* Configure LED1-4 GPIOs for output */ + + stm32_configgpio(GPIO_LED1); + stm32_configgpio(GPIO_LED2); + stm32_configgpio(GPIO_LED3); + stm32_configgpio(GPIO_LED4); +} + +/**************************************************************************** + * Name: board_autoled_on + ****************************************************************************/ + +void board_autoled_on(int led) +{ + led_clrbits(BOARD_LED1_BIT | BOARD_LED2_BIT | BOARD_LED3_BIT | BOARD_LED4_BIT); + led_setbits(g_ledbits[led]); +} + +/**************************************************************************** + * Name: board_autoled_off + ****************************************************************************/ + +void board_autoled_off(int led) +{ + led_clrbits(g_ledbits[led]); +} + +#endif /* CONFIG_ARCH_LEDS */ diff --git a/arch/arm/src/calypso/calypso_heap.c b/configs/olimex-stm32-p407/src/stm32_boot.c similarity index 55% rename from arch/arm/src/calypso/calypso_heap.c rename to configs/olimex-stm32-p407/src/stm32_boot.c index 697e05a8f5e..220455fef01 100644 --- a/arch/arm/src/calypso/calypso_heap.c +++ b/configs/olimex-stm32-p407/src/stm32_boot.c @@ -1,12 +1,8 @@ -/**************************************************************************** - * arch/arm/src/calypso/calypso_heap.c - * Initialize memory interfaces of Calypso MCU +/************************************************************************************ + * configs/olimex-stm32-p407/src/stm32_boot.c * - * (C) 2010 by Harald Welte - * (C) 2011 Stefan Richter - * - * This source code is derivated from Osmocom-BB project and was - * relicensed as BSD with permission from original authors. + * 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 @@ -35,67 +31,82 @@ * 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 "olimex-stm32-p407.h" -#include "up_arch.h" -#include "up_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** +/************************************************************************************ * Public Functions - ****************************************************************************/ + ************************************************************************************/ -/**************************************************************************** - * Name: up_addregion +/************************************************************************************ + * Name: stm32_boardinitialize * * Description: - * This function is called right after basics are initialized and right - * before IRQ system setup. + * All STM32 architectures must provide the following entry point. This entry point + * is called early in the intitialization -- after all memory has been configured + * and mapped but before any devices have been initialized. + * + ************************************************************************************/ + +void stm32_boardinitialize(void) +{ + /* Initialize USB if the 1) OTG FS controller is in the configuration and 2) + * disabled, and 3) the weak function stm32_usb_configure() has been brought + * into the build. Presumeably either CONFIG_USBDEV or CONFIG_USBHOST is also + * selected. + */ + +#ifdef CONFIG_STM32_OTGFS + if (stm32_usb_configure) + { + stm32_usb_configure(); + } +#endif + + /* Configure on-board LEDs if LED support has been selected. */ + +#ifdef CONFIG_ARCH_LEDS + board_autoled_initialize(); +#endif + + /* Configure on-board BUTTONs if BUTTON support has been selected. */ + +#ifdef CONFIG_ARCH_BUTTONS + board_button_initialize(); +#endif +} + +/**************************************************************************** + * Name: board_initialize + * + * Description: + * If CONFIG_BOARD_INITIALIZE is selected, then an additional + * initialization call will be performed in the boot-up sequence to a + * function called board_initialize(). board_initialize() will be + * called immediately after up_initialize() is called and just before the + * initial application is started. This additional initialization phase + * may be used, for example, to initialize board-specific device drivers. * ****************************************************************************/ -#if CONFIG_MM_REGIONS > 1 -void up_addregion(void) +#ifdef CONFIG_BOARD_INITIALIZE +void board_initialize(void) { -#ifdef CONFIG_ARCH_BOARD_COMPALE99 - /* Disable watchdog in first non-common function */ - wdog_enable(0); -#endif - /* XXX: change to initialization of extern memory with save defaults */ - /* Configure memory interface */ - calypso_mem_cfg(CALYPSO_nCS0, 3, CALYPSO_MEM_16bit, 1); - calypso_mem_cfg(CALYPSO_nCS1, 3, CALYPSO_MEM_16bit, 1); - calypso_mem_cfg(CALYPSO_nCS2, 5, CALYPSO_MEM_16bit, 1); - calypso_mem_cfg(CALYPSO_nCS3, 5, CALYPSO_MEM_16bit, 1); - calypso_mem_cfg(CALYPSO_CS4, 0, CALYPSO_MEM_8bit, 1); - calypso_mem_cfg(CALYPSO_nCS6, 0, CALYPSO_MEM_32bit, 1); - calypso_mem_cfg(CALYPSO_nCS7, 0, CALYPSO_MEM_32bit, 0); + /* Perform board-specific initialization here if so configured */ - /* Set VTCXO_DIV2 = 1, configure PLL for 104 MHz and give ARM half of that */ - calypso_clock_set(2, CALYPSO_PLL13_104_MHZ, ARM_MCLK_DIV_2); - - /* Configure the RHEA bridge with some sane default values */ - calypso_rhea_cfg(0, 0, 0xff, 0, 1, 0, 0); - - kmm_addregion((FAR void *)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE); + (void)stm32_bringup(); } #endif diff --git a/configs/olimex-stm32-p407/src/stm32_bringup.c b/configs/olimex-stm32-p407/src/stm32_bringup.c new file mode 100644 index 00000000000..3e626b6cddf --- /dev/null +++ b/configs/olimex-stm32-p407/src/stm32_bringup.c @@ -0,0 +1,138 @@ +/**************************************************************************** + * config/olimex-stm32-p407/src/stm32_bringup.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_USBMONITOR +# include +#endif + +#ifdef CONFIG_STM32_OTGFS +# include "stm32_usbhost.h" +#endif + +#include "stm32.h" +#include "olimex-stm32-p407.h" + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_bringup + * + * Description: + * Perform architecture-specific initialization + * + * CONFIG_BOARD_INITIALIZE=y : + * Called from board_initialize(). + * + * CONFIG_BOARD_INITIALIZE=n && CONFIG_LIB_BOARDCTL=y : + * Called from the NSH library + * + ****************************************************************************/ + +int stm32_bringup(void) +{ + int ret; + +#ifdef CONFIG_FS_PROCFS + /* Mount the procfs file system */ + + ret = mount(NULL, "/proc", "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret); + } +#endif + +#ifdef CONFIG_CAN + /* Initialize CAN and register the CAN driver. */ + + ret = stm32_can_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_can_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_ADC + /* Initialize ADC and register the ADC driver. */ + + ret = stm32_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); + } +#endif + +#ifdef HAVE_USBHOST + /* Initialize USB host operation. stm32_usbhost_setup() starts a thread + * will monitor for USB connection and disconnection events. + */ + + ret = stm32_usbhost_setup(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret); + return ret; + } +#endif + +#ifdef HAVE_USBMONITOR + /* Start the USB Monitor */ + + ret = usbmonitor_start(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to start USB monitor: %d\n", ret); + } +#endif + + UNUSED(ret); + return OK; +} diff --git a/configs/olimex-stm32-p407/src/stm32_buttons.c b/configs/olimex-stm32-p407/src/stm32_buttons.c new file mode 100644 index 00000000000..94580ec5a1c --- /dev/null +++ b/configs/olimex-stm32-p407/src/stm32_buttons.c @@ -0,0 +1,194 @@ +/**************************************************************************** + * configs/olimex-stm32-p407/src/stm32_buttons.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 "olimex-stm32-p407.h" + +#ifdef CONFIG_ARCH_BUTTONS + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/* Pin configuration for each STM32F4 Discovery button. This array is indexed by + * the BUTTON_* definitions in board.h + */ + +static const uint32_t g_buttons[NUM_BUTTONS] = +{ + GPIO_BTN_TAMPER, + GPIO_BTN_WKUP, + GPIO_BTN_RIGHT, + GPIO_BTN_UP, + GPIO_BTN_LEFT, + GPIO_BTN_DOWN, + GPIO_BTN_CENTER +}; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: board_button_initialize + * + * Description: + * board_button_initialize() must be called to initialize button resources. After + * that, board_buttons() may be called to collect the current state of all + * buttons or board_button_irq() may be called to register button interrupt + * handlers. + * + ****************************************************************************/ + +void board_button_initialize(void) +{ + int i; + + /* Configure the GPIO pins as inputs. NOTE that EXTI interrupts are + * configured for all pins. + */ + + for (i = 0; i < NUM_BUTTONS; i++) + { + stm32_configgpio(g_buttons[i]); + } +} + +/**************************************************************************** + * Name: board_buttons + ****************************************************************************/ + +uint8_t board_buttons(void) +{ + uint8_t ret = 0; + + /* Check that state of each key */ + + if (!stm32_gpioread(g_buttons[BUTTON_TAMPER])) + { + ret |= BUTTON_TAMPER_BIT; + } + + if (stm32_gpioread(g_buttons[BUTTON_WKUP])) + { + ret |= BUTTON_WKUP_BIT; + } + + if (stm32_gpioread(g_buttons[BUTTON_RIGHT])) + { + ret |= BUTTON_RIGHT_BIT; + } + + if (stm32_gpioread(g_buttons[BUTTON_UP])) + { + ret |= BUTTON_UP_BIT; + } + + if (stm32_gpioread(g_buttons[BUTTON_LEFT])) + { + ret |= BUTTON_LEFT_BIT; + } + + if (stm32_gpioread(g_buttons[BUTTON_DOWN])) + { + ret |= BUTTON_DOWN_BIT; + } + + if (stm32_gpioread(g_buttons[BUTTON_CENTER])) + { + ret |= BUTTON_CENTER_BIT; + } + + return ret; +} + +/************************************************************************************ + * Button support. + * + * Description: + * board_button_initialize() must be called to initialize button resources. After + * that, board_buttons() may be called to collect the current state of all + * buttons or board_button_irq() may be called to register button interrupt + * handlers. + * + * After board_button_initialize() has been called, board_buttons() may be called to + * collect the state of all buttons. board_buttons() returns an 8-bit bit set + * with each bit associated with a button. See the BUTTON_*_BIT + * definitions in board.h for the meaning of each bit. + * + * board_button_irq() may be called to register an interrupt handler that will + * be called when a button is depressed or released. The ID value is a + * button enumeration value that uniquely identifies a button resource. See the + * BUTTON_* definitions in board.h for the meaning of enumeration + * value. The previous interrupt handler address is returned (so that it may + * restored, if so desired). + * + ************************************************************************************/ + +#ifdef CONFIG_ARCH_IRQBUTTONS +xcpt_t board_button_irq(int id, xcpt_t irqhandler) +{ + xcpt_t oldhandler = NULL; + + /* The following should be atomic */ + + if (id >= MIN_IRQBUTTON && id <= MAX_IRQBUTTON) + { + oldhandler = stm32_gpiosetevent(g_buttons[id], true, true, true, irqhandler); + } + + return oldhandler; +} +#endif +#endif /* CONFIG_ARCH_BUTTONS */ diff --git a/arch/arm/src/kl/kl_getc.c b/configs/olimex-stm32-p407/src/stm32_can.c similarity index 60% rename from arch/arm/src/kl/kl_getc.c rename to configs/olimex-stm32-p407/src/stm32_can.c index 8b63ec217d6..763df54e78a 100644 --- a/arch/arm/src/kl/kl_getc.c +++ b/configs/olimex-stm32-p407/src/stm32_can.c @@ -1,7 +1,7 @@ -/**************************************************************************** - * arch/arm/src/kl/kl_getc.c +/************************************************************************************ + * configs/olimex-stm32-p407/src/stm32_can.c * - * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -31,66 +31,82 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ****************************************************************************/ + ************************************************************************************/ -/**************************************************************************** +/************************************************************************************ * Included Files - ****************************************************************************/ + ************************************************************************************/ #include -#include +#include +#include -#include "up_arch.h" +#include +#include -#include "kl_config.h" -#include "kl_getc.h" +#include "stm32.h" +#include "stm32_can.h" +#include "olimex-stm32-p407.h" -/**************************************************************************** +#ifdef CONFIG_CAN + +/************************************************************************************ * Pre-processor Definitions - ****************************************************************************/ + ************************************************************************************/ +/* Configuration ********************************************************************/ -/* Select UART parameters for the selected console */ - -#if defined(CONFIG_UART0_SERIAL_CONSOLE) -# define CONSOLE_BASE KL_UART0_BASE -#elif defined(CONFIG_UART1_SERIAL_CONSOLE) -# define CONSOLE_BASE KL_UART1_BASE -#elif defined(CONFIG_UART2_SERIAL_CONSOLE) -# define CONSOLE_BASE KL_UART2_BASE +#if defined(CONFIG_STM32_CAN1) && defined(CONFIG_STM32_CAN2) +# warning "Both CAN1 and CAN2 are enabled. Only CAN1 is connected." +# undef CONFIG_STM32_CAN2 #endif -/**************************************************************************** - * Public Functions - ****************************************************************************/ +#ifdef CONFIG_STM32_CAN1 +# define CAN_PORT 1 +#else +# define CAN_PORT 2 +#endif -/**************************************************************************** - * Name: up_getc +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_can_setup * * Description: - * Input one byte from the serial console + * Initialize CAN and register the CAN device * - * REVIST: If used with the serial driver enabled, then this could - * interfere with the serial driver operations. Serial interrupts should - * be disabled when this function executes in that case. - * - ****************************************************************************/ + ************************************************************************************/ -int up_getc(void) +int stm32_can_setup(void) { - uint8_t ch = 0; +#if defined(CONFIG_STM32_CAN1) || defined(CONFIG_STM32_CAN2) + struct can_dev_s *can; + int ret; -#if defined HAVE_UART_DEVICE && defined HAVE_SERIAL_CONSOLE - /* Wait while the receiver data buffer is "empty" (RDRF) to assure that - * we have data in the buffer to read. - */ + /* Call stm32_caninitialize() to get an instance of the CAN interface */ - while ((getreg8(CONSOLE_BASE + KL_UART_S1_OFFSET) & UART_S1_RDRF) == 0); + can = stm32_caninitialize(CAN_PORT); + if (can == NULL) + { + canerr("ERROR: Failed to get CAN interface\n"); + return -ENODEV; + } - /* Then read a character from the UART data register */ + /* Register the CAN driver at "/dev/can0" */ - ch = getreg8(CONSOLE_BASE + KL_UART_D_OFFSET); + ret = can_register("/dev/can0", can); + if (ret < 0) + { + canerr("ERROR: can_register failed: %d\n", ret); + return ret; + } + + return OK; +#else + return -ENODEV; #endif - - return (int)ch; } + +#endif /* CONFIG_CAN */ diff --git a/configs/olimex-stm32-p407/src/stm32_usb.c b/configs/olimex-stm32-p407/src/stm32_usb.c new file mode 100644 index 00000000000..e6340dcc50f --- /dev/null +++ b/configs/olimex-stm32-p407/src/stm32_usb.c @@ -0,0 +1,318 @@ +/************************************************************************************ + * configs/olimex-stm32-p407/src/stm32_usb.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 "stm32.h" +#include "stm32_otgfs.h" +#include "olimex-stm32-p407.h" + +#ifdef CONFIG_STM32_OTGFS + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +#if defined(CONFIG_USBDEV) || defined(CONFIG_USBHOST) +# define HAVE_USB 1 +#else +# warning "CONFIG_STM32_OTGFS is enabled but neither CONFIG_USBDEV nor CONFIG_USBHOST" +# undef HAVE_USB +#endif + +#ifndef CONFIG_USBHOST_DEFPRIO +# define CONFIG_USBHOST_DEFPRIO 50 +#endif + +#ifndef CONFIG_USBHOST_STACKSIZE +# ifdef CONFIG_USBHOST_HUB +# define CONFIG_USBHOST_STACKSIZE 1536 +# else +# define CONFIG_USBHOST_STACKSIZE 1024 +# endif +#endif + +/************************************************************************************ + * Private Data + ************************************************************************************/ + +#ifdef CONFIG_USBHOST +static struct usbhost_connection_s *g_usbconn; +#endif + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: usbhost_waiter + * + * Description: + * Wait for USB devices to be connected. + * + ************************************************************************************/ + +#ifdef CONFIG_USBHOST +static int usbhost_waiter(int argc, char *argv[]) +{ + struct usbhost_hubport_s *hport; + + uinfo("Running\n"); + for (;;) + { + /* Wait for the device to change state */ + + DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport)); + uinfo("%s\n", hport->connected ? "connected" : "disconnected"); + + /* Did we just become connected? */ + + if (hport->connected) + { + /* Yes.. enumerate the newly connected device */ + + (void)CONN_ENUMERATE(g_usbconn, hport); + } + } + + /* Keep the compiler from complaining */ + + return 0; +} +#endif + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_usbdev_setup + * + * Description: + * Called from stm32_usbdev_setup very early in inialization to setup USB-related + * GPIO pins for the STM32F4Discovery board. + * + ************************************************************************************/ + +void stm32_usbdev_setup(void) +{ + /* The OTG FS has an internal soft pull-up. No GPIO configuration is required */ + + /* Configure the OTG FS VBUS sensing GPIO, and Power On GPIOs */ + +#ifdef CONFIG_STM32_OTGFS + stm32_configgpio(GPIO_OTGFS_VBUS); + stm32_configgpio(GPIO_OTGFS_PWRON); + stm32_configgpio(GPIO_OTGFS_OVER); +#endif +} + +/*********************************************************************************** + * Name: stm32_usbhost_setup + * + * Description: + * Called at application startup time to initialize the USB host functionality. + * This function will start a thread that will monitor for device + * connection/disconnection events. + * + ***********************************************************************************/ + +#ifdef CONFIG_USBHOST +int stm32_usbhost_setup(void) +{ + int pid; +#if defined(CONFIG_USBHOST_HUB) || defined(CONFIG_USBHOST_MSC) || defined(CONFIG_USBHOST_CDCACM) + int ret; +#endif + + /* First, register all of the class drivers needed to support the drivers + * that we care about: + */ + + uinfo("Register class drivers\n"); + +#ifdef CONFIG_USBHOST_HUB + /* Initialize USB hub class support */ + + ret = usbhost_hub_initialize(); + if (ret < 0) + { + uerr("ERROR: usbhost_hub_initialize failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_USBHOST_MSC + /* Register the USB host Mass Storage Class */ + + ret = usbhost_msc_initialize(); + if (ret != OK) + { + uerr("ERROR: Failed to register the mass storage class: %d\n", ret); + } +#endif + +#ifdef CONFIG_USBHOST_CDCACM + /* Register the CDC/ACM serial class */ + + ret = usbhost_cdcacm_initialize(); + if (ret != OK) + { + uerr("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret); + } +#endif + + /* Then get an instance of the USB host interface */ + + uinfo("Initialize USB host\n"); + g_usbconn = stm32_otgfshost_initialize(0); + if (g_usbconn) + { + /* Start a thread to handle device connection. */ + + uinfo("Start usbhost_waiter\n"); + + pid = task_create("usbhost", CONFIG_USBHOST_DEFPRIO, + CONFIG_USBHOST_STACKSIZE, + (main_t)usbhost_waiter, (FAR char * const *)NULL); + return pid < 0 ? -ENOEXEC : OK; + } + + return -ENODEV; +} +#endif + +/************************************************************************************ + * Name: stm32_setup_overcurrent + * + * Description: + * Setup to receive an interrupt-level callback if an overcurrent condition is + * detected. + * + * Input Parameter: + * handler - New overcurrent interrupt handler + * + * Returned value: + * Old overcurrent interrupt handler + * + ************************************************************************************/ + +#ifdef CONFIG_USBHOST +xcpt_t stm32_setup_overcurrent(xcpt_t handler) +{ + return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler); +} +#endif + +/*********************************************************************************** + * Name: stm32_usbhost_vbusdrive + * + * Description: + * Enable/disable driving of VBUS 5V output. This function must be provided be + * each platform that implements the STM32 OTG FS host interface + * + * "On-chip 5 V VBUS generation is not supported. For this reason, a charge pump + * or, if 5 V are available on the application board, a basic power switch, must + * be added externally to drive the 5 V VBUS line. The external charge pump can + * be driven by any GPIO output. When the application decides to power on VBUS + * using the chosen GPIO, it must also set the port power bit in the host port + * control and status register (PPWR bit in OTG_FS_HPRT). + * + * "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 + * + ***********************************************************************************/ + +#ifdef CONFIG_USBHOST +void stm32_usbhost_vbusdrive(int iface, bool enable) +{ + DEBUGASSERT(iface == 0); + + if (enable) + { + /* Enable the Power Switch by driving the enable pin low */ + + stm32_gpiowrite(GPIO_OTGFS_PWRON, false); + } + else + { + /* Disable the Power Switch by driving the enable pin high */ + + stm32_gpiowrite(GPIO_OTGFS_PWRON, true); + } +} +#endif + +/************************************************************************************ + * Name: stm32_usbsuspend + * + * Description: + * Board logic must provide the stm32_usbsuspend logic if the USBDEV driver is + * used. This function is called whenever the USB enters or leaves suspend mode. + * This is an opportunity for the board logic to shutdown clocks, power, etc. + * while the USB is suspended. + * + ************************************************************************************/ + +#ifdef CONFIG_USBDEV +void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +{ + uinfo("resume: %d\n", resume); +} +#endif + +#endif /* CONFIG_STM32_OTGFS */ diff --git a/arch/arm/src/calypso/calypso_lowputc.S b/configs/olimex-stm32-p407/src/stm32_userleds.c similarity index 62% rename from arch/arm/src/calypso/calypso_lowputc.S rename to configs/olimex-stm32-p407/src/stm32_userleds.c index 5556b3baca9..d044d386e48 100644 --- a/arch/arm/src/calypso/calypso_lowputc.S +++ b/configs/olimex-stm32-p407/src/stm32_userleds.c @@ -1,11 +1,7 @@ -/************************************************************************** - * calypso/calypso_lowputc.S +/**************************************************************************** + * configs/olimex-stm32-p407/src/stm32_userleds.c * - * Copyright (C) 2011 Stefan Richter. All rights reserved. - * Author: Stefan Richter - * - * based on: c5471/c5471_lowputc.S - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -35,99 +31,85 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - **************************************************************************/ + ****************************************************************************/ -/************************************************************************** +/**************************************************************************** * Included Files - **************************************************************************/ + ****************************************************************************/ #include -#include "chip.h" -#include "up_arch.h" -#include "up_internal.h" +#include +#include +#include +#include +#include "stm32.h" +#include "olimex-stm32-p407.h" -/************************************************************************** - * Pre-processor Definitions - **************************************************************************/ +#ifndef CONFIG_ARCH_LEDS -/************************************************************************** - * Private Types - **************************************************************************/ - -/************************************************************************** - * Private Function Prototypes - **************************************************************************/ - -/************************************************************************** - * Public Data - **************************************************************************/ - -/************************************************************************** +/**************************************************************************** * Private Data - **************************************************************************/ + ****************************************************************************/ +/* This array maps an LED number to GPIO pin configuration */ -/************************************************************************** +static uint32_t g_ledcfg[BOARD_NLEDS] = +{ + GPIO_LED1, GPIO_LED2, GPIO_LED3, GPIO_LED4 +}; + +/**************************************************************************** + * Private Function Protototypes + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/**************************************************************************** * Private Functions - **************************************************************************/ + ****************************************************************************/ -/************************************************************************** +/**************************************************************************** * Public Functions - **************************************************************************/ + ****************************************************************************/ -/************************************************************************** - * Name: up_lowputc - **************************************************************************/ +/**************************************************************************** + * Name: board_userled_initialize + ****************************************************************************/ -/* This assembly language version has the advantage that it can does not - * require a C stack and uses only r0-r1. Hence it can be used during - * early boot phases. - */ +void board_userled_initialize(void) +{ + /* Configure LED1-4 GPIOs for output */ - .text - .global up_lowputc - .type up_lowputc, function -up_lowputc: - /* On entry, r0 holds the character to be printed */ + stm32_configgpio(GPIO_LED1); + stm32_configgpio(GPIO_LED2); + stm32_configgpio(GPIO_LED3); + stm32_configgpio(GPIO_LED4); +} -#ifdef CONFIG_SERIAL_IRDA_CONSOLE - ldr r2, =UART_IRDA_BASE /* r2=IRDA UART base */ -#else - ldr r2, =UART_MODEM_BASE /* r2=Modem UART base */ -#endif +/**************************************************************************** + * Name: board_userled + ****************************************************************************/ - /* Poll bit 0 of the UART_SSR register. When the bit - * is clear, the TX FIFO is no longer full - */ +void board_userled(int led, bool ledon) +{ + if ((unsigned)led < BOARD_NLEDS) + { + stm32_gpiowrite(g_ledcfg[led], ledon); + } +} -1: ldrb r1, [r2, #UART_SSR_OFFS] - tst r1, #UART_SSR_TXFULL - bne 1b +/**************************************************************************** + * Name: board_userled_all + ****************************************************************************/ - /* Send the character by writing it into the UART_THR - * register. - */ - - strb r0, [r2, #UART_THR_OFFS] - - /* Wait for the tranmsit holding regiser (THR) to be - * emptied. This is detemined when bit 6 of the LSR - * is set. - */ - -2: ldrb r1, [r2, #UART_LSR_OFFS] - tst r1, #0x00000020 - beq 2b - - /* If the character that we just sent was a linefeed, - * then send a carriage return as well. - */ - - teq r0, #'\n' - moveq r0, #'\r' - beq 1b - - /* And return */ - - mov pc, lr +void board_userled_all(uint8_t ledset) +{ + stm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) != 0); + stm32_gpiowrite(GPIO_LED2, (ledset & BOARD_LED2_BIT) != 0); + stm32_gpiowrite(GPIO_LED3, (ledset & BOARD_LED3_BIT) != 0); + stm32_gpiowrite(GPIO_LED4, (ledset & BOARD_LED4_BIT) != 0); +} +#endif /* !CONFIG_ARCH_LEDS */ diff --git a/configs/olimex-strp711/nettest/defconfig b/configs/olimex-strp711/nettest/defconfig index d89e0bf5d34..838239291fd 100644 --- a/configs/olimex-strp711/nettest/defconfig +++ b/configs/olimex-strp711/nettest/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -461,7 +460,6 @@ CONFIG_ENC28J60_HPWORK=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimex-strp711/nsh/defconfig b/configs/olimex-strp711/nsh/defconfig index aed99049aa1..d889a22c2e7 100644 --- a/configs/olimex-strp711/nsh/defconfig +++ b/configs/olimex-strp711/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -433,7 +432,6 @@ CONFIG_MMCSD_SPIMODE=0 # 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 diff --git a/configs/olimexino-stm32/can/defconfig b/configs/olimexino-stm32/can/defconfig index d83e2a9a936..93c56baffeb 100644 --- a/configs/olimexino-stm32/can/defconfig +++ b/configs/olimexino-stm32/can/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -783,7 +782,6 @@ CONFIG_ANALOG=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimexino-stm32/composite/defconfig b/configs/olimexino-stm32/composite/defconfig index 7dc2e5a48bc..8bf9ffffa71 100644 --- a/configs/olimexino-stm32/composite/defconfig +++ b/configs/olimexino-stm32/composite/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -794,7 +793,6 @@ CONFIG_MMCSD_SPIMODE=0 # 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 diff --git a/configs/olimexino-stm32/nsh/defconfig b/configs/olimexino-stm32/nsh/defconfig index fe7b38e6853..10da4dcdbde 100644 --- a/configs/olimexino-stm32/nsh/defconfig +++ b/configs/olimexino-stm32/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -793,7 +792,6 @@ CONFIG_MMCSD_SPIMODE=0 # 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 diff --git a/configs/olimexino-stm32/smallnsh/defconfig b/configs/olimexino-stm32/smallnsh/defconfig index 0eca97c9442..fd206bba455 100644 --- a/configs/olimexino-stm32/smallnsh/defconfig +++ b/configs/olimexino-stm32/smallnsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -761,7 +760,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/olimexino-stm32/tiny/defconfig b/configs/olimexino-stm32/tiny/defconfig index b56ff2028ee..5940eb260cc 100644 --- a/configs/olimexino-stm32/tiny/defconfig +++ b/configs/olimexino-stm32/tiny/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -766,7 +765,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/open1788/knsh/defconfig b/configs/open1788/knsh/defconfig index 4878abcb490..c304ff04641 100644 --- a/configs/open1788/knsh/defconfig +++ b/configs/open1788/knsh/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -495,7 +494,6 @@ CONFIG_PIPES=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/open1788/nsh/defconfig b/configs/open1788/nsh/defconfig index 8ed16d5c5e8..2f155a49d00 100644 --- a/configs/open1788/nsh/defconfig +++ b/configs/open1788/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -491,7 +490,6 @@ CONFIG_PIPES=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/open1788/nxlines/defconfig b/configs/open1788/nxlines/defconfig index 7cb4a4b8bba..5abe3e6aa0e 100644 --- a/configs/open1788/nxlines/defconfig +++ b/configs/open1788/nxlines/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -523,7 +522,6 @@ CONFIG_PIPES=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/p112/ostest/defconfig b/configs/p112/ostest/defconfig index 7c5b119941b..56ea350bf42 100644 --- a/configs/p112/ostest/defconfig +++ b/configs/p112/ostest/defconfig @@ -271,7 +271,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set diff --git a/configs/pcblogic-pic32mx/nsh/defconfig b/configs/pcblogic-pic32mx/nsh/defconfig index 32b09083584..8b93eb5cc44 100644 --- a/configs/pcblogic-pic32mx/nsh/defconfig +++ b/configs/pcblogic-pic32mx/nsh/defconfig @@ -495,7 +495,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/pcduino-a10/nsh/defconfig b/configs/pcduino-a10/nsh/defconfig index f16a34ab905..db630aab6d5 100644 --- a/configs/pcduino-a10/nsh/defconfig +++ b/configs/pcduino-a10/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_A1X=y # CONFIG_ARCH_CHIP_C5471 is not set -# CONFIG_ARCH_CHIP_CALYPSO is not set # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set @@ -475,7 +474,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/pic32mx-starterkit/nsh/defconfig b/configs/pic32mx-starterkit/nsh/defconfig index 7281f362e7a..780f2150916 100644 --- a/configs/pic32mx-starterkit/nsh/defconfig +++ b/configs/pic32mx-starterkit/nsh/defconfig @@ -539,7 +539,6 @@ CONFIG_MTD=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/pic32mx-starterkit/nsh2/defconfig b/configs/pic32mx-starterkit/nsh2/defconfig index c28f915d1c5..1de34877704 100644 --- a/configs/pic32mx-starterkit/nsh2/defconfig +++ b/configs/pic32mx-starterkit/nsh2/defconfig @@ -603,7 +603,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/pic32mx7mmb/nsh/defconfig b/configs/pic32mx7mmb/nsh/defconfig index 75ff18d6d07..7b0660e9862 100644 --- a/configs/pic32mx7mmb/nsh/defconfig +++ b/configs/pic32mx7mmb/nsh/defconfig @@ -622,7 +622,6 @@ CONFIG_ETH0_PHY_LAN8720=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/pic32mz-starterkit/nsh/defconfig b/configs/pic32mz-starterkit/nsh/defconfig index 9368fa716d4..b64f33c2627 100644 --- a/configs/pic32mz-starterkit/nsh/defconfig +++ b/configs/pic32mz-starterkit/nsh/defconfig @@ -466,7 +466,6 @@ CONFIG_MTD=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/pirelli_dpl10/README.txt b/configs/pirelli_dpl10/README.txt deleted file mode 100644 index e9f0204df51..00000000000 --- a/configs/pirelli_dpl10/README.txt +++ /dev/null @@ -1,363 +0,0 @@ -pirelli_dpl10 -============= - - This directory contains the board support for Pirelli "Discus" DP-L10 - phones. - -Contents -======== - - * History - * Hardware - * Osmocom-BB Dependencies and Sercomm - * Loading NuttX - * Memory Map - * USB Serial Console - * NuttX OABI "buildroot" Toolchain - * Generic OABI Toolchain - * Configurations - -History -======= - This port is a variant of the compal_e88 configuration with the small - change of enabling the IrDA serial console: - - - CONFIG_SERIAL_IRDA_CONSOLE=y - - This port is based on patches contributed by Denis Carikli for both the - compal e99 and e88. At the time of initial check-in, the following phones - were tested: - - - Pirelli DPL-10 nsh_highram loaded via romload in osmocon - - The patches were made by Alan Carvalho de Assis and Denis Carikli using - the Stefan Richter's patches that can be found here: - - http://cgit.osmocom.org/cgit/nuttx-bb/log/?h=lputt%2Ftesting - -Hardware -======== - - * CPU/DBB: TI Calypso (D751992AZHH) - - See http://bb.osmocom.org/trac/wiki/Hardware/Calypso - - * ABB: TI Iota (TWL3014) - - Analog baseband chip. See http://bb.osmocom.org/trac/wiki/Iota - - * GSM Transceiver: TI Rita (TRF6151) - - GSM Transceiver. See http://bb.osmocom.org/trac/wiki/Rita - - * PA: SKY77328-13 - - Quad-band GSM/GPRS: See http://www.skyworksinc.com/Product.aspx?ProductID=434 - - * Flash/SRAM: Spansion S71PL129NC0 128MBit/64MBit - - Combined FLASH and SDRAM: - FLASH: 128Mbit - SDRAM: 64Mbit - - * Wifi: Marvell 88W8385 802.11 MAC - Marvell 88W8015 802.11b/g transceiver - - * Winbond W56940 ringtone chip - - * Sunplus SPCA552E multimedia controller - - Multimedia processor: integrates CMOS sensor interface, DSC processor, JPEG - codec engine, LCM interface and other peripherals. - - I have not yet been able to find a data sheet for this chip. I believe that - it will be critical to develop drivers for the display. - - * LSI-65194A1 ASIC (seems to be a DSP for VoIP en-/decoding) - - * Silabs CP2102 USB UART (connected to UART_IRDA of the Calypso) - -Osmocom-BB Dependencies and Sercomm -=================================== - - Sercomm is an HDLC protocol used to communicate between a Calypso phone - and the host PC. By default, NuttX will not use sercomm (HDLC protocol) to - communicate with the host system. Sercomm is the transport used by - osmocom-bb that runs on top of serial. See - http://bb.osmocom.org/trac/wiki/nuttx-bb/run for detailed the usage of nuttx - with sercomm. - - If you build with sercomm, you must add support for sercomm in your - configuration (CONFIG_SERCOMM_CONSOLE=y). In this case, the build - environment assumes that you have the osmocom-bb project directory at same - level as the nuttx project: - - |- nuttx - |- apps - `- osmocom-bb - - If you attempt to build a sercomm-enaled configuration without osmocom-bb, - you will get compilation errors in drivers/sercomm due to header files that - are needed from the osmocom-bb directory. - -Loading NuttX -============= - - General - ------- - The osmocom-bb wiki describes how to load NuttX. See - http://bb.osmocom.org/trac/wiki/nuttx-bb for detailed information. - The way that nuttx is loaded depends on the configuration (highram/compalram) - and phone: - - - compalram is for the ramloader(for phone having a bootloader on flash) - - highram is for phones having the romloader(if the phone has a bootrom) - or for loading in the ram trough a special loader(loaded first on ram - by talking to the ramloader) when having a ramloader(which can only - load 64k). - - The Pirelli USB Serial Interface - -------------------------------- - The Pirelli phone is epecially easy to use because you just use the - supplied USB cable. The phone already has an integrated Silabs CP210x - USB-UART, which is supported by Linux. No need for a T191 cable. - - Most of the phones seem to use USB vid:pid 0489:e003, which is mainline - since Linux 2.6.36. You can do the following for Kernels < 2.6.36: - - # modprobe -v cp210x - # echo "0489 e003" > /sys/bus/usb-serial/drivers/cp210x/new_id - - Loading NuttX - ------------- - Here's how I load NuttX into the phone: - - - Take out the battery - - Plug in the USB adapter into the phone then the computer - - Start osmocon like: osmocon -p /dev/ttyUSB0 -m romload nuttx.bin - - Put the battery back in - - This works most of the time. Sometimes I have to take out and put in - the battery a few times or re-start the whole set of steps but it's - generally quite reliable. - -Memory Map -========= - - Internal SRAM and ROM - --------------------- - Calypso has 256KB of internal SRAM (0x800000-0x83ffff, although some of - this is, I believe, actually ROM). Only this internal SRAM is used by - these configurations. The internal SRAM is broken up into two logical - banks. - - LRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x00020000 - HRAM (rw) : ORIGIN = 0x00820000, LENGTH = 0x00020000 - - Code can be loaded by the CalypsoBootloader only into HRAM beginning at - address 0x00820000 and, hence, is restricted to 128KB (including then - non-loaded sections: Uninitialized data and the NuttX heap). - - SDRAM and NOR FLASH - ------------------- - SDRAM is provided by a Flash/SRAM: Spansion S71PL129NC0 part that provices - 128MBit (16MB) of FLASH and 64MBit (8MB) of SDRAM. - - * SDRAM - - The Pirelli DP-L10 has 8MB of SDRAM beginning at address 0x01000000. - This DRAM appears to be initialized by the Pirelli ROM loader and is - ready for use with no further initialization required. - - * NOR FLASH - - The 16MB FLASH is at address 0x00000000. - -USB Serial Console -================== - - These configurations are set up to use the Calypso IrDA UART as the serial - port. On the Pirelli phone, this port connects to the built-in USB-serial - adaptor so that that NuttX serial console will be available on your PC as - a USB serial device. You should see something this using 'dmesg' when you - plug the Pirelli phone into a PC running Linux: - - usb 5-2: new full speed USB device number 3 using uhci_hcd - usb 5-2: New USB device found, idVendor=0489, idProduct=e003 - usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 - usb 5-2: Product: DP-L10 - usb 5-2: Manufacturer: Silicon Labs - usb 5-2: SerialNumber: 0001 - usbcore: registered new interface driver usbserial - USB Serial support registered for generic - usbcore: registered new interface driver usbserial_generic - usbserial: USB Serial Driver core - USB Serial support registered for cp210x - cp210x 5-2:1.0: cp210x converter detected - usb 5-2: reset full speed USB device number 3 using uhci_hcd - usb 5-2: cp210x converter now attached to ttyUSB0 - usbcore: registered new interface driver cp210x - cp210x: v0.09:Silicon Labs CP210x RS232 serial adaptor driver - - - Before you use this port to communicate with Nuttx, make sure that osmocon is - no longer running. Then start a serial terminal such as minicom on your host - PC. Configure the serial terminal so that it uses: - - Port: /dev/ttyUSB0 - Baud: 115,200 8N1 - -JTAG and Alternative Serial Console -=================================== - -JTAG - All JTAG lines, as well as the second uart (UART_MODEM), go to the - unpopulated connector next to the display connector. NOTE: You have - to disassemble the phone to get to this connector. - - - --- --------------------------- - PIN SIGNAL - --- --------------------------- - 1 Vcc - 2 RX_MODEM - 3 TESTRSTz (Iota) - 4 TDI - 5 TMS - 6 TCK - 7 TX_MODEM - 8 TDO - 9 N/C - 10 GND - 11 N/C - 12 N/C - --- --------------------------- - -JTAG Apapter: - - ------- ----------- --------------- -------------------------------------- - JTAG 20-PIN DESCRIPTION NOTES - SIGNAL CONNECTOR - ------- ----------- --------------- -------------------------------------- - Vcc 1, 2 Vcc - nTRST 3 Reset Connect this pin to the (active - low) reset input of the target MCU. - Some JTAG adapters driver nTRST (high - and low). Others can can configure - nTRST as open collector (only drive - low). - GND 4, 6, 8, Ground - 10, 12, 14, - 16, 20 - TDI 5 JTAG Test Data Use 10K-100K Ohm pull-up resistor to - Input VCC - TMS 7 JTAG Test Mode Use 10K-100K Ohm pull-up resistor to - Select VCC - TCK 9 Clock into the Use 10K-100K Ohm pull-down resistor to - core GND - RTCK 11 Return clock Some JTAG adapters have adaptive clocking - using an RTCK signal. - DBGSEL 11 Debug Select Some devices have special pins that - enable the JTAG interface. For example, - on the NXP LPC2129 the signal RTCK must - be driven low during RESET to enable the - JTAG interface. - TDO 13 JTAG Test Data Use 10K-100K Ohm pull-up resistor to VCC - Output - DBGRQ 17 N/C - DGBACK 19 N/C - ISP ?? ISP Most NXP MCU's have an ISP pin which - (when pulled low) can be used to cause - the MCU to enter a bootloader on reset. - Use 10K-100K Ohm pull up resistor. - ------- ----------- --------------- -------------------------------------- - -NuttX OABI "buildroot" Toolchain -================================ - - A GNU GCC-based toolchain is assumed. The files */setenv.sh should - be modified to point to the correct path to the ARM GCC toolchain (if - different from the default in your PATH variable). - - If you have no ARMtoolchain, one can be downloaded from the NuttX - Bitbucket download site (https://bitbucket.org/nuttx/buildroot/downloads/). - This GNU toolchain builds and executes in the Linux or Cygwin environment. - - 1. You must have already configured Nuttx in /nuttx. - - cd tools - ./configure.sh pirelli_dpl10/ - - 2. Download the latest buildroot package into - - 3. unpack the buildroot tarball. The resulting directory may - have versioning information on it like buildroot-x.y.z. If so, - rename /buildroot-x.y.z to /buildroot. - - 4. cd /buildroot - - 5. cp configs/arm7tdmi-defconfig-4.3.3 .config - - 6. make oldconfig - - 7. make - - 8. Edit setenv.h, if necessary, so that the PATH variable includes - the path to the newly built binaries. - - See the file configs/README.txt in the buildroot source tree. That has more - details PLUS some special instructions that you will need to follow if you are - building a Cortex-M3 toolchain for Cygwin under Windows. - -Generic OABI Toolchain -====================== - - The NuttX OABI toolchain is selected with: - - CONFIG_ARM_TOOLCHAIN_BUILDROOT=y - CONFIG_ARM_OABI_TOOLCHAIN=y - - In most cases, OsmocomBB is built with a different OABI toolchain with a - prefix of arm-elf-. To use that toolchain, change the configuration as - follows: - - CONFIG_ARM_TOOLCHAIN_GNU_OABI=y - -Configurations -============== - - nsh: - --- - Configures the NuttShell (nsh) located at apps/examples/nsh. - - NOTES: - - 1. This configuration uses the mconf-based configuration tool. To - change this configuration using that tool, you should: - - a. Build and install the kconfig-mconf tool. See nuttx/README.txt - see additional README.txt files in the NuttX tools repository. - - b. Execute 'make menuconfig' in nuttx/ in order to start the - reconfiguration process. - - 2. This configuration enables the serial interface on IrDA UART which - will appears as a USB serial device. - - CONFIG_SERIAL_IRDA_CONSOLE=y - - 3. By default, this configuration uses the CodeSourcery toolchain - for Windows and builds under Cygwin (or probably MSYS). That - can easily be reconfigured, of course. - - CONFIG_HOST_LINUX=y : Builds under Linux - CONFIG_ARM_TOOLCHAIN_BUILDROOT=y : NuttX buildroot OABI toolchain - CONFIG_ARM_OABI_TOOLCHAIN=y - - You can switch to use the generic arm-elf- GCC toolchain by - setting: - - CONFIG_ARM_TOOLCHAIN_GNU_OABI=y : General arm-elf- toolchain - - 4. Support for builtin applications is enabled. A builtin 'poweroff' - command is supported. diff --git a/configs/pirelli_dpl10/include/board.h b/configs/pirelli_dpl10/include/board.h deleted file mode 100644 index 1426ea73247..00000000000 --- a/configs/pirelli_dpl10/include/board.h +++ /dev/null @@ -1,6 +0,0 @@ -/**************************************************************************** - * configs/pirelli_dpl10/include/board.h - * - * Supposed to be empty - * - ****************************************************************************/ diff --git a/configs/pirelli_dpl10/nsh_highram/Make.defs b/configs/pirelli_dpl10/nsh_highram/Make.defs deleted file mode 100644 index 6adb17f5a6f..00000000000 --- a/configs/pirelli_dpl10/nsh_highram/Make.defs +++ /dev/null @@ -1,131 +0,0 @@ -############################################################################ -# configs/pirelli_dpl10/nsh/Make.defs -# -# Copyright (C) 2007, 2008, 2011, 2013 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -include ${TOPDIR}/.config -include ${TOPDIR}/tools/Config.mk -include ${TOPDIR}/arch/arm/src/arm/Toolchain.defs - -LDSCRIPT = highram.ld - -ifeq ($(WINTOOL),y) - # Windows-native toolchains - 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 - ARCHINCLUDES = -I. -isystem $(TOPDIR)/include - ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) -endif - -CC = $(CROSSDEV)gcc -CXX = $(CROSSDEV)g++ -CPP = $(CROSSDEV)gcc -E -LD = $(CROSSDEV)ld -AR = $(ARCROSSDEV)ar rcs -NM = $(ARCROSSDEV)nm -OBJCOPY = $(CROSSDEV)objcopy -OBJDUMP = $(CROSSDEV)objdump - -ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} -ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} - -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION = -g -endif - -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -endif - -ARCHCFLAGS = -fno-builtin -ARCHCXXFLAGS = -fno-builtin -fno-exceptions -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-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 - -ifeq ("${CONFIG_SERCOMM_CONSOLE}","y") -OSMODIR = $(TOPDIR)/../../osmocom-bb -EXTRA_LIBS = $(OSMODIR)/src/target/firmware/comm/libcomm.a \ - $(OSMODIR)/src/shared/libosmocore/build-target/src/.libs/libosmocore.a \ - $(OSMODIR)/src/target/firmware/calypso/libcalypso.a \ - $(OSMODIR)/src/target/firmware/comm/libcomm.a - # ^^^ Stupid hack! Why do I have to put it twice??? -endif - -HOSTCC = gcc -HOSTINCLUDES = -I. -HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe -HOSTLDFLAGS = -ifeq ($(CONFIG_HOST_WINDOWS),y) - HOSTEXEEXT = .exe -else - HOSTEXEEXT = -endif - -ifeq ($(WINTOOL),y) - # Windows-native host tools - DIRLINK = $(TOPDIR)/tools/copydir.sh - DIRUNLINK = $(TOPDIR)/tools/unlink.sh - MKDEP = $(TOPDIR)/tools/mkwindeps.sh -else - # Linux/Cygwin-native host tools - MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) -endif diff --git a/configs/pirelli_dpl10/nsh_highram/defconfig b/configs/pirelli_dpl10/nsh_highram/defconfig deleted file mode 100644 index e03349f8ee7..00000000000 --- a/configs/pirelli_dpl10/nsh_highram/defconfig +++ /dev/null @@ -1,809 +0,0 @@ -# -# Automatically generated file; DO NOT EDIT. -# Nuttx/ Configuration -# - -# -# Build Setup -# -# CONFIG_EXPERIMENTAL is not set -# CONFIG_DEFAULT_SMALL is not set -CONFIG_HOST_LINUX=y -# CONFIG_HOST_OSX is not set -# CONFIG_HOST_WINDOWS is not set -# CONFIG_HOST_OTHER is not set - -# -# Build Configuration -# -# CONFIG_APPS_DIR="../apps" -CONFIG_BUILD_FLAT=y -# CONFIG_BUILD_2PASS is not set - -# -# Binary Output Formats -# -# CONFIG_RRLOAD_BINARY is not set -# CONFIG_INTELHEX_BINARY is not set -# CONFIG_MOTOROLA_SREC is not set -CONFIG_RAW_BINARY=y -# CONFIG_UBOOT_UIMAGE is not set - -# -# Customize Header Files -# -# CONFIG_ARCH_STDINT_H is not set -# CONFIG_ARCH_STDBOOL_H is not set -# CONFIG_ARCH_MATH_H is not set -# CONFIG_ARCH_FLOAT_H is not set -# CONFIG_ARCH_STDARG_H is not set -# CONFIG_ARCH_DEBUG_H is not set - -# -# Debug Options -# -CONFIG_DEBUG_ALERT=y -# CONFIG_DEBUG_FEATURES is not set -CONFIG_ARCH_HAVE_STACKCHECK=y -# CONFIG_STACK_COLORATION is not set -# CONFIG_ARCH_HAVE_HEAPCHECK is not set -# CONFIG_DEBUG_SYMBOLS is not set -CONFIG_ARCH_HAVE_CUSTOMOPT=y -# CONFIG_DEBUG_NOOPT is not set -# CONFIG_DEBUG_CUSTOMOPT is not set -CONFIG_DEBUG_FULLOPT=y - -# -# System Type -# -CONFIG_ARCH_ARM=y -# CONFIG_ARCH_AVR is not set -# CONFIG_ARCH_HC is not set -# CONFIG_ARCH_MIPS is not set -# CONFIG_ARCH_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=y -# CONFIG_ARCH_CHIP_DM320 is not set -# CONFIG_ARCH_CHIP_EFM32 is not set -# CONFIG_ARCH_CHIP_IMX1 is not set -# CONFIG_ARCH_CHIP_IMX6 is not set -# CONFIG_ARCH_CHIP_KINETIS is not set -# CONFIG_ARCH_CHIP_KL is not set -# CONFIG_ARCH_CHIP_LM is not set -# CONFIG_ARCH_CHIP_TIVA is not set -# CONFIG_ARCH_CHIP_LPC11XX is not set -# CONFIG_ARCH_CHIP_LPC17XX is not set -# CONFIG_ARCH_CHIP_LPC214X is not set -# CONFIG_ARCH_CHIP_LPC2378 is not set -# CONFIG_ARCH_CHIP_LPC31XX is not set -# CONFIG_ARCH_CHIP_LPC43XX is not set -# CONFIG_ARCH_CHIP_NUC1XX is not set -# CONFIG_ARCH_CHIP_SAMA5 is not set -# CONFIG_ARCH_CHIP_SAMD is not set -# CONFIG_ARCH_CHIP_SAML is not set -# CONFIG_ARCH_CHIP_SAM34 is not set -# CONFIG_ARCH_CHIP_SAMV7 is not set -# CONFIG_ARCH_CHIP_STM32 is not set -# CONFIG_ARCH_CHIP_STM32F7 is not set -# CONFIG_ARCH_CHIP_STM32L4 is not set -# CONFIG_ARCH_CHIP_STR71X is not set -# CONFIG_ARCH_CHIP_TMS570 is not set -# CONFIG_ARCH_CHIP_MOXART is not set -CONFIG_ARCH_ARM7TDMI=y -# CONFIG_ARCH_ARM926EJS is not set -# CONFIG_ARCH_ARM920T is not set -# CONFIG_ARCH_CORTEXM0 is not set -# CONFIG_ARCH_CORTEXM3 is not set -# CONFIG_ARCH_CORTEXM4 is not set -# CONFIG_ARCH_CORTEXM7 is not set -# CONFIG_ARCH_CORTEXA5 is not set -# CONFIG_ARCH_CORTEXA8 is not set -# CONFIG_ARCH_CORTEXA9 is not set -# CONFIG_ARCH_CORTEXR4 is not set -# CONFIG_ARCH_CORTEXR4F is not set -# CONFIG_ARCH_CORTEXR5 is not set -# CONFIG_ARCH_CORTEX5F is not set -# CONFIG_ARCH_CORTEXR7 is not set -# CONFIG_ARCH_CORTEXR7F is not set -CONFIG_ARCH_FAMILY="arm" -CONFIG_ARCH_CHIP="calypso" -# CONFIG_ARM_TOOLCHAIN_IAR is not set -# CONFIG_ARM_TOOLCHAIN_GNU is not set -# CONFIG_ARCH_HAVE_FPU is not set -# CONFIG_ARCH_HAVE_DPFPU is not set -# CONFIG_ARCH_HAVE_TRUSTZONE is not set -# CONFIG_ARM_HAVE_MPU_UNIFIED is not set -CONFIG_ARCH_HAVE_LOWVECTORS=y -# CONFIG_ARCH_LOWVECTORS is not set - -# -# ARM Configuration Options -# -CONFIG_ARM_TOOLCHAIN_BUILDROOT=y -# CONFIG_ARM_TOOLCHAIN_CODESOURCERYL is not set -# CONFIG_ARM_TOOLCHAIN_GNU_EABIL is not set -# CONFIG_ARM_TOOLCHAIN_GNU_OABI is not set -CONFIG_ARM_OABI_TOOLCHAIN=y -CONFIG_UART_IRDA_BAUD=115200 -CONFIG_UART_IRDA_PARITY=0 -CONFIG_UART_IRDA_BITS=8 -CONFIG_UART_IRDA_2STOP=0 -CONFIG_UART_IRDA_RXBUFSIZE=256 -CONFIG_UART_IRDA_TXBUFSIZE=256 -CONFIG_UART_MODEM_BAUD=115200 -CONFIG_UART_MODEM_PARITY=0 -CONFIG_UART_MODEM_BITS=8 -CONFIG_UART_MODEM_2STOP=0 -CONFIG_UART_MODEM_RXBUFSIZE=256 -CONFIG_UART_MODEM_TXBUFSIZE=256 - -# -# Calypso Configuration Options -# - -# -# Modem UART Configuration -# -# CONFIG_UART_MODEM_HWFLOWCONTROL is not set - -# -# IrDA UART Configuration -# -# CONFIG_UART_IRDA_HWFLOWCONTROL is not set -# CONFIG_USE_SERCOMM_CONSOLE is not set -# CONFIG_SERIAL_MODEM_CONSOLE is not set -CONFIG_SERIAL_IRDA_CONSOLE=y -# CONFIG_SERIAL_CONSOLE_NONE 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 is not set -CONFIG_ARCH_HAVE_VFORK=y -# CONFIG_ARCH_HAVE_MMU is not set -# CONFIG_ARCH_HAVE_MPU is not set -# CONFIG_ARCH_NAND_HWECC is not set -# CONFIG_ARCH_HAVE_EXTCLK is not set -CONFIG_ARCH_HAVE_POWEROFF=y -# CONFIG_ARCH_HAVE_RESET is not set -CONFIG_ARCH_STACKDUMP=y -# CONFIG_ENDIAN_BIG is not set -# CONFIG_ARCH_IDLE_CUSTOM is not set -# CONFIG_ARCH_HAVE_RAMFUNCS is not set -# CONFIG_ARCH_HAVE_RAMVECTORS is not set - -# -# Board Settings -# -CONFIG_BOARD_LOOPSPERMSEC=1250 -# CONFIG_ARCH_CALIBRATION is not set - -# -# Interrupt options -# -CONFIG_ARCH_HAVE_INTERRUPTSTACK=y -CONFIG_ARCH_INTERRUPTSTACK=1024 -# CONFIG_ARCH_HAVE_HIPRI_INTERRUPT is not set - -# -# Boot options -# -# CONFIG_BOOT_RUNFROMEXTSRAM is not set -# CONFIG_BOOT_RUNFROMFLASH is not set -CONFIG_BOOT_RUNFROMISRAM=y -# CONFIG_BOOT_RUNFROMSDRAM is not set -# CONFIG_BOOT_COPYTORAM is not set - -# -# Boot Memory Configuration -# -CONFIG_RAM_START=0x00800000 -CONFIG_RAM_SIZE=262144 -# CONFIG_ARCH_HAVE_SDRAM is not set - -# -# Board Selection -# -# CONFIG_ARCH_BOARD_COMPALE86 is not set -# CONFIG_ARCH_BOARD_COMPALE88 is not set -# CONFIG_ARCH_BOARD_COMPALE99 is not set -CONFIG_ARCH_BOARD_PIRELLI_DPL10=y -# CONFIG_ARCH_BOARD_CUSTOM is not set -CONFIG_ARCH_BOARD="pirelli_dpl10" - -# -# Common Board Options -# -CONFIG_NSH_MMCSDMINOR=0 - -# -# Board-Specific Options -# -CONFIG_LIB_BOARDCTL=y -CONFIG_BOARDCTL_POWEROFF=y -# CONFIG_BOARDCTL_UNIQUEID is not set -# CONFIG_BOARDCTL_TSCTEST 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=y -# CONFIG_DISABLE_ENVIRON is not set - -# -# Clocks and Timers -# -CONFIG_USEC_PER_TICK=10000 -# CONFIG_SYSTEM_TIME64 is not set -# CONFIG_CLOCK_MONOTONIC is not set -# CONFIG_JULIAN_TIME is not set -CONFIG_START_YEAR=2007 -CONFIG_START_MONTH=2 -CONFIG_START_DAY=13 -CONFIG_MAX_WDOGPARMS=4 -CONFIG_PREALLOC_WDOGS=8 -CONFIG_WDOG_INTRESERVE=1 -CONFIG_PREALLOC_TIMERS=8 - -# -# Tasks and Scheduling -# -# CONFIG_INIT_NONE is not set -CONFIG_INIT_ENTRYPOINT=y -# CONFIG_INIT_FILEPATH is not set -CONFIG_USER_ENTRYPOINT="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 is not set - -# -# Pthread Options -# -# CONFIG_MUTEX_TYPES is not set -CONFIG_NPTHREAD_KEYS=4 - -# -# Performance Monitoring -# -# CONFIG_SCHED_CPULOAD is not set -# CONFIG_SCHED_INSTRUMENTATION is not set - -# -# Files and I/O -# -CONFIG_DEV_CONSOLE=y -# CONFIG_FDCLONE_DISABLE is not set -# CONFIG_FDCLONE_STDIO is not set -CONFIG_SDCLONE_DISABLE=y -CONFIG_NFILE_DESCRIPTORS=8 -CONFIG_NFILE_STREAMS=8 -CONFIG_NAME_MAX=32 -# CONFIG_PRIORITY_INHERITANCE is not set - -# -# RTOS hooks -# -# CONFIG_BOARD_INITIALIZE is not set -# CONFIG_SCHED_STARTHOOK is not set -# CONFIG_SCHED_ATEXIT is not set -# CONFIG_SCHED_ONEXIT is not set - -# -# Signal Numbers -# -CONFIG_SIG_SIGUSR1=1 -CONFIG_SIG_SIGUSR2=2 -CONFIG_SIG_SIGALARM=3 -CONFIG_SIG_SIGCONDTIMEDOUT=16 -# 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=2048 -CONFIG_USERMAIN_STACKSIZE=2048 -CONFIG_PTHREAD_STACK_MIN=256 -CONFIG_PTHREAD_STACK_DEFAULT=2048 -# CONFIG_LIB_SYSCALL is not set - -# -# Device Drivers -# -CONFIG_DISABLE_POLL=y -CONFIG_DEV_NULL=y -# CONFIG_DEV_ZERO is not set -# CONFIG_DEV_LOOP is not set - -# -# Buffering -# -# CONFIG_DRVR_WRITEBUFFER is not set -# CONFIG_DRVR_READAHEAD is not set -# CONFIG_RAMDISK is not set -# CONFIG_CAN is not set -# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set -# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set -# CONFIG_PWM is not set -# CONFIG_ARCH_HAVE_I2CRESET is not set -# CONFIG_I2C is not set -CONFIG_SPI=y -# CONFIG_SPI_SLAVE is not set -CONFIG_SPI_EXCHANGE=y -# CONFIG_SPI_CMDDATA is not set -# CONFIG_SPI_CALLBACK is not set -# CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_HWFEATURES is not set -# CONFIG_SPI_CRCGENERATION is not set -# CONFIG_SPI_CS_CONTROL is not set -# CONFIG_SPI_CS_DELAY_CONTROL is not set -# CONFIG_I2S is not set - -# -# Timer Driver Support -# -# CONFIG_TIMER is not set -# CONFIG_RTC is not set -# CONFIG_WATCHDOG is not set -# CONFIG_ANALOG is not set -# CONFIG_AUDIO_DEVICES is not set -# CONFIG_VIDEO_DEVICES is not set -# CONFIG_BCH is not set -# CONFIG_INPUT is not set -# CONFIG_IOEXPANDER is not set - -# -# LCD Driver Support -# -# CONFIG_LCD is not set -# CONFIG_SLCD is not set - -# -# LED Support -# -# CONFIG_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=y -CONFIG_MCU_SERIAL=y -# CONFIG_STANDARD_SERIAL is not set -# CONFIG_SERIAL_IFLOWCONTROL is not set -# CONFIG_SERIAL_OFLOWCONTROL is not set -# CONFIG_SERIAL_DMA is not set -# CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set -CONFIG_OTHER_SERIAL_CONSOLE=y -# CONFIG_NO_SERIAL_CONSOLE is not set -# CONFIG_USBDEV is not set -# CONFIG_USBHOST is not set -# CONFIG_DRIVERS_WIRELESS is not set - -# -# System Logging -# -# CONFIG_ARCH_SYSLOG is not set -# CONFIG_RAMLOG is not set -# CONFIG_SYSLOG_INTBUFFER is not set -# CONFIG_SYSLOG_TIMESTAMP is not set -CONFIG_SYSLOG_SERIAL_CONSOLE=y -# CONFIG_SYSLOG_CHAR is not set -CONFIG_SYSLOG_CONSOLE=y -# CONFIG_SYSLOG_NONE is not set -# CONFIG_SYSLOG_FILE is not set - -# -# Networking Support -# -# CONFIG_ARCH_HAVE_NET is not set -# CONFIG_ARCH_HAVE_PHY is not set -# CONFIG_NET is not set - -# -# Crypto API -# -# CONFIG_CRYPTO is not set - -# -# File Systems -# - -# -# File system configuration -# -# CONFIG_DISABLE_MOUNTPOINT is not set -# CONFIG_FS_AUTOMOUNTER is not set -# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set -# CONFIG_FS_READABLE is not set -# CONFIG_FS_WRITABLE is not set -# CONFIG_FS_NAMED_SEMAPHORES is not set -# 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=y -CONFIG_HEAP2_BASE=0x00000000 -CONFIG_HEAP2_SIZE=0 -# 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=1024 -CONFIG_STDIO_LINEBUFFER=y -CONFIG_NUNGET_CHARS=2 -CONFIG_LIB_HOMEDIR="/" -# CONFIG_LIBM is not set -# CONFIG_NOPRINTF_FIELDWIDTH is not set -# CONFIG_LIBC_FLOATINGPOINT is not set -CONFIG_LIBC_LONG_LONG=y -# CONFIG_LIBC_IOCTL_VARIADIC is not set -CONFIG_LIB_RAND_ORDER=1 -# CONFIG_EOL_IS_CR is not set -# CONFIG_EOL_IS_LF is not set -# CONFIG_EOL_IS_BOTH_CRLF is not set -CONFIG_EOL_IS_EITHER_CRLF=y -# CONFIG_LIBC_EXECFUNCS is not set -CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 -CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 -# CONFIG_LIBC_STRERROR is not set -# CONFIG_LIBC_PERROR_STDOUT is not set -CONFIG_ARCH_LOWPUTC=y -# CONFIG_LIBC_LOCALTIME is not set -# CONFIG_TIME_EXTENDED is not set -CONFIG_LIB_SENDFILE_BUFSIZE=512 -# CONFIG_ARCH_ROMGETC is not set -# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set -CONFIG_ARCH_HAVE_TLS=y -# CONFIG_TLS is not set -# CONFIG_LIBC_NETDB is not set - -# -# Non-standard Library Support -# -# CONFIG_LIB_CRC64_FAST is not set -# CONFIG_LIB_KBDCODEC is not set -# CONFIG_LIB_SLCDCODEC is not set - -# -# Basic CXX Support -# -# CONFIG_C99_BOOL8 is not set -# CONFIG_HAVE_CXX is not set - -# -# Application Configuration -# - -# -# Built-In Applications -# -CONFIG_BUILTIN_PROXY_STACKSIZE=1024 - -# -# CAN Utilities -# - -# -# Examples -# -# CONFIG_EXAMPLES_CHAT is not set -# CONFIG_EXAMPLES_CONFIGDATA is not set -# CONFIG_EXAMPLES_CPUHOG is not set -# CONFIG_EXAMPLES_DHCPD is not set -# CONFIG_EXAMPLES_ELF is not set -# CONFIG_EXAMPLES_FTPC is not set -# CONFIG_EXAMPLES_FTPD is not set -CONFIG_EXAMPLES_HELLO=y -CONFIG_EXAMPLES_HELLO_PRIORITY=100 -CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 -# CONFIG_EXAMPLES_HIDKBD is not set -# CONFIG_EXAMPLES_IGMP is not set -# CONFIG_EXAMPLES_JSON is not set -# CONFIG_EXAMPLES_KEYPADTEST is not set -# CONFIG_EXAMPLES_MEDIA is not set -# CONFIG_EXAMPLES_MM is not set -# CONFIG_EXAMPLES_MODBUS is not set -# CONFIG_EXAMPLES_MOUNT is not set -# CONFIG_EXAMPLES_NRF24L01TERM is not set -CONFIG_EXAMPLES_NSH=y -# CONFIG_EXAMPLES_NULL is not set -# CONFIG_EXAMPLES_NX is not set -# CONFIG_EXAMPLES_NXFFS is not set -# CONFIG_EXAMPLES_NXHELLO is not set -# CONFIG_EXAMPLES_NXIMAGE is not set -# CONFIG_EXAMPLES_NXLINES is not set -# CONFIG_EXAMPLES_NXTERM is not set -# CONFIG_EXAMPLES_NXTEXT is not set -# CONFIG_EXAMPLES_OSTEST is not set -# CONFIG_EXAMPLES_PCA9635 is not set -# CONFIG_EXAMPLES_PIPE is not set -# CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_PPPD is not set -# CONFIG_EXAMPLES_RGBLED is not set -# CONFIG_EXAMPLES_SENDMAIL is not set -# CONFIG_EXAMPLES_SERIALBLASTER is not set -# CONFIG_EXAMPLES_SERIALRX is not set -# CONFIG_EXAMPLES_SERLOOP is not set -# CONFIG_EXAMPLES_SLCD is not set -# CONFIG_EXAMPLES_SMART is not set -# CONFIG_EXAMPLES_SMART_TEST is not set -# CONFIG_EXAMPLES_SMP is not set -# CONFIG_EXAMPLES_TCPECHO is not set -# CONFIG_EXAMPLES_TELNETD is not set -# CONFIG_EXAMPLES_TIFF is not set -# CONFIG_EXAMPLES_TOUCHSCREEN is not set -# CONFIG_EXAMPLES_USBSERIAL is not set -# CONFIG_EXAMPLES_USBTERM is not set -# CONFIG_EXAMPLES_WATCHDOG is not set -# CONFIG_EXAMPLES_WEBSERVER is not set - -# -# File System Utilities -# -# CONFIG_FSUTILS_INIFILE is not set - -# -# GPS Utilities -# -# CONFIG_GPSUTILS_MINMEA_LIB is not set - -# -# Graphics Support -# -# CONFIG_TIFF is not set -# CONFIG_GRAPHICS_TRAVELER is not set - -# -# Interpreters -# -# CONFIG_INTERPRETERS_FICL is not set -# CONFIG_INTERPRETERS_MICROPYTHON is not set -# CONFIG_INTERPRETERS_PCODE is not set - -# -# FreeModBus -# -# CONFIG_MODBUS is not set - -# -# Network Utilities -# -# CONFIG_NETUTILS_CODECS is not set -# CONFIG_NETUTILS_ESP8266 is not set -# CONFIG_NETUTILS_FTPC is not set -# CONFIG_NETUTILS_JSON is not set -# CONFIG_NETUTILS_SMTP is not set - -# -# NSH Library -# -CONFIG_NSH_LIBRARY=y -# CONFIG_NSH_MOTD is not set - -# -# Command Line Configuration -# -CONFIG_NSH_READLINE=y -# CONFIG_NSH_CLE is not set -CONFIG_NSH_LINELEN=64 -# CONFIG_NSH_DISABLE_SEMICOLON is not set -CONFIG_NSH_CMDPARMS=y -CONFIG_NSH_MAXARGUMENTS=6 -CONFIG_NSH_ARGCAT=y -CONFIG_NSH_NESTDEPTH=3 -# CONFIG_NSH_DISABLEBG is not set -CONFIG_NSH_BUILTIN_APPS=y - -# -# Disable Individual commands -# -# CONFIG_NSH_DISABLE_ADDROUTE is not set -# CONFIG_NSH_DISABLE_BASENAME is not set -# CONFIG_NSH_DISABLE_CAT is not set -# CONFIG_NSH_DISABLE_CD is not set -# CONFIG_NSH_DISABLE_CP is not set -# CONFIG_NSH_DISABLE_CMP is not set -CONFIG_NSH_DISABLE_DATE=y -# CONFIG_NSH_DISABLE_DD is not set -# CONFIG_NSH_DISABLE_DF is not set -# CONFIG_NSH_DISABLE_DELROUTE is not set -# CONFIG_NSH_DISABLE_DIRNAME is not set -# CONFIG_NSH_DISABLE_ECHO is not set -# CONFIG_NSH_DISABLE_EXEC is not set -# CONFIG_NSH_DISABLE_EXIT is not set -# CONFIG_NSH_DISABLE_FREE is not set -# CONFIG_NSH_DISABLE_GET is not set -# CONFIG_NSH_DISABLE_HELP is not set -# CONFIG_NSH_DISABLE_HEXDUMP is not set -# CONFIG_NSH_DISABLE_IFCONFIG is not set -CONFIG_NSH_DISABLE_IFUPDOWN=y -# CONFIG_NSH_DISABLE_KILL is not set -# CONFIG_NSH_DISABLE_LOSETUP is not set -CONFIG_NSH_DISABLE_LOSMART=y -# CONFIG_NSH_DISABLE_LS is not set -# CONFIG_NSH_DISABLE_MB is not set -# CONFIG_NSH_DISABLE_MKDIR is not set -# CONFIG_NSH_DISABLE_MKFIFO is not set -# CONFIG_NSH_DISABLE_MKRD is not set -# CONFIG_NSH_DISABLE_MH is not set -# CONFIG_NSH_DISABLE_MOUNT is not set -# CONFIG_NSH_DISABLE_MV is not set -# CONFIG_NSH_DISABLE_MW is not set -# CONFIG_NSH_DISABLE_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 - -# -# Configure Command Options -# -# CONFIG_NSH_CMDOPT_DF_H is not set -CONFIG_NSH_CODECS_BUFSIZE=128 -CONFIG_NSH_CMDOPT_HEXDUMP=y -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 - -# -# Console Configuration -# -CONFIG_NSH_CONSOLE=y -# CONFIG_NSH_ALTCONDEV is not set -# CONFIG_NSH_ARCHINIT is not set -# CONFIG_NSH_LOGIN is not set -# CONFIG_NSH_CONSOLE_LOGIN is not set - -# -# NxWidgets/NxWM -# - -# -# Platform-specific Support -# -# CONFIG_PLATFORM_CONFIGDATA is not set - -# -# System Libraries and NSH Add-Ons -# -# CONFIG_SYSTEM_CLE is not set -# CONFIG_SYSTEM_CUTERM is not set -# CONFIG_SYSTEM_FREE is not set -# CONFIG_LIB_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/pirelli_dpl10/scripts/highram.ld b/configs/pirelli_dpl10/scripts/highram.ld deleted file mode 100644 index f20a5f89c2a..00000000000 --- a/configs/pirelli_dpl10/scripts/highram.ld +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Linker script for running from internal SRAM on Pirelli DP-L10 phones - * - * This script is tailored specifically to the requirements imposed - * on us by the CalypsoRomloader in the Pirelli rom. - * - */ - -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -OUTPUT_ARCH(arm) -ENTRY(__start) - -MEMORY -{ - /* 0x00800000-0x0082000: Low RAM. Used only for exception vectors */ - - LRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x00020000 - - /* 0x00820000-0x0084000: High RAM. The CalypsoRomloader loads binary to - * address 0x00820000 */ - - HRAM (rw) : ORIGIN = 0x00820000, LENGTH = 0x00020000 -} - -SECTIONS -{ - . = 0x800000; - - /* romloader data section, contains passthru interrupt vectors */ - .compal.loader (NOLOAD) : { . = 0x100; } > LRAM - - /* image signature (prepended by osmocon according to phone type) */ - .compal.header (NOLOAD) : { . = 4; } > LRAM - - /* initialization code */ - . = ALIGN(4); - .text.start : { - PROVIDE(__start = .); - KEEP(*(.text.start)) - *(.text.start) - } > HRAM - - /* exception vectors from 0x80001c to 0x800034 */ - .text.exceptions 0x80001c : AT (LOADADDR(.text.start) + SIZEOF(.text.start)) { - KEEP(*(.text.exceptions)) - * (.text.exceptions) - . = ALIGN(4); - } > LRAM - PROVIDE(_exceptions = LOADADDR(.text.exceptions)); - - /* code */ - . = ALIGN(4); - .text (LOADADDR(.text.exceptions) + SIZEOF(.text.exceptions)) : - AT (LOADADDR(.text.exceptions) + SIZEOF(.text.exceptions)) { - /* regular code */ - *(.text*) - /* always-in-ram code */ - *(.ramtext*) - /* gcc voodoo */ - *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx) - . = ALIGN(4); - } > HRAM - PROVIDE(_text_start = LOADADDR(.text)); - PROVIDE(_text_end = LOADADDR(.text) + SIZEOF(.text)); - - /* constructor pointers */ - .ctors : { - /* ctor count */ - LONG(SIZEOF(.ctors) / 4 - 2) - /* ctor pointers */ - KEEP(*(SORT(.ctors))) - /* end of list */ - LONG(0) - } > HRAM - PROVIDE(_ctor_start = LOADADDR(.ctors)); - PROVIDE(_ctor_end = LOADADDR(.ctors) + SIZEOF(.ctors)); - - /* destructor pointers */ - .dtors : { - /* dtor count */ - LONG(SIZEOF(.dtors) / 4 - 2) - /* dtor pointers */ - KEEP(*(SORT(.dtors))) - /* end of list */ - LONG(0) - } > HRAM - PROVIDE(_dtor_start = LOADADDR(.dtors)); - PROVIDE(_dtor_end = LOADADDR(.dtors) + SIZEOF(.dtors)); - - /* read-only data */ - . = ALIGN(4); - .rodata : { - *(.rodata*) - } > HRAM - PROVIDE(_rodata_start = LOADADDR(.rodata)); - PROVIDE(_rodata_end = LOADADDR(.rodata) + SIZEOF(.rodata)); - - /* initialized data */ - . = ALIGN(4); - .data : { - *(.data) - } > HRAM - PROVIDE(_data_start = LOADADDR(.data)); - PROVIDE(_data_end = LOADADDR(.data) + SIZEOF(.data)); - - /* pic offset tables */ - . = ALIGN(4); - .got : { - *(.got) - *(.got.plt) *(.igot.plt) *(.got) *(.igot) - } > HRAM - PROVIDE(_got_start = LOADADDR(.got)); - PROVIDE(_got_end = LOADADDR(.got) + SIZEOF(.got)); - - /* uninitialized data */ - .bss (NOLOAD) : { - . = ALIGN(4); - __bss_start = .; - _sbss = ABSOLUTE(.); - *(.bss) - _ebss = ABSOLUTE(.); - } > HRAM - . = ALIGN(4); - __bss_end = .; - PROVIDE(_bss_start = __bss_start); - PROVIDE(_bss_end = __bss_end); - - /* end of image */ - . = ALIGN(4); - _end = .; - PROVIDE(end = .); -} diff --git a/configs/pirelli_dpl10/src/.gitignore b/configs/pirelli_dpl10/src/.gitignore deleted file mode 100644 index 726d936e1e3..00000000000 --- a/configs/pirelli_dpl10/src/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/.depend -/Make.dep diff --git a/configs/pirelli_dpl10/src/Makefile b/configs/pirelli_dpl10/src/Makefile deleted file mode 100644 index 4026b5fb1c9..00000000000 --- a/configs/pirelli_dpl10/src/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################ -# configs/pirelli_dpl10/src/Makefile -# -# Copyright (C) 2007, 2008, 2013 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Copyright (C) 2011 Stefan Richter. All rights reserved. -# Author: Stefan Richter -# -# 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 = boot.c - -include $(TOPDIR)/configs/Board.mk diff --git a/configs/qemu-i486/nsh/defconfig b/configs/qemu-i486/nsh/defconfig index 36683c23fb2..dc240aa19a3 100644 --- a/configs/qemu-i486/nsh/defconfig +++ b/configs/qemu-i486/nsh/defconfig @@ -238,7 +238,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_16550_UART=y diff --git a/configs/qemu-i486/ostest/defconfig b/configs/qemu-i486/ostest/defconfig index bddc708e7d9..b205650b6c4 100644 --- a/configs/qemu-i486/ostest/defconfig +++ b/configs/qemu-i486/ostest/defconfig @@ -237,7 +237,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set diff --git a/configs/sabre-6quad/README.txt b/configs/sabre-6quad/README.txt index dda5ef76204..a9703e5a28b 100644 --- a/configs/sabre-6quad/README.txt +++ b/configs/sabre-6quad/README.txt @@ -525,7 +525,51 @@ Open Issues: correctly yet. Currently cache inconsistencies appear to be the root cause of all current SMP - issues. + issues. SMP works as expected if the caches are disabled, but otherwise there + are problems (usually hangs): + + This will disable the caches: + +diff --git a/arch/arm/src/armv7-a/arm_head.S b/arch/arm/src/armv7-a/arm_head.S +index 27c2a5b..2a6274c 100644 +--- a/arch/arm/src/armv7-a/arm_head.S ++++ b/arch/arm/src/armv7-a/arm_head.S +@@ -454,6 +454,7 @@ __start: + * after SMP cache coherency has been setup. + */ + ++#if 0 // REMOVE ME + #if !defined(CPU_DCACHE_DISABLE) && !defined(CONFIG_SMP) + /* Dcache enable + * +@@ -471,6 +472,7 @@ __start: + + orr r0, r0, #(SCTLR_I) + #endif ++#endif // REMOVE ME + + #ifdef CPU_ALIGNMENT_TRAP + /* Alignment abort enable +diff --git a/arch/arm/src/armv7-a/arm_scu.c b/arch/arm/src/armv7-a/arm_scu.c +index eedf179..1db2092 100644 +--- a/arch/arm/src/armv7-a/arm_scu.c ++++ b/arch/arm/src/armv7-a/arm_scu.c +@@ -156,6 +156,7 @@ static inline void arm_set_actlr(uint32_t actlr) + + void arm_enable_smp(int cpu) + { ++#if 0 // REMOVE ME + uint32_t regval; + + /* Handle actions unique to CPU0 which comes up first */ +@@ -222,6 +223,7 @@ void arm_enable_smp(int cpu) + regval = arm_get_sctlr(); + regval |= SCTLR_C; + arm_set_sctlr(regval); ++#endif // REMOVE ME + } + + #endif Configurations ============== diff --git a/configs/sabre-6quad/nsh/defconfig b/configs/sabre-6quad/nsh/defconfig index 51c987752aa..41a976f7143 100644 --- a/configs/sabre-6quad/nsh/defconfig +++ b/configs/sabre-6quad/nsh/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -449,7 +448,6 @@ CONFIG_DEV_ZERO=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sabre-6quad/scripts/dramboot.ld b/configs/sabre-6quad/scripts/dramboot.ld index da35b396aae..a5d696c5ce0 100644 --- a/configs/sabre-6quad/scripts/dramboot.ld +++ b/configs/sabre-6quad/scripts/dramboot.ld @@ -44,7 +44,6 @@ MEMORY { - nocache (WR) : ORIGIN = 0x00400000, LENGTH = 4K oscram (W!RX) : ORIGIN = 0x00900000, LENGTH = 256K - 16K ddr3 (W!RX) : ORIGIN = 0x10800000, LENGTH = 1024M - 8M } @@ -123,14 +122,8 @@ SECTIONS _enoinit = ABSOLUTE(.); } > ddr3 - .nocache : - { - _snocache = ABSOLUTE(.); - *(.nocache) - _enocache = ABSOLUTE(.); - } > nocache - /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } .stabstr 0 : { *(.stabstr) } .stab.excl 0 : { *(.stab.excl) } diff --git a/configs/sabre-6quad/smp/defconfig b/configs/sabre-6quad/smp/defconfig index 7bd54f8c703..d470592436e 100644 --- a/configs/sabre-6quad/smp/defconfig +++ b/configs/sabre-6quad/smp/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -316,7 +315,7 @@ CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_RR_INTERVAL=200 # CONFIG_SCHED_SPORADIC is not set CONFIG_TASK_NAME_SIZE=31 -CONFIG_MAX_TASKS=16 +CONFIG_MAX_TASKS=32 # CONFIG_SCHED_HAVE_PARENT is not set CONFIG_SCHED_WAITPID=y @@ -325,6 +324,8 @@ CONFIG_SCHED_WAITPID=y # # CONFIG_MUTEX_TYPES is not set CONFIG_NPTHREAD_KEYS=4 +# CONFIG_PTHREAD_CLEANUP is not set +# CONFIG_CANCELLATION_POINTS is not set # # Performance Monitoring @@ -455,7 +456,6 @@ CONFIG_DEV_ZERO=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set @@ -649,6 +649,8 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set CONFIG_ARCH_HAVE_TLS=y # CONFIG_TLS is not set +# CONFIG_LIBC_IPv4_ADDRCONV is not set +# CONFIG_LIBC_IPv6_ADDRCONV is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -732,7 +734,10 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # 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_SMP=y +CONFIG_EXAMPLES_SMP_NBARRIER_THREADS=8 +CONFIG_EXAMPLES_SMP_PRIORITY=100 +CONFIG_EXAMPLES_SMP_STACKSIZE=2048 # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set # CONFIG_EXAMPLES_TIFF is not set @@ -860,6 +865,7 @@ CONFIG_NSH_MMCSDMINOR=0 # Configure Command Options # # CONFIG_NSH_CMDOPT_DF_H is not set +# CONFIG_NSH_CMDOPT_DD_STATS is not set CONFIG_NSH_CODECS_BUFSIZE=128 # CONFIG_NSH_CMDOPT_HEXDUMP is not set CONFIG_NSH_PROC_MOUNTPOINT="/proc" diff --git a/configs/sam3u-ek/knsh/defconfig b/configs/sam3u-ek/knsh/defconfig index 2fec4684474..23349ef9a84 100644 --- a/configs/sam3u-ek/knsh/defconfig +++ b/configs/sam3u-ek/knsh/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -512,7 +511,6 @@ CONFIG_MMCSD_NSLOTS=1 # 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 diff --git a/configs/sam3u-ek/nsh/defconfig b/configs/sam3u-ek/nsh/defconfig index 4607e053cc0..0de76352604 100644 --- a/configs/sam3u-ek/nsh/defconfig +++ b/configs/sam3u-ek/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -497,7 +496,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sam3u-ek/nx/defconfig b/configs/sam3u-ek/nx/defconfig index 2b1876e7633..87b7722e880 100644 --- a/configs/sam3u-ek/nx/defconfig +++ b/configs/sam3u-ek/nx/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -537,7 +536,6 @@ CONFIG_LCD_PORTRAIT=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sam3u-ek/nxwm/defconfig b/configs/sam3u-ek/nxwm/defconfig index 5358c385b2c..c0e70052c19 100644 --- a/configs/sam3u-ek/nxwm/defconfig +++ b/configs/sam3u-ek/nxwm/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -581,7 +580,6 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sam4cmp-db/nsh/defconfig b/configs/sam4cmp-db/nsh/defconfig index 6eb16914322..118b123cef1 100644 --- a/configs/sam4cmp-db/nsh/defconfig +++ b/configs/sam4cmp-db/nsh/defconfig @@ -104,7 +104,6 @@ CONFIG_ARCH="arm" # # 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 @@ -523,7 +522,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sam4e-ek/nsh/defconfig b/configs/sam4e-ek/nsh/defconfig index ea0145d4317..fa0dcfdf169 100644 --- a/configs/sam4e-ek/nsh/defconfig +++ b/configs/sam4e-ek/nsh/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -643,7 +642,6 @@ CONFIG_ETH0_PHY_KSZ8051=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sam4e-ek/nxwm/defconfig b/configs/sam4e-ek/nxwm/defconfig index 7f1d48a118e..e4a4a5a6645 100644 --- a/configs/sam4e-ek/nxwm/defconfig +++ b/configs/sam4e-ek/nxwm/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -702,7 +701,6 @@ CONFIG_ETH0_PHY_KSZ8051=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sam4e-ek/usbnsh/defconfig b/configs/sam4e-ek/usbnsh/defconfig index 095a827bda1..4a65eb790bc 100644 --- a/configs/sam4e-ek/usbnsh/defconfig +++ b/configs/sam4e-ek/usbnsh/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -648,7 +647,6 @@ CONFIG_ETH0_PHY_KSZ8051=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_SERIAL_CONSOLE is not set diff --git a/configs/sam4l-xplained/nsh/defconfig b/configs/sam4l-xplained/nsh/defconfig index def321022ba..a4d744bbf5d 100644 --- a/configs/sam4l-xplained/nsh/defconfig +++ b/configs/sam4l-xplained/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -515,7 +514,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sam4s-xplained-pro/nsh/defconfig b/configs/sam4s-xplained-pro/nsh/defconfig index a77d8931674..bd98575c00c 100644 --- a/configs/sam4s-xplained-pro/nsh/defconfig +++ b/configs/sam4s-xplained-pro/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -581,7 +580,6 @@ 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 diff --git a/configs/sam4s-xplained/nsh/defconfig b/configs/sam4s-xplained/nsh/defconfig index b7ccf03ad32..5120854680e 100644 --- a/configs/sam4s-xplained/nsh/defconfig +++ b/configs/sam4s-xplained/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -495,7 +494,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d2-xult/nsh/defconfig b/configs/sama5d2-xult/nsh/defconfig index c5249938396..bfd5cf964a2 100644 --- a/configs/sama5d2-xult/nsh/defconfig +++ b/configs/sama5d2-xult/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -578,7 +577,6 @@ CONFIG_RTC_DATETIME=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d3-xplained/bridge/defconfig b/configs/sama5d3-xplained/bridge/defconfig index 51c672c0665..ca9a6b5b224 100644 --- a/configs/sama5d3-xplained/bridge/defconfig +++ b/configs/sama5d3-xplained/bridge/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -634,7 +633,6 @@ CONFIG_ETH1_PHY_KSZ8081=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d3-xplained/nsh/defconfig b/configs/sama5d3-xplained/nsh/defconfig index f527aefe04c..8646ca8b032 100644 --- a/configs/sama5d3-xplained/nsh/defconfig +++ b/configs/sama5d3-xplained/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -533,7 +532,6 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d3x-ek/demo/defconfig b/configs/sama5d3x-ek/demo/defconfig index 521ace3b80b..b0e5384d27d 100644 --- a/configs/sama5d3x-ek/demo/defconfig +++ b/configs/sama5d3x-ek/demo/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -659,7 +658,6 @@ CONFIG_AT25_SPIFREQUENCY=10000000 # 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 diff --git a/configs/sama5d3x-ek/hello/defconfig b/configs/sama5d3x-ek/hello/defconfig index 80ad780990a..d4ab5620205 100644 --- a/configs/sama5d3x-ek/hello/defconfig +++ b/configs/sama5d3x-ek/hello/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -514,7 +513,6 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d3x-ek/norboot/defconfig b/configs/sama5d3x-ek/norboot/defconfig index 349fff0a1a8..11eedfe99aa 100644 --- a/configs/sama5d3x-ek/norboot/defconfig +++ b/configs/sama5d3x-ek/norboot/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -528,7 +527,6 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d3x-ek/nsh/defconfig b/configs/sama5d3x-ek/nsh/defconfig index 8c5a5954ae2..b3140774afe 100644 --- a/configs/sama5d3x-ek/nsh/defconfig +++ b/configs/sama5d3x-ek/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -532,7 +531,6 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d3x-ek/nx/defconfig b/configs/sama5d3x-ek/nx/defconfig index bad74c5af81..b67a145dfcf 100644 --- a/configs/sama5d3x-ek/nx/defconfig +++ b/configs/sama5d3x-ek/nx/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -588,7 +587,6 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d3x-ek/nxplayer/defconfig b/configs/sama5d3x-ek/nxplayer/defconfig index 6d6dfc0d15a..00b2d5479dd 100644 --- a/configs/sama5d3x-ek/nxplayer/defconfig +++ b/configs/sama5d3x-ek/nxplayer/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -629,7 +628,6 @@ CONFIG_SDIO_BLOCKSETUP=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d3x-ek/nxwm/defconfig b/configs/sama5d3x-ek/nxwm/defconfig index 016756b5c6d..5c873be148d 100644 --- a/configs/sama5d3x-ek/nxwm/defconfig +++ b/configs/sama5d3x-ek/nxwm/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -643,7 +642,6 @@ CONFIG_INPUT=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d3x-ek/ov2640/defconfig b/configs/sama5d3x-ek/ov2640/defconfig index 61d48821a68..c0d64cc771a 100644 --- a/configs/sama5d3x-ek/ov2640/defconfig +++ b/configs/sama5d3x-ek/ov2640/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -599,7 +598,6 @@ CONFIG_OV2640_SVGA_RESOLUTION=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d4-ek/at25boot/defconfig b/configs/sama5d4-ek/at25boot/defconfig index 2d4c89081f1..57b32544cd3 100644 --- a/configs/sama5d4-ek/at25boot/defconfig +++ b/configs/sama5d4-ek/at25boot/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -598,7 +597,6 @@ CONFIG_AT25_SPIFREQUENCY=20000000 # 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 diff --git a/configs/sama5d4-ek/bridge/defconfig b/configs/sama5d4-ek/bridge/defconfig index a02e6539034..d723f241508 100644 --- a/configs/sama5d4-ek/bridge/defconfig +++ b/configs/sama5d4-ek/bridge/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -652,7 +651,6 @@ CONFIG_ETH1_PHY_KSZ8081=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d4-ek/dramboot/defconfig b/configs/sama5d4-ek/dramboot/defconfig index f0f68c6855e..8ca250d5d3f 100644 --- a/configs/sama5d4-ek/dramboot/defconfig +++ b/configs/sama5d4-ek/dramboot/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -550,7 +549,6 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d4-ek/elf/defconfig b/configs/sama5d4-ek/elf/defconfig index b55fc146064..73827504120 100644 --- a/configs/sama5d4-ek/elf/defconfig +++ b/configs/sama5d4-ek/elf/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -577,7 +576,6 @@ CONFIG_AUDIO_DEVICES=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d4-ek/ipv6/defconfig b/configs/sama5d4-ek/ipv6/defconfig index a4488a7647e..434147e3696 100644 --- a/configs/sama5d4-ek/ipv6/defconfig +++ b/configs/sama5d4-ek/ipv6/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -788,7 +787,6 @@ CONFIG_ETH0_PHY_KSZ8081=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d4-ek/knsh/defconfig b/configs/sama5d4-ek/knsh/defconfig index 372200adb0c..feeeb88157a 100644 --- a/configs/sama5d4-ek/knsh/defconfig +++ b/configs/sama5d4-ek/knsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -606,7 +605,6 @@ CONFIG_SDIO_BLOCKSETUP=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d4-ek/knsh/defconfig.ROMFS b/configs/sama5d4-ek/knsh/defconfig.ROMFS index 1e117837004..047303d132b 100644 --- a/configs/sama5d4-ek/knsh/defconfig.ROMFS +++ b/configs/sama5d4-ek/knsh/defconfig.ROMFS @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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_IMX1 is not set # CONFIG_ARCH_CHIP_KINETIS is not set @@ -482,7 +481,6 @@ CONFIG_RTC_DATETIME=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set diff --git a/configs/sama5d4-ek/nsh/defconfig b/configs/sama5d4-ek/nsh/defconfig index dff96a156d0..a169aa669cd 100644 --- a/configs/sama5d4-ek/nsh/defconfig +++ b/configs/sama5d4-ek/nsh/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -790,7 +789,6 @@ CONFIG_ETH0_PHY_KSZ8081=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d4-ek/nxwm/defconfig b/configs/sama5d4-ek/nxwm/defconfig index e890dab1a62..a6987f8f8b0 100644 --- a/configs/sama5d4-ek/nxwm/defconfig +++ b/configs/sama5d4-ek/nxwm/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -759,7 +758,6 @@ CONFIG_ETH0_PHY_KSZ8081=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sama5d4-ek/ramtest/defconfig b/configs/sama5d4-ek/ramtest/defconfig index 8b7eb08c69a..e76da62faa1 100644 --- a/configs/sama5d4-ek/ramtest/defconfig +++ b/configs/sama5d4-ek/ramtest/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -550,7 +549,6 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/samd20-xplained/nsh/defconfig b/configs/samd20-xplained/nsh/defconfig index 973d39e7ec0..a91d464767f 100644 --- a/configs/samd20-xplained/nsh/defconfig +++ b/configs/samd20-xplained/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -477,7 +476,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/samd21-xplained/nsh/defconfig b/configs/samd21-xplained/nsh/defconfig index 0428f7b7466..3181a18cfe6 100644 --- a/configs/samd21-xplained/nsh/defconfig +++ b/configs/samd21-xplained/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -475,7 +474,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/same70-xplained/netnsh/defconfig b/configs/same70-xplained/netnsh/defconfig index d46655853da..c2d2a2401b3 100644 --- a/configs/same70-xplained/netnsh/defconfig +++ b/configs/same70-xplained/netnsh/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -689,7 +688,6 @@ CONFIG_ETH0_PHY_KSZ8081=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/same70-xplained/nsh/defconfig b/configs/same70-xplained/nsh/defconfig index 8f45a3dba35..c8dc02ad826 100644 --- a/configs/same70-xplained/nsh/defconfig +++ b/configs/same70-xplained/nsh/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -632,7 +631,6 @@ CONFIG_AT25_SPIFREQUENCY=20000000 # 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 diff --git a/configs/saml21-xplained/nsh/defconfig b/configs/saml21-xplained/nsh/defconfig index 2306bef6b93..9d487c68b00 100644 --- a/configs/saml21-xplained/nsh/defconfig +++ b/configs/saml21-xplained/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -463,7 +462,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/samv71-xult/knsh/defconfig b/configs/samv71-xult/knsh/defconfig index 400e510fb02..2c7189db7cb 100644 --- a/configs/samv71-xult/knsh/defconfig +++ b/configs/samv71-xult/knsh/defconfig @@ -81,7 +81,6 @@ CONFIG_ARCH="arm" # # 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 @@ -635,7 +634,6 @@ CONFIG_AT25_SPIFREQUENCY=20000000 # 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 diff --git a/configs/samv71-xult/module/defconfig b/configs/samv71-xult/module/defconfig index f7457269dfb..f4e7afb959e 100644 --- a/configs/samv71-xult/module/defconfig +++ b/configs/samv71-xult/module/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -543,7 +542,6 @@ CONFIG_ARCH_HAVE_SPI_CS_CONTROL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/samv71-xult/mxtxplnd/defconfig b/configs/samv71-xult/mxtxplnd/defconfig index 4bdce00af16..49cbf5f29ff 100644 --- a/configs/samv71-xult/mxtxplnd/defconfig +++ b/configs/samv71-xult/mxtxplnd/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -676,7 +675,6 @@ CONFIG_AT25_SPIFREQUENCY=20000000 # 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 diff --git a/configs/samv71-xult/netnsh/defconfig b/configs/samv71-xult/netnsh/defconfig index e200f8f883d..37be93f688e 100644 --- a/configs/samv71-xult/netnsh/defconfig +++ b/configs/samv71-xult/netnsh/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -692,7 +691,6 @@ CONFIG_ETH0_PHY_KSZ8061=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/samv71-xult/nsh/defconfig b/configs/samv71-xult/nsh/defconfig index 43cb4ab172b..e10517c26cf 100644 --- a/configs/samv71-xult/nsh/defconfig +++ b/configs/samv71-xult/nsh/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -635,7 +634,6 @@ CONFIG_AT25_SPIFREQUENCY=20000000 # 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 diff --git a/configs/samv71-xult/nxwm/defconfig b/configs/samv71-xult/nxwm/defconfig index 7af475dfee0..5ea82c1a857 100644 --- a/configs/samv71-xult/nxwm/defconfig +++ b/configs/samv71-xult/nxwm/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -679,7 +678,6 @@ CONFIG_AT25_SPIFREQUENCY=20000000 # 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 diff --git a/configs/samv71-xult/vnc/defconfig b/configs/samv71-xult/vnc/defconfig index 762455ee66d..d01ad46b86e 100644 --- a/configs/samv71-xult/vnc/defconfig +++ b/configs/samv71-xult/vnc/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -693,7 +692,6 @@ CONFIG_ETH0_PHY_KSZ8061=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/samv71-xult/vnxwm/defconfig b/configs/samv71-xult/vnxwm/defconfig index 3efe65fb474..87e57d38fb1 100644 --- a/configs/samv71-xult/vnxwm/defconfig +++ b/configs/samv71-xult/vnxwm/defconfig @@ -79,7 +79,6 @@ CONFIG_ARCH="arm" # # 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 @@ -696,7 +695,6 @@ CONFIG_ETH0_PHY_KSZ8061=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/shenzhou/nsh/defconfig b/configs/shenzhou/nsh/defconfig index d41b177dfd1..aa0359c9dbc 100644 --- a/configs/shenzhou/nsh/defconfig +++ b/configs/shenzhou/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -826,7 +825,6 @@ CONFIG_ETH0_PHY_DM9161=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/shenzhou/nxwm/defconfig b/configs/shenzhou/nxwm/defconfig index be72bc7d18d..ecab569fe4a 100644 --- a/configs/shenzhou/nxwm/defconfig +++ b/configs/shenzhou/nxwm/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -889,7 +888,6 @@ CONFIG_ETH0_PHY_DM9161=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/shenzhou/thttpd/defconfig b/configs/shenzhou/thttpd/defconfig index f35fe1526a9..fcd1ac40744 100644 --- a/configs/shenzhou/thttpd/defconfig +++ b/configs/shenzhou/thttpd/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -856,7 +855,6 @@ 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 is not set diff --git a/configs/sim/bas/defconfig b/configs/sim/bas/defconfig index 9b11ad59470..71c6bf66593 100644 --- a/configs/sim/bas/defconfig +++ b/configs/sim/bas/defconfig @@ -298,7 +298,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set diff --git a/configs/sim/configdata/defconfig b/configs/sim/configdata/defconfig index 6a58a5c9e99..c46b145c614 100644 --- a/configs/sim/configdata/defconfig +++ b/configs/sim/configdata/defconfig @@ -327,7 +327,6 @@ CONFIG_RAMMTD_FLASHSIM=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sim/cxxtest/defconfig b/configs/sim/cxxtest/defconfig index 7ecdc39504f..de26a571acf 100644 --- a/configs/sim/cxxtest/defconfig +++ b/configs/sim/cxxtest/defconfig @@ -315,7 +315,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sim/minibasic/defconfig b/configs/sim/minibasic/defconfig index b7a6e11eae1..edeba61d18f 100644 --- a/configs/sim/minibasic/defconfig +++ b/configs/sim/minibasic/defconfig @@ -352,7 +352,6 @@ CONFIG_DEV_LOOP=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sim/mount/defconfig b/configs/sim/mount/defconfig index 14234058c0e..9af8bfff48c 100644 --- a/configs/sim/mount/defconfig +++ b/configs/sim/mount/defconfig @@ -314,7 +314,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sim/mtdpart/defconfig b/configs/sim/mtdpart/defconfig index a9e8cb82f90..b5944473332 100644 --- a/configs/sim/mtdpart/defconfig +++ b/configs/sim/mtdpart/defconfig @@ -325,7 +325,6 @@ CONFIG_RAMMTD_FLASHSIM=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sim/mtdrwb/defconfig b/configs/sim/mtdrwb/defconfig index 4a24af5075e..3716ffcb22b 100644 --- a/configs/sim/mtdrwb/defconfig +++ b/configs/sim/mtdrwb/defconfig @@ -357,7 +357,6 @@ CONFIG_RAMMTD_FLASHSIM=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sim/nettest/defconfig b/configs/sim/nettest/defconfig index 7bce3f6cb12..09df2684d63 100644 --- a/configs/sim/nettest/defconfig +++ b/configs/sim/nettest/defconfig @@ -327,7 +327,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sim/nsh/defconfig b/configs/sim/nsh/defconfig index b7b881c136c..26c5503422a 100644 --- a/configs/sim/nsh/defconfig +++ b/configs/sim/nsh/defconfig @@ -334,7 +334,6 @@ CONFIG_DEV_LOOP=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sim/nsh2/defconfig b/configs/sim/nsh2/defconfig index 320355597b6..3101ea4785d 100644 --- a/configs/sim/nsh2/defconfig +++ b/configs/sim/nsh2/defconfig @@ -343,7 +343,6 @@ CONFIG_INPUT=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sim/nx/defconfig b/configs/sim/nx/defconfig index b205eadbdca..c596a93fa57 100644 --- a/configs/sim/nx/defconfig +++ b/configs/sim/nx/defconfig @@ -329,7 +329,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sim/nx11/defconfig b/configs/sim/nx11/defconfig index d845ca9349c..f6c56ac9ae9 100644 --- a/configs/sim/nx11/defconfig +++ b/configs/sim/nx11/defconfig @@ -330,7 +330,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sim/nxffs/defconfig b/configs/sim/nxffs/defconfig index fb1252ac6e9..fb70a4df9b8 100644 --- a/configs/sim/nxffs/defconfig +++ b/configs/sim/nxffs/defconfig @@ -296,7 +296,6 @@ CONFIG_RAMMTD_FLASHSIM=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set diff --git a/configs/sim/nxlines/defconfig b/configs/sim/nxlines/defconfig index 9b82cf35860..c80c0efaa91 100644 --- a/configs/sim/nxlines/defconfig +++ b/configs/sim/nxlines/defconfig @@ -305,7 +305,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set diff --git a/configs/sim/nxwm/defconfig b/configs/sim/nxwm/defconfig index ab478684c35..0748c0164f7 100644 --- a/configs/sim/nxwm/defconfig +++ b/configs/sim/nxwm/defconfig @@ -341,7 +341,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sim/ostest/defconfig b/configs/sim/ostest/defconfig index 089a488da34..e3570e04813 100644 --- a/configs/sim/ostest/defconfig +++ b/configs/sim/ostest/defconfig @@ -327,7 +327,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sim/pashello/defconfig b/configs/sim/pashello/defconfig index ad3b274cebc..b64438c27ed 100644 --- a/configs/sim/pashello/defconfig +++ b/configs/sim/pashello/defconfig @@ -288,7 +288,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set diff --git a/configs/sim/touchscreen/defconfig b/configs/sim/touchscreen/defconfig index e5427ff736c..66e90503f56 100644 --- a/configs/sim/touchscreen/defconfig +++ b/configs/sim/touchscreen/defconfig @@ -338,7 +338,6 @@ CONFIG_INPUT=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sim/traveler/defconfig b/configs/sim/traveler/defconfig index 14f3aa47195..3a6a75c03c9 100644 --- a/configs/sim/traveler/defconfig +++ b/configs/sim/traveler/defconfig @@ -344,7 +344,6 @@ CONFIG_AJOYSTICK=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sim/udgram/defconfig b/configs/sim/udgram/defconfig index 6a41938192c..856d330290a 100644 --- a/configs/sim/udgram/defconfig +++ b/configs/sim/udgram/defconfig @@ -339,7 +339,6 @@ 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 is not set diff --git a/configs/sim/unionfs/defconfig b/configs/sim/unionfs/defconfig index 77da0ebc322..0fea09b8d34 100644 --- a/configs/sim/unionfs/defconfig +++ b/configs/sim/unionfs/defconfig @@ -298,7 +298,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set diff --git a/configs/sim/ustream/defconfig b/configs/sim/ustream/defconfig index b61d8b04a7c..e356f4bbac7 100644 --- a/configs/sim/ustream/defconfig +++ b/configs/sim/ustream/defconfig @@ -339,7 +339,6 @@ 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 is not set diff --git a/configs/skp16c26/ostest/defconfig b/configs/skp16c26/ostest/defconfig index b46a95b90d0..61814e3a1c0 100644 --- a/configs/skp16c26/ostest/defconfig +++ b/configs/skp16c26/ostest/defconfig @@ -253,7 +253,6 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set diff --git a/configs/spark/composite/defconfig b/configs/spark/composite/defconfig index 80fc026185f..d192166cefb 100644 --- a/configs/spark/composite/defconfig +++ b/configs/spark/composite/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -774,7 +773,6 @@ CONFIG_SST25_SECTOR512=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y diff --git a/configs/spark/nsh/defconfig b/configs/spark/nsh/defconfig index 8c480ed1def..5f8d3daac62 100644 --- a/configs/spark/nsh/defconfig +++ b/configs/spark/nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -774,7 +773,6 @@ CONFIG_SST25_SECTOR512=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y diff --git a/configs/spark/usbmsc/defconfig b/configs/spark/usbmsc/defconfig index 524811c2b9a..dfd2fda6597 100644 --- a/configs/spark/usbmsc/defconfig +++ b/configs/spark/usbmsc/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -774,7 +773,6 @@ CONFIG_SST25_SECTOR512=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/spark/usbnsh/defconfig b/configs/spark/usbnsh/defconfig index 4f0f81059ba..9af591a0f59 100644 --- a/configs/spark/usbnsh/defconfig +++ b/configs/spark/usbnsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -775,7 +774,6 @@ CONFIG_SST25_SPIFREQUENCY=20000000 # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_SERIAL_CONSOLE is not set diff --git a/configs/spark/usbserial/defconfig b/configs/spark/usbserial/defconfig index dcd7afa1d2c..2bbed930a3b 100644 --- a/configs/spark/usbserial/defconfig +++ b/configs/spark/usbserial/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -779,7 +778,6 @@ CONFIG_SST25_SECTOR512=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y diff --git a/configs/stm3210e-eval/composite/defconfig b/configs/stm3210e-eval/composite/defconfig index f15376d1b6a..0d9c1897266 100644 --- a/configs/stm3210e-eval/composite/defconfig +++ b/configs/stm3210e-eval/composite/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -802,7 +801,6 @@ CONFIG_MTD=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y diff --git a/configs/stm3210e-eval/nsh/defconfig b/configs/stm3210e-eval/nsh/defconfig index 64a89edb98c..6e963ddd3da 100644 --- a/configs/stm3210e-eval/nsh/defconfig +++ b/configs/stm3210e-eval/nsh/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -803,7 +802,6 @@ CONFIG_MTD=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3210e-eval/nsh2/defconfig b/configs/stm3210e-eval/nsh2/defconfig index ebe9ca441fd..22a4433f22e 100644 --- a/configs/stm3210e-eval/nsh2/defconfig +++ b/configs/stm3210e-eval/nsh2/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -856,7 +855,6 @@ CONFIG_MTD=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3210e-eval/nx/defconfig b/configs/stm3210e-eval/nx/defconfig index 39ddbeda896..d7eb099f528 100644 --- a/configs/stm3210e-eval/nx/defconfig +++ b/configs/stm3210e-eval/nx/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -794,7 +793,6 @@ CONFIG_LCD_RPORTRAIT=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3210e-eval/nxterm/defconfig b/configs/stm3210e-eval/nxterm/defconfig index f1c58151c73..ffb7dc3e2d1 100644 --- a/configs/stm3210e-eval/nxterm/defconfig +++ b/configs/stm3210e-eval/nxterm/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -787,7 +786,6 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3210e-eval/pm/defconfig b/configs/stm3210e-eval/pm/defconfig index 57fc099163d..aa84118fb7a 100644 --- a/configs/stm3210e-eval/pm/defconfig +++ b/configs/stm3210e-eval/pm/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -829,7 +828,6 @@ CONFIG_PM_SLEEPEXIT_THRESH=2 CONFIG_PM_SLEEPENTER_COUNT=70 # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3210e-eval/usbmsc/defconfig b/configs/stm3210e-eval/usbmsc/defconfig index 78e07719984..988055ebab5 100644 --- a/configs/stm3210e-eval/usbmsc/defconfig +++ b/configs/stm3210e-eval/usbmsc/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -764,7 +763,6 @@ CONFIG_SDIO_PREFLIGHT=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3210e-eval/usbserial/defconfig b/configs/stm3210e-eval/usbserial/defconfig index b7ca54b7c70..d6cd26bde2f 100644 --- a/configs/stm3210e-eval/usbserial/defconfig +++ b/configs/stm3210e-eval/usbserial/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -739,7 +738,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y diff --git a/configs/stm3220g-eval/dhcpd/defconfig b/configs/stm3220g-eval/dhcpd/defconfig index af4f6af931d..79a0512054e 100644 --- a/configs/stm3220g-eval/dhcpd/defconfig +++ b/configs/stm3220g-eval/dhcpd/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -800,7 +799,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3220g-eval/ide/nsh/iar/libc.ewp b/configs/stm3220g-eval/ide/nsh/iar/libc.ewp index db57f8d8b93..15e9c88df48 100644 --- a/configs/stm3220g-eval/ide/nsh/iar/libc.ewp +++ b/configs/stm3220g-eval/ide/nsh/iar/libc.ewp @@ -2313,9 +2313,6 @@ $PROJ_DIR$/../../../../../libc/stdio/lib_memsostream.c - - $PROJ_DIR$/../../../../../libc/stdio/lib_lowinstream.c - $PROJ_DIR$/../../../../../libc/stdio/lib_lowoutstream.c diff --git a/configs/stm3220g-eval/ide/nsh/uvision/libc.uvproj b/configs/stm3220g-eval/ide/nsh/uvision/libc.uvproj index 31ee6e86a52..90ecb7c9c13 100644 --- a/configs/stm3220g-eval/ide/nsh/uvision/libc.uvproj +++ b/configs/stm3220g-eval/ide/nsh/uvision/libc.uvproj @@ -953,11 +953,6 @@ 1 ../../../../../libc/stdio/lib_memsostream.c - - lib_lowinstream.c - 1 - ../../../../../libc/stdio/lib_lowinstream.c - lib_lowoutstream.c 1 diff --git a/configs/stm3220g-eval/nettest/defconfig b/configs/stm3220g-eval/nettest/defconfig index 6a21166a9a0..41df74c7591 100644 --- a/configs/stm3220g-eval/nettest/defconfig +++ b/configs/stm3220g-eval/nettest/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -801,7 +800,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3220g-eval/nsh/defconfig b/configs/stm3220g-eval/nsh/defconfig index c3e02f4f667..29cbdf4d714 100644 --- a/configs/stm3220g-eval/nsh/defconfig +++ b/configs/stm3220g-eval/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -867,7 +866,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3220g-eval/nsh2/defconfig b/configs/stm3220g-eval/nsh2/defconfig index b7bbf116fc5..277d815547e 100644 --- a/configs/stm3220g-eval/nsh2/defconfig +++ b/configs/stm3220g-eval/nsh2/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -874,7 +873,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_SERIAL_REMOVABLE is not set # CONFIG_SERIAL_CONSOLE is not set diff --git a/configs/stm3220g-eval/nxwm/defconfig b/configs/stm3220g-eval/nxwm/defconfig index bdd33e67b6e..70f3be08716 100644 --- a/configs/stm3220g-eval/nxwm/defconfig +++ b/configs/stm3220g-eval/nxwm/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -910,7 +909,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3220g-eval/telnetd/defconfig b/configs/stm3220g-eval/telnetd/defconfig index 5e7c56f25f4..c096d97f0ea 100644 --- a/configs/stm3220g-eval/telnetd/defconfig +++ b/configs/stm3220g-eval/telnetd/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -803,7 +802,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3240g-eval/dhcpd/defconfig b/configs/stm3240g-eval/dhcpd/defconfig index 89f99ddd5bc..9144444845b 100644 --- a/configs/stm3240g-eval/dhcpd/defconfig +++ b/configs/stm3240g-eval/dhcpd/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -804,7 +803,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3240g-eval/discover/defconfig b/configs/stm3240g-eval/discover/defconfig index f40268a76f5..f51ac02cc14 100644 --- a/configs/stm3240g-eval/discover/defconfig +++ b/configs/stm3240g-eval/discover/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -827,7 +826,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3240g-eval/knxwm/defconfig b/configs/stm3240g-eval/knxwm/defconfig index e5c07319dc9..55af3191470 100644 --- a/configs/stm3240g-eval/knxwm/defconfig +++ b/configs/stm3240g-eval/knxwm/defconfig @@ -85,7 +85,6 @@ CONFIG_ARCH="arm" # # 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 @@ -858,7 +857,6 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3240g-eval/nettest/defconfig b/configs/stm3240g-eval/nettest/defconfig index ae30475a204..6ada3514750 100644 --- a/configs/stm3240g-eval/nettest/defconfig +++ b/configs/stm3240g-eval/nettest/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -805,7 +804,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3240g-eval/nsh/defconfig b/configs/stm3240g-eval/nsh/defconfig index afc9d74ff1b..52a2e2b6ae6 100644 --- a/configs/stm3240g-eval/nsh/defconfig +++ b/configs/stm3240g-eval/nsh/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -845,7 +844,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3240g-eval/nsh2/defconfig b/configs/stm3240g-eval/nsh2/defconfig index 9cb4875f38e..e9d10d9490e 100644 --- a/configs/stm3240g-eval/nsh2/defconfig +++ b/configs/stm3240g-eval/nsh2/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -878,7 +877,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_SERIAL_REMOVABLE is not set # CONFIG_SERIAL_CONSOLE is not set diff --git a/configs/stm3240g-eval/nxterm/defconfig b/configs/stm3240g-eval/nxterm/defconfig index 9aed6dd7200..a83753f6520 100644 --- a/configs/stm3240g-eval/nxterm/defconfig +++ b/configs/stm3240g-eval/nxterm/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -884,7 +883,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3240g-eval/nxwm/defconfig b/configs/stm3240g-eval/nxwm/defconfig index 63a4cf23a85..f57abc92542 100644 --- a/configs/stm3240g-eval/nxwm/defconfig +++ b/configs/stm3240g-eval/nxwm/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -907,7 +906,6 @@ CONFIG_ETH0_PHY_NONE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3240g-eval/telnetd/defconfig b/configs/stm3240g-eval/telnetd/defconfig index cb4e4b091ad..23d37a39706 100644 --- a/configs/stm3240g-eval/telnetd/defconfig +++ b/configs/stm3240g-eval/telnetd/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -807,7 +806,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3240g-eval/webserver/defconfig b/configs/stm3240g-eval/webserver/defconfig index 17e05f9e57c..98c8514cafa 100644 --- a/configs/stm3240g-eval/webserver/defconfig +++ b/configs/stm3240g-eval/webserver/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -866,7 +865,6 @@ CONFIG_ETH0_PHY_NONE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm3240g-eval/xmlrpc/defconfig b/configs/stm3240g-eval/xmlrpc/defconfig index b3db31d9302..c305c0cc189 100644 --- a/configs/stm3240g-eval/xmlrpc/defconfig +++ b/configs/stm3240g-eval/xmlrpc/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -822,7 +821,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32_tiny/nsh/defconfig b/configs/stm32_tiny/nsh/defconfig index d1c78f0cbde..4c75ba7ed63 100644 --- a/configs/stm32_tiny/nsh/defconfig +++ b/configs/stm32_tiny/nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -729,7 +728,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32_tiny/usbnsh/defconfig b/configs/stm32_tiny/usbnsh/defconfig index 6f9342afa8e..ddc34f64d22 100644 --- a/configs/stm32_tiny/usbnsh/defconfig +++ b/configs/stm32_tiny/usbnsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -707,7 +706,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y CONFIG_SERIAL_CONSOLE=y diff --git a/configs/stm32butterfly2/nsh/defconfig b/configs/stm32butterfly2/nsh/defconfig index 56edadf6640..ed2275d4a79 100644 --- a/configs/stm32butterfly2/nsh/defconfig +++ b/configs/stm32butterfly2/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -778,7 +777,6 @@ CONFIG_MMCSD_SPIMODE=0 # 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 diff --git a/configs/stm32butterfly2/nshnet/defconfig b/configs/stm32butterfly2/nshnet/defconfig index b8249473b61..43d0054ecdb 100644 --- a/configs/stm32butterfly2/nshnet/defconfig +++ b/configs/stm32butterfly2/nshnet/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -828,7 +827,6 @@ 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 diff --git a/configs/stm32butterfly2/nshusbdev/defconfig b/configs/stm32butterfly2/nshusbdev/defconfig index 01071e210df..602e0633755 100644 --- a/configs/stm32butterfly2/nshusbdev/defconfig +++ b/configs/stm32butterfly2/nshusbdev/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -771,7 +770,6 @@ CONFIG_MMCSD_SPIMODE=0 # 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 diff --git a/configs/stm32butterfly2/nshusbhost/defconfig b/configs/stm32butterfly2/nshusbhost/defconfig index 56edadf6640..ed2275d4a79 100644 --- a/configs/stm32butterfly2/nshusbhost/defconfig +++ b/configs/stm32butterfly2/nshusbhost/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -778,7 +777,6 @@ CONFIG_MMCSD_SPIMODE=0 # 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 diff --git a/configs/stm32f103-minimum/README.txt b/configs/stm32f103-minimum/README.txt index 112182b032c..fd4c30987fc 100644 --- a/configs/stm32f103-minimum/README.txt +++ b/configs/stm32f103-minimum/README.txt @@ -421,140 +421,6 @@ instead of configure.sh: Where is one of the following: - minnsh: - ------ - - This is a experiment to see just how small we can get a usable NSH - configuration. This configuration has far fewer features than the nsh - configuration but is also a fraction of the size. - - This minnsh configuration is a "proof-of-concept" and not very usable in - its current state. This configuration was created by disabling - everything possible INCLUDING file system support. Without file system - support, NuttX is pretty much crippled. Here are some of the - consequences of disabling the file system: - - - All features that depend on the file system are lost: device drivers, - mountpoints, message queues, named semaphores. - - - Without device drivers, you cannot interact with the RTOS using POSIX - interfaces. You would have to work with NuttX as with those other - tiny RTOSs: As a scheduler and a callable hardare abstraction layer - (HAL). - - - You cannot use any of the NuttX upper half device drivers since they - depend on the pseudo-file system and device nodes. You can, of - course, continue to use the lower half drivers either directly. Or, - perhaps, you could write some custom minnsh upper half drivers that - do not depend on a file system and expose a HAL interface. - - There is a special version of readline() the NSH uses when there is no - file system. It uses a special up_putc() to write data to the console - and a special function up_getc() to read data from the console. - - - The current up_getc() implementationsa are a kludge. They are - analogous to the up_putc() implementations: They directly poll the - hardware for serial availability, locking up all lower priority tasks - in the entire system while they poll. So a version of NSH that uses - up_getc() essentially blocks the system until a character is received. - - This, of course, could be fixed by creating a special, upper half - implementation of the interrupt-driven serial lower half (like - stm32_serial) that just supports single character console I/O - (perhaps called up_putc and up_getc?). The NSH could wait for serial - input without blocking the system. But then that would increase the - footprint too. - - So although the minnsh configurations are a good starting point for - making things small, they not are really very practical. Why might - you want a NuttX minnsh solution? Perhaps you have software that runs - on a family of chips including some very tiny MCUs. Then perhaps having - the RTOS compatibility would justify the loss of functionality? - - STATUS: - 2016-06-03: Using that config I got this: - - $ ls -l nuttx.bin - -rwxr-xr-x 1 alan alan 12543 Jun 3 17:58 nuttx.bin - - $ arm-none-eabi-size nuttx - text data bss dec hex filename - 12542 1 816 13359 342f nuttx - - And this is free command from NuttX shell: - - NuttShell (NSH) - nsh> free - total used free largest - Mem: 18624 2328 16296 16296 - nsh> - - 2016-06-07: As another experiment, I tried enabling just (1) the file - system, (2) the console device, and (3) the upper half serial driver in - the minnsh configuration. With these changes, NSH should behave better - and we preserve the device driver interface. I made the following - configuration changes: - - Enable the file system: - CONFIG_NFILE_DESCRIPTORS=5 - CONFIG_NFILE_STREAMS=5 - - Enable the console device: - CONFIG_DEV_CONSOLE=y - - Disable most new NSH commands. Some like 'ls' are really mandatory - with a file system: - CONFIG_NSH_DISABLE_xxx=y - - Enable the upper half serial driver: - CONFIG_SERIAL=y - CONFIG_STANDARD_SERIAL=y - - Enable the USART1 serial driver: - CONFIG_STM32_USART1=y - CONFIG_STM32_USART1_SERIALDRIVER=y - CONFIG_USART1_SERIAL_CONSOLE=y - - CONFIG_USART1_2STOP=0 - CONFIG_USART1_BAUD=115200 - CONFIG_USART1_BITS=8 - CONFIG_USART1_PARITY=0 - CONFIG_USART1_RXBUFSIZE=16 - CONFIG_USART1_TXBUFSIZE=16 - - The resulting code was bigger as expected: - - $ arm-none-eabi-size nuttx - text data bss dec hex filename - 19853 88 876 20817 5151 nuttx - - I am sure that other things that could be disabled were also drawn into - the build, so perhaps this could be reduced. This amounts to a size - increase of around 7KB. - - One major part of this size increase is due to the addition of the NSH - 'ls' command. Now, if I disable the 'ls' command, I get: - - $ arm-none-eabi-size nuttx - text data bss dec hex filename - 17804 80 864 18748 493c nuttx - - Or an increase of only 5.1 KB. This, of course, not only excludes the - 'ls' command logic, but also the things that were drawn into the link - when 'ls' was enabled: opendir(), readdir(), closedir(), stat(), and - probably other things. - - So I think we can say that the cost of the file system and true serial - console device was about 5 KB (primarily OS support) and the cost of - the NSH 'ls' command (including OS support) is about 2KB. - - 2016-06-21: Just checking the size after some big system changes: The - size of the base configuration has actually dropped by a few bytes: - - $ arm-none-eabi-size nuttx - text data bss dec hex filename - 12526 4 816 13346 3422 nuttx - nsh: --- Configures the NuttShell (nsh) located at apps/examples/nsh. This diff --git a/configs/stm32f103-minimum/audio_tone/defconfig b/configs/stm32f103-minimum/audio_tone/defconfig index 42f05f35f11..993a61286b6 100644 --- a/configs/stm32f103-minimum/audio_tone/defconfig +++ b/configs/stm32f103-minimum/audio_tone/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -730,7 +729,6 @@ CONFIG_AUDIO_TONE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f103-minimum/buttons/defconfig b/configs/stm32f103-minimum/buttons/defconfig index d18846b9098..a37eab30f76 100644 --- a/configs/stm32f103-minimum/buttons/defconfig +++ b/configs/stm32f103-minimum/buttons/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -727,7 +726,6 @@ CONFIG_BUTTONS_NPOLLWAITERS=2 # 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 diff --git a/configs/stm32f103-minimum/jlx12864g/defconfig b/configs/stm32f103-minimum/jlx12864g/defconfig index 7714aa1c451..b9ff3e625f8 100644 --- a/configs/stm32f103-minimum/jlx12864g/defconfig +++ b/configs/stm32f103-minimum/jlx12864g/defconfig @@ -111,7 +111,6 @@ CONFIG_ARCH="arm" # # 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 @@ -816,7 +815,6 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f103-minimum/minnsh/setenv.sh b/configs/stm32f103-minimum/minnsh/setenv.sh deleted file mode 100644 index 73dfab5a4d0..00000000000 --- a/configs/stm32f103-minimum/minnsh/setenv.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash -# configs//stm32f103-minimum/nsh/setenv.sh -# -# Copyright (C) 2016 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -if [ "$_" = "$0" ] ; then - echo "You must source this script, not run it!" 1>&2 - exit 1 -fi - -WD=`pwd` -if [ ! -x "setenv.sh" ]; then - echo "This script must be executed from the top-level NuttX build directory" - exit 1 -fi - -if [ -z "${PATH_ORIG}" ]; then - export PATH_ORIG="${PATH}" -fi - -# This is the Cygwin path to the location where I installed the CodeSourcery -# toolchain under windows. You will also have to edit this if you install -# the CodeSourcery toolchain in any other location -#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" -#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" -# export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" - -# This is the location where I installed the ARM "GNU Tools for ARM Embedded Processors" -# You can this free toolchain here https://launchpad.net/gcc-arm-embedded -export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q2/bin" - -# This is the path to the location where I installed the devkitARM toolchain -# You can get this free toolchain from http://devkitpro.org/ or http://sourceforge.net/projects/devkitpro/ -#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/devkitARM/bin" - -# This is the Cygwin path to the location where I build the buildroot -# toolchain. -# export TOOLCHAIN_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" - -# Add the path to the toolchain to the PATH varialble -export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" - -echo "PATH : ${PATH}" diff --git a/configs/stm32f103-minimum/nsh/defconfig b/configs/stm32f103-minimum/nsh/defconfig index f66dd17b413..f7f96edde21 100644 --- a/configs/stm32f103-minimum/nsh/defconfig +++ b/configs/stm32f103-minimum/nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -710,7 +709,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f103-minimum/pwm/defconfig b/configs/stm32f103-minimum/pwm/defconfig index 971e72ba34c..5c851766afc 100644 --- a/configs/stm32f103-minimum/pwm/defconfig +++ b/configs/stm32f103-minimum/pwm/defconfig @@ -74,7 +74,6 @@ CONFIG_ARCH="arm" # # 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 @@ -724,7 +723,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f103-minimum/rfid-rc522/defconfig b/configs/stm32f103-minimum/rfid-rc522/defconfig index d32c6b30080..13b50d89fc0 100644 --- a/configs/stm32f103-minimum/rfid-rc522/defconfig +++ b/configs/stm32f103-minimum/rfid-rc522/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -730,7 +729,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f103-minimum/rgbled/defconfig b/configs/stm32f103-minimum/rgbled/defconfig index 2fd2f2707af..19ef7948efc 100644 --- a/configs/stm32f103-minimum/rgbled/defconfig +++ b/configs/stm32f103-minimum/rgbled/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -751,7 +750,6 @@ CONFIG_RGBLED=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f103-minimum/usbnsh/defconfig b/configs/stm32f103-minimum/usbnsh/defconfig index 83ca39bb6c3..5425732ae14 100644 --- a/configs/stm32f103-minimum/usbnsh/defconfig +++ b/configs/stm32f103-minimum/usbnsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -707,7 +706,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y CONFIG_SERIAL_CONSOLE=y diff --git a/configs/stm32f103-minimum/userled/defconfig b/configs/stm32f103-minimum/userled/defconfig index 02996a0ab52..ba69602cc63 100644 --- a/configs/stm32f103-minimum/userled/defconfig +++ b/configs/stm32f103-minimum/userled/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -713,7 +712,6 @@ CONFIG_USERLED_LOWER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f103-minimum/veml6070/defconfig b/configs/stm32f103-minimum/veml6070/defconfig index 3fd720b90f3..2c73508f80f 100644 --- a/configs/stm32f103-minimum/veml6070/defconfig +++ b/configs/stm32f103-minimum/veml6070/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -769,7 +768,6 @@ CONFIG_MS58XX_VDD=30 CONFIG_VEML6070=y # CONFIG_XEN1210 is not set # CONFIG_ZEROCROSS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f3discovery/nsh/defconfig b/configs/stm32f3discovery/nsh/defconfig index e3495e5ddbb..0a4c3b350dd 100644 --- a/configs/stm32f3discovery/nsh/defconfig +++ b/configs/stm32f3discovery/nsh/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -728,7 +727,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y diff --git a/configs/stm32f3discovery/usbnsh/defconfig b/configs/stm32f3discovery/usbnsh/defconfig index b7be381bdd6..265bb26eeb1 100644 --- a/configs/stm32f3discovery/usbnsh/defconfig +++ b/configs/stm32f3discovery/usbnsh/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -746,7 +745,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_SERIAL_CONSOLE is not set diff --git a/configs/stm32f411e-disco/nsh/defconfig b/configs/stm32f411e-disco/nsh/defconfig index fd0aea5e526..16b329ad850 100644 --- a/configs/stm32f411e-disco/nsh/defconfig +++ b/configs/stm32f411e-disco/nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -709,7 +708,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f429i-disco/extflash/defconfig b/configs/stm32f429i-disco/extflash/defconfig index 916011dfe8a..5d05d322271 100644 --- a/configs/stm32f429i-disco/extflash/defconfig +++ b/configs/stm32f429i-disco/extflash/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -827,7 +826,6 @@ CONFIG_SST25XX_MEMORY_TYPE=0x25 # 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 diff --git a/configs/stm32f429i-disco/ide/ltcd/uvision/libc.uvproj b/configs/stm32f429i-disco/ide/ltcd/uvision/libc.uvproj index f7340f2ce7f..97ded008652 100644 --- a/configs/stm32f429i-disco/ide/ltcd/uvision/libc.uvproj +++ b/configs/stm32f429i-disco/ide/ltcd/uvision/libc.uvproj @@ -915,11 +915,6 @@ 1 ../../../../../libc/stdio/lib_memsostream.c - - lib_lowinstream.c - 1 - ../../../../../libc/stdio/lib_lowinstream.c - lib_lowoutstream.c 1 diff --git a/configs/stm32f429i-disco/lcd/defconfig b/configs/stm32f429i-disco/lcd/defconfig index 7f8194d36a0..49d8da93fcc 100644 --- a/configs/stm32f429i-disco/lcd/defconfig +++ b/configs/stm32f429i-disco/lcd/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -807,7 +806,6 @@ CONFIG_LCD_ILI9341_IFACE0_RGB565=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f429i-disco/ltdc/defconfig b/configs/stm32f429i-disco/ltdc/defconfig index 1c0ccce8c7b..087b0b89cad 100644 --- a/configs/stm32f429i-disco/ltdc/defconfig +++ b/configs/stm32f429i-disco/ltdc/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -824,7 +823,6 @@ CONFIG_SPI_CMDDATA=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f429i-disco/nsh/defconfig b/configs/stm32f429i-disco/nsh/defconfig index b201f021ab8..90fa62e4f73 100644 --- a/configs/stm32f429i-disco/nsh/defconfig +++ b/configs/stm32f429i-disco/nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -756,7 +755,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f429i-disco/usbmsc/defconfig b/configs/stm32f429i-disco/usbmsc/defconfig index e67c0af1260..8f1fbb55835 100644 --- a/configs/stm32f429i-disco/usbmsc/defconfig +++ b/configs/stm32f429i-disco/usbmsc/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -776,7 +775,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f429i-disco/usbnsh/defconfig b/configs/stm32f429i-disco/usbnsh/defconfig index e7e805b97f5..99cfa1b9851 100644 --- a/configs/stm32f429i-disco/usbnsh/defconfig +++ b/configs/stm32f429i-disco/usbnsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -762,7 +761,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_SERIAL_CONSOLE is not set diff --git a/configs/stm32f4discovery/canard/defconfig b/configs/stm32f4discovery/canard/defconfig index 092eb83b759..606f95268c0 100644 --- a/configs/stm32f4discovery/canard/defconfig +++ b/configs/stm32f4discovery/canard/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -778,7 +777,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f4discovery/cxxtest/defconfig b/configs/stm32f4discovery/cxxtest/defconfig index 17aee260040..47aa9ad4712 100644 --- a/configs/stm32f4discovery/cxxtest/defconfig +++ b/configs/stm32f4discovery/cxxtest/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -747,7 +746,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f4discovery/elf/defconfig b/configs/stm32f4discovery/elf/defconfig index 267a0eb4c92..a7acd953157 100644 --- a/configs/stm32f4discovery/elf/defconfig +++ b/configs/stm32f4discovery/elf/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -747,7 +746,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f4discovery/ipv6/defconfig b/configs/stm32f4discovery/ipv6/defconfig index a0ba73ae9c5..964ec83c841 100644 --- a/configs/stm32f4discovery/ipv6/defconfig +++ b/configs/stm32f4discovery/ipv6/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -867,7 +866,6 @@ CONFIG_ETH0_PHY_LAN8720=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f4discovery/kostest/defconfig b/configs/stm32f4discovery/kostest/defconfig index f60c51af13a..e48549911fc 100644 --- a/configs/stm32f4discovery/kostest/defconfig +++ b/configs/stm32f4discovery/kostest/defconfig @@ -82,7 +82,6 @@ CONFIG_ARCH="arm" # # 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 @@ -755,7 +754,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f4discovery/netnsh/defconfig b/configs/stm32f4discovery/netnsh/defconfig index 24acf420356..7798def2d6d 100644 --- a/configs/stm32f4discovery/netnsh/defconfig +++ b/configs/stm32f4discovery/netnsh/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -869,7 +868,6 @@ CONFIG_ETH0_PHY_LAN8720=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f4discovery/nsh/defconfig b/configs/stm32f4discovery/nsh/defconfig index 8fde6da232f..ad989a03844 100644 --- a/configs/stm32f4discovery/nsh/defconfig +++ b/configs/stm32f4discovery/nsh/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -765,7 +764,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f4discovery/nxlines/defconfig b/configs/stm32f4discovery/nxlines/defconfig index 4dc4b3990de..3ea55af740d 100644 --- a/configs/stm32f4discovery/nxlines/defconfig +++ b/configs/stm32f4discovery/nxlines/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -800,7 +799,6 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f4discovery/pm/defconfig b/configs/stm32f4discovery/pm/defconfig index b3d5cf6b474..9d31f4d16c8 100644 --- a/configs/stm32f4discovery/pm/defconfig +++ b/configs/stm32f4discovery/pm/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -786,7 +785,6 @@ CONFIG_PM_SLEEPEXIT_THRESH=2 CONFIG_PM_SLEEPENTER_COUNT=70 # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f4discovery/posix_spawn/defconfig b/configs/stm32f4discovery/posix_spawn/defconfig index 8ec76f3264b..6244ecf5de1 100644 --- a/configs/stm32f4discovery/posix_spawn/defconfig +++ b/configs/stm32f4discovery/posix_spawn/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -747,7 +746,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f4discovery/pseudoterm/defconfig b/configs/stm32f4discovery/pseudoterm/defconfig index bfbce2da4ba..2e888aa40d1 100644 --- a/configs/stm32f4discovery/pseudoterm/defconfig +++ b/configs/stm32f4discovery/pseudoterm/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -765,7 +764,6 @@ 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 is not set diff --git a/configs/stm32f4discovery/rgbled/defconfig b/configs/stm32f4discovery/rgbled/defconfig index 8aadf0ef481..60d084552e1 100644 --- a/configs/stm32f4discovery/rgbled/defconfig +++ b/configs/stm32f4discovery/rgbled/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -772,7 +771,6 @@ CONFIG_RGBLED=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f4discovery/src/stm32_boot.c b/configs/stm32f4discovery/src/stm32_boot.c index 41eb13dcc72..483f5edd13b 100644 --- a/configs/stm32f4discovery/src/stm32_boot.c +++ b/configs/stm32f4discovery/src/stm32_boot.c @@ -47,14 +47,6 @@ #include "up_arch.h" #include "stm32f4discovery.h" -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ diff --git a/configs/stm32f4discovery/uavcan/defconfig b/configs/stm32f4discovery/uavcan/defconfig index e1c6805af22..c80096bf724 100644 --- a/configs/stm32f4discovery/uavcan/defconfig +++ b/configs/stm32f4discovery/uavcan/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -717,7 +716,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set # CONFIG_SERIAL is not set # CONFIG_USBDEV is not set # CONFIG_USBHOST is not set diff --git a/configs/stm32f4discovery/usbnsh/defconfig b/configs/stm32f4discovery/usbnsh/defconfig index 732aff799cf..b6661f5d88c 100644 --- a/configs/stm32f4discovery/usbnsh/defconfig +++ b/configs/stm32f4discovery/usbnsh/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -771,7 +770,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_SERIAL_CONSOLE is not set diff --git a/configs/stm32f4discovery/winbuild/defconfig b/configs/stm32f4discovery/winbuild/defconfig index 579f659c5fc..a5740592a55 100644 --- a/configs/stm32f4discovery/winbuild/defconfig +++ b/configs/stm32f4discovery/winbuild/defconfig @@ -74,7 +74,6 @@ CONFIG_ARCH="arm" # # 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 @@ -653,7 +652,6 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set diff --git a/configs/stm32f4discovery/xen1210/defconfig b/configs/stm32f4discovery/xen1210/defconfig index cd071055692..076a4e5a03e 100644 --- a/configs/stm32f4discovery/xen1210/defconfig +++ b/configs/stm32f4discovery/xen1210/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -802,7 +801,6 @@ CONFIG_MS58XX_VDD=30 # CONFIG_QENCODER is not set CONFIG_XEN1210=y # CONFIG_ZEROCROSS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32f746-ws/nsh/defconfig b/configs/stm32f746-ws/nsh/defconfig index f49876c5c7f..46aed046354 100644 --- a/configs/stm32f746-ws/nsh/defconfig +++ b/configs/stm32f746-ws/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -691,7 +690,6 @@ 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 diff --git a/configs/stm32f746g-disco/nsh/defconfig b/configs/stm32f746g-disco/nsh/defconfig index 2fbb7948a8e..80155b308a2 100644 --- a/configs/stm32f746g-disco/nsh/defconfig +++ b/configs/stm32f746g-disco/nsh/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -619,7 +618,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32l476-mdk/nsh/defconfig b/configs/stm32l476-mdk/nsh/defconfig index 2d6b19fd7e6..57b5c9fd477 100644 --- a/configs/stm32l476-mdk/nsh/defconfig +++ b/configs/stm32l476-mdk/nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -562,7 +561,6 @@ CONFIG_RTC_IOCTL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32l476vg-disco/nsh/defconfig b/configs/stm32l476vg-disco/nsh/defconfig index 6a25d6e89bc..a62de0776c4 100644 --- a/configs/stm32l476vg-disco/nsh/defconfig +++ b/configs/stm32l476vg-disco/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -615,7 +614,6 @@ CONFIG_N25QXXX_SECTOR512=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32ldiscovery/nsh/defconfig b/configs/stm32ldiscovery/nsh/defconfig index 5e6fd0b110f..af6dda6e9a0 100644 --- a/configs/stm32ldiscovery/nsh/defconfig +++ b/configs/stm32ldiscovery/nsh/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -707,7 +706,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/stm32vldiscovery/nsh/defconfig b/configs/stm32vldiscovery/nsh/defconfig index 20b009d5120..c7ca2ef2c5e 100644 --- a/configs/stm32vldiscovery/nsh/defconfig +++ b/configs/stm32vldiscovery/nsh/defconfig @@ -77,7 +77,6 @@ CONFIG_ARCH="arm" # # 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 @@ -725,7 +724,6 @@ CONFIG_RTC=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sure-pic32mx/nsh/defconfig b/configs/sure-pic32mx/nsh/defconfig index 6934ae69707..7cf509a7bf3 100644 --- a/configs/sure-pic32mx/nsh/defconfig +++ b/configs/sure-pic32mx/nsh/defconfig @@ -506,7 +506,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/sure-pic32mx/usbnsh/defconfig b/configs/sure-pic32mx/usbnsh/defconfig index b5dd27d3ed6..0a5838887ee 100644 --- a/configs/sure-pic32mx/usbnsh/defconfig +++ b/configs/sure-pic32mx/usbnsh/defconfig @@ -508,7 +508,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_SERIAL_CONSOLE is not set diff --git a/configs/teensy-2.0/hello/defconfig b/configs/teensy-2.0/hello/defconfig index 410aba1b5cd..cf6bd2ee38e 100644 --- a/configs/teensy-2.0/hello/defconfig +++ b/configs/teensy-2.0/hello/defconfig @@ -300,7 +300,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set diff --git a/configs/teensy-2.0/nsh/defconfig b/configs/teensy-2.0/nsh/defconfig index 80afdf009bb..a947d314ee4 100644 --- a/configs/teensy-2.0/nsh/defconfig +++ b/configs/teensy-2.0/nsh/defconfig @@ -311,7 +311,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set diff --git a/configs/teensy-2.0/usbmsc/defconfig b/configs/teensy-2.0/usbmsc/defconfig index 821868dc61c..ed35a4ece2e 100644 --- a/configs/teensy-2.0/usbmsc/defconfig +++ b/configs/teensy-2.0/usbmsc/defconfig @@ -333,7 +333,6 @@ CONFIG_MMCSD_SPIMODE=0 # 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=y # CONFIG_16550_UART is not set diff --git a/configs/teensy-3.x/nsh/defconfig b/configs/teensy-3.x/nsh/defconfig index 5d53034bd9c..4712175377d 100644 --- a/configs/teensy-3.x/nsh/defconfig +++ b/configs/teensy-3.x/nsh/defconfig @@ -76,7 +76,6 @@ CONFIG_ARCH="arm" # # 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 @@ -479,7 +478,6 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/teensy-3.x/usbnsh/defconfig b/configs/teensy-3.x/usbnsh/defconfig index 25bb2c87e68..8b71905cfff 100644 --- a/configs/teensy-3.x/usbnsh/defconfig +++ b/configs/teensy-3.x/usbnsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -479,7 +478,6 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y diff --git a/configs/teensy-lc/nsh/defconfig b/configs/teensy-lc/nsh/defconfig index e00646624c5..e3e77e208ae 100644 --- a/configs/teensy-lc/nsh/defconfig +++ b/configs/teensy-lc/nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_ARCH="arm" # # 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 @@ -442,7 +441,6 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/tm4c123g-launchpad/nsh/defconfig b/configs/tm4c123g-launchpad/nsh/defconfig index 0f871ed23fe..12288ccbfcd 100644 --- a/configs/tm4c123g-launchpad/nsh/defconfig +++ b/configs/tm4c123g-launchpad/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -500,7 +499,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/tm4c1294-launchpad/ipv6/defconfig b/configs/tm4c1294-launchpad/ipv6/defconfig index 0d05d6b4cbf..f016e962aaa 100644 --- a/configs/tm4c1294-launchpad/ipv6/defconfig +++ b/configs/tm4c1294-launchpad/ipv6/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -561,7 +560,6 @@ CONFIG_ARCH_PHY_INTERRUPT=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/tm4c1294-launchpad/nsh/defconfig b/configs/tm4c1294-launchpad/nsh/defconfig index a4131c7391c..3c4bcce6eb9 100644 --- a/configs/tm4c1294-launchpad/nsh/defconfig +++ b/configs/tm4c1294-launchpad/nsh/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -563,7 +562,6 @@ CONFIG_ARCH_PHY_INTERRUPT=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/twr-k60n512/nsh/defconfig b/configs/twr-k60n512/nsh/defconfig index 5bea922930e..ddafbe24e9d 100644 --- a/configs/twr-k60n512/nsh/defconfig +++ b/configs/twr-k60n512/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -466,7 +465,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/u-blox-c027/nsh/defconfig b/configs/u-blox-c027/nsh/defconfig index 7e4713c0c93..b1ca48a213c 100644 --- a/configs/u-blox-c027/nsh/defconfig +++ b/configs/u-blox-c027/nsh/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -556,7 +555,6 @@ CONFIG_ETH1_PHY_NONE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/ubw32/nsh/defconfig b/configs/ubw32/nsh/defconfig index 59dee9b7136..91b77cebc88 100644 --- a/configs/ubw32/nsh/defconfig +++ b/configs/ubw32/nsh/defconfig @@ -512,7 +512,6 @@ CONFIG_MMCSD_NSLOTS=1 # 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 diff --git a/configs/us7032evb1/nsh/defconfig b/configs/us7032evb1/nsh/defconfig index d8e8df8334e..e64dc02107e 100644 --- a/configs/us7032evb1/nsh/defconfig +++ b/configs/us7032evb1/nsh/defconfig @@ -238,7 +238,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set diff --git a/configs/us7032evb1/ostest/defconfig b/configs/us7032evb1/ostest/defconfig index 1beac7ba05f..0c196b33de5 100644 --- a/configs/us7032evb1/ostest/defconfig +++ b/configs/us7032evb1/ostest/defconfig @@ -237,7 +237,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set diff --git a/configs/viewtool-stm32f107/highpri/defconfig b/configs/viewtool-stm32f107/highpri/defconfig index d05f74d6889..23206b58e0e 100644 --- a/configs/viewtool-stm32f107/highpri/defconfig +++ b/configs/viewtool-stm32f107/highpri/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -738,7 +737,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/viewtool-stm32f107/netnsh/defconfig b/configs/viewtool-stm32f107/netnsh/defconfig index 466b2d70095..4c9058eef1f 100644 --- a/configs/viewtool-stm32f107/netnsh/defconfig +++ b/configs/viewtool-stm32f107/netnsh/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -796,7 +795,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/viewtool-stm32f107/nsh/defconfig b/configs/viewtool-stm32f107/nsh/defconfig index 2e08d6e3cf7..5da2fdda702 100644 --- a/configs/viewtool-stm32f107/nsh/defconfig +++ b/configs/viewtool-stm32f107/nsh/defconfig @@ -80,7 +80,6 @@ CONFIG_ARCH="arm" # # 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 @@ -735,7 +734,6 @@ CONFIG_ARCH_HAVE_SPI_BITORDER=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/xtrs/nsh/defconfig b/configs/xtrs/nsh/defconfig index aa63aa60f0a..18cd15188b6 100644 --- a/configs/xtrs/nsh/defconfig +++ b/configs/xtrs/nsh/defconfig @@ -192,7 +192,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set diff --git a/configs/xtrs/ostest/defconfig b/configs/xtrs/ostest/defconfig index 39e06ae357b..b03cffef6fb 100644 --- a/configs/xtrs/ostest/defconfig +++ b/configs/xtrs/ostest/defconfig @@ -191,7 +191,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set diff --git a/configs/xtrs/pashello/defconfig b/configs/xtrs/pashello/defconfig index 324ef07f30c..b38652e6c05 100644 --- a/configs/xtrs/pashello/defconfig +++ b/configs/xtrs/pashello/defconfig @@ -192,7 +192,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set diff --git a/configs/z16f2800100zcog/nsh/defconfig b/configs/z16f2800100zcog/nsh/defconfig index 94b2c6ff7ed..781652bd58f 100644 --- a/configs/z16f2800100zcog/nsh/defconfig +++ b/configs/z16f2800100zcog/nsh/defconfig @@ -331,7 +331,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/z16f2800100zcog/ostest/defconfig b/configs/z16f2800100zcog/ostest/defconfig index 99ec6fd0985..dec05b3b6c6 100644 --- a/configs/z16f2800100zcog/ostest/defconfig +++ b/configs/z16f2800100zcog/ostest/defconfig @@ -331,7 +331,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/z16f2800100zcog/pashello/defconfig b/configs/z16f2800100zcog/pashello/defconfig index 0594e40c9af..04d067caa42 100644 --- a/configs/z16f2800100zcog/pashello/defconfig +++ b/configs/z16f2800100zcog/pashello/defconfig @@ -215,7 +215,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set diff --git a/configs/z80sim/nsh/defconfig b/configs/z80sim/nsh/defconfig index cdc9ce0d710..7034fccbf92 100644 --- a/configs/z80sim/nsh/defconfig +++ b/configs/z80sim/nsh/defconfig @@ -192,7 +192,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set diff --git a/configs/z80sim/ostest/defconfig b/configs/z80sim/ostest/defconfig index 6184bd83971..f7eb3afd2c3 100644 --- a/configs/z80sim/ostest/defconfig +++ b/configs/z80sim/ostest/defconfig @@ -191,7 +191,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set diff --git a/configs/z80sim/pashello/defconfig b/configs/z80sim/pashello/defconfig index a2b5d7fb12b..6945b3c5477 100644 --- a/configs/z80sim/pashello/defconfig +++ b/configs/z80sim/pashello/defconfig @@ -191,7 +191,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set diff --git a/configs/z8encore000zco/ostest/defconfig b/configs/z8encore000zco/ostest/defconfig index 79a76d1ba5d..7b8c2d79c80 100644 --- a/configs/z8encore000zco/ostest/defconfig +++ b/configs/z8encore000zco/ostest/defconfig @@ -345,7 +345,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/z8f64200100kit/ostest/defconfig b/configs/z8f64200100kit/ostest/defconfig index ec1ca29abaa..31c730fc47d 100644 --- a/configs/z8f64200100kit/ostest/defconfig +++ b/configs/z8f64200100kit/ostest/defconfig @@ -345,7 +345,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/zkit-arm-1769/hello/defconfig b/configs/zkit-arm-1769/hello/defconfig index b6b968fe33e..f3a86fcb981 100644 --- a/configs/zkit-arm-1769/hello/defconfig +++ b/configs/zkit-arm-1769/hello/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -516,7 +515,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/zkit-arm-1769/nsh/defconfig b/configs/zkit-arm-1769/nsh/defconfig index 19e8ebc26f3..8a675b6180b 100644 --- a/configs/zkit-arm-1769/nsh/defconfig +++ b/configs/zkit-arm-1769/nsh/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -553,7 +552,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/zkit-arm-1769/nxhello/defconfig b/configs/zkit-arm-1769/nxhello/defconfig index 370e8d037cb..4c7dfae49f3 100644 --- a/configs/zkit-arm-1769/nxhello/defconfig +++ b/configs/zkit-arm-1769/nxhello/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -591,7 +590,6 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/zkit-arm-1769/thttpd/defconfig b/configs/zkit-arm-1769/thttpd/defconfig index 026d759b453..0438660456d 100644 --- a/configs/zkit-arm-1769/thttpd/defconfig +++ b/configs/zkit-arm-1769/thttpd/defconfig @@ -75,7 +75,6 @@ CONFIG_ARCH="arm" # # 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 @@ -519,7 +518,6 @@ 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=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/zp214xpa/nsh/defconfig b/configs/zp214xpa/nsh/defconfig index 14e69b33803..547c51e58c2 100644 --- a/configs/zp214xpa/nsh/defconfig +++ b/configs/zp214xpa/nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -394,7 +393,6 @@ CONFIG_DEV_NULL=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_SERIAL_REMOVABLE is not set diff --git a/configs/zp214xpa/nxlines/defconfig b/configs/zp214xpa/nxlines/defconfig index cfc2584b66b..06f8adea17a 100644 --- a/configs/zp214xpa/nxlines/defconfig +++ b/configs/zp214xpa/nxlines/defconfig @@ -72,7 +72,6 @@ CONFIG_ARCH="arm" # # 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 @@ -440,7 +439,6 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_PM is not set # CONFIG_POWER is not set # CONFIG_SENSORS is not set -# CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_SERIAL_REMOVABLE is not set diff --git a/drivers/Kconfig b/drivers/Kconfig index 4ac8a9d0c69..740602b9f25 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -519,23 +519,6 @@ if SENSORS source drivers/sensors/Kconfig endif # SENSORS -menuconfig SERCOMM_CONSOLE - bool "Osmocom-bb Sercomm Driver Support" - default n - ---help--- - Sercomm is the transport used by osmocom-bb that runs on top of serial. - See http://bb.osmocom.org/trac/wiki/nuttx-bb/run for detailed the usage - of nuttx with sercomm. - - drivers/sercomm is only built if SERCOMM_CONSOLE in the NuttX - configuration file. If you attempt to build this driver without - osmocom-bb, you will get compilation errors because of header files - that are needed from the osmocom-bb. - -if SERCOMM_CONSOLE -source drivers/sercomm/Kconfig -endif # SERCOMM_CONSOLE - menuconfig SERIAL bool "Serial Driver Support" default y diff --git a/drivers/Makefile b/drivers/Makefile index daac4cd18c1..94f027afbbf 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -66,7 +66,6 @@ include net$(DELIM)Make.defs include pipes$(DELIM)Make.defs include power$(DELIM)Make.defs include sensors$(DELIM)Make.defs -include sercomm$(DELIM)Make.defs include serial$(DELIM)Make.defs include spi$(DELIM)Make.defs include syslog$(DELIM)Make.defs diff --git a/drivers/README.txt b/drivers/README.txt index fbb13ce25d7..f9f23af06f2 100644 --- a/drivers/README.txt +++ b/drivers/README.txt @@ -137,16 +137,6 @@ sensors/ measure and convert voltage levels. DACs, however, are retained in the analog/ sub-directory. -sercomm/ - Sercomm is the transport used by osmocom-bb that runs on top of serial. - See http://bb.osmocom.org/trac/wiki/nuttx-bb/run for detailed the usage - of nuttx with sercomm. - - drivers/sercomm is only built if CONFIG_SERCOMM_CONSOLE in the NuttX - configuration file. If you attempt to build this driver without - osmocom-bb, you will get compilation errors because of header files - that are needed from the osmocom-bb. - serial/ Front-end character drivers for chip-specific UARTs. This provide some TTY-like functionality and are commonly used (but not required for) diff --git a/drivers/lcd/README.txt b/drivers/lcd/README.txt index 85d4f52d71b..266a583654d 100644 --- a/drivers/lcd/README.txt +++ b/drivers/lcd/README.txt @@ -162,10 +162,6 @@ that support additional LCDs. LCD drivers in the configuration directory if they support some differ LCD interface (such as a parallel interface) that makes then less re-usable: - SSD1783 Drivers: - - configs/compal_e99/src/ssd1783.c - SSD1289 Drivers: configs/hymini-stm32v/src/ssd1289.c. See also drivers/lcd/ssd1298.c diff --git a/drivers/mmcsd/mmcsd_sdio.c b/drivers/mmcsd/mmcsd_sdio.c index dbdf4e98ca8..9c93cefd4ba 100644 --- a/drivers/mmcsd/mmcsd_sdio.c +++ b/drivers/mmcsd/mmcsd_sdio.c @@ -857,7 +857,7 @@ static void mmcsd_decodeCID(FAR struct mmcsd_state_s *priv, uint32_t cid[4]) */ decoded.mid = cid[0] >> 24; - decoded.oid = (cid[0] >> 16) & 0xffff; + decoded.oid = (cid[0] >> 8) & 0xffff; decoded.pnm[0] = cid[0] & 0xff; /* Word 2: Bits 64:95 @@ -893,9 +893,9 @@ static void mmcsd_decodeCID(FAR struct mmcsd_state_s *priv, uint32_t cid[4]) decoded.mdt = (cid[3] >> 8) & 0x0fff; decoded.crc = (cid[3] >> 1) & 0x7f; - finfo("mid: %02x oid: %04x pnm: %s prv: %d psn: %d mdt: %02x crc: %02x\n", + finfo("mid: %02x oid: %04x pnm: %s prv: %d psn: %lu mdt: %02x crc: %02x\n", decoded.mid, decoded.oid, decoded.pnm, decoded.prv, - decoded.psn, decoded.mdt, decoded.crc); + (unsigned long)decoded.psn, decoded.mdt, decoded.crc); } #endif @@ -2234,7 +2234,8 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry) geometry->geo_mediachanged ? "true" : "false", geometry->geo_writeenabled ? "true" : "false"); finfo("nsectors: %lu sectorsize: %d\n", - (long)geometry->geo_nsectors, geometry->geo_sectorsize); + ((unsigned long))geometry->geo_nsectors, + geometry->geo_sectorsize); priv->mediachanged = false; ret = OK; diff --git a/drivers/sercomm/Kconfig b/drivers/sercomm/Kconfig deleted file mode 100644 index f72f3c094ce..00000000000 --- a/drivers/sercomm/Kconfig +++ /dev/null @@ -1,4 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# diff --git a/drivers/sercomm/Make.defs b/drivers/sercomm/Make.defs deleted file mode 100644 index 0cf93d4c805..00000000000 --- a/drivers/sercomm/Make.defs +++ /dev/null @@ -1,55 +0,0 @@ -############################################################################ -# drivers/serial/Make.defs -# -# Copyright (C) 2009, 2011 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. -# -############################################################################ - -# File descriptor support is needed for this driver - -ifneq ($(CONFIG_NFILE_DESCRIPTORS),0) - -# The sercomm driver should not be build for all platforms. Only build it -# is so configured - -ifeq ($(CONFIG_SERCOMM_CONSOLE),y) - -# Include serial drivers - -CSRCS += console.c uart.c - -# Include sercomm build support - -DEPPATH += --dep-path sercomm -VPATH += :sercomm - -endif -endif diff --git a/drivers/sercomm/README.txt b/drivers/sercomm/README.txt deleted file mode 100644 index 06add26e88b..00000000000 --- a/drivers/sercomm/README.txt +++ /dev/null @@ -1,19 +0,0 @@ -drivers/sercomm README -====================== - -If CONFIG_SERCOMM_CONSOLE is defined in the NuttX configuration file, NuttX -will attempt to use sercomm (HDLC protocol) to communicate with the -host system. Sercomm is the transport used by osmocom-bb that runs on top -of serial. See http://bb.osmocom.org/trac/wiki/nuttx-bb/run for detailed -the usage of nuttx with sercomm. - -The drivers/sercomm build that you have the osmocom-bb project directory -at same level as the nuttx project: - - |- nuttx - |- apps - `- osmocom-bb - -If you attempt to build this driver without osmocom-bb, you will get -compilation errors because of header files that are needed from the -osmocom-bb directory. diff --git a/drivers/sercomm/console.c b/drivers/sercomm/console.c deleted file mode 100644 index efd1174ba3f..00000000000 --- a/drivers/sercomm/console.c +++ /dev/null @@ -1,216 +0,0 @@ -/**************************************************************************** - * drivers/sercomm/console.c - * Driver for NuttX Console - * - * (C) 2010 by Harald Welte - * (C) 2011 Stefan Richter - * - * This source code is derivated from Osmocom-BB project and was - * relicensed as BSD with permission from original authors. - * - * 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 -#include -#include -#include - -#include -#include -#include - -#include "uart.h" -#include -#include - -/************************************************************************************ - * Fileops Prototypes and Structures - ************************************************************************************/ - -typedef FAR struct file file_t; - -static ssize_t sc_console_read(file_t *filep, FAR char *buffer, size_t buflen); -static ssize_t sc_console_write(file_t *filep, FAR const char *buffer, size_t buflen); -static int sc_console_ioctl(file_t *filep, int cmd, unsigned long arg); -#ifndef CONFIG_DISABLE_POLL -static int sc_console_poll(file_t *filep, FAR struct pollfd *fds, bool setup); -#endif - -static const struct file_operations g_sercom_console_ops = -{ - 0, /* open, always opened */ - 0, /* close, stays open */ - sc_console_read, /* read */ - sc_console_write, /* write */ - 0, /* seek, not supported */ - sc_console_ioctl, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - sc_console_poll /* poll */ -#endif -}; - -static FAR uart_dev_t *readdev = NULL; -static struct msgb *recvmsg = NULL; - -/**************************************************************************** - * Helper functions - ****************************************************************************/ - -static void recv_cb(uint8_t dlci, struct msgb *msg) -{ - sem_post(&readdev->recvsem); - recvmsg = msg; -} - -/**************************************************************************** - * Fileops - ****************************************************************************/ - -/* REVISIT: recvmsg is overwritten when multiple msg arrive! */ - -static ssize_t sc_console_read(file_t *filep, FAR char *buffer, size_t buflen) -{ - size_t len; - struct msgb *tmp; - - /* Wait until data is received */ - - while (recvmsg == NULL) - { - sem_wait(&readdev->recvsem); - } - - len = recvmsg->len > buflen ? buflen : recvmsg->len; - memcpy(buffer, msgb_get(recvmsg, len), len); - - if (recvmsg->len == 0) - { - /* prevent inconsistent msg by first invalidating it, then free it */ - - tmp = recvmsg; - recvmsg = NULL; - msgb_free(tmp); - } - - return len; -} - -/* REVISIT: redirect to old Osmocom-BB comm/sercomm_cons.c -> 2 buffers */ - -extern int sercomm_puts(const char *s); - -static ssize_t sc_console_write(file_t *filep, FAR const char *buffer, size_t buflen) -{ - char dstbuf[32]; - int cnt; - - if (buflen >= 31) - { - cnt = 31; - } - else - { - cnt = buflen; - } - - memcpy(dstbuf, buffer, cnt); - dstbuf[cnt] = '\0'; - - /* print part of our buffer */ - - sercomm_puts(dstbuf); - - /* wait a little bit to get data transfered */ - - up_mdelay(1); - - return cnt; -} - -/* Forward ioctl to uart driver */ - -static int sc_console_ioctl(struct file *filep, int cmd, unsigned long arg) -{ - FAR struct inode *inode = filep->f_inode; - FAR uart_dev_t *dev = inode->i_private; - - return dev->ops->ioctl(filep, cmd, arg); -} - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/* Use sercomm on uart driver, register console driver */ - -int sercomm_register(FAR const char *path, FAR uart_dev_t *dev) -{ - /* REVISIT: initialize MODEMUART to be used for sercomm */ - - uart_init(SERCOMM_UART_NR, 1); - uart_baudrate(SERCOMM_UART_NR, UART_115200); - readdev = dev; - sercomm_register_rx_cb(SC_DLCI_LOADER, &recv_cb); - - sem_init(&dev->xmit.sem, 0, 1); - sem_init(&dev->recv.sem, 0, 1); - sem_init(&dev->closesem, 0, 1); - sem_init(&dev->xmitsem, 0, 0); - sem_init(&dev->recvsem, 0, 0); -#ifndef CONFIG_DISABLE_POLL - sem_init(&dev->pollsem, 0, 1); -#endif - - sem_setprotocol(&dev->xmitsem, SEM_PRIO_NONE); - sem_setprotocol(&dev->recvsem, SEM_PRIO_NONE); - - _info("Registering %s\n", path); - return register_driver(path, &g_sercom_console_ops, 0666, NULL); -} - -/* Stubs to make serial driver happy */ - -void sercomm_recvchars(void *a) -{ -} - -void sercomm_xmitchars(void *a) -{ -} - -/* Stubs to make memory allocator happy */ - -void cons_puts(void *foo) -{ -} - -void delay_ms(int ms) -{ -} diff --git a/drivers/sercomm/loadwriter.py b/drivers/sercomm/loadwriter.py deleted file mode 100755 index 6234d6f0d3e..00000000000 --- a/drivers/sercomm/loadwriter.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/python -from socket import * -import time - -SOCKET_NAME = '/tmp/osmocom_loader' - -s = socket(AF_UNIX, SOCK_STREAM) -s.connect(SOCKET_NAME) - -while 1: - try: - x = raw_input(">") - y = len(x) + 1 - s.send(chr(y>>8) + chr(y&255) + x + "\n") - except: - print '' - break - -s.close() diff --git a/drivers/sercomm/uart.c b/drivers/sercomm/uart.c deleted file mode 100644 index 9e257455a89..00000000000 --- a/drivers/sercomm/uart.c +++ /dev/null @@ -1,607 +0,0 @@ -/**************************************************************************** - * drivers/sercomm/uart.c - * Calypso DBB internal UART Driver - * - * (C) 2010 by Harald Welte - * (C) 2010 by Ingo Albrecht - * - * 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 -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include - -#include "uart.h" - -#define BASE_ADDR_UART_MODEM 0xffff5000 -#define OFFSET_IRDA 0x800 - -#define UART_REG(n,m) (BASE_ADDR_UART_MODEM + ((n)*OFFSET_IRDA)+(m)) - -#define LCR7BIT 0x80 -#define LCRBFBIT 0x40 -#define MCR6BIT 0x20 -#define REG_OFFS(m) ((m) & ~(LCR7BIT|LCRBFBIT|MCR6BIT)) - -/* read access LCR[7] = 0 */ - -enum uart_reg -{ - RHR = 0, - IER = 1, - IIR = 2, - LCR = 3, - MCR = 4, - LSR = 5, - MSR = 6, - SPR = 7, - MDR1 = 8, - DMR2 = 9, - SFLSR = 0x0a, - RESUME = 0x0b, - SFREGL = 0x0c, - SFREGH = 0x0d, - BLR = 0x0e, - ACREG = 0x0f, - SCR = 0x10, - SSR = 0x11, - EBLR = 0x12, - - /* read access LCR[7] = 1 */ - - DLL = RHR | LCR7BIT, - DLH = IER | LCR7BIT, - DIV1_6 = ACREG | LCR7BIT, - - /* read/write access LCR[7:0] = 0xbf */ - - EFR = IIR | LCRBFBIT, - XON1 = MCR | LCRBFBIT, - XON2 = LSR | LCRBFBIT, - XOFF1 = MSR | LCRBFBIT, - XOFF2 = SPR | LCRBFBIT, - - /* read/write access if EFR[4] = 1 and MCR[6] = 1 */ - - TCR = MSR | MCR6BIT, - TLR = SPR | MCR6BIT, -}; - -/* write access LCR[7] = 0 */ - -#define THR RHR -#define FCR IIR /* only if EFR[4] = 1 */ -#define TXFLL SFLSR -#define TXFLH RESUME -#define RXFLL SFREGL -#define RXFLH SFREGH - -enum fcr_bits -{ - FIFO_EN = (1 << 0), - RX_FIFO_CLEAR = (1 << 1), - TX_FIFO_CLEAR = (1 << 2), - DMA_MODE = (1 << 3), -}; - -#define TX_FIFO_TRIG_SHIFT 4 -#define RX_FIFO_TRIG_SHIFT 6 - -enum iir_bits -{ - IIR_INT_PENDING = 0x01, - IIR_INT_TYPE = 0x3E, - IIR_INT_TYPE_RX_STATUS_ERROR = 0x06, - IIR_INT_TYPE_RX_TIMEOUT = 0x0C, - IIR_INT_TYPE_RHR = 0x04, - IIR_INT_TYPE_THR = 0x02, - IIR_INT_TYPE_MSR = 0x00, - IIR_INT_TYPE_XOFF = 0x10, - IIR_INT_TYPE_FLOW = 0x20, - IIR_FCR0_MIRROR = 0xC0, -}; - -#define UART_REG_UIR 0xffff6000 - -/* enable or disable the divisor latch for access to DLL, DLH */ - -static void uart_set_lcr7bit(int uart, int on) -{ - uint8_t reg; - - reg = readb(UART_REG(uart, LCR)); - if (on) - { - reg |= (1 << 7); - } - else - { - reg &= ~(1 << 7); - } - - writeb(reg, UART_REG(uart, LCR)); -} - -static uint8_t old_lcr; -static void uart_set_lcr_bf(int uart, int on) -{ - if (on) - { - old_lcr = readb(UART_REG(uart, LCR)); - writeb(0xBF, UART_REG(uart, LCR)); - } - else - { - writeb(old_lcr, UART_REG(uart, LCR)); - } -} - -/* Enable or disable the TCR_TLR latch bit in MCR[6] */ - -static void uart_set_mcr6bit(int uart, int on) -{ - uint8_t mcr; - - /* we assume EFR[4] is always set to 1 */ - - mcr = readb(UART_REG(uart, MCR)); - if (on) - { - mcr |= (1 << 6); - } - else - { - mcr &= ~(1 << 6); - } - - writeb(mcr, UART_REG(uart, MCR)); -} - -static void uart_reg_write(int uart, enum uart_reg reg, uint8_t val) -{ - if (reg & LCRBFBIT) - { - uart_set_lcr_bf(uart, 1); - } - else if (reg & LCR7BIT) - { - uart_set_lcr7bit(uart, 1); - } - else if (reg & MCR6BIT) - { - uart_set_mcr6bit(uart, 1); - } - - writeb(val, UART_REG(uart, REG_OFFS(reg))); - - if (reg & LCRBFBIT) - { - uart_set_lcr_bf(uart, 0); - } - else if (reg & LCR7BIT) - { - uart_set_lcr7bit(uart, 0); - } - else if (reg & MCR6BIT) - { - uart_set_mcr6bit(uart, 0); - } -} - -/* read from a UART register, applying any required latch bits */ - -static uint8_t uart_reg_read(int uart, enum uart_reg reg) -{ - uint8_t ret; - - if (reg & LCRBFBIT) - { - uart_set_lcr_bf(uart, 1); - } - else if (reg & LCR7BIT) - { - uart_set_lcr7bit(uart, 1); - } - else if (reg & MCR6BIT) - { - uart_set_mcr6bit(uart, 1); - } - - ret = readb(UART_REG(uart, REG_OFFS(reg))); - - if (reg & LCRBFBIT) - { - uart_set_lcr_bf(uart, 0); - } - else if (reg & LCR7BIT) - { - uart_set_lcr7bit(uart, 0); - } - else if (reg & MCR6BIT) - { - uart_set_mcr6bit(uart, 0); - } - - return ret; -} - -#if 0 -static void uart_irq_handler_cons(__unused enum irq_nr irqnr) -{ - const uint8_t uart = CONS_UART_NR; - uint8_t iir; - - iir = uart_reg_read(uart, IIR); - if (iir & IIR_INT_PENDING) - { - return; - } - - switch (iir & IIR_INT_TYPE) - { - case IIR_INT_TYPE_RHR: - break; - - case IIR_INT_TYPE_THR: - if (cons_rb_flush() == 1) - { - /* everything was flushed, disable THR IRQ */ - - uint8_t ier = uart_reg_read(uart, IER); - ier &= ~(1 << 1); - uart_reg_write(uart, IER, ier); - } - break; - - case IIR_INT_TYPE_MSR: - break; - - case IIR_INT_TYPE_RX_STATUS_ERROR: - break; - - case IIR_INT_TYPE_RX_TIMEOUT: - break; - - case IIR_INT_TYPE_XOFF: - break; - } -} -#endif - -static void uart_irq_handler_sercomm(__unused enum irq_nr irqnr, __unused void *context) -{ - const uint8_t uart = SERCOMM_UART_NR; - uint8_t iir, ch; - - iir = uart_reg_read(uart, IIR); - if (iir & IIR_INT_PENDING) - { - return; - } - - switch (iir & IIR_INT_TYPE) - { - case IIR_INT_TYPE_RX_TIMEOUT: - case IIR_INT_TYPE_RHR: - /* as long as we have rx data available */ - - while (uart_getchar_nb(uart, &ch)) - { - if (sercomm_drv_rx_char(ch) < 0) - { - /* sercomm cannot receive more data right now */ - - uart_irq_enable(uart, UART_IRQ_RX_CHAR, 0); - } - } - break; - - case IIR_INT_TYPE_THR: - /* as long as we have space in the FIFO */ - - while (!uart_tx_busy(uart)) - { - /* get a byte from sercomm */ - - if (!sercomm_drv_pull(&ch)) - { - /* no more bytes in sercomm, stop TX interrupts */ - - uart_irq_enable(uart, UART_IRQ_TX_EMPTY, 0); - break; - } - - /* write the byte into the TX FIFO */ - - uart_putchar_nb(uart, ch); - } - break; - - case IIR_INT_TYPE_MSR: - printf("UART IRQ MSR\n"); - break; - - case IIR_INT_TYPE_RX_STATUS_ERROR: - printf("UART IRQ RX_SE\n"); - break; - - case IIR_INT_TYPE_XOFF: - printf("UART IRQXOFF\n"); - break; - } -} - -static const uint8_t uart2irq[] = -{ - [0] = IRQ_UART_IRDA, - [1] = IRQ_UART_MODEM, -}; - -void uart_init(uint8_t uart, uint8_t interrupts) -{ -#if 0 - uint8_t irq = uart2irq[uart]; -#endif - - uart_reg_write(uart, IER, 0x00); - - if (uart == SERCOMM_UART_NR) - { - sercomm_init(); - irq_attach(IRQ_UART_MODEM, (xcpt_t)uart_irq_handler_sercomm); - up_enable_irq(IRQ_UART_MODEM); - uart_irq_enable(uart, UART_IRQ_RX_CHAR, 1); - } - -#if 0 - if (uart == CONS_UART_NR) - { - cons_init(); - if (interrupts) - { - irq_register_handler(irq, &uart_irq_handler_cons); - irq_config(irq, 0, 0, 0xff); - irq_enable(irq); - } - } - else - { - sercomm_init(); - if (interrupts) - { - irq_register_handler(irq, &uart_irq_handler_sercomm); - irq_config(irq, 0, 0, 0xff); - irq_enable(irq); - } - - uart_irq_enable(uart, UART_IRQ_RX_CHAR, 1); - } -#endif -#if 0 - if (uart == 1) - { - /* assign UART to MCU and unmask interrupts */ - - writeb(UART_REG_UIR, 0x00); - } -#endif - - /* if we don't initialize these, we get strange corruptions in the - * received data... :-( - */ - - uart_reg_write(uart, MDR1, 0x07); /* turn off UART */ - uart_reg_write(uart, XON1, 0x00); /* Xon1/Addr Register */ - uart_reg_write(uart, XON2, 0x00); /* Xon2/Addr Register */ - uart_reg_write(uart, XOFF1, 0x00); /* Xoff1 Register */ - uart_reg_write(uart, XOFF2, 0x00); /* Xoff2 Register */ - uart_reg_write(uart, EFR, 0x00); /* Enhanced Features Register */ - - /* select UART mode */ - - uart_reg_write(uart, MDR1, 0); - - /* no XON/XOFF flow control, ENHANCED_EN, no auto-RTS/CTS */ - - uart_reg_write(uart, EFR, (1 << 4)); - - /* enable Tx/Rx FIFO, Tx trigger at 56 spaces, Rx trigger at 60 chars */ - - uart_reg_write(uart, FCR, FIFO_EN | RX_FIFO_CLEAR | TX_FIFO_CLEAR | - (3 << TX_FIFO_TRIG_SHIFT) | (3 << RX_FIFO_TRIG_SHIFT)); - - /* THR interrupt only when TX FIFO and TX shift register are empty */ - - uart_reg_write(uart, SCR, (1 << 0)); /* | (1 << 3)); */ - - /* 8 bit, 1 stop bit, no parity, no break */ - - uart_reg_write(uart, LCR, 0x03); - - uart_set_lcr7bit(uart, 0); -} - -void uart_poll(uint8_t uart) -{ -#if 0 - if (uart == CONS_UART_NR) - { - uart_irq_handler_cons(0); - } - else -#endif - { - uart_irq_handler_sercomm(0, NULL); - } -} - -void uart_irq_enable(uint8_t uart, enum uart_irq irq, int on) -{ - uint8_t ier = uart_reg_read(uart, IER); - uint8_t mask = 0; - - switch (irq) - { - case UART_IRQ_TX_EMPTY: - mask = (1 << 1); - break; - - case UART_IRQ_RX_CHAR: - mask = (1 << 0); - break; - } - - if (on) - { - ier |= mask; - } - else - { - ier &= ~mask; - } - - uart_reg_write(uart, IER, ier); -} - -void uart_putchar_wait(uint8_t uart, int c) -{ - /* wait while TX FIFO indicates full */ - - while (readb(UART_REG(uart, SSR)) & 0x01) { } - - /* put character in TX FIFO */ - - writeb(c, UART_REG(uart, THR)); -} - -int uart_putchar_nb(uint8_t uart, int c) -{ - /* if TX FIFO indicates full, abort */ - - if (readb(UART_REG(uart, SSR)) & 0x01) - { - return 0; - } - - writeb(c, UART_REG(uart, THR)); - return 1; -} - -int uart_getchar_nb(uint8_t uart, uint8_t *ch) -{ - uint8_t lsr; - - lsr = readb(UART_REG(uart, LSR)); - - /* something strange happened */ - - if (lsr & 0x02) - { - printf("LSR RX_OE\n"); - } - - if (lsr & 0x04) - { - printf("LSR RX_PE\n"); - } - - if (lsr & 0x08) - { - printf("LSR RX_FE\n"); - } - - if (lsr & 0x10) - { - printf("LSR RX_BI\n"); - } - - if (lsr & 0x80) - { - printf("LSR RX_FIFO_STS\n"); - } - - /* is the Rx FIFO empty? */ - - if (!(lsr & 0x01)) - { - return 0; - } - - *ch = readb(UART_REG(uart, RHR)); - return 1; -} - -int uart_tx_busy(uint8_t uart) -{ - if (readb(UART_REG(uart, SSR)) & 0x01) - { - return 1; - } - - return 0; -} - -static const uint16_t divider[] = -{ - [UART_38400] = 21, /* 38,690 */ - [UART_57600] = 14, /* 58,035 */ - [UART_115200] = 7, /* 116,071 */ - [UART_230400] = 4, /* 203,125! (-3% would be 223,488) */ - [UART_460800] = 2, /* 406,250! (-3% would be 446,976) */ - [UART_921600] = 1, /* 812,500! (-3% would be 893,952) */ -}; - -int uart_baudrate(uint8_t uart, enum uart_baudrate bdrt) -{ - uint16_t div; - - if (bdrt > ARRAY_SIZE(divider)) - { - return -1; - } - - div = divider[bdrt]; - uart_set_lcr7bit(uart, 1); - writeb(div & 0xff, UART_REG(uart, DLL)); - writeb(div >> 8, UART_REG(uart, DLH)); - uart_set_lcr7bit(uart, 0); - - return 0; -} diff --git a/drivers/sercomm/uart.h b/drivers/sercomm/uart.h deleted file mode 100644 index 81d7a15609e..00000000000 --- a/drivers/sercomm/uart.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _UART_H -#define _UART_H - -#include - -enum uart_baudrate { - UART_38400, - UART_57600, - UART_115200, - UART_230400, - UART_460800, - UART_614400, - UART_921600, -}; - -void uart_init(uint8_t uart, uint8_t interrupts); -void uart_putchar_wait(uint8_t uart, int c); -int uart_putchar_nb(uint8_t uart, int c); -int uart_getchar_nb(uint8_t uart, uint8_t *ch); -int uart_tx_busy(uint8_t uart); -int uart_baudrate(uint8_t uart, enum uart_baudrate bdrt); - -enum uart_irq { - UART_IRQ_TX_EMPTY, - UART_IRQ_RX_CHAR, -}; - -void uart_irq_enable(uint8_t uart, enum uart_irq irq, int on); - -void uart_poll(uint8_t uart); - -#endif /* _UART_H */ diff --git a/drivers/usbdev/cdcacm.c b/drivers/usbdev/cdcacm.c index 64e2e68075d..15f92dd9aea 100644 --- a/drivers/usbdev/cdcacm.c +++ b/drivers/usbdev/cdcacm.c @@ -242,6 +242,12 @@ static const struct uart_ops_s g_uartops = NULL, /* rxavailable */ #ifdef CONFIG_SERIAL_IFLOWCONTROL cdcuart_rxflowcontrol, /* rxflowcontrol */ +#endif +#ifdef CONFIG_SERIAL_DMA + NULL, /* dmasend */ + NULL, /* dmareceive */ + NULL, /* dmarxfree */ + NULL, /* dmatxavail */ #endif NULL, /* send */ cdcuart_txint, /* txinit */ diff --git a/fs/aio/aio_cancel.c b/fs/aio/aio_cancel.c index bdd4ba463a0..aa575fdb8b9 100644 --- a/fs/aio/aio_cancel.c +++ b/fs/aio/aio_cancel.c @@ -61,30 +61,30 @@ * The aio_cancel() function attempts to cancel one or more asynchronous * I/O requests currently outstanding against file descriptor 'fildes'. * The aiocbp argument points to the asynchronous I/O control block for - * a particular request to be cancelled. If aiocbp is NULL, then all + * a particular request to be canceled. If aiocbp is NULL, then all * outstanding cancelable asynchronous I/O requests against fildes will - * be cancelled. + * be canceled. * * Normal asynchronous notification will occur for asynchronous I/O - * operations that are successfully cancelled. If there are requests that - * cannot be cancelled, then the normal asynchronous completion process + * operations that are successfully canceled. If there are requests that + * cannot be canceled, then the normal asynchronous completion process * will take place for those requests when they are completed. * - * For requested operations that are successfully cancelled, the associated + * For requested operations that are successfully canceled, the associated * error status will be set to ECANCELED and the return status will be -1. - * For requested operations that are not successfully cancelled, the aiocbp + * For requested operations that are not successfully canceled, the aiocbp * will not be modified by aio_cancel(). * * Input Parameters: * fildes - Not used in this implementation * aiocbp - Points to the asynchronous I/O control block for a particular - * request to be cancelled. + * request to be canceled. * * Returned Value: * The aio_cancel() function will return the value AIO_CANCELED if the - * requested operation(s) were cancelled. The value AIO_NOTCANCELED will + * requested operation(s) were canceled. The value AIO_NOTCANCELED will * be returned if at least one of the requested operation(s) cannot be - * cancelled because it is in progress. In this case, the state of the + * canceled because it is in progress. In this case, the state of the * other operations, if any, referenced in the call to aio_cancel() is * not indicated by the return value of aio_cancel(). The application * may determine the state of affairs for these operations by using @@ -133,7 +133,7 @@ int aio_cancel(int fildes, FAR struct aiocb *aiocbp) * possibilities:* (1) the work has already been started and * is no longer queued, or (2) the work has not been started * and is still in the work queue. Only the second case can - * be cancelled. work_cancel() will return -ENOENT in the + * be canceled. work_cancel() will return -ENOENT in the * first case. */ @@ -177,7 +177,7 @@ int aio_cancel(int fildes, FAR struct aiocb *aiocbp) * possibilities:* (1) the work has already been started and * is no longer queued, or (2) the work has not been started * and is still in the work queue. Only the second case can - * be cancelled. work_cancel() will return -ENOENT in the + * be canceled. work_cancel() will return -ENOENT in the * first case. */ diff --git a/fs/aio/aio_read.c b/fs/aio/aio_read.c index 6d261ec7d8e..462c5ddd26e 100644 --- a/fs/aio/aio_read.c +++ b/fs/aio/aio_read.c @@ -226,7 +226,7 @@ static void aio_read_worker(FAR void *arg) * aiocbp->aio_nbytes is an invalid value. * * In the case that the aio_read() successfully queues the I/O operation - * but the operation is subsequently cancelled or encounters an error, the + * but the operation is subsequently canceled or encounters an error, the * return status of the asynchronous operation is one of the values * normally returned by the read() function call. In addition, the error * status of the asynchronous operation is set to one of the error @@ -235,7 +235,7 @@ static void aio_read_worker(FAR void *arg) * * EBADF - The aiocbp->aio_fildes argument is not a valid file descriptor * open for reading. - * ECANCELED - The requested I/O was cancelled before the I/O completed + * ECANCELED - The requested I/O was canceled before the I/O completed * due to an explicit aio_cancel() request. * EINVAL - The file offset value implied by aiocbp->aio_offset would be * invalid. diff --git a/fs/aio/aio_write.c b/fs/aio/aio_write.c index 3d20b2dd93e..0aab19e7cba 100644 --- a/fs/aio/aio_write.c +++ b/fs/aio/aio_write.c @@ -279,7 +279,7 @@ errout: * aiocbp->aio_nbytes is an invalid value. * * In the case that the aio_write() successfully queues the I/O operation - * but the operation is subsequently cancelled or encounters an error, the + * but the operation is subsequently canceled or encounters an error, the * return status of the asynchronous operation is one of the values * normally returned by the write() function call. In addition, the error * status of the asynchronous operation is set to one of the error @@ -290,7 +290,7 @@ errout: * open for writing. * EINVAL - The file offset value implied by aiocbp->aio_offset would be * invalid. - * ECANCELED - The requested I/O was cancelled before the I/O completed + * ECANCELED - The requested I/O was canceled before the I/O completed * due to an explicit aio_cancel() request. * * The following condition may be detected synchronously or asynchronously: diff --git a/fs/mount/fs_automount.c b/fs/mount/fs_automount.c index 1bee61d7f5a..47bc9c01182 100644 --- a/fs/mount/fs_automount.c +++ b/fs/mount/fs_automount.c @@ -485,7 +485,7 @@ static int automount_interrupt(FAR const struct automount_lower_s *lower, /* Queue work to occur after a delay. The delays performs debouncing: * If the insertion/removal detection logic has "chatter", then we may * receive this interrupt numerous times. Each time, the previous work - * will be cancelled (above) and the new work will scheduled with the + * will be canceled (above) and the new work will scheduled with the * delay. So the final mount operation will not be performed until the * insertion state is stable for that delay. */ diff --git a/fs/procfs/fs_procfsproc.c b/fs/procfs/fs_procfsproc.c index d962559a6a1..f15ef0522ab 100644 --- a/fs/procfs/fs_procfsproc.c +++ b/fs/procfs/fs_procfsproc.c @@ -316,6 +316,9 @@ static FAR const char *g_statenames[] = "Invalid", "Waiting,Unlock", "Ready", +#ifdef CONFIG_SMP + "Assigned", +#endif "Running", "Inactive", "Waiting,Semaphore", diff --git a/fs/vfs/fs_close.c b/fs/vfs/fs_close.c index a2b02b1d870..6020af57317 100644 --- a/fs/vfs/fs_close.c +++ b/fs/vfs/fs_close.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs/vfs/fs_close.c * - * Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -42,6 +42,8 @@ #include #include #include + +#include #include #if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0 @@ -82,7 +84,13 @@ int close(int fd) int errcode; #if CONFIG_NFILE_DESCRIPTORS > 0 int ret; +#endif + /* close() is a cancellation point */ + + (void)enter_cancellation_point(); + +#if CONFIG_NFILE_DESCRIPTORS > 0 /* Did we get a valid file descriptor? */ if ((unsigned int)fd >= CONFIG_NFILE_DESCRIPTORS) @@ -93,7 +101,9 @@ int close(int fd) #if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0 if ((unsigned int)fd < (CONFIG_NFILE_DESCRIPTORS+CONFIG_NSOCKET_DESCRIPTORS)) { - return net_close(fd); + ret = net_close(fd); + leave_cancellation_point(); + return ret; } else #endif @@ -123,11 +133,13 @@ int close(int fd) goto errout; } + leave_cancellation_point(); return OK; #endif errout: set_errno(errcode); + leave_cancellation_point(); return ERROR; } diff --git a/fs/vfs/fs_fcntl.c b/fs/vfs/fs_fcntl.c index 01ca8761fe8..4d8e74b497e 100644 --- a/fs/vfs/fs_fcntl.c +++ b/fs/vfs/fs_fcntl.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs/vfs/fs_fcntl.c * - * Copyright (C) 2009, 2012-2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2012-2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -44,20 +44,13 @@ #include #include +#include +#include #include #include -#include #include "inode/inode.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -228,6 +221,10 @@ int fcntl(int fd, int cmd, ...) va_list ap; int ret; + /* fcntl() is a cancellation point */ + + (void)enter_cancellation_point(); + /* Setup to access the variable argument list */ va_start(ap, cmd); @@ -244,6 +241,8 @@ int fcntl(int fd, int cmd, ...) { /* The errno value has already been set */ + va_end(ap); + leave_cancellation_point(); return ERROR; } @@ -273,5 +272,6 @@ int fcntl(int fd, int cmd, ...) } va_end(ap); + leave_cancellation_point(); return ret; } diff --git a/fs/vfs/fs_fsync.c b/fs/vfs/fs_fsync.c index a2d58825eb4..60c55634971 100644 --- a/fs/vfs/fs_fsync.c +++ b/fs/vfs/fs_fsync.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs/vfs/fs_fsync.c * - * Copyright (C) 2007-2009, 2013-2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2013-2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -44,8 +44,9 @@ #include #include -#include #include +#include +#include #include "inode/inode.h" @@ -117,6 +118,11 @@ errout: int fsync(int fd) { FAR struct file *filep; + int ret; + + /* fsync() is a cancellation point */ + + (void)enter_cancellation_point(); /* Get the file structure corresponding to the file descriptor. */ @@ -125,12 +131,15 @@ int fsync(int fd) { /* The errno value has already been set */ + leave_cancellation_point(); return ERROR; } /* Perform the fsync operation */ - return file_fsync(filep); + ret = file_fsync(filep); + leave_cancellation_point(); + return ret; } #endif /* !CONFIG_DISABLE_MOUNTPOINT */ diff --git a/fs/vfs/fs_open.c b/fs/vfs/fs_open.c index a66f62e869a..a2a662f722f 100644 --- a/fs/vfs/fs_open.c +++ b/fs/vfs/fs_open.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs/vfs/fs_open.c * - * Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011-2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -48,15 +48,12 @@ #include #endif +#include #include #include "inode/inode.h" #include "driver/driver.h" -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -106,6 +103,10 @@ int open(const char *path, int oflags, ...) # warning "File creation not implemented" # endif + /* open() is a cancellation point */ + + (void)enter_cancellation_point(); + /* If the file is opened for creation, then get the mode bits */ if ((oflags & (O_WRONLY | O_CREAT)) != 0) @@ -159,6 +160,7 @@ int open(const char *path, int oflags, ...) /* Return the file descriptor */ + leave_cancellation_point(); return fd; } else @@ -204,6 +206,7 @@ int open(const char *path, int oflags, ...) { /* The errno value has already been set */ + leave_cancellation_point(); return ERROR; } @@ -264,6 +267,7 @@ int open(const char *path, int oflags, ...) } #endif + leave_cancellation_point(); return fd; errout_with_fd: @@ -272,5 +276,6 @@ errout_with_inode: inode_release(inode); errout: set_errno(ret); + leave_cancellation_point(); return ERROR; } diff --git a/fs/vfs/fs_poll.c b/fs/vfs/fs_poll.c index e2c66abf7bf..f0cc6ce2a9f 100644 --- a/fs/vfs/fs_poll.c +++ b/fs/vfs/fs_poll.c @@ -48,6 +48,7 @@ #include #include +#include #include #include @@ -365,6 +366,10 @@ int poll(FAR struct pollfd *fds, nfds_t nfds, int timeout) int errcode; int ret; + /* poll() is a cancellation point */ + + (void)enter_cancellation_point(); + /* This semaphore is used for signaling and, hence, should not have * priority inheritance enabled. */ @@ -425,6 +430,7 @@ int poll(FAR struct pollfd *fds, nfds_t nfds, int timeout) } sem_destroy(&sem); + leave_cancellation_point(); /* Check for errors */ diff --git a/fs/vfs/fs_pread.c b/fs/vfs/fs_pread.c index e80efe66a08..2385ea00a0c 100644 --- a/fs/vfs/fs_pread.c +++ b/fs/vfs/fs_pread.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs/vfs/fs_pread.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -43,12 +43,9 @@ #include #include +#include #include -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -144,6 +141,11 @@ ssize_t file_pread(FAR struct file *filep, FAR void *buf, size_t nbytes, ssize_t pread(int fd, FAR void *buf, size_t nbytes, off_t offset) { FAR struct file *filep; + ssize_t ret; + + /* pread() is a cancellation point */ + + (void)enter_cancellation_point(); /* Get the file structure corresponding to the file descriptor. */ @@ -152,10 +154,15 @@ ssize_t pread(int fd, FAR void *buf, size_t nbytes, off_t offset) { /* The errno value has already been set */ - return (ssize_t)ERROR; + ret = (ssize_t)ERROR; + } + else + { + /* Let file_pread do the real work */ + + ret = file_pread(filep, buf, nbytes, offset); } - /* Let file_pread do the real work */ - - return file_pread(filep, buf, nbytes, offset); + leave_cancellation_point(); + return ret; } diff --git a/fs/vfs/fs_pwrite.c b/fs/vfs/fs_pwrite.c index 43630c455a4..8e841247ca8 100644 --- a/fs/vfs/fs_pwrite.c +++ b/fs/vfs/fs_pwrite.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs/vfs/fs_pwrite.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -43,12 +43,9 @@ #include #include +#include #include -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -142,6 +139,11 @@ ssize_t file_pwrite(FAR struct file *filep, FAR const void *buf, ssize_t pwrite(int fd, FAR const void *buf, size_t nbytes, off_t offset) { FAR struct file *filep; + ssize_t ret; + + /* pread() is a cancellation point */ + + (void)enter_cancellation_point(); /* Get the file structure corresponding to the file descriptor. */ @@ -150,10 +152,15 @@ ssize_t pwrite(int fd, FAR const void *buf, size_t nbytes, off_t offset) { /* The errno value has already been set */ - return (ssize_t)ERROR; + ret = (ssize_t)ERROR; + } + else + { + /* Let file_pread do the real work */ + + ret = file_pwrite(filep, buf, nbytes, offset); } - /* Let file_pread do the real work */ - - return file_pwrite(filep, buf, nbytes, offset); + (void)enter_cancellation_point(); + return ret; } diff --git a/fs/vfs/fs_read.c b/fs/vfs/fs_read.c index f1d6097236c..6da412c3793 100644 --- a/fs/vfs/fs_read.c +++ b/fs/vfs/fs_read.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs/vfs/fs_read.c * - * Copyright (C) 2007-2009, 2012-2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2012-2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -38,19 +38,17 @@ ****************************************************************************/ #include + #include #include - #include #include #include #include -#include "inode/inode.h" +#include -/**************************************************************************** - * Private Functions - ****************************************************************************/ +#include "inode/inode.h" /**************************************************************************** * Public Functions @@ -136,23 +134,30 @@ ssize_t file_read(FAR struct file *filep, FAR void *buf, size_t nbytes) ssize_t read(int fd, FAR void *buf, size_t nbytes) { + ssize_t ret; + + /* read() is a cancellation point */ + + (void)enter_cancellation_point(); + /* Did we get a valid file descriptor? */ #if CONFIG_NFILE_DESCRIPTORS > 0 if ((unsigned int)fd >= CONFIG_NFILE_DESCRIPTORS) #endif { +#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0 /* No.. If networking is enabled, read() is the same as recv() with - * the flags parameter set to zero. + * the flags parameter set to zero. Note that recv() sets + * the errno variable. */ -#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0 - return recv(fd, buf, nbytes, 0); + ret = recv(fd, buf, nbytes, 0); #else /* No networking... it is a bad descriptor in any event */ set_errno(EBADF); - return ERROR; + ret = ERROR; #endif } @@ -162,20 +167,28 @@ ssize_t read(int fd, FAR void *buf, size_t nbytes) FAR struct file *filep; /* The descriptor is in a valid range to file descriptor... do the - * read. First, get the file structure. + * read. First, get the file structure. Note that on failure, + * fs_getfilep() will set the errno variable. */ filep = fs_getfilep(fd); - if (!filep) + if (filep == NULL) { /* The errno value has already been set */ - return ERROR; + ret = ERROR; } + else + { + /* Then let file_read do all of the work. Note that file_read() + * sets the errno variable. + */ - /* Then let file_read do all of the work */ - - return file_read(filep, buf, nbytes); + ret = file_read(filep, buf, nbytes); + } } #endif + + leave_cancellation_point(); + return ret; } diff --git a/fs/vfs/fs_select.c b/fs/vfs/fs_select.c index d71d8e28a1c..acb42b35aed 100644 --- a/fs/vfs/fs_select.c +++ b/fs/vfs/fs_select.c @@ -49,6 +49,7 @@ #include #include +#include #include #include "inode/inode.h" @@ -110,6 +111,10 @@ int select(int nfds, FAR fd_set *readfds, FAR fd_set *writefds, int ndx; int ret; + /* select() is cancellation point */ + + (void)enter_cancellation_point(); + /* How many pollfd structures do we need to allocate? */ /* Initialize the descriptor list for poll() */ @@ -134,6 +139,7 @@ int select(int nfds, FAR fd_set *readfds, FAR fd_set *writefds, if (!pollset) { set_errno(ENOMEM); + leave_cancellation_point(); return ERROR; } @@ -280,6 +286,7 @@ int select(int nfds, FAR fd_set *readfds, FAR fd_set *writefds, set_errno(errcode); } + leave_cancellation_point(); return ret; } diff --git a/fs/vfs/fs_write.c b/fs/vfs/fs_write.c index 34b77e5a472..4731f26bb10 100644 --- a/fs/vfs/fs_write.c +++ b/fs/vfs/fs_write.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs/vfs/fs_write.c * - * Copyright (C) 2007-2009, 2012-2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2012-2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -38,6 +38,7 @@ ****************************************************************************/ #include + #include #include #include @@ -49,11 +50,9 @@ # include #endif -#include "inode/inode.h" +#include -/**************************************************************************** - * Private Functions - ****************************************************************************/ +#include "inode/inode.h" /**************************************************************************** * Public Functions @@ -72,7 +71,7 @@ ssize_t file_write(FAR struct file *filep, FAR const void *buf, size_t nbytes) { FAR struct inode *inode; - int ret; + ssize_t ret; int errcode; /* Was this file opened for write access? */ @@ -163,6 +162,11 @@ ssize_t write(int fd, FAR const void *buf, size_t nbytes) #if CONFIG_NFILE_DESCRIPTORS > 0 FAR struct file *filep; #endif + ssize_t ret; + + /* write() is a cancellation point */ + + (void)enter_cancellation_point(); /* Did we get a valid file descriptor? */ @@ -170,31 +174,44 @@ ssize_t write(int fd, FAR const void *buf, size_t nbytes) if ((unsigned int)fd >= CONFIG_NFILE_DESCRIPTORS) #endif { - /* Write to a socket descriptor is equivalent to send with flags == 0 */ - #if defined(CONFIG_NET_TCP) && CONFIG_NSOCKET_DESCRIPTORS > 0 - return send(fd, buf, nbytes, 0); + /* Write to a socket descriptor is equivalent to send with flags == 0. + * Note that send() will set the errno on failure. + */ + + ret = send(fd, buf, nbytes, 0); #else set_errno(EBADF); - return ERROR; + ret = ERROR ERROR; #endif } #if CONFIG_NFILE_DESCRIPTORS > 0 - /* The descriptor is in the right range to be a file descriptor... write - * to the file. - */ - - filep = fs_getfilep(fd); - if (!filep) + else { - /* The errno value has already been set */ + /* The descriptor is in the right range to be a file descriptor.. + * write to the file. Note that fs_getfilep() will set the errno on + * failure. + */ - return ERROR; + filep = fs_getfilep(fd); + if (filep == NULL) + { + /* The errno value has already been set */ + + ret = ERROR; + } + else + { + /* Perform the write operation using the file descriptor as an + * index. Note that file_write() will set the errno on failure. + */ + + ret = file_write(filep, buf, nbytes); + } } - - /* Perform the write operation using the file descriptor as an index */ - - return file_write(filep, buf, nbytes); #endif + + leave_cancellation_point(); + return ret; } diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h index 4affda90da9..22b5ebb337f 100644 --- a/include/nuttx/arch.h +++ b/include/nuttx/arch.h @@ -2300,16 +2300,6 @@ xcpt_t arch_phy_irq(FAR const char *intf, xcpt_t handler, phy_enable_t *enable); int up_putc(int ch); -/**************************************************************************** - * Name: up_getc - * - * Description: - * Get one character on the console - * - ****************************************************************************/ - -int up_getc(void); - /**************************************************************************** * Name: up_puts * diff --git a/include/nuttx/cancelpt.h b/include/nuttx/cancelpt.h new file mode 100644 index 00000000000..8adfc8c217e --- /dev/null +++ b/include/nuttx/cancelpt.h @@ -0,0 +1,152 @@ +/**************************************************************************** + * include/nuttx/cancelpt.h + * Definitions related to cancellation points + * + * 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_CANCELPT_H +#define __INCLUDE_NUTTX_CANCELPT_H + +/**************************************************************************** + * Cancellation Points. + * + * Cancellation points shall occur when a thread is executing the following + * functions: + * + * accept() mq_timedsend() putpmsg() sigtimedwait() + * aio_suspend() msgrcv() pwrite() sigwait() + * clock_nanosleep() msgsnd() read() sigwaitinfo() + * close() msync() readv() sleep() + * connect() nanosleep() recv() system() + * creat() open() recvfrom() tcdrain() + * fcntl() pause() recvmsg() usleep() + * fdatasync() poll() select() wait() + * fsync() pread() sem_timedwait() waitid() + * getmsg() pselect() sem_wait() waitpid() + * getpmsg() pthread_cond_timedwait() send() write() + * lockf() pthread_cond_wait() sendmsg() writev() + * mq_receive() pthread_join() sendto() + * mq_send() pthread_testcancel() sigpause() + * mq_timedreceive() putmsg() sigsuspend() + * + * Each of the above function must call enter_cancellation_point() on entry + * in order to establish the cancellation point and leave_cancellation_point() + * on exit. These functions are described below. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Name: enter_cancellation_point + * + * Description: + * Called at the beginning of the cancellation point to establish the + * cancellation point. This function does the following: + * + * 1. If deferred cancellation does not apply to this thread, nothing is + * done, otherwise, it + * 2. Sets state information in the caller's TCB and increments a nesting + * count. + * 3. If this is the outermost nesting level, it checks if there is a + * pending cancellation and, if so, calls either exit() or + * pthread_exit(), depending upon the type of the thread. + * + * Input Parameters: + * None + * + * Returned Value + * true is returned if a cancellation is pending but cannot be performed + * now due to the nesting level. + * + ****************************************************************************/ + +#ifdef CONFIG_CANCELLATION_POINTS +bool enter_cancellation_point(void); +#else +# define enter_cancellation_point() false +#endif + +/**************************************************************************** + * Name: leave_cancellation_point + * + * Description: + * Called at the end of the cancellation point. This function does the + * following: + * + * 1. If deferred cancellation does not apply to this thread, nothing is + * done, otherwise, it + * 2. Clears state information in the caller's TCB and decrements a + * nesting count. + * 3. If this is the outermost nesting level, it checks if there is a + * pending cancellation and, if so, calls either exit() or + * pthread_exit(), depending upon the type of the thread. + * + * Input Parameters: + * None + * + * Returned Value + * None + * + ****************************************************************************/ + +#ifdef CONFIG_CANCELLATION_POINTS +void leave_cancellation_point(void); +#else +# define leave_cancellation_point() +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __INCLUDE_NUTTX_CANCELPT_H */ diff --git a/include/nuttx/nx/nxfonts.h b/include/nuttx/nx/nxfonts.h index 5a5d81e04bc..5d5dcf0d368 100644 --- a/include/nuttx/nx/nxfonts.h +++ b/include/nuttx/nx/nxfonts.h @@ -124,70 +124,70 @@ /* X11 misc fixed fonts */ #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_4X6) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_4X6 +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_4X6 #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_5X7) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_5X7 +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_5X7 #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_5X8) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_5X8 +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_5X8 #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_6X9) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_6X9 +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_6X9 #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_6X10) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_6X10 +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_6X10 #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_6X12) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_6X12 +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_6X12 #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_6X13) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_6X13 +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_6X13 #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_6X13B) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_6X13B +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_6X13B #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_6X13O) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_6X13O +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_6X13O #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_7X13) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_7X13 +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_7X13 #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_7X13B) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_7X13B +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_7X13B #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_7X13O) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_7X13O +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_7X13O #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_7X14) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_7X14 +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_7X14 #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_7X14B) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_7X14B +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_7X14B #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_8X13) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_8X13 +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_8X13 #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_8X13B) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_8X13B +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_8X13B #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_8X13O) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_8X13O +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_8X13O #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_9X15) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_9X15 +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_9X15 #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_9X15B) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_9X15B +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_9X15B #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_9X18) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_9X18 +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_9X18 #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_9X18B) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_9X18B +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_9X18B #elif defined(CONFIG_NXFONT_X11_MISC_FIXED_10X20) -# define NXFONT_DEFAULT CONFIG_NXFONT_X11_MISC_FIXED_10X20 +# define NXFONT_DEFAULT FONTID_X11_MISC_FIXED_10X20 /* Mono-space fonts */ diff --git a/include/nuttx/pthread.h b/include/nuttx/pthread.h index 54d5dc659bd..27fb5dd99c8 100644 --- a/include/nuttx/pthread.h +++ b/include/nuttx/pthread.h @@ -2,7 +2,7 @@ * include/nuttx/pthread.h * Non-standard, NuttX-specific pthread-related declarations. * - * Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -42,6 +42,7 @@ ****************************************************************************/ #include + #include #include diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h index ec438727f81..687d19dcf9b 100644 --- a/include/nuttx/sched.h +++ b/include/nuttx/sched.h @@ -141,16 +141,17 @@ # define TCB_FLAG_TTYPE_PTHREAD (1 << TCB_FLAG_TTYPE_SHIFT) /* User pthread */ # define TCB_FLAG_TTYPE_KERNEL (2 << TCB_FLAG_TTYPE_SHIFT) /* Kernel thread */ #define TCB_FLAG_NONCANCELABLE (1 << 2) /* Bit 2: Pthread is non-cancelable */ -#define TCB_FLAG_CANCEL_PENDING (1 << 3) /* Bit 3: Pthread cancel is pending */ -#define TCB_FLAG_POLICY_SHIFT (4) /* Bit 4-5: Scheduling policy */ +#define TCB_FLAG_CANCEL_DEFERRED (1 << 3) /* Bit 3: Deferred (vs asynch) cancellation type */ +#define TCB_FLAG_CANCEL_PENDING (1 << 4) /* Bit 4: Pthread cancel is pending */ +#define TCB_FLAG_POLICY_SHIFT (5) /* Bit 5-6: Scheduling policy */ #define TCB_FLAG_POLICY_MASK (3 << TCB_FLAG_POLICY_SHIFT) # define TCB_FLAG_SCHED_FIFO (0 << TCB_FLAG_POLICY_SHIFT) /* FIFO scheding policy */ # define TCB_FLAG_SCHED_RR (1 << TCB_FLAG_POLICY_SHIFT) /* Round robin scheding policy */ # define TCB_FLAG_SCHED_SPORADIC (2 << TCB_FLAG_POLICY_SHIFT) /* Sporadic scheding policy */ # define TCB_FLAG_SCHED_OTHER (3 << TCB_FLAG_POLICY_SHIFT) /* Other scheding policy */ -#define TCB_FLAG_CPU_LOCKED (1 << 6) /* Bit 6: Locked to this CPU */ -#define TCB_FLAG_EXIT_PROCESSING (1 << 7) /* Bit 7: Exitting */ - /* Bits 8-15: Available */ +#define TCB_FLAG_CPU_LOCKED (1 << 7) /* Bit 7: Locked to this CPU */ +#define TCB_FLAG_EXIT_PROCESSING (1 << 8) /* Bit 8: Exitting */ + /* Bits 9-15: Available */ /* Values for struct task_group tg_flags */ @@ -322,6 +323,17 @@ struct child_status_s }; #endif +/* struct pthread_cleanup_s ******************************************************/ +/* This structure describes one element of the pthread cleanup stack */ + +#ifdef CONFIG_PTHREAD_CLEANUP +struct pthread_cleanup_s +{ + pthread_cleanup_t pc_cleaner; /* Cleanup callback address */ + FAR void *pc_arg; /* Argument that accompanies the callback */ +}; +#endif + /* struct dspace_s ***************************************************************/ /* This structure describes a reference counted D-Space region. This must be a * separately allocated "break-away" structure that can be owned by a task and @@ -571,6 +583,9 @@ struct tcb_s #ifdef CONFIG_SMP int16_t irqcount; /* 0=interrupts enabled */ #endif +#ifdef CONFIG_CANCELLATION_POINTS + int16_t cpcount; /* Nested cancellation point count */ +#endif #if CONFIG_RR_INTERVAL > 0 || defined(CONFIG_SCHED_SPORADIC) int32_t timeslice; /* RR timeslice OR Sporadic budget */ @@ -682,6 +697,17 @@ struct pthread_tcb_s pthread_addr_t arg; /* Startup argument */ FAR void *joininfo; /* Detach-able info to support join */ + /* Clean-up stack *************************************************************/ + +#ifdef CONFIG_PTHREAD_CLEANUP + /* tos - The index to the next avaiable entry at the top of the stack. + * stack - The pre-allocated clean-up stack memory. + */ + + uint8_t tos; + struct pthread_cleanup_s stack[CONFIG_PTHREAD_CLEANUP_STACKSIZE]; +#endif + /* POSIX Thread Specific Data *************************************************/ #if CONFIG_NPTHREAD_KEYS > 0 diff --git a/include/nuttx/sched_note.h b/include/nuttx/sched_note.h index 47c028b617d..bd1091e9503 100644 --- a/include/nuttx/sched_note.h +++ b/include/nuttx/sched_note.h @@ -76,35 +76,35 @@ enum note_type_e { - NOTE_START = 0, - NOTE_STOP, - NOTE_SUSPEND, - NOTE_RESUME + NOTE_START = 0, + NOTE_STOP = 1, + NOTE_SUSPEND = 2, + NOTE_RESUME = 3 #ifdef CONFIG_SMP , - NOTE_CPU_START, - NOTE_CPU_STARTED, - NOTE_CPU_PAUSE, - NOTE_CPU_PAUSED, - NOTE_CPU_RESUME, - NOTE_CPU_RESUMED + NOTE_CPU_START = 4, + NOTE_CPU_STARTED = 5, + NOTE_CPU_PAUSE = 6, + NOTE_CPU_PAUSED = 7, + NOTE_CPU_RESUME = 8, + NOTE_CPU_RESUMED = 9 #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION , - NOTE_PREEMPT_LOCK, - NOTE_PREEMPT_UNLOCK + NOTE_PREEMPT_LOCK = 10, + NOTE_PREEMPT_UNLOCK = 11 #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_CSECTION , - NOTE_CSECTION_ENTER, - NOTE_CSECTION_LEAVE + NOTE_CSECTION_ENTER = 12, + NOTE_CSECTION_LEAVE = 13 #endif #ifdef CONFIG_SCHED_INSTRUMENTATION_SPINLOCKS , - NOTE_SPINLOCK_LOCK, - NOTE_SPINLOCK_LOCKED, - NOTE_SPINLOCK_UNLOCK, - NOTE_SPINLOCK_ABORT + NOTE_SPINLOCK_LOCK = 14, + NOTE_SPINLOCK_LOCKED = 15, + NOTE_SPINLOCK_UNLOCK = 16, + NOTE_SPINLOCK_ABORT = 17 #endif }; diff --git a/include/nuttx/sercomm/msgb.h b/include/nuttx/sercomm/msgb.h deleted file mode 100644 index 39067c3ba39..00000000000 --- a/include/nuttx/sercomm/msgb.h +++ /dev/null @@ -1,218 +0,0 @@ -/**************************************************************************** - * (C) 2008-2010 by Harald Welte - * - * This source code is derivated from Osmocom-BB project and was - * relicensed as BSD with permission from original authors. - * - * 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_SERCOM_MSGB_H -#define __INCLUDE_NUTTX_SERCOM_MSGB_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -struct msgb -{ - struct llist_head list; - - /* the layer 1 header, if any */ - - unsigned char *l1h; - - /* the A-bis layer 2 header: OML, RSL(RLL), NS */ - - unsigned char *l2h; - - /* the layer 3 header. For OML: FOM; RSL: 04.08; GPRS: BSSGP */ - - unsigned char *l3h; - - uint16_t data_len; - uint16_t len; - - unsigned char *head; /* start of buffer */ - unsigned char *tail; /* end of message */ - unsigned char *data; /* start of message */ - unsigned char _data[0]; -}; - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -struct msgb *msgb_alloc(uint16_t size, const char *name); -void msgb_free(struct msgb *m); -void msgb_enqueue(struct llist_head *queue, struct msgb *msg); -struct msgb *msgb_dequeue(struct llist_head *queue); -void msgb_reset(struct msgb *m); - -/**************************************************************************** - * Inline Functions - ****************************************************************************/ - -#define msgb_l1(m) ((void *)(m->l1h)) -#define msgb_l2(m) ((void *)(m->l2h)) -#define msgb_l3(m) ((void *)(m->l3h)) - -static inline unsigned int msgb_l1len(const struct msgb *msgb) -{ - return msgb->tail - (uint8_t *)msgb_l1(msgb); -} - -static inline unsigned int msgb_l2len(const struct msgb *msgb) -{ - return msgb->tail - (uint8_t *)msgb_l2(msgb); -} - -static inline unsigned int msgb_l3len(const struct msgb *msgb) -{ - return msgb->tail - (uint8_t *)msgb_l3(msgb); -} - -static inline unsigned int msgb_headlen(const struct msgb *msgb) -{ - return msgb->len - msgb->data_len; -} - -static inline int msgb_tailroom(const struct msgb *msgb) -{ - return (msgb->head + msgb->data_len) - msgb->tail; -} - -static inline unsigned char *msgb_put(struct msgb *msgb, unsigned int len) -{ - unsigned char *tmp = msgb->tail; - - /* we intentionally call cons_puts() here to display an allocation - * failure on the _other_ serial port (i.e. the one that doesn't - * have the HDLC layer on it - */ - - if (msgb_tailroom(msgb) < len) - { - cons_puts("msgb_tailroom insufficient!\n"); - } - - msgb->tail += len; - msgb->len += len; - return tmp; -} - -static inline void msgb_put_u8(struct msgb *msgb, uint8_t word) -{ - uint8_t *space = msgb_put(msgb, 1); - space[0] = word & 0xFF; -} - -static inline void msgb_put_u16(struct msgb *msgb, uint16_t word) -{ - uint8_t *space = msgb_put(msgb, 2); - space[0] = word >> 8 & 0xFF; - space[1] = word & 0xFF; -} - -static inline void msgb_put_u32(struct msgb *msgb, uint32_t word) -{ - uint8_t *space = msgb_put(msgb, 4); - space[0] = word >> 24 & 0xFF; - space[1] = word >> 16 & 0xFF; - space[2] = word >> 8 & 0xFF; - space[3] = word & 0xFF; -} - -static inline unsigned char *msgb_get(struct msgb *msgb, unsigned int len) -{ - unsigned char *tmp = msgb->data; - msgb->data += len; - msgb->len -= len; - return tmp; -} - -static inline uint8_t msgb_get_u8(struct msgb *msgb) -{ - uint8_t *space = msgb_get(msgb, 1); - return space[0]; -} - -static inline uint16_t msgb_get_u16(struct msgb *msgb) -{ - uint8_t *space = msgb_get(msgb, 2); - return space[0] << 8 | space[1]; -} - -static inline uint32_t msgb_get_u32(struct msgb *msgb) -{ - uint8_t *space = msgb_get(msgb, 4); - return space[0] << 24 | space[1] << 16 | space[2] << 8 | space[3]; -} - -static inline unsigned char *msgb_push(struct msgb *msgb, unsigned int len) -{ - msgb->data -= len; - msgb->len += len; - return msgb->data; -} - -static inline unsigned char *msgb_pull(struct msgb *msgb, unsigned int len) -{ - msgb->len -= len; - return msgb->data += len; -} - -/* increase the headroom of an empty msgb, reducing the tailroom */ - -static inline void msgb_reserve(struct msgb *msg, int len) -{ - msg->data += len; - msg->tail += len; -} - -static inline struct msgb *msgb_alloc_headroom(int size, int headroom, - const char *name) -{ - struct msgb *msg = msgb_alloc(size, name); - if (msg) - { - msgb_reserve(msg, headroom); - } - - return msg; -} - -#endif /* __INCLUDE_NUTTX_SERCOM_MSGB_H */ diff --git a/include/nuttx/sercomm/sercomm.h b/include/nuttx/sercomm/sercomm.h deleted file mode 100644 index 260f1be57b8..00000000000 --- a/include/nuttx/sercomm/sercomm.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef __INCLUDE_NUTTX_SERCOMM_SERCOMM_H -#define __INCLUDE_NUTTX_SERCOMM_SERCOMM_H - -/* SERCOMM layer on UART1 (modem UART) */ - -#include - -#define SERCOMM_UART_NR 1 - -#define HDLC_FLAG 0x7E -#define HDLC_ESCAPE 0x7D - -#define HDLC_C_UI 0x03 -#define HDLC_C_P_BIT (1 << 4) -#define HDLC_C_F_BIT (1 << 4) - -/* a low sercomm_dlci means high priority. A high DLCI means low priority */ -enum sercomm_dlci { - SC_DLCI_HIGHEST = 0, - SC_DLCI_DEBUG = 4, - SC_DLCI_L1A_L23 = 5, - SC_DLCI_LOADER = 9, - SC_DLCI_CONSOLE = 10, - SC_DLCI_ECHO = 128, - _SC_DLCI_MAX -}; - -void sercomm_init(void); -int sercomm_initialized(void); - -/* User Interface: Tx */ - -/* user interface for transmitting messages for a given DLCI */ -void sercomm_sendmsg(uint8_t dlci, struct msgb *msg); -/* how deep is the Tx queue for a given DLCI */ -unsigned int sercomm_tx_queue_depth(uint8_t dlci); - -/* User Interface: Rx */ - -/* receiving messages for a given DLCI */ -typedef void (*dlci_cb_t)(uint8_t dlci, struct msgb *msg); -int sercomm_register_rx_cb(uint8_t dlci, dlci_cb_t cb); - -/* Driver Interface */ - -/* fetch one octet of to-be-transmitted serial data. returns 0 if no more data */ -int sercomm_drv_pull(uint8_t *ch); -/* the driver has received one byte, pass it into sercomm layer. - returns 1 in case of success, 0 in case of unrecognized char */ -int sercomm_drv_rx_char(uint8_t ch); - -static inline struct msgb *sercomm_alloc_msgb(unsigned int len) -{ - return msgb_alloc_headroom(len+4, 4, "sercomm_tx"); -} - -#endif /* __INCLUDE_NUTTX_SERCOMM_SERCOMM_H */ diff --git a/include/nuttx/sercomm/sercomm_cons.h b/include/nuttx/sercomm/sercomm_cons.h deleted file mode 100644 index eb8e7fa12bd..00000000000 --- a/include/nuttx/sercomm/sercomm_cons.h +++ /dev/null @@ -1,10 +0,0 @@ -#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 - -int sercomm_puts(const char *s); -int sercomm_putchar(int c); - -#endif /* __INCLUDE_NUTTX_SERCOMM_SERCOMM_CONS_H */ diff --git a/include/nuttx/spinlock.h b/include/nuttx/spinlock.h index 44b907bc61d..3798e177ff5 100644 --- a/include/nuttx/spinlock.h +++ b/include/nuttx/spinlock.h @@ -145,15 +145,16 @@ spinlock_t up_testset(volatile FAR spinlock_t *lock); * Initialize a non-reentrant spinlock object to its initial, unlocked state. * * Input Parameters: - * lock - A reference to the spinlock object to be initialized. + * lock - A reference to the spinlock object to be initialized. + * state - Initial state of the spinlock {SP_LOCKED or SP_UNLOCKED) * * Returned Value: * None. * ****************************************************************************/ -/* void spin_initialize(FAR spinlock_t *lock); */ -#define spin_initialize(i) do { (l) = SP_UNLOCKED; } while (0) +/* void spin_initialize(FAR spinlock_t *lock, spinlock_t state); */ +#define spin_initialize(l,s) do { *(l) = (s); } while (0) /**************************************************************************** * Name: spin_initializer @@ -329,7 +330,7 @@ void spin_unlockr(FAR struct spinlock_s *lock); * Input Parameters: * set - A reference to the bitset to set the CPU bit in * cpu - The bit number to be set - * setlock - A reference to the lock lock protecting the set + * setlock - A reference to the lock protecting the set * orlock - Will be set to SP_LOCKED while holding setlock * * Returned Value: @@ -350,7 +351,7 @@ void spin_setbit(FAR volatile cpu_set_t *set, unsigned int cpu, * Input Parameters: * set - A reference to the bitset to set the CPU bit in * cpu - The bit number to be set - * setlock - A reference to the lock lock protecting the set + * setlock - A reference to the lock protecting the set * orlock - Will be set to SP_UNLOCKED if all bits become cleared in set * * Returned Value: diff --git a/include/nuttx/streams.h b/include/nuttx/streams.h index ffbcffc9ec5..eb7ad678449 100644 --- a/include/nuttx/streams.h +++ b/include/nuttx/streams.h @@ -299,15 +299,13 @@ void lib_rawsistream(FAR struct lib_rawsistream_s *instream, int fd); void lib_rawsostream(FAR struct lib_rawsostream_s *outstream, int fd); /**************************************************************************** - * Name: lib_lowinstream, lib_lowoutstream + * Name: lib_lowoutstream * * Description: - * Initializes a stream for use with low-level, architecture-specific I/O. - * Defined in lib/stdio/lib_lowinstream.c and lib/stdio/lib_lowoutstream.c + * Initializes a stream for use with low-level, architecture-specific output. + * Defined in ib/stdio/lib_lowoutstream.c * * Input parameters: - * lowinstream - User allocated, uninitialized instance of struct - * lib_lowinstream_s to be initialized. * lowoutstream - User allocated, uninitialized instance of struct * lib_lowoutstream_s to be initialized. * @@ -316,9 +314,6 @@ void lib_rawsostream(FAR struct lib_rawsostream_s *outstream, int fd); * ****************************************************************************/ -#ifdef CONFIG_ARCH_LOWGETC -void lib_lowinstream(FAR struct lib_instream_s *lowinstream); -#endif #ifdef CONFIG_ARCH_LOWPUTC void lib_lowoutstream(FAR struct lib_outstream_s *lowoutstream); #endif diff --git a/include/pthread.h b/include/pthread.h index ac495e44c29..d943a843e2f 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -115,11 +115,16 @@ #define PTHREAD_DEFAULT_PRIORITY 100 -/* Cancellation states returned by pthread_cancelstate() */ +/* Cancellation states used by pthread_setcancelstate() */ #define PTHREAD_CANCEL_ENABLE (0) #define PTHREAD_CANCEL_DISABLE (1) +/* Cancellation types used by pthread_setcanceltype() */ + +#define PTHREAD_CANCEL_DEFERRED (0) +#define PTHREAD_CANCEL_ASYNCHRONOUS (1) + /* Thread return value when a pthread is canceled */ #define PTHREAD_CANCELED ((FAR void*)ERROR) @@ -265,6 +270,12 @@ typedef struct pthread_barrier_s pthread_barrier_t; typedef bool pthread_once_t; #define __PTHREAD_ONCE_T_DEFINED 1 +#ifdef CONFIG_PTHREAD_CLEANUP +/* This type describes the pthread cleanup callback (non-standard) */ + +typedef CODE void (*pthread_cleanup_t)(FAR void *arg); +#endif + /* Forward references */ struct sched_param; /* Defined in sched.h */ @@ -334,8 +345,18 @@ int pthread_detach(pthread_t thread); void pthread_exit(pthread_addr_t value) noreturn_function; int pthread_cancel(pthread_t thread); int pthread_setcancelstate(int state, FAR int *oldstate); +int pthread_setcanceltype(int type, FAR int *oldtype); void pthread_testcancel(void); +/* A thread may set up cleanup functions to execut when the thread exits or + * is canceled. + */ + +#ifdef CONFIG_PTHREAD_CLEANUP +void pthread_cleanup_pop(int execute); +void pthread_cleanup_push(pthread_cleanup_t routine, FAR void *arg); +#endif + /* A thread can await termination of another thread and retrieve the return * value of the thread. */ diff --git a/include/sched.h b/include/sched.h index 31526f923e1..f63c42201ae 100644 --- a/include/sched.h +++ b/include/sched.h @@ -54,18 +54,30 @@ /* POSIX-like scheduling policies */ -#define SCHED_FIFO 1 /* FIFO priority scheduling policy */ -#define SCHED_RR 2 /* Round robin scheduling policy */ -#define SCHED_SPORADIC 3 /* Sporadic scheduling policy */ -#define SCHED_OTHER 4 /* Not supported */ +#define SCHED_FIFO 1 /* FIFO priority scheduling policy */ +#define SCHED_RR 2 /* Round robin scheduling policy */ +#define SCHED_SPORADIC 3 /* Sporadic scheduling policy */ +#define SCHED_OTHER 4 /* Not supported */ /* Maximum number of SCHED_SPORADIC replenishments */ -#define SS_REPL_MAX CONFIG_SCHED_SPORADIC_MAXREPL +#define SS_REPL_MAX CONFIG_SCHED_SPORADIC_MAXREPL + +/* Cancellation definitions *****************************************************/ + +/* Cancellation states used by task_setcancelstate() */ + +#define TASK_CANCEL_ENABLE (0) +#define TASK_CANCEL_DISABLE (1) + +/* Cancellation types used by task_setcanceltype() */ + +#define TASK_CANCEL_DEFERRED (0) +#define TASK_CANCEL_ASYNCHRONOUS (1) /* Pthread definitions **********************************************************/ -#define PTHREAD_KEYS_MAX CONFIG_NPTHREAD_KEYS +#define PTHREAD_KEYS_MAX CONFIG_NPTHREAD_KEYS /* CPU affinity mask helpers ***************************************************/ /* These are not standard but are defined for Linux compatibility */ @@ -229,6 +241,10 @@ int task_create(FAR const char *name, int priority, int stack_size, int task_delete(pid_t pid); int task_restart(pid_t pid); +int task_setcancelstate(int state, FAR int *oldstate); +int task_setcanceltype(int type, FAR int *oldtype); +void task_testcancel(void); + /* Task Scheduling Interfaces (based on POSIX APIs) */ int sched_setparam(pid_t pid, const struct sched_param *param); diff --git a/include/sys/syscall.h b/include/sys/syscall.h index d0bfcd95977..8da2d8f968a 100644 --- a/include/sys/syscall.h +++ b/include/sys/syscall.h @@ -128,8 +128,16 @@ # define SYS_task_delete __SYS_task_delete # define SYS_task_restart (__SYS_task_delete+1) -# define SYS_up_assert (__SYS_task_delete+2) -# define __SYS_vfork (__SYS_task_delete+3) +# define SYS_task_setcancelstate (__SYS_task_delete+2) +# define SYS_up_assert (__SYS_task_delete+3) + +# ifdef CONFIG_CANCELLATION_POINTS +# define SYS_task_setcanceltype (__SYS_task_delete+4) +# define SYS_task_testcancel (__SYS_task_delete+5) +# define __SYS_vfork (__SYS_task_delete+6) +# else +# define __SYS_vfork (__SYS_task_delete+4) +# endif /* The following can be individually enabled */ @@ -400,27 +408,35 @@ # define SYS_pthread_mutex_trylock (__SYS_pthread+20) # define SYS_pthread_mutex_unlock (__SYS_pthread+21) # define SYS_pthread_once (__SYS_pthread+22) -# define SYS_pthread_setcancelstate (__SYS_pthread+23) -# define SYS_pthread_setschedparam (__SYS_pthread+24) -# define SYS_pthread_setschedprio (__SYS_pthread+25) -# define SYS_pthread_setspecific (__SYS_pthread+26) -# define SYS_pthread_yield (__SYS_pthread+27) +# define SYS_pthread_setschedparam (__SYS_pthread+23) +# define SYS_pthread_setschedprio (__SYS_pthread+24) +# define SYS_pthread_setspecific (__SYS_pthread+25) +# define SYS_pthread_yield (__SYS_pthread+26) +# define __SYS_pthread_smp (__SYS_pthread+27) -# ifndef CONFIG_SMP -# define SYS_pthread_setaffinity_np (__SYS_pthread+28) -# define SYS_pthread_getaffinity_np (__SYS_pthread+29) -# define __SYS_pthread_signals (__SYS_pthread+30) +# ifdef CONFIG_SMP +# define SYS_pthread_setaffinity_np (__SYS_pthread_smp+0) +# define SYS_pthread_getaffinity_np (__SYS_pthread_smp+1) +# define __SYS_pthread_signals (__SYS_pthread_smp+2) # else -# define __SYS_pthread_signals (__SYS_pthread+28) +# define __SYS_pthread_signals __SYS_pthread_smp # endif # ifndef CONFIG_DISABLE_SIGNALS # define SYS_pthread_cond_timedwait (__SYS_pthread_signals+0) # define SYS_pthread_kill (__SYS_pthread_signals+1) # define SYS_pthread_sigmask (__SYS_pthread_signals+2) -# define __SYS_mqueue (__SYS_pthread_signals+3) +# define __SYS_pthread_cleanup (__SYS_pthread_signals+3) # else -# define __SYS_mqueue __SYS_pthread_signals +# define __SYS_pthread_cleanup __SYS_pthread_signals +# endif + +# ifdef CONFIG_PTHREAD_CLEANUP +# define __SYS_pthread_cleanup_push (__SYS_pthread_cleanup+0) +# define __SYS_pthread_cleanup_pop (__SYS_pthread_cleanup+1) +# define __SYS_mqueue (__SYS_pthread_cleanup+2) +# else +# define __SYS_mqueue __SYS_pthread_cleanup # endif #else diff --git a/include/termios.h b/include/termios.h index 00ff32e5c66..8427cbf5991 100644 --- a/include/termios.h +++ b/include/termios.h @@ -110,8 +110,8 @@ #define HUPCL (1 << 6) /* Bit 6: Hang up on last close */ #define CLOCAL (1 << 7) /* Bit 7: Ignore modem status lines */ #define CCTS_OFLOW (1 << 8) /* Bit 8: CTS flow control of output */ -#define CRTSCTS CCTS_OFLOW #define CRTS_IFLOW (1 << 9) /* Bit 9: RTS flow control of input */ +#define CRTSCTS (CRTS_IFLOW | CCTS_OFLOW) /* Local Modes (c_lflag in the termios structure) */ diff --git a/libc/Kconfig b/libc/Kconfig index 757b115d81f..c33aa553e58 100644 --- a/libc/Kconfig +++ b/libc/Kconfig @@ -61,6 +61,12 @@ config LIBC_LONG_LONG libraries that will be drawn into the build if long long support is enabled. +config LIBC_SCANSET + default "Scanset support" + default n + ---help--- + Add scanset support to sscanf(). + config LIBC_IOCTL_VARIADIC bool "Enable variadic ioctl()" default n diff --git a/libc/aio/aio_suspend.c b/libc/aio/aio_suspend.c index 948462cd909..34b7e4a72bd 100644 --- a/libc/aio/aio_suspend.c +++ b/libc/aio/aio_suspend.c @@ -47,27 +47,6 @@ #ifdef CONFIG_FS_AIO -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Configuration ************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/libc/pthread/Make.defs b/libc/pthread/Make.defs index bbb3280959d..f5eab2b9432 100644 --- a/libc/pthread/Make.defs +++ b/libc/pthread/Make.defs @@ -47,6 +47,8 @@ CSRCS += pthread_mutexattr_init.c pthread_mutexattr_destroy.c CSRCS += pthread_mutexattr_getpshared.c pthread_mutexattr_setpshared.c CSRCS += pthread_mutexattr_setprotocol.c pthread_mutexattr_getprotocol.c CSRCS += pthread_mutexattr_settype.c pthread_mutexattr_gettype.c +CSRCS += pthread_setcancelstate.c pthread_setcanceltype.c +CSRCS += pthread_testcancel.c ifeq ($(CONFIG_SMP),y) CSRCS += pthread_attr_getaffinity.c pthread_attr_setaffinity.c diff --git a/libc/pthread/pthread_mutexattr_setprotocol.c b/libc/pthread/pthread_mutexattr_setprotocol.c index 0d128e0480d..44d8be78494 100644 --- a/libc/pthread/pthread_mutexattr_setprotocol.c +++ b/libc/pthread/pthread_mutexattr_setprotocol.c @@ -86,5 +86,4 @@ int pthread_mutexattr_setprotocol(FAR pthread_mutexattr_t *attr, return ENOSYS; #endif - } diff --git a/libc/stdio/lib_lowinstream.c b/libc/pthread/pthread_setcancelstate.c similarity index 67% rename from libc/stdio/lib_lowinstream.c rename to libc/pthread/pthread_setcancelstate.c index ad3231784d5..e81a4440f7a 100644 --- a/libc/stdio/lib_lowinstream.c +++ b/libc/pthread/pthread_setcancelstate.c @@ -1,7 +1,7 @@ /**************************************************************************** - * libc/stdio/lib_lowinstream.c + * libc/pthread/pthread_setcancelstate.c * - * Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,64 +39,54 @@ #include -#include -#include +#include +#include #include -#include - -#include "libc.h" - -#ifdef CONFIG_ARCH_LOWGETC - /**************************************************************************** - * Private Functions + * Public Functions ****************************************************************************/ +/* These are defined in different header files but must have the same values. */ -/**************************************************************************** - * Name: lowinstream_getc - ****************************************************************************/ +#if PTHREAD_CANCEL_ENABLE != TASK_CANCEL_ENABLE +# error We must have PTHREAD_CANCEL_ENABLE == TASK_CANCEL_ENABLE +#endif -static int lowinstream_getc(FAR struct lib_instream_s *this) -{ - int ret; - - DEBUGASSERT(this); - - /* Get the next character from the incoming stream */ - - ret = up_getc(ch); - if (ret != EOF) - { - this->nget++; - } - - return ret; -} +#if PTHREAD_CANCEL_DISABLE != TASK_CANCEL_DISABLE +# error We must have PTHREAD_CANCEL_DISABLE == TASK_CANCEL_DISABLE +#endif /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: lib_lowinstream + * Name: pthread_setcancelstate * * Description: - * Initializes a stream for use with low-level, architecture-specific I/O. + * The pthread_setcancelstate() function atomically both sets the calling + * thread's cancelability state to the indicated state and returns the + * previous cancelability state at the location referenced by oldstate. + * Legal values for state are PTHREAD_CANCEL_ENABLE and + * PTHREAD_CANCEL_DISABLE. * - * Input parameters: - * stream - User allocated, uninitialized instance of struct - * lib_lowinstream_s to be initialized. - * - * Returned Value: - * None (User allocated instance initialized). + * The cancelability state and type of any newly created threads, + * including the thread in which main() was first invoked, are + * PTHREAD_CANCEL_ENABLE and PTHREAD_CANCEL_DEFERRED respectively. * ****************************************************************************/ -void lib_lowinstream(FAR struct lib_instream_s *stream) +int pthread_setcancelstate(int state, FAR int *oldstate) { - stream->get = lowinstream_getc; - stream->nget = 0; -} + int ret; -#endif /* CONFIG_ARCH_LOWGETC */ + /* task_setcancelstate() can do this */ + + ret = task_setcancelstate(state, oldstate); + if (ret < 0) + { + ret = errno; + } + + return ret; +} diff --git a/arch/arm/src/lpc11xx/lpc11_getc.c b/libc/pthread/pthread_setcanceltype.c similarity index 66% rename from arch/arm/src/lpc11xx/lpc11_getc.c rename to libc/pthread/pthread_setcanceltype.c index f809e9d3438..583376dfcc5 100644 --- a/arch/arm/src/lpc11xx/lpc11_getc.c +++ b/libc/pthread/pthread_setcanceltype.c @@ -1,7 +1,7 @@ /**************************************************************************** - * arch/arm/src/lpc11/lpc11_getc.c + * libc/pthread/pthread_setcanceltype.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -37,26 +37,23 @@ * Included Files ****************************************************************************/ -#include - -#include - -#include "up_arch.h" - -#include "lpc11_getc.h" +#include +#include +#include /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +/* The following are defined in different header files but must have the + * same values. + */ -/* Select UART parameters for the selected console */ +#if PTHREAD_CANCEL_DEFERRED != TASK_CANCEL_DEFERRED +# error We must have PTHREAD_CANCEL_DEFERRED == TASK_CANCEL_DEFERRED +#endif -#if defined(CONFIG_UART0_SERIAL_CONSOLE) -# define CONSOLE_BASE LPC11_UART0_BASE -#elif defined(CONFIG_UART1_SERIAL_CONSOLE) -# define CONSOLE_BASE LPC11_UART1_BASE -#elif defined(CONFIG_UART2_SERIAL_CONSOLE) -# define CONSOLE_BASE LPC11_UART2_BASE +#if PTHREAD_CANCEL_ASYNCHRONOUS != TASK_CANCEL_ASYNCHRONOUS +# error We must have PTHREAD_CANCEL_ASYNCHRONOUS == TASK_CANCEL_ASYNCHRONOUS #endif /**************************************************************************** @@ -64,32 +61,32 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_getc + * Name: pthread_setcancelstate * * Description: - * Input one byte from the serial console. + * The pthread_setcanceltype() function atomically both sets the calling + * thread's cancelability type to the indicated type and returns the + * previous cancelability type at the location referenced by oldtype + * Legal values for type are PTHREAD_CANCEL_DEFERRED and + * PTHREAD_CANCEL_ASYNCHRONOUS. * - * REVIST: If used with the serial driver enabled, then this could - * interfere with the serial driver operations. Serial interrupts should - * be disabled when this function executes in that case. + * The cancelability state and type of any newly created threads, + * including the thread in which main() was first invoked, are + * PTHREAD_CANCEL_ENABLE and PTHREAD_CANCEL_DEFERRED respectively. * ****************************************************************************/ -int up_getc(void) +int pthread_setcanceltype(int type, FAR int *oldtype) { - uint8_t ch = 0; + int ret; -#if defined HAVE_UART && defined HAVE_SERIAL_CONSOLE - /* Wait while the Receiver Data Ready (RDR) is indicating a "empty" FIFO to - * assure that we have data in the buffer to read. - */ + /* task_setcanceltype() can do this */ - while ((getreg32(CONSOLE_BASE+LPC11_UART_LSR_OFFSET) & UART_LSR_RDR) == 0); + ret = task_setcanceltype(type, oldtype); + if (ret < 0) + { + ret = errno; + } - /* Then read a character from the UART data register */ - - ch = getreg8(CONSOLE_BASE+LPC11_UART_RBR_OFFSET); -#endif - - return (int)ch; + return ret; } diff --git a/arch/arm/src/stm32/stm32_getc.h b/libc/pthread/pthread_testcancel.c similarity index 70% rename from arch/arm/src/stm32/stm32_getc.h rename to libc/pthread/pthread_testcancel.c index 651165fba5e..c5bf14aec42 100644 --- a/arch/arm/src/stm32/stm32_getc.h +++ b/libc/pthread/pthread_testcancel.c @@ -1,5 +1,5 @@ -/************************************************************************************ - * arch/arm/src/stm32/stm32_getc.h +/**************************************************************************** + * libc/pthread/pthread_testcancel.c * * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -31,17 +31,32 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************************************/ + ****************************************************************************/ -#ifndef __ARCH_ARM_SRC_STM32_STM32_GETC_H -#define __ARCH_ARM_SRC_STM32_STM32_GETC_H - -/************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************/ + ****************************************************************************/ -#include +#include +#include -#include "chip.h" +/**************************************************************************** + * Public Functions + ****************************************************************************/ -#endif /* __ARCH_ARM_SRC_STM32_STM32_GETC_H */ +/**************************************************************************** + * Name: pthread_testcancel + * + * Description: + * The pthread_testcancel() function creates a cancellation point in the + * calling thread. The pthread_testcancel() function has no effect if + * cancelability is disabled + * + ****************************************************************************/ + +void pthread_testcancel(void) +{ + /* task_testcancel() does the real work */ + + task_testcancel(); +} diff --git a/libc/sched/Make.defs b/libc/sched/Make.defs index eeb4be1c1bb..5d875d3eac6 100644 --- a/libc/sched/Make.defs +++ b/libc/sched/Make.defs @@ -37,6 +37,10 @@ CSRCS += sched_getprioritymax.c sched_getprioritymin.c +ifneq ($(CONFIG_CANCELLATION_POINTS),y) +CSRCS += task_setcanceltype.c task_testcancel.c +endif + ifeq ($(CONFIG_SMP),y) CSRCS += sched_cpucount.c endif diff --git a/configs/compal_e86/src/boot.c b/libc/sched/task_setcanceltype.c similarity index 64% rename from configs/compal_e86/src/boot.c rename to libc/sched/task_setcanceltype.c index 8c214a004c3..d43f5d9d30c 100644 --- a/configs/compal_e86/src/boot.c +++ b/libc/sched/task_setcanceltype.c @@ -1,8 +1,8 @@ /**************************************************************************** - * configs/compal_e86/boot.c + * libc/sched/task_setcanceltype.c * - * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * 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 @@ -37,39 +37,38 @@ * Included Files ****************************************************************************/ -#include -#include +#include +#include /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: board_app_initialize + * Name: task_setcancelstate * * Description: - * Perform architecture specific initialization + * The task_setcanceltype() function atomically both sets the calling + * task's cancelability type to the indicated type and returns the + * previous cancelability type at the location referenced by oldtype + * Legal values for type are TASK_CANCEL_DEFERRED and + * TASK_CANCEL_ASYNCHRONOUS. * - * Input Parameters: - * arg - The boardctl() argument is passed to the board_app_initialize() - * implementation without modification. The argument has no - * meaning to NuttX; the meaning of the argument is a contract - * between the board-specific initalization logic and the the - * matching application logic. The value cold be such things as a - * mode enumeration value, a set of DIP switch switch settings, a - * pointer to configuration data read from a file or serial FLASH, - * or whatever you would like to do with it. Every implementation - * should accept zero/NULL as a default configuration. - * - * Returned Value: - * Zero (OK) is returned on success; a negated errno value is returned on - * any failure to indicate the nature of the failure. + * The cancelability state and type of any newly created tasks are + * TASK_CANCEL_ENABLE and TASK_CANCEL_DEFERRED respectively. * ****************************************************************************/ -#ifdef CONFIG_LIB_BOARDCTL -int board_app_initialize(uintptr_t arg) +int task_setcanceltype(int type, FAR int *oldtype) { - return 0; + /* Return the current type if so requrested */ + + if (oldtype != NULL) + { + *oldtype = TASK_CANCEL_ASYNCHRONOUS; + } + + /* Check the requested cancellation type */ + + return (type == TASK_CANCEL_ASYNCHRONOUS) ? OK : ENOSYS; } -#endif /* CONFIG_LIB_BOARDCTL */ diff --git a/arch/arm/include/calypso/armio.h b/libc/sched/task_testcancel.c similarity index 76% rename from arch/arm/include/calypso/armio.h rename to libc/sched/task_testcancel.c index 2f232beb22a..0d99dbebbc2 100644 --- a/arch/arm/include/calypso/armio.h +++ b/libc/sched/task_testcancel.c @@ -1,8 +1,8 @@ /**************************************************************************** - * Driver for Calypso ARMIO + * libc/sched/task_testcancel.c * - * Copyright (C) 2011 Stefan Richter. All rights reserved. - * Author: Stefan Richter + * 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 @@ -33,17 +33,26 @@ * ****************************************************************************/ -#include -#include - /**************************************************************************** - * Prototypes for interrupt handling + * Included Files ****************************************************************************/ -inline int calypso_kbd_irq(int irq, uint32_t *regs); +#include /**************************************************************************** - * Initialize device, add /dev/... nodes + * Public Functions ****************************************************************************/ -void calypso_armio(void); +/**************************************************************************** + * Name: task_testcancel + * + * Description: + * The task_testcancel() function creates a cancellation point in the + * calling thread. The task_testcancel() function has no effect if + * cancelability is disabled + * + ****************************************************************************/ + +void task_testcancel(void) +{ +} diff --git a/libc/stdio/Make.defs b/libc/stdio/Make.defs index f308266d656..f6220671c9d 100644 --- a/libc/stdio/Make.defs +++ b/libc/stdio/Make.defs @@ -41,7 +41,7 @@ CSRCS += lib_fileno.c lib_printf.c lib_sprintf.c lib_asprintf.c CSRCS += lib_snprintf.c lib_libsprintf.c lib_vsprintf.c lib_vasprintf.c CSRCS += lib_vsnprintf.c lib_libvsprintf.c lib_dprintf.c lib_vdprintf.c CSRCS += lib_meminstream.c lib_memoutstream.c lib_memsistream.c -CSRCS += lib_memsostream.c lib_lowinstream.c lib_lowoutstream.c +CSRCS += lib_memsostream.c lib_lowoutstream.c CSRCS += lib_zeroinstream.c lib_nullinstream.c lib_nulloutstream.c CSRCS += lib_sscanf.c diff --git a/libc/stdio/lib_sscanf.c b/libc/stdio/lib_sscanf.c index 0bc413295b0..24d3c6d1842 100644 --- a/libc/stdio/lib_sscanf.c +++ b/libc/stdio/lib_sscanf.c @@ -134,6 +134,157 @@ static int findwidth(FAR const char *buf, FAR const char *fmt) return strcspn(buf, spaces); } +/**************************************************************************** + * Function: findscanset + * + * Description: + * Fill in the given table from the scanset at the given format. + * Return a pointer to the character the closing ']'. + * The table has a 1 wherever characters should be considered part of the + * scanset. + * + * Function findscanset based on source function __sccl of FreeBSD + * (https://github.com/lattera/freebsd/blob/master/sys/kern/subr_scanf.c) + * + ****************************************************************************/ + +#ifdef CONFIG_LIBC_SCANSET +static FAR const char *findscanset(FAR const char *fmt, + FAR unsigned char set[32]) +{ + int c; + int n; + int v; + + fmt++; /* Skip '[' */ + + /* first `clear' the whole table */ + + c = *fmt++; /* First char hat => negated scanset */ + if (c == '^') + { + v = 1; /* Default => accept */ + c = *fmt++; /* Get new first char */ + } + else + { + v = 0; /* Default => reject */ + } + + memset(set, 0, 32); + if (c == 0) + { + goto doexit; + } + + /* Now set the entries corresponding to the actual scanset + * to the opposite of the above. + * + * The first character may be ']' (or '-') without being special; + * the last character may be '-'. + */ + + for (;;) + { + set[c / 8] |= (1 << (c % 8)); /* take character c */ + +doswitch: + n = *fmt++; /* and examine the next */ + switch (n) + { + case 0: /* format ended too soon */ + case ']': /* end of scanset */ + goto doexit; + + case '-': + /* A scanset of the form + * + * [01+-] + * + * is defined as "the digit 0, the digit 1, the character +, the + * character -", but the effect of a scanset such as + * + * [a-zA-Z0-9] + * + * is implementation defined. The V7 Unix scanf treats "a-z" as + * "the letters a through z", but treats "a-a" as "the letter a, + * the character -, and the letter a". + * + * For compatibility, the `-' is not considerd to define a range + * if the character following it is either a close bracket + * (required by ANSI) or is not numerically greater than the + * character* we just stored in the table (c). + */ + + n = *fmt; + if (n == ']' || n < c) + { + c = '-'; + break; /* resume the for(;;) */ + } + + fmt++; + do + { + /* Fill in the range */ + + c++; + set[c / 8] |= (1 << (c % 8)); /* Take character c */ + } + while (c < n); + + /* Alas, the V7 Unix scanf also treats formats such as [a-c-e] as + * "the letters a through e". This too is permitted by the + * standard. + */ + + goto doswitch; + + default: /* just another character */ + c = n; + break; + } + } + +doexit: + if (v) /* default => accept */ + { + for (int i = 0; i < 32; i++) /* invert all */ + { + set[i] ^= 0xFF; + } + } + + return (fmt - 1); +} +#endif + +/**************************************************************************** + * Function: scansetwidth + ****************************************************************************/ + +#ifdef CONFIG_LIBC_SCANSET +static int scansetwidth(FAR const char *buf, + FAR const unsigned char set[32]) +{ + FAR const char *next = buf; + int c; + + while (*next) + { + c = *next; + if ((set[c / 8] & (1 << (c % 8))) == 0) + { + break; + } + + next++; + } + + return (next - buf); +} +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -177,6 +328,9 @@ int vsscanf(FAR const char *buf, FAR const char *fmt, va_list ap) int fwidth; int base = 10; char tmp[MAXLN]; +#ifdef CONFIG_LIBC_SCANSET + unsigned char set[32]; /* Bit field (256 / 8) */ +#endif linfo("vsscanf: buf=\"%s\" fmt=\"%s\"\n", buf, fmt); @@ -220,7 +374,11 @@ int vsscanf(FAR const char *buf, FAR const char *fmt, va_list ap) { linfo("vsscanf: Processing %c\n", *fmt); +#ifdef CONFIG_LIBC_SCANSET + if (strchr("dibouxcsefgn[%", *fmt)) +#else if (strchr("dibouxcsefgn%", *fmt)) +#endif { break; } @@ -307,6 +465,72 @@ int vsscanf(FAR const char *buf, FAR const char *fmt, va_list ap) } } +#ifdef CONFIG_LIBC_SCANSET + /* Process %[: Scanset conversion */ + + if (*fmt == '[') + { + linfo("vsscanf: Performing scanset conversion\n"); + + fmt = findscanset(fmt, set); /* find scanset */ + + /* Get a pointer to the char * value. We need to do this even + * if we have reached the end of the input data in order to + * update the 'ap' variable. + */ + + tv = NULL; /* To avoid warnings about begin uninitialized */ + if (!noassign) + { + tv = va_arg(ap, FAR char *); + tv[0] = '\0'; + } + + /* But we only perform the data conversion is we still have + * bytes remaining in the input data stream. + */ + + if (*buf) + { + /* Skip over white space */ + + while (isspace(*buf)) + { + buf++; + } + + /* Guess a field width using some heuristics */ + + fwidth = scansetwidth(buf, set); + + /* Use the actual field's width if 1) no fieldwidth + * specified or 2) the actual field's width is smaller + * than fieldwidth specified + */ + + if (!width || fwidth < width) + { + width = fwidth; + } + + width = MIN(sizeof(tmp) - 1, width); + + /* Copy the string (if we are making an assignment) */ + + if (!noassign) + { + strncpy(tv, buf, width); + tv[width] = '\0'; + count++; + } + + /* Update the buffer pointer past the string in the input */ + + buf += width; + } + } +#endif + /* Process %c: Character conversion */ else if (*fmt == 'c') diff --git a/libc/unistd/lib_usleep.c b/libc/unistd/lib_usleep.c index 5b72bbdcdf7..4e3d4cdb0c4 100644 --- a/libc/unistd/lib_usleep.c +++ b/libc/unistd/lib_usleep.c @@ -43,26 +43,6 @@ #include #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Type Declarations - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/net/socket/accept.c b/net/socket/accept.c index a01f69f6c62..4bf35dc7f21 100644 --- a/net/socket/accept.c +++ b/net/socket/accept.c @@ -1,7 +1,7 @@ /**************************************************************************** * net/socket/accept.c * - * Copyright (C) 2007-2012, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2012, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -48,6 +48,7 @@ #include #include +#include #include #include "tcp/tcp.h" @@ -132,6 +133,10 @@ int psock_accept(FAR struct socket *psock, FAR struct sockaddr *addr, DEBUGASSERT(psock != NULL); + /* Treat as a cancellation point */ + + (void)enter_cancellation_point(); + /* Is the socket a stream? */ if (psock->s_type != SOCK_STREAM) @@ -269,6 +274,8 @@ int psock_accept(FAR struct socket *psock, FAR struct sockaddr *addr, newsock->s_flags |= _SF_CONNECTED; newsock->s_flags &= ~_SF_CLOSED; + + leave_cancellation_point(); return OK; errout_after_accept: @@ -276,6 +283,7 @@ errout_after_accept: errout: set_errno(errcode); + leave_cancellation_point(); return ERROR; } @@ -355,6 +363,10 @@ int accept(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen) int errcode; int ret; + /* accept() is a cancellation point */ + + (void)enter_cancellation_point(); + /* Verify that the sockfd corresponds to valid, allocated socket */ if (psock == NULL || psock->s_crefs <= 0) @@ -402,9 +414,11 @@ int accept(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen) /* The errno value has already been set */ sockfd_release(newfd); + leave_cancellation_point(); return ERROR; } + leave_cancellation_point(); return newfd; errout_with_socket: @@ -412,6 +426,7 @@ errout_with_socket: errout: set_errno(errcode); + leave_cancellation_point(); return ERROR; } diff --git a/net/socket/connect.c b/net/socket/connect.c index 6b83184fd9c..6a0140ea55a 100644 --- a/net/socket/connect.c +++ b/net/socket/connect.c @@ -51,6 +51,7 @@ #include #include +#include #include #include #include @@ -516,6 +517,10 @@ int psock_connect(FAR struct socket *psock, FAR const struct sockaddr *addr, #endif int errcode; + /* Treat as a cancellation point */ + + (void)enter_cancellation_point(); + /* Verify that the psock corresponds to valid, allocated socket */ if (!psock || psock->s_crefs <= 0) @@ -663,10 +668,12 @@ int psock_connect(FAR struct socket *psock, FAR const struct sockaddr *addr, goto errout; } + leave_cancellation_point(); return OK; errout: set_errno(errcode); + leave_cancellation_point(); return ERROR; } @@ -741,13 +748,21 @@ errout: int connect(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen) { + int ret; + + /* accept() is a cancellation point */ + + (void)enter_cancellation_point(); + /* Get the underlying socket structure */ FAR struct socket *psock = sockfd_socket(sockfd); /* Then let psock_connect() do all of the work */ - return psock_connect(psock, addr, addrlen); + ret = psock_connect(psock, addr, addrlen); + leave_cancellation_point(); + return ret; } #endif /* CONFIG_NET */ diff --git a/net/socket/recv.c b/net/socket/recv.c index 412ed6e0d0b..2e590c0b715 100644 --- a/net/socket/recv.c +++ b/net/socket/recv.c @@ -71,6 +71,8 @@ ssize_t recv(int sockfd, FAR void *buf, size_t len, int flags) { + /* recv is a cancellation point, but that can all be handled by recvfrom */ + return recvfrom(sockfd, buf, len, flags, NULL, 0); } diff --git a/net/socket/recvfrom.c b/net/socket/recvfrom.c index e8a029b099a..9a692fea8aa 100644 --- a/net/socket/recvfrom.c +++ b/net/socket/recvfrom.c @@ -57,6 +57,7 @@ #include #include +#include #include #include #include @@ -1851,6 +1852,10 @@ ssize_t psock_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, ssize_t ret; int errcode; + /* Treat as a cancellation point */ + + (void)enter_cancellation_point(); + /* Verify that non-NULL pointers were passed */ #ifdef CONFIG_DEBUG_FEATURES @@ -2013,10 +2018,12 @@ ssize_t psock_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, /* Success return */ + leave_cancellation_point(); return ret; errout: set_errno(errcode); + leave_cancellation_point(); return ERROR; } @@ -2076,6 +2083,11 @@ ssize_t recvfrom(int sockfd, FAR void *buf, size_t len, int flags, FAR struct sockaddr *from, FAR socklen_t *fromlen) { FAR struct socket *psock; + ssize_t ret; + + /* recvfrom() is a cancellation point */ + + (void)enter_cancellation_point(); /* Get the underlying socket structure */ @@ -2083,7 +2095,9 @@ ssize_t recvfrom(int sockfd, FAR void *buf, size_t len, int flags, /* Then let psock_recvfrom() do all of the work */ - return psock_recvfrom(psock, buf, len, flags, from, fromlen); + ret = psock_recvfrom(psock, buf, len, flags, from, fromlen); + leave_cancellation_point(); + return ret; } #endif /* CONFIG_NET */ diff --git a/net/socket/send.c b/net/socket/send.c index 60b19ab296f..e90b27b116a 100644 --- a/net/socket/send.c +++ b/net/socket/send.c @@ -1,7 +1,7 @@ /**************************************************************************** * net/socket/send.c * - * Copyright (C) 2007-2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -43,6 +43,8 @@ #include #include +#include + #include "tcp/tcp.h" #include "udp/udp.h" #include "pkt/pkt.h" @@ -122,6 +124,10 @@ ssize_t psock_send(FAR struct socket *psock, FAR const void *buf, size_t len, { int ret; + /* Treat as a cancellation point */ + + (void)enter_cancellation_point(); + switch (psock->s_type) { #if defined(CONFIG_NET_PKT) @@ -192,6 +198,7 @@ ssize_t psock_send(FAR struct socket *psock, FAR const void *buf, size_t len, break; } + leave_cancellation_point(); return ret; } @@ -261,5 +268,20 @@ ssize_t psock_send(FAR struct socket *psock, FAR const void *buf, size_t len, ssize_t send(int sockfd, FAR const void *buf, size_t len, int flags) { - return psock_send(sockfd_socket(sockfd), buf, len, flags); + FAR struct socket *psock; + ssize_t ret; + + /* send() is a cancellation point */ + + (void)enter_cancellation_point(); + + /* Get the underlying socket structure */ + + psock = sockfd_socket(sockfd); + + /* And let psock_send do all of the work */ + + ret = psock_send(psock, buf, len, flags); + leave_cancellation_point(); + return ret; } diff --git a/net/socket/sendto.c b/net/socket/sendto.c index 79eb93e68fa..db51b73c79a 100644 --- a/net/socket/sendto.c +++ b/net/socket/sendto.c @@ -45,6 +45,7 @@ #include #include +#include #include #include "udp/udp.h" @@ -309,6 +310,11 @@ ssize_t sendto(int sockfd, FAR const void *buf, size_t len, int flags, FAR const struct sockaddr *to, socklen_t tolen) { FAR struct socket *psock; + ssize_t ret; + + /* sendto() is a cancellation point */ + + (void)enter_cancellation_point(); /* Get the underlying socket structure */ @@ -316,5 +322,7 @@ ssize_t sendto(int sockfd, FAR const void *buf, size_t len, int flags, /* And let psock_sendto do all of the work */ - return psock_sendto(psock, buf, len, flags, to, tolen); + ret = psock_sendto(psock, buf, len, flags, to, tolen); + leave_cancellation_point(); + return ret; } diff --git a/sched/Kconfig b/sched/Kconfig index 4b0e068e6fb..ecfe78addd6 100644 --- a/sched/Kconfig +++ b/sched/Kconfig @@ -249,7 +249,6 @@ menu "Tasks and Scheduling" config SPINLOCK bool "Support Spinlocks" default n - depends on EXPERIMENTAL ---help--- Enables suppport for spinlocks. Spinlocks are current used only for SMP suppport. @@ -537,8 +536,37 @@ config NPTHREAD_KEYS The number of items of thread- specific data that can be retained +config PTHREAD_CLEANUP + bool "pthread cleanup stack" + default n + ---help--- + Select to enable support for pthread exit cleanup stacks. This + enables the interfaces pthread_cleanup_push() and + pthread_cleanup_pop(). + +config PTHREAD_CLEANUP_STACKSIZE + int "pthread cleanup stack size" + default 1 + range 1 32 + depends on PTHREAD_CLEANUP + ---help--- + The maximum number of cleanup actions that may be pushed by + pthread_clean_push(). This setting will increase the size of EVERY + pthread task control block by about n * CONFIG_PTHREAD_CLEANUP_STACKSIZE + where n is the size of a pointer, 2* sizeof(uintptr_t), this would be + 8 for a CPU with 32-bit addressing and 4 for a CPU with 16-bit + addressing. + endmenu # Pthread Options +config CANCELLATION_POINTS + bool "Cancellation points" + default n + ---help--- + Enable POSIX cancellation points for pthread_cancel(). If selected, + cancellation points will also used with the () task_delete() API even if + pthreads are not enabled. + menu "Performance Monitoring" config SCHED_CPULOAD diff --git a/sched/init/os_smpstart.c b/sched/init/os_smpstart.c index ba8afac2ded..17316e5b616 100644 --- a/sched/init/os_smpstart.c +++ b/sched/init/os_smpstart.c @@ -218,6 +218,13 @@ int os_smp_start(void) */ up_initial_state(tcb); + + /* Set the task flags to indicate that this is a kernel thread and that + * this task is locked to this CPU. + */ + + tcb->flags = (TCB_FLAG_TTYPE_KERNEL | TCB_FLAG_NONCANCELABLE | TCB_FLAG_CPU_LOCKED); + tcb->cpu = cpu; } /* Then start all of the other CPUs after we have completed the memory diff --git a/sched/init/os_start.c b/sched/init/os_start.c index 17e1f40cde9..2d8eb2e6e14 100644 --- a/sched/init/os_start.c +++ b/sched/init/os_start.c @@ -470,10 +470,11 @@ void os_start(void) */ #ifdef CONFIG_SMP - g_idletcb[cpu].cmn.flags = (TCB_FLAG_TTYPE_KERNEL | TCB_FLAG_CPU_LOCKED); + g_idletcb[cpu].cmn.flags = (TCB_FLAG_TTYPE_KERNEL | TCB_FLAG_NONCANCELABLE | + TCB_FLAG_CPU_LOCKED); g_idletcb[cpu].cmn.cpu = cpu; #else - g_idletcb[cpu].cmn.flags = TCB_FLAG_TTYPE_KERNEL; + g_idletcb[cpu].cmn.flags = (TCB_FLAG_TTYPE_KERNEL | TCB_FLAG_NONCANCELABLE); #endif #ifdef CONFIG_SMP diff --git a/sched/irq/irq.h b/sched/irq/irq.h index 69b3d344b39..40473a60108 100644 --- a/sched/irq/irq.h +++ b/sched/irq/irq.h @@ -44,6 +44,7 @@ #include #include +#include #include #include @@ -106,6 +107,33 @@ void weak_function irq_initialize(void); int irq_unexpected_isr(int irq, FAR void *context); +/**************************************************************************** + * Name: irq_cpu_locked + * + * Description: + * Test if the IRQ lock set OR if this CPU holds the IRQ lock + * There is an interaction with pre-emption controls and IRQ locking: + * Even if the pre-emption is enabled, tasks will be forced to pend if + * the IRQ lock is also set UNLESS the CPU starting the task is the + * holder of the IRQ lock. + * + * Inputs: + * rtcb - Points to the blocked TCB that is ready-to-run + * + * Return Value: + * true - IRQs are locked by a different CPU. + * false - IRQs are unlocked OR if they are locked BUT this CPU + * is the holder of the lock. + * + * Warning: This values are volatile at only valid at the instance that + * the CPU set was queried. + * + ****************************************************************************/ + +#ifdef CONFIG_SMP +bool irq_cpu_locked(int cpu); +#endif + #undef EXTERN #ifdef __cplusplus } diff --git a/sched/irq/irq_csection.c b/sched/irq/irq_csection.c index 935cbfd3af4..bf226bf6217 100644 --- a/sched/irq/irq_csection.c +++ b/sched/irq/irq_csection.c @@ -504,39 +504,41 @@ void leave_critical_section(irqstate_t flags) DEBUGASSERT(spin_islocked(&g_cpu_irqlock) && (g_cpu_irqset & (1 << cpu)) != 0); - rtcb->irqcount = 0; - spin_clrbit(&g_cpu_irqset, cpu, &g_cpu_irqsetlock, - &g_cpu_irqlock); + /* Check if releasing the lock held by this CPU will unlock the + * critical section. + */ - /* Have all CPUs released the lock? */ - - if (!spin_islocked(&g_cpu_irqlock)) + if ((g_cpu_irqset & ~(1 << cpu)) == 0) { - /* Check if there are pending tasks and that pre-emption - * is also enabled. - * - * REVISIT: Is there an issue here? up_release_pending() - * must be called from within a critical section but here - * we have just left the critical section. At least we - * still have interrupts disabled on this CPU. + /* Yes.. Check if there are pending tasks and that pre-emption + * is also enabled. This is necessary because we may have + * deferred the up_release_pending() call in sched_unlock() + * because we were within a critical section then. */ if (g_pendingtasks.head != NULL && !spin_islocked(&g_cpu_schedlock)) { /* Release any ready-to-run tasks that have collected - * in g_pendingtasks if the scheduler is not locked. - * - * NOTE: This operation has a very high likelihood of - * causing this task to be switched out! - * - * REVISIT: Should this not be done while we are in the - * critical section. + * in g_pendingtasks. NOTE: This operation has a very + * high likelihood of causing this task to be switched + * out! */ up_release_pending(); } } + + /* Now, possibly on return from a context switch, clear our + * count on the lock. If all CPUs have released the lock, + * then unlock the global IRQ spinlock. + */ + + rtcb->irqcount = 0; + spin_clrbit(&g_cpu_irqset, cpu, &g_cpu_irqsetlock, + &g_cpu_irqlock); + + /* Have all CPUs released the lock? */ } } } @@ -570,4 +572,78 @@ void leave_critical_section(irqstate_t flags) } #endif -#endif /* CONFIG_SMP || CONFIG_SCHED_INSTRUMENTATION_CSECTION*/ +/**************************************************************************** + * Name: irq_cpu_locked + * + * Description: + * Test if the IRQ lock set OR if this CPU holds the IRQ lock + * There is an interaction with pre-emption controls and IRQ locking: + * Even if the pre-emption is enabled, tasks will be forced to pend if + * the IRQ lock is also set UNLESS the CPU starting the task is the + * holder of the IRQ lock. + * + * Inputs: + * rtcb - Points to the blocked TCB that is ready-to-run + * + * Return Value: + * true - IRQs are locked by a different CPU. + * false - IRQs are unlocked OR if they are locked BUT this CPU + * is the holder of the lock. + * + * Warning: This values are volatile at only valid at the instance that + * the CPU set was queried. + * + ****************************************************************************/ + +#ifdef CONFIG_SMP +bool irq_cpu_locked(int cpu) +{ + cpu_set_t irqset; + + /* g_cpu_irqset is not valid in early phases of initialization */ + + if (g_os_initstate < OSINIT_OSREADY) + { + /* We are still single threaded. In either state of g_cpu_irqlock, + * the correct return value should always be false. + */ + + return false; + } + + /* Test if g_cpu_irqlock is locked. We don't really need to use check + * g_cpu_irqlock to do this, we can use the g_cpu_set. + * + * Sample the g_cpu_irqset once. That is an atomic operation. All + * subsequent operations will operate on the sampled cpu set. + */ + + irqset = (cpu_set_t)g_cpu_irqset; + if (irqset != 0) + { + /* Some CPU holds the lock. So g_cpu_irqlock should be locked. + * Return false if the 'cpu' is the holder of the lock; return + * true if g_cpu_irqlock is locked, but this CPU is not the + * holder of the lock. + */ + + return ((irqset & (1 << cpu)) == 0); + } + + /* No CPU holds the lock */ + + else + { + /* In this case g_cpu_irqlock should be unlocked. However, if + * the lock was established in the interrupt handler AND there are + * no bits set in g_cpu_irqset, that probabaly means only that + * critical section was established from an interrupt handler. + * Return false in either case. + */ + + return false; + } +} +#endif + +#endif /* CONFIG_SMP || CONFIG_SCHED_INSTRUMENTATION_CSECTION */ diff --git a/sched/mqueue/mq_rcvinternal.c b/sched/mqueue/mq_rcvinternal.c index c260c1183dd..91701e5e076 100644 --- a/sched/mqueue/mq_rcvinternal.c +++ b/sched/mqueue/mq_rcvinternal.c @@ -50,6 +50,7 @@ #include #include +#include #include "sched/sched.h" #include "mqueue/mqueue.h" @@ -141,6 +142,23 @@ FAR struct mqueue_msg_s *mq_waitreceive(mqd_t mqdes) FAR struct mqueue_inode_s *msgq; FAR struct mqueue_msg_s *rcvmsg; + /* mq_waitreceive() is not a cancellation point, but it is always called + * from a cancellation point. + */ + + if (enter_cancellation_point()) + { +#ifndef CONFIG_CANCELLATION_POINTS /* Not reachable in this case */ + /* If there is a pending cancellation, then do not perform + * the wait. Exit now with ECANCELED. + */ + + set_errno(ECANCELED); + leave_cancellation_point(); + return NULL; +#endif + } + /* Get a pointer to the message queue */ msgq = mqdes->msgq; @@ -195,6 +213,7 @@ FAR struct mqueue_msg_s *mq_waitreceive(mqd_t mqdes) msgq->nmsgs--; } + leave_cancellation_point(); return rcvmsg; } diff --git a/sched/mqueue/mq_receive.c b/sched/mqueue/mq_receive.c index 4fed3b5afd2..31878a29a57 100644 --- a/sched/mqueue/mq_receive.c +++ b/sched/mqueue/mq_receive.c @@ -47,6 +47,7 @@ #include #include +#include #include "mqueue/mqueue.h" @@ -103,12 +104,17 @@ ssize_t mq_receive(mqd_t mqdes, FAR char *msg, size_t msglen, DEBUGASSERT(up_interrupt_context() == false); + /* mq_receive() is a cancellation point */ + + (void)enter_cancellation_point(); + /* Verify the input parameters and, in case of an error, set * errno appropriately. */ if (mq_verifyreceive(mqdes, msg, msglen) != OK) { + leave_cancellation_point(); return ERROR; } @@ -145,5 +151,6 @@ ssize_t mq_receive(mqd_t mqdes, FAR char *msg, size_t msglen, } sched_unlock(); + leave_cancellation_point(); return ret; } diff --git a/sched/mqueue/mq_send.c b/sched/mqueue/mq_send.c index 12ce2b85c1e..59e6eecebef 100644 --- a/sched/mqueue/mq_send.c +++ b/sched/mqueue/mq_send.c @@ -46,6 +46,7 @@ #include #include +#include #include "mqueue/mqueue.h" @@ -103,12 +104,17 @@ int mq_send(mqd_t mqdes, FAR const char *msg, size_t msglen, int prio) irqstate_t flags; int ret = ERROR; + /* mq_send() is a cancellation point */ + + (void)enter_cancellation_point(); + /* Verify the input parameters -- setting errno appropriately * on any failures to verify. */ if (mq_verifysend(mqdes, msg, msglen, prio) != OK) { + leave_cancellation_point(); return ERROR; } @@ -177,5 +183,6 @@ int mq_send(mqd_t mqdes, FAR const char *msg, size_t msglen, int prio) } sched_unlock(); + leave_cancellation_point(); return ret; } diff --git a/sched/mqueue/mq_sndinternal.c b/sched/mqueue/mq_sndinternal.c index 087e1f15dc9..c59250683fd 100644 --- a/sched/mqueue/mq_sndinternal.c +++ b/sched/mqueue/mq_sndinternal.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/mqueue/mq_send.c + * sched/mqueue/mq_sndinternal.c * * Copyright (C) 2007, 2009, 2013-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -53,6 +53,7 @@ #include #include #include +#include #include "sched/sched.h" #ifndef CONFIG_DISABLE_SIGNALS @@ -232,6 +233,23 @@ int mq_waitsend(mqd_t mqdes) FAR struct tcb_s *rtcb; FAR struct mqueue_inode_s *msgq; + /* mq_waitsend() is not a cancellation point, but it is always called from + * a cancellation point. + */ + + if (enter_cancellation_point()) + { +#ifndef CONFIG_CANCELLATION_POINTS /* Not reachable in this case */ + /* If there is a pending cancellation, then do not perform + * the wait. Exit now with ECANCELED. + */ + + set_errno(ECANCELED); + leave_cancellation_point(); + return ERROR; +#endif + } + /* Get a pointer to the message queue */ msgq = mqdes->msgq; @@ -249,6 +267,7 @@ int mq_waitsend(mqd_t mqdes) /* No... We will return an error to the caller. */ set_errno(EAGAIN); + leave_cancellation_point(); return ERROR; } @@ -283,12 +302,14 @@ int mq_waitsend(mqd_t mqdes) if (get_errno() != OK) { + leave_cancellation_point(); return ERROR; } } } } + leave_cancellation_point(); return OK; } diff --git a/sched/mqueue/mq_timedreceive.c b/sched/mqueue/mq_timedreceive.c index b5bb100b89a..9df2a6ab61a 100644 --- a/sched/mqueue/mq_timedreceive.c +++ b/sched/mqueue/mq_timedreceive.c @@ -50,6 +50,7 @@ #include #include #include +#include #include "sched/sched.h" #include "clock/clock.h" @@ -174,18 +175,24 @@ ssize_t mq_timedreceive(mqd_t mqdes, FAR char *msg, size_t msglen, DEBUGASSERT(up_interrupt_context() == false && rtcb->waitdog == NULL); + /* mq_timedreceive() is a cancellation point */ + + (void)enter_cancellation_point(); + /* Verify the input parameters and, in case of an error, set * errno appropriately. */ if (mq_verifyreceive(mqdes, msg, msglen) != OK) { + leave_cancellation_point(); return ERROR; } if (!abstime || abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) { set_errno(EINVAL); + leave_cancellation_point(); return ERROR; } @@ -198,6 +205,7 @@ ssize_t mq_timedreceive(mqd_t mqdes, FAR char *msg, size_t msglen, if (!rtcb->waitdog) { set_errno(EINVAL); + leave_cancellation_point(); return ERROR; } @@ -250,6 +258,7 @@ ssize_t mq_timedreceive(mqd_t mqdes, FAR char *msg, size_t msglen, rtcb->waitdog = NULL; set_errno(result); + leave_cancellation_point(); return ERROR; } @@ -288,5 +297,6 @@ ssize_t mq_timedreceive(mqd_t mqdes, FAR char *msg, size_t msglen, sched_unlock(); wd_delete(rtcb->waitdog); rtcb->waitdog = NULL; + leave_cancellation_point(); return ret; } diff --git a/sched/mqueue/mq_timedsend.c b/sched/mqueue/mq_timedsend.c index 0b82fb8edb2..83e25515eb3 100644 --- a/sched/mqueue/mq_timedsend.c +++ b/sched/mqueue/mq_timedsend.c @@ -50,6 +50,7 @@ #include #include #include +#include #include "clock/clock.h" #include "sched/sched.h" @@ -178,6 +179,10 @@ int mq_timedsend(mqd_t mqdes, FAR const char *msg, size_t msglen, int prio, DEBUGASSERT(up_interrupt_context() == false && rtcb->waitdog == NULL); + /* mq_timedsend() is a cancellation point */ + + (void)enter_cancellation_point(); + /* Verify the input parameters -- setting errno appropriately * on any failures to verify. */ @@ -186,6 +191,7 @@ int mq_timedsend(mqd_t mqdes, FAR const char *msg, size_t msglen, int prio, { /* mq_verifysend() will set the errno appropriately */ + leave_cancellation_point(); return ERROR; } @@ -199,6 +205,7 @@ int mq_timedsend(mqd_t mqdes, FAR const char *msg, size_t msglen, int prio, */ set_errno(ENOMEM); + leave_cancellation_point(); return ERROR; } @@ -229,6 +236,7 @@ int mq_timedsend(mqd_t mqdes, FAR const char *msg, size_t msglen, int prio, ret = mq_dosend(mqdes, mqmsg, msg, msglen, prio); sched_unlock(); + leave_cancellation_point(); return ret; } @@ -320,6 +328,7 @@ int mq_timedsend(mqd_t mqdes, FAR const char *msg, size_t msglen, int prio, sched_unlock(); wd_delete(rtcb->waitdog); rtcb->waitdog = NULL; + leave_cancellation_point(); return ret; /* Exit here with (1) the scheduler locked, (2) a message allocated, (3) a @@ -341,5 +350,6 @@ errout_with_mqmsg: sched_unlock(); set_errno(result); + leave_cancellation_point(); return ERROR; } diff --git a/sched/pthread/Make.defs b/sched/pthread/Make.defs index d27938aa379..6156dd54112 100644 --- a/sched/pthread/Make.defs +++ b/sched/pthread/Make.defs @@ -42,8 +42,9 @@ CSRCS += pthread_mutexlock.c pthread_mutextrylock.c pthread_mutexunlock.c CSRCS += pthread_condinit.c pthread_conddestroy.c CSRCS += pthread_condwait.c pthread_condsignal.c pthread_condbroadcast.c CSRCS += pthread_barrierinit.c pthread_barrierdestroy.c pthread_barrierwait.c -CSRCS += pthread_cancel.c pthread_setcancelstate.c -CSRCS += pthread_keycreate.c pthread_setspecific.c pthread_getspecific.c pthread_keydelete.c +CSRCS += pthread_cancel.c +CSRCS += pthread_keycreate.c pthread_setspecific.c pthread_getspecific.c +CSRCS += pthread_keydelete.c CSRCS += pthread_initialize.c pthread_completejoin.c pthread_findjoininfo.c CSRCS += pthread_once.c pthread_release.c pthread_setschedprio.c @@ -55,6 +56,10 @@ ifeq ($(CONFIG_SMP),y) CSRCS += pthread_setaffinity.c pthread_getaffinity.c endif +ifeq ($(CONFIG_PTHREAD_CLEANUP),y) +CSRCS += pthread_cleanup.c +endif + # Include pthread build support DEPPATH += --dep-path pthread diff --git a/sched/pthread/pthread.h b/sched/pthread/pthread.h index 6371e9df330..be7a20de2ea 100644 --- a/sched/pthread/pthread.h +++ b/sched/pthread/pthread.h @@ -96,6 +96,11 @@ struct task_group_s; /* Forward reference */ void weak_function pthread_initialize(void); int pthread_schedsetup(FAR struct pthread_tcb_s *tcb, int priority, start_t start, pthread_startroutine_t entry); + +#ifdef CONFIG_PTHREAD_CLEANUP +void pthread_cleanup_popall(FAR struct pthread_tcb_s *tcb); +#endif + int pthread_completejoin(pid_t pid, FAR void *exit_value); void pthread_destroyjoin(FAR struct task_group_s *group, FAR struct join_s *pjoin); diff --git a/sched/pthread/pthread_cancel.c b/sched/pthread/pthread_cancel.c index a8ba2ee4c93..6b974629a01 100644 --- a/sched/pthread/pthread_cancel.c +++ b/sched/pthread/pthread_cancel.c @@ -45,6 +45,7 @@ #include #include "sched/sched.h" +#include "task/task.h" #include "pthread/pthread.h" /**************************************************************************** @@ -53,11 +54,11 @@ int pthread_cancel(pthread_t thread) { - FAR struct tcb_s *tcb; + FAR struct pthread_tcb_s *tcb; /* First, make sure that the handle references a valid thread */ - if (!thread) + if (thread == 0) { /* pid == 0 is the IDLE task. Callers cannot cancel the * IDLE task. @@ -66,8 +67,8 @@ int pthread_cancel(pthread_t thread) return ESRCH; } - tcb = sched_gettcb((pid_t)thread); - if (!tcb) + tcb = (FAR struct pthread_tcb_s *)sched_gettcb((pid_t)thread); + if (tcb == NULL) { /* The pid does not correspond to any known thread. The thread * has probably already exited. @@ -76,13 +77,17 @@ int pthread_cancel(pthread_t thread) return ESRCH; } + /* Only pthreads should use this interface */ + + DEBUGASSERT((tcb->cmn.flags & TCB_FLAG_TTYPE_MASK) == TCB_FLAG_TTYPE_PTHREAD); + /* Check to see if this thread has the non-cancelable bit set in its * flags. Suppress context changes for a bit so that the flags are stable. - * (the flags should not change in interrupt handling. + * (the flags should not change in interrupt handling). */ sched_lock(); - if ((tcb->flags & TCB_FLAG_NONCANCELABLE) != 0) + if ((tcb->cmn.flags & TCB_FLAG_NONCANCELABLE) != 0) { /* Then we cannot cancel the thread now. Here is how this is * supposed to work: @@ -97,29 +102,69 @@ int pthread_cancel(pthread_t thread) * processing." */ - tcb->flags |= TCB_FLAG_CANCEL_PENDING; + tcb->cmn.flags |= TCB_FLAG_CANCEL_PENDING; sched_unlock(); return OK; } +#ifdef CONFIG_CANCELLATION_POINTS + /* Check if this thread supports deferred cancellation */ + + if ((tcb->cmn.flags & TCB_FLAG_CANCEL_DEFERRED) != 0) + { + /* Then we cannot cancel the thread asynchronously. Mark the cancellation + * as pending. + */ + + tcb->cmn.flags |= TCB_FLAG_CANCEL_PENDING; + + /* If the thread is waiting at a cancellation point, then notify of the + * cancellation thereby waking the task up with an ECANCELED error. + * + * REVISIT: is locking the scheduler sufficent in SMP mode? + */ + + if (tcb->cmn.cpcount > 0) + { + notify_cancellation(&tcb->cmn); + } + + sched_unlock(); + return OK; + } +#endif + + /* Otherwise, perform the asyncrhonous cancellation */ + sched_unlock(); /* Check to see if the ID refers to ourselves.. this would be the * same as pthread_exit(PTHREAD_CANCELED). */ - if (tcb == this_task()) + if (tcb == (FAR struct pthread_tcb_s *)this_task()) { pthread_exit(PTHREAD_CANCELED); } +#ifdef CONFIG_PTHREAD_CLEANUP + /* Perform any stack pthread clean-up callbacks. + * + * REVISIT: In this case, the clean-up callback will execute on the + * thread of the caller of pthread cancel, not on the thread of + * the thread-to-be-canceled. Is that an issue? Presumably they + * are both within the same group and within the same process address + * space. + */ + + pthread_cleanup_popall(tcb); +#endif + /* Complete pending join operations */ (void)pthread_completejoin((pid_t)thread, PTHREAD_CANCELED); - /* Then let pthread_delete do the real work */ + /* Then let task_terminate do the real work */ - task_delete((pid_t)thread); - return OK; + return task_terminate((pid_t)thread, false); } - diff --git a/sched/pthread/pthread_cleanup.c b/sched/pthread/pthread_cleanup.c new file mode 100644 index 00000000000..6c71cd8c138 --- /dev/null +++ b/sched/pthread/pthread_cleanup.c @@ -0,0 +1,226 @@ +/**************************************************************************** + * sched/pthread/pthread_cleanup.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include + +#include + +#include "sched/sched.h" +#include "pthread/pthread.h" + +#ifdef CONFIG_PTHREAD_CLEANUP + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: pthread_cleanup_pop_tcb + * + * Description: + * The pthread_cleanup_pop_tcb() function will remove the routine at the top + * of the calling thread's cancellation cleanup stack and optionally + * invoke it (if 'execute' is non-zero). + * + * Input Parameters: + * tcb - The TCB of the pthread that is exiting or being canceled. + * + * Return Value: + * None + * + * Assumptions: + * The scheduler is locked. + * + ****************************************************************************/ + +static void pthread_cleanup_pop_tcb(FAR struct pthread_tcb_s *tcb, int execute) +{ + if (tcb->tos > 0) + { + unsigned int ndx; + + /* Get the index to the last cleaner function pushed onto the stack */ + + ndx = tcb->tos - 1; + DEBUGASSERT(ndx >= 0 && ndx < CONFIG_PTHREAD_CLEANUP_STACKSIZE); + + /* Should we execute the cleanup routine at the top of the stack? */ + + if (execute != 0) + { + FAR struct pthread_cleanup_s *cb; + + /* Yes.. Execute the clean-up routine. + * + * REVISIT: This is a security problem In the PROTECTED and KERNEL + * builds: We must not call the registered function in supervisor + * mode! See also on_exit() and atexit() callbacks. + */ + + cb = &tcb->stack[ndx]; + cb->pc_cleaner(cb->pc_arg); + } + + tcb->tos = ndx; + } +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: pthread_cleanup_push + * pthread_cleanup_pop + * + * Description: + * The pthread_cleanup_pop() function will remove the routine at the top + * of the calling thread's cancellation cleanup stack and optionally + * invoke it (if 'execute' is non-zero). + * + * The pthread_cleanup_push() function will push the specified cancellation + * cleanup handler routine onto the calling thread's cancellation cleanup + * stack. The cancellation cleanup handler will be popped from the + * cancellation cleanup stack and invoked with the argument arg when: + * + * - The thread exits (that is, calls pthread_exit()). + * - The thread acts upon a cancellation request. + * - The thread calls pthread_cleanup_pop() with a non-zero execute argument. + * + * Input Parameters: + * routine - The cleanup routine to be pushed on the the cleanup stack. + * arg - An argument that will accompany the callback. + * execute - Execute the popped cleanup function immediately. + * + * Returned Value: + * None + * + ****************************************************************************/ + +void pthread_cleanup_pop(int execute) +{ + FAR struct pthread_tcb_s *tcb = (FAR struct pthread_tcb_s *)this_task(); + + /* We don't assert if called from a non-pthread; we just don't do anything */ + + DEBUGASSERT(tcb != NULL); + + /* sched_lock() should provide sufficient protection. We only need to + * have this TCB stationary; the pthread cleanup stack should never be + * modified by interrupt level logic. + */ + + sched_lock(); + if ((tcb->cmn.flags & TCB_FLAG_TTYPE_MASK) == TCB_FLAG_TTYPE_PTHREAD) + { + pthread_cleanup_pop_tcb(tcb, execute); + } + + sched_unlock(); +} + +void pthread_cleanup_push(pthread_cleanup_t routine, FAR void *arg) +{ + FAR struct pthread_tcb_s *tcb = (FAR struct pthread_tcb_s *)this_task(); + + /* We don't assert if called from a non-pthread; we just don't do anything */ + + DEBUGASSERT(tcb != NULL); + DEBUGASSERT(tcb->tos < CONFIG_PTHREAD_CLEANUP_STACKSIZE); + + /* sched_lock() should provide sufficient protection. We only need to + * have this TCB stationary; the pthread cleanup stack should never be + * modified by interrupt level logic. + */ + + sched_lock(); + if ((tcb->cmn.flags & TCB_FLAG_TTYPE_MASK) == TCB_FLAG_TTYPE_PTHREAD && + tcb->tos < CONFIG_PTHREAD_CLEANUP_STACKSIZE) + { + unsigned int ndx = tcb->tos; + + tcb->tos++; + tcb->stack[ndx].pc_cleaner = routine; + tcb->stack[ndx].pc_arg = arg; + } + + sched_unlock(); +} + +/**************************************************************************** + * Name: pthread_cleanup_popall + * + * Description: + * The pthread_cleanup_popall() is an internal function that will pop and + * execute all clean-up functions. This function is only called from within + * the pthread_exit() and pthread_cancellation() logic + * + * Input Parameters: + * tcb - The TCB of the pthread that is exiting or being canceled. + * + * Returned Value: + * None + * + ****************************************************************************/ + +void pthread_cleanup_popall(FAR struct pthread_tcb_s *tcb) +{ + DEBUGASSERT(tcb != NULL); + DEBUGASSERT((tcb->cmn.flags & TCB_FLAG_TTYPE_MASK) == TCB_FLAG_TTYPE_PTHREAD); + + /* Pop and execute each cleanup routine/ + * + * sched_lock() should provide sufficient protection. We only need to + * have this TCB stationary; the pthread cleanup stack should never be + * modified by interrupt level logic. + */ + + sched_lock(); + while (tcb->tos > 0) + { + pthread_cleanup_pop_tcb(tcb, 1); + } + + sched_unlock(); +} + +#endif /* CONFIG_PTHREAD_CLEANUP */ diff --git a/sched/pthread/pthread_condtimedwait.c b/sched/pthread/pthread_condtimedwait.c index 7950c5b5fc4..9027c305ef9 100644 --- a/sched/pthread/pthread_condtimedwait.c +++ b/sched/pthread/pthread_condtimedwait.c @@ -51,6 +51,7 @@ #include #include +#include #include "sched/sched.h" #include "pthread/pthread.h" @@ -178,6 +179,10 @@ int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex, DEBUGASSERT(rtcb->waitdog == NULL); + /* pthread_cond_timedwait() is a cancellation point */ + + (void)enter_cancellation_point(); + /* Make sure that non-NULL references were provided. */ if (!cond || !mutex) @@ -338,6 +343,7 @@ int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex, } } + leave_cancellation_point(); sinfo("Returning %d\n", ret); return ret; } diff --git a/sched/pthread/pthread_condwait.c b/sched/pthread/pthread_condwait.c index a9ad2ba91cf..e7c6a9af255 100644 --- a/sched/pthread/pthread_condwait.c +++ b/sched/pthread/pthread_condwait.c @@ -1,7 +1,7 @@ /**************************************************************************** * sched/pthread/pthread_condwait.c * - * Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -45,6 +45,8 @@ #include #include +#include + #include "pthread/pthread.h" /**************************************************************************** @@ -73,9 +75,13 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex) sinfo("cond=0x%p mutex=0x%p\n", cond, mutex); + /* pthread_cond_wait() is a cancellation point */ + + (void)enter_cancellation_point(); + /* Make sure that non-NULL references were provided. */ - if (!cond || !mutex) + if (cond == NULL || mutex == NULL) { ret = EINVAL; } @@ -101,16 +107,21 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex) ret |= pthread_takesemaphore((FAR sem_t *)&cond->sem); sched_unlock(); - /* Reacquire the mutex */ + /* Reacquire the mutex. + * + * REVISIT: When cancellation points are enabled, we will almost + * certainly hold the mutex when the pthread is canceled. + */ sinfo("Reacquire mutex...\n"); ret |= pthread_takesemaphore((FAR sem_t *)&mutex->sem); - if (!ret) + if (ret == OK) { mutex->pid = getpid(); } } + leave_cancellation_point(); sinfo("Returning %d\n", ret); return ret; } diff --git a/sched/pthread/pthread_create.c b/sched/pthread/pthread_create.c index 6efc9aa21ad..7a4e628e00d 100644 --- a/sched/pthread/pthread_create.c +++ b/sched/pthread/pthread_create.c @@ -483,6 +483,12 @@ int pthread_create(FAR pthread_t *thread, FAR const pthread_attr_t *attr, #endif } +#ifdef CONFIG_CANCELLATION_POINTS + /* Set the deferred cancellation type */ + + ptcb->cmn.flags |= TCB_FLAG_CANCEL_DEFERRED; +#endif + /* Get the assigned pid before we start the task (who knows what * could happen to ptcb after this!). Copy this ID into the join structure * as well. diff --git a/sched/pthread/pthread_exit.c b/sched/pthread/pthread_exit.c index 15b6240ee79..40a5b7fb0de 100644 --- a/sched/pthread/pthread_exit.c +++ b/sched/pthread/pthread_exit.c @@ -80,6 +80,9 @@ void pthread_exit(FAR void *exit_value) sinfo("exit_value=%p\n", exit_value); + DEBUGASSERT(tcb != NULL); + DEBUGASSERT((tcb->flags & TCB_FLAG_TTYPE_MASK) == TCB_FLAG_TTYPE_PTHREAD); + /* Block any signal actions that would awaken us while were * are performing the JOIN handshake. */ @@ -91,6 +94,23 @@ void pthread_exit(FAR void *exit_value) } #endif +#ifdef CONFIG_CANCELLATION_POINTS + /* Mark the pthread as non-cancelable to avoid additional calls to + * pthread_exit() due to any cancellation point logic that might get + * kicked off by actions taken during pthread_exit processing. + */ + + tcb->flags |= TCB_FLAG_NONCANCELABLE; + tcb->flags &= ~TCB_FLAG_CANCEL_PENDING; + tcb->cpcount = 0; +#endif + +#ifdef CONFIG_PTHREAD_CLEANUP + /* Perform any stack pthread clean-up callbacks */ + + pthread_cleanup_popall((FAR struct pthread_tcb_s *)tcb); +#endif + /* Complete pending join operations */ status = pthread_completejoin(getpid(), exit_value); diff --git a/sched/pthread/pthread_join.c b/sched/pthread/pthread_join.c index 9b73fd4268f..01c1c713eaa 100644 --- a/sched/pthread/pthread_join.c +++ b/sched/pthread/pthread_join.c @@ -1,7 +1,7 @@ /**************************************************************************** * sched/pthread/pthread_join.c * - * Copyright (C) 2007, 2008, 2011, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008, 2011, 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -37,12 +37,16 @@ * Included Files ****************************************************************************/ +#include + #include #include #include #include #include +#include + #include "sched/sched.h" #include "group/group.h" #include "pthread/pthread.h" @@ -90,12 +94,17 @@ int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value) sinfo("thread=%d group=%p\n", thread, group); DEBUGASSERT(group); + /* pthread_join() is a cancellation point */ + + (void)enter_cancellation_point(); + /* First make sure that this is not an attempt to join to * ourself. */ if ((pid_t)thread == getpid()) { + leave_cancellation_point(); return EDEADLK; } @@ -230,6 +239,7 @@ int pthread_join(pthread_t thread, FAR pthread_addr_t *pexit_value) ret = OK; } + leave_cancellation_point(); sinfo("Returning %d\n", ret); return ret; } diff --git a/sched/pthread/pthread_mutexdestroy.c b/sched/pthread/pthread_mutexdestroy.c index a6b945f6702..8bab62c4743 100644 --- a/sched/pthread/pthread_mutexdestroy.c +++ b/sched/pthread/pthread_mutexdestroy.c @@ -41,6 +41,7 @@ #include #include +#include #include #include #include @@ -74,7 +75,7 @@ int pthread_mutex_destroy(FAR pthread_mutex_t *mutex) sinfo("mutex=0x%p\n", mutex); - if (!mutex) + if (mutex == NULL) { ret = EINVAL; } @@ -90,7 +91,29 @@ int pthread_mutex_destroy(FAR pthread_mutex_t *mutex) if (mutex->pid != -1) { - ret = EBUSY; +#ifndef CONFIG_DISABLE_SIGNALS + /* Verify that the PID still exists. We may be destroying the + * mutex after cancelling a pthread and the mutex may have been + * in a bad state owned by the dead pthread. + */ + + ret = kill(mutex->pid, 0); + if (ret < 0) + { + /* The thread associated with the PID no longer exists */ + + mutex->pid = -1; + + /* Destroy the semaphore */ + + status = sem_destroy((FAR sem_t *)&mutex->sem); + ret = (status != OK) ? get_errno() : OK; + } + else +#endif + { + ret = EBUSY; + } } else { @@ -99,7 +122,7 @@ int pthread_mutex_destroy(FAR pthread_mutex_t *mutex) status = sem_destroy((FAR sem_t *)&mutex->sem); if (status != OK) { - ret = EINVAL; + ret = get_errno(); } } diff --git a/sched/sched/sched_addreadytorun.c b/sched/sched/sched_addreadytorun.c index 77b1492c535..c5f86e2a807 100644 --- a/sched/sched/sched_addreadytorun.c +++ b/sched/sched/sched_addreadytorun.c @@ -167,10 +167,11 @@ bool sched_addreadytorun(FAR struct tcb_s *btcb) { FAR struct tcb_s *rtcb; FAR dq_queue_t *tasklist; - int task_state; - int cpu; bool switched; bool doswitch; + int task_state; + int cpu; + int me; /* Check if the blocked TCB is locked to this CPU */ @@ -226,9 +227,17 @@ bool sched_addreadytorun(FAR struct tcb_s *btcb) * disabled. If the selected state is TSTATE_TASK_READYTORUN, then it * should also go to the pending task list so that it will have a chance * to be restarted when the scheduler is unlocked. + * + * There is an interaction here with IRQ locking. Even if the pre- + * emption is enabled, tasks will be forced to pend if the IRQ lock + * is also set UNLESS the CPU starting the thread is also the holder of + * the IRQ lock. irq_cpu_locked() performs an atomic check for that + * situation. */ - if (spin_islocked(&g_cpu_schedlock) && task_state != TSTATE_TASK_ASSIGNED) + me = this_cpu(); + if ((spin_islocked(&g_cpu_schedlock) || irq_cpu_locked(me)) && + task_state != TSTATE_TASK_ASSIGNED) { /* Add the new ready-to-run task to the g_pendingtasks task list for * now. @@ -255,10 +264,8 @@ bool sched_addreadytorun(FAR struct tcb_s *btcb) } else /* (task_state == TSTATE_TASK_ASSIGNED || task_state == TSTATE_TASK_RUNNING) */ { - int me = this_cpu(); - - /* If we are modifying some assigned task list other than our own, we will - * need to stop that CPU. + /* If we are modifying some assigned task list other than our own, we + * will need to stop that CPU. */ if (cpu != me) @@ -273,7 +280,8 @@ bool sched_addreadytorun(FAR struct tcb_s *btcb) tasklist = (FAR dq_queue_t *)&g_assignedtasks[cpu]; switched = sched_addprioritized(btcb, tasklist); - /* If the selected task was the g_assignedtasks[] list, then a context + /* If the selected task list was the g_assignedtasks[] list and if the + * new tasks is the highest priority (RUNNING) task, then a context * switch will occur. */ @@ -367,7 +375,14 @@ bool sched_addreadytorun(FAR struct tcb_s *btcb) } else { - /* No context switch. Assign the CPU and set the assigned state */ + /* No context switch. Assign the CPU and set the assigned state. + * + * REVISIT: I have seen this assertion fire. Apparently another + * CPU may add another, higher prioirity task to the same + * g_assignedtasks[] list sometime after sched_cpu_select() was + * called above, leaving this TCB in the wrong task list if task_state + * is TSTATE_TASK_ASSIGNED). + */ DEBUGASSERT(task_state == TSTATE_TASK_ASSIGNED); diff --git a/sched/sched/sched_mergepending.c b/sched/sched/sched_mergepending.c index 863eb73c275..15e87ce99c6 100644 --- a/sched/sched/sched_mergepending.c +++ b/sched/sched/sched_mergepending.c @@ -48,6 +48,7 @@ # include #endif +#include "irq/irq.h" #include "sched/sched.h" /**************************************************************************** @@ -196,15 +197,16 @@ bool sched_mergepending(void) FAR struct tcb_s *tcb; bool ret = false; int cpu; + int me; /* Remove and process every TCB in the g_pendingtasks list. * - * This function is only called in the context where locking is known to - * disabled on one CPU. However, we must do nothing if pre-emption is - * still locked because of actions of other CPUs. + * Do nothing if (1) pre-emption is still disabled (by any CPU), or (2) if + * some CPU other than this one is in a critical section. */ - if (!spin_islocked(&g_cpu_schedlock)) + me = this_cpu(); + if (!spin_islocked(&g_cpu_schedlock) && !irq_cpu_locked(me)) { /* Find the CPU that is executing the lowest priority task */ @@ -243,7 +245,7 @@ bool sched_mergepending(void) * Check if that happened. */ - if (spin_islocked(&g_cpu_schedlock)) + if (spin_islocked(&g_cpu_schedlock) || irq_cpu_locked(me)) { /* Yes.. then we may have incorrectly placed some TCBs in the * g_readytorun list (unlikely, but possible). We will have to diff --git a/sched/sched/sched_removereadytorun.c b/sched/sched/sched_removereadytorun.c index 5b6b663d97c..be80d3ad0fe 100644 --- a/sched/sched/sched_removereadytorun.c +++ b/sched/sched/sched_removereadytorun.c @@ -165,7 +165,7 @@ bool sched_removereadytorun(FAR struct tcb_s *rtcb) if (rtcb->blink == NULL && TLIST_ISRUNNABLE(rtcb->task_state)) { FAR struct tcb_s *nxttcb; - FAR struct tcb_s *rtrtcb; + FAR struct tcb_s *rtrtcb = NULL; int me; /* There must always be at least one task in the list (the IDLE task) @@ -198,14 +198,21 @@ bool sched_removereadytorun(FAR struct tcb_s *rtcb) * g_readytorun list. We can only select a task from that list if * the affinity mask includes the current CPU. * - * REVISIT: What should we do, if anything, if pre-emption is locked - * by the another CPU? Should just used nxttcb? Should we select - * from the pending task list instead of the g_readytorun list? + * If pre-emption is locked or another CPU is in a critical section, + * then use the 'nxttcb' which will probably be the IDLE thread. + * REVISIT: What if it is not the IDLE thread? */ - for (rtrtcb = (FAR struct tcb_s *)g_readytorun.head; - rtrtcb != NULL && !CPU_ISSET(cpu, &rtrtcb->affinity); - rtrtcb = (FAR struct tcb_s *)rtrtcb->flink); + if (!spin_islocked(&g_cpu_schedlock) && !irq_cpu_locked(me)) + { + /* Search for the highest priority task that can run on this + * CPU. + */ + + for (rtrtcb = (FAR struct tcb_s *)g_readytorun.head; + rtrtcb != NULL && !CPU_ISSET(cpu, &rtrtcb->affinity); + rtrtcb = (FAR struct tcb_s *)rtrtcb->flink); + } /* Did we find a task in the g_readytorun list? Which task should * we use? We decide strictly by the priority of the two tasks: diff --git a/sched/sched/sched_setpriority.c b/sched/sched/sched_setpriority.c index 9e2c9384aa9..2dfd1c1417d 100644 --- a/sched/sched/sched_setpriority.c +++ b/sched/sched/sched_setpriority.c @@ -52,6 +52,64 @@ * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: sched_nexttcb + * + * Description: + * Get the next highest priority ready-to-run task. + * + * Inputs: + * tcb - the TCB of task to reprioritize. + * + * Return Value: + * TCB of the next highest priority ready-to-run task. + * + ****************************************************************************/ + +#ifdef CONFIG_SMP +static FAR struct tcb_s *sched_nexttcb(FAR struct tcb_s *tcb) +{ + FAR struct tcb_s *nxttcb = (FAR struct tcb_s *)tcb->flink; + FAR struct tcb_s *rtrtcb; + int cpu = this_cpu(); + + /* Which task should run next? It will be either the next tcb in the + * assigned task list (nxttcb) or a TCB in the g_readytorun list. We can + * only select a task from that list if the affinity mask includes the + * current CPU. + * + * If pre-emption is locked or another CPU is in a critical section, + * then use the 'nxttcb' which will probably be the IDLE thread. + */ + + if (!spin_islocked(&g_cpu_schedlock) && !irq_cpu_locked(cpu)) + { + /* Search for the highest priority task that can run on this CPU. */ + + for (rtrtcb = (FAR struct tcb_s *)g_readytorun.head; + rtrtcb != NULL && !CPU_ISSET(cpu, &rtrtcb->affinity); + rtrtcb = (FAR struct tcb_s *)rtrtcb->flink); + + /* Return the TCB from the readyt-to-run list if it is the next + * highest priority task. + */ + + if (rtrtcb != NULL && + rtrtcb->sched_priority >= nxttcb->sched_priority) + { + return rtrtcb; + } + } + + /* Otherwise, return the next TCB in the g_assignedtasks[] list... + * probably the TCB of the IDLE thread. + * REVISIT: What if it is not the IDLE thread? + */ + + return nxttcb; +} +#endif + /**************************************************************************** * Name: sched_running_setpriority * @@ -77,12 +135,24 @@ static inline void sched_running_setpriority(FAR struct tcb_s *tcb, int sched_priority) { + FAR struct tcb_s *nxttcb; + + /* Get the TCB of the next highest priority, ready to run task */ + +#ifdef CONFIG_SMP + nxttcb = sched_nexttcb(tcb); +#else + nxttcb = (FAR struct tcb_s *)tcb->flink; +#endif + + DEBUGASSERT(nxttcb != NULL); + /* A context switch will occur if the new priority of the running * task becomes less than OR EQUAL TO the next highest priority * ready to run task. */ - if (sched_priority <= tcb->flink->sched_priority) + if (sched_priority <= nxttcb->sched_priority) { /* A context switch will occur. */ diff --git a/sched/sched/sched_unlock.c b/sched/sched/sched_unlock.c index 9a6ff5a9248..885e0c778ce 100644 --- a/sched/sched/sched_unlock.c +++ b/sched/sched/sched_unlock.c @@ -44,6 +44,7 @@ #include #include +#include "irq/irq.h" #include "sched/sched.h" /**************************************************************************** @@ -66,6 +67,10 @@ int sched_unlock(void) { FAR struct tcb_s *rtcb = this_task(); + int cpu; + + cpu = this_cpu(); + rtcb = current_task(cpu); /* Check for some special cases: (1) rtcb may be NULL only during * early boot-up phases, and (2) sched_unlock() should have no @@ -106,23 +111,48 @@ int sched_unlock(void) */ DEBUGASSERT(g_cpu_schedlock == SP_LOCKED && - (g_cpu_lockset & (1 << this_cpu())) != 0); + (g_cpu_lockset & (1 << cpu)) != 0); - spin_clrbit(&g_cpu_lockset, this_cpu(), &g_cpu_locksetlock, + spin_clrbit(&g_cpu_lockset, cpu, &g_cpu_locksetlock, &g_cpu_schedlock); #endif /* Release any ready-to-run tasks that have collected in - * g_pendingtasks. In the SMP case, the scheduler remains - * locked if interrupts are disabled. + * g_pendingtasks. * * NOTE: This operation has a very high likelihood of causing * this task to be switched out! */ #ifdef CONFIG_SMP - if (g_pendingtasks.head != NULL && rtcb->irqcount <= 0) + /* In the SMP case, the tasks remains pend(1) if we are + * in a critical section, i.e., g_cpu_irqlock is locked by other + * CPUs, or (2) other CPUs still have pre-emption disabled, i.e., + * g_cpu_schedlock is locked. In those cases, the release of the + * pending tasks must be deferred until those conditions are met. + * + * There are certain conditions that we must avoid by preventing + * releasing the pending tasks while within the critical section + * of other CPUs. This logic does that and there is matching + * logic in sched_addreadytorun to avoid starting new tasks within + * the critical section (unless the CPU is the holder of the lock). + * + * REVISIT: If this CPU is only one that holds the IRQ lock, then + * we should go ahead and release the pending tasks. See the logic + * leave_critical_section(): It will call up_release_pending() + * BEFORE it clears IRQ lock. + * BEFORE it clears IRQ lock. + */ + + if (!spin_islocked(&g_cpu_schedlock) && !irq_cpu_locked(cpu) && + g_pendingtasks.head != NULL) #else + /* In the single CPU case, decrementing irqcount to zero is + * sufficient to release the pending tasks. Further, in that + * configuration, critical sections and pre-emption can operate + * fully independently. + */ + if (g_pendingtasks.head != NULL) #endif { diff --git a/sched/sched/sched_wait.c b/sched/sched/sched_wait.c index d1547e07cfa..c558de50bf6 100644 --- a/sched/sched/sched_wait.c +++ b/sched/sched/sched_wait.c @@ -80,8 +80,11 @@ pid_t wait(FAR int *stat_loc) { + /* wait() is a cancellation point, but nothings needs to be done for this + * trivial case. + */ + return waitpid((pid_t)-1, stat_loc, 0); } #endif /* CONFIG_SCHED_WAITPID && CONFIG_SCHED_HAVE_PARENT */ - diff --git a/sched/sched/sched_waitid.c b/sched/sched/sched_waitid.c index f4e48d5f649..dd3dd86211f 100644 --- a/sched/sched/sched_waitid.c +++ b/sched/sched/sched_waitid.c @@ -44,6 +44,7 @@ #include #include +#include #include "sched/sched.h" #include "group/group.h" @@ -164,6 +165,10 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) int errcode; int ret; + /* waitid() is a cancellation point */ + + (void)enter_cancellation_point(); + /* MISSING LOGIC: If WNOHANG is provided in the options, then this function * should returned immediately. However, there is no mechanism available now * know if the thread has child: The children remember their parents (if @@ -404,12 +409,14 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) } } + leave_cancellation_point(); sched_unlock(); return OK; errout_with_errno: set_errno(errcode); errout: + leave_cancellation_point(); sched_unlock(); return ERROR; } diff --git a/sched/sched/sched_waitpid.c b/sched/sched/sched_waitpid.c index a3ef50674f1..aca86d093fe 100644 --- a/sched/sched/sched_waitpid.c +++ b/sched/sched/sched_waitpid.c @@ -45,6 +45,7 @@ #include #include +#include #include "sched/sched.h" #include "group/group.h" @@ -185,12 +186,17 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) DEBUGASSERT(stat_loc); + /* waitpid() is a cancellation point */ + + (void)enter_cancellation_point(); + /* None of the options are supported */ #ifdef CONFIG_DEBUG_FEATURES if (options != 0) { set_errno(ENOSYS); + leave_cancellation_point(); return ERROR; } #endif @@ -268,12 +274,14 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) /* On success, return the PID */ + leave_cancellation_point(); sched_unlock(); return pid; errout_with_errno: set_errno(errcode); errout: + leave_cancellation_point(); sched_unlock(); return ERROR; } @@ -307,12 +315,17 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) DEBUGASSERT(stat_loc); + /* waitpid() is a cancellation point */ + + (void)enter_cancellation_point(); + /* None of the options are supported */ #ifdef CONFIG_DEBUG_FEATURES if (options != 0) { set_errno(ENOSYS); + leave_cancellation_point(); return ERROR; } #endif @@ -528,6 +541,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) } } + leave_cancellation_point(); sched_unlock(); return (int)pid; @@ -535,6 +549,7 @@ errout_with_errno: set_errno(errcode); errout_with_lock: + leave_cancellation_point(); sched_unlock(); return ERROR; } diff --git a/sched/semaphore/sem_timedwait.c b/sched/semaphore/sem_timedwait.c index 81e7a79d506..23c16cc2d53 100644 --- a/sched/semaphore/sem_timedwait.c +++ b/sched/semaphore/sem_timedwait.c @@ -49,6 +49,7 @@ #include #include #include +#include #include "sched/sched.h" #include "clock/clock.h" @@ -103,6 +104,10 @@ int sem_timedwait(FAR sem_t *sem, FAR const struct timespec *abstime) DEBUGASSERT(up_interrupt_context() == false && rtcb->waitdog == NULL); + /* sem_timedwait() is a cancellation point */ + + (void)enter_cancellation_point(); + /* Verify the input parameters and, in case of an error, set * errno appropriately. */ @@ -209,6 +214,7 @@ success_with_irqdisabled: leave_critical_section(flags); wd_delete(rtcb->waitdog); rtcb->waitdog = NULL; + leave_cancellation_point(); return OK; /* Error exits */ @@ -220,5 +226,6 @@ errout_with_irqdisabled: errout: set_errno(errcode); + leave_cancellation_point(); return ERROR; } diff --git a/sched/semaphore/sem_wait.c b/sched/semaphore/sem_wait.c index da855bc70c0..1aec3679d81 100644 --- a/sched/semaphore/sem_wait.c +++ b/sched/semaphore/sem_wait.c @@ -46,6 +46,7 @@ #include #include +#include #include "sched/sched.h" #include "semaphore/semaphore.h" @@ -86,17 +87,33 @@ int sem_wait(FAR sem_t *sem) DEBUGASSERT(sem != NULL && up_interrupt_context() == false); + /* The following operations must be performed with interrupts + * disabled because sem_post() may be called from an interrupt + * handler. + */ + + flags = enter_critical_section(); + + /* sem_wait() is a cancellation point */ + + if (enter_cancellation_point()) + { +#ifndef CONFIG_CANCELLATION_POINTS /* Not reachable in this case */ + /* If there is a pending cancellation, then do not perform + * the wait. Exit now with ECANCELED. + */ + + set_errno(ECANCELED); + leave_cancellation_point(); + leave_critical_section(flags); + return ERROR; +#endif + } + /* Make sure we were supplied with a valid semaphore. */ if (sem != NULL) { - /* The following operations must be performed with interrupts - * disabled because sem_post() may be called from an interrupt - * handler. - */ - - flags = enter_critical_section(); - /* Check if the lock is available */ if (sem->semcount > 0) @@ -186,15 +203,13 @@ int sem_wait(FAR sem_t *sem) sched_unlock(); #endif } - - /* Interrupts may now be enabled. */ - - leave_critical_section(flags); } else { set_errno(EINVAL); } + leave_cancellation_point(); + leave_critical_section(flags); return ret; } diff --git a/sched/semaphore/spinlock.c b/sched/semaphore/spinlock.c index ec0e406d86e..349cdec57fc 100644 --- a/sched/semaphore/spinlock.c +++ b/sched/semaphore/spinlock.c @@ -390,7 +390,7 @@ void spin_unlockr(FAR struct spinlock_s *lock) * Input Parameters: * set - A reference to the bitset to set the CPU bit in * cpu - The bit number to be set - * setlock - A reference to the lock lock protecting the set + * setlock - A reference to the lock protecting the set * orlock - Will be set to SP_LOCKED while holding setlock * * Returned Value: @@ -441,7 +441,7 @@ void spin_setbit(FAR volatile cpu_set_t *set, unsigned int cpu, * Input Parameters: * set - A reference to the bitset to set the CPU bit in * cpu - The bit number to be set - * setlock - A reference to the lock lock protecting the set + * setlock - A reference to the lock protecting the set * orlock - Will be set to SP_UNLOCKED if all bits become cleared in set * * Returned Value: diff --git a/sched/signal/sig_nanosleep.c b/sched/signal/sig_nanosleep.c index 4a492f0c853..05f2c88af73 100644 --- a/sched/signal/sig_nanosleep.c +++ b/sched/signal/sig_nanosleep.c @@ -46,6 +46,7 @@ #include #include +#include #include "clock/clock.h" @@ -112,6 +113,10 @@ int nanosleep(FAR const struct timespec *rqtp, FAR struct timespec *rmtp) int ret; #endif + /* nanosleep() is a cancellation point */ + + (void)enter_cancellation_point(); + if (!rqtp || rqtp->tv_nsec < 0 || rqtp->tv_nsec >= 1000000000) { errval = EINVAL; @@ -154,6 +159,7 @@ int nanosleep(FAR const struct timespec *rqtp, FAR struct timespec *rmtp) /* The timeout "error" is the normal, successful result */ leave_critical_section(flags); + leave_cancellation_point(); return OK; } @@ -203,5 +209,6 @@ int nanosleep(FAR const struct timespec *rqtp, FAR struct timespec *rmtp) errout: set_errno(errval); + leave_cancellation_point(); return ERROR; } diff --git a/sched/signal/sig_pause.c b/sched/signal/sig_pause.c index 80fc712cb7b..5a83f1a735b 100644 --- a/sched/signal/sig_pause.c +++ b/sched/signal/sig_pause.c @@ -1,7 +1,7 @@ /**************************************************************************** * sched/signal/sig_pause.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -42,6 +42,8 @@ #include #include +#include + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -72,8 +74,13 @@ int pause(void) { - sigset_t set; struct siginfo value; + sigset_t set; + int ret; + + /* pause() is a cancellation point */ + + (void)enter_cancellation_point(); /* Set up for the sleep. Using the empty set means that we are not * waiting for any particular signal. However, any unmasked signal @@ -86,5 +93,7 @@ int pause(void) * meaning that some unblocked signal was caught. */ - return sigwaitinfo(&set, &value); + ret = sigwaitinfo(&set, &value); + leave_cancellation_point(); + return ret; } diff --git a/sched/signal/sig_suspend.c b/sched/signal/sig_suspend.c index d3a4a9ba719..ab5cfd25fe7 100644 --- a/sched/signal/sig_suspend.c +++ b/sched/signal/sig_suspend.c @@ -46,6 +46,7 @@ #include #include +#include #include "sched/sched.h" #include "signal/signal.h" @@ -98,6 +99,10 @@ int sigsuspend(FAR const sigset_t *set) irqstate_t flags; int unblocksigno; + /* sigsuspend() is a cancellation point */ + + (void)enter_cancellation_point(); + /* Several operations must be performed below: We must determine if any * signal is pending and, if not, wait for the signal. Since signals can * be posted from the interrupt level, there is a race condition that @@ -154,5 +159,6 @@ int sigsuspend(FAR const sigset_t *set) } sched_unlock(); - return ERROR; + leave_cancellation_point(); + return ERROR; /* ??REVISIT: Always returns ERROR?? */ } diff --git a/sched/signal/sig_timedwait.c b/sched/signal/sig_timedwait.c index 687884dcf9c..bdb5376d8bd 100644 --- a/sched/signal/sig_timedwait.c +++ b/sched/signal/sig_timedwait.c @@ -52,6 +52,7 @@ #include #include #include +#include #include "sched/sched.h" #include "signal/signal.h" @@ -173,6 +174,9 @@ int sigtimedwait(FAR const sigset_t *set, FAR struct siginfo *info, DEBUGASSERT(rtcb->waitdog == NULL); + /* sigtimedwait() is a cancellation point */ + + (void)enter_cancellation_point(); sched_lock(); /* Not necessary */ /* Several operations must be performed below: We must determine if any @@ -343,5 +347,6 @@ int sigtimedwait(FAR const sigset_t *set, FAR struct siginfo *info, } sched_unlock(); + leave_cancellation_point(); return ret; } diff --git a/sched/signal/sig_waitinfo.c b/sched/signal/sig_waitinfo.c index d271dc9884c..73afb186de3 100644 --- a/sched/signal/sig_waitinfo.c +++ b/sched/signal/sig_waitinfo.c @@ -38,8 +38,11 @@ ****************************************************************************/ #include + #include +#include + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -65,5 +68,15 @@ int sigwaitinfo(FAR const sigset_t *set, FAR struct siginfo *info) { - return sigtimedwait(set, info, NULL); + int ret; + + /* sigwaitinfo() is a cancellation point */ + + (void)enter_cancellation_point(); + + /* Just a wrapper around sigtimedwait() */ + + ret = sigtimedwait(set, info, NULL); + leave_cancellation_point(); + return ret; } diff --git a/sched/task/Make.defs b/sched/task/Make.defs index ddf3e972b73..a5c2295692c 100644 --- a/sched/task/Make.defs +++ b/sched/task/Make.defs @@ -35,8 +35,9 @@ CSRCS += task_create.c task_init.c task_setup.c task_activate.c CSRCS += task_start.c task_delete.c task_exit.c task_exithook.c -CSRCS += task_recover.c task_restart.c task_spawnparms.c task_terminate.c -CSRCS += task_getgroup.c task_prctl.c task_getpid.c exit.c +CSRCS += task_getgroup.c task_getpid.c task_prctl.c task_recover.c +CSRCS += task_restart.c task_spawnparms.c task_setcancelstate.c +CSRCS += task_terminate.c exit.c ifeq ($(CONFIG_ARCH_HAVE_VFORK),y) ifeq ($(CONFIG_SCHED_WAITPID),y) @@ -48,6 +49,10 @@ ifneq ($(CONFIG_BUILD_KERNEL),y) CSRCS += task_spawn.c endif +ifeq ($(CONFIG_CANCELLATION_POINTS),y) +CSRCS += task_setcanceltype.c task_testcancel.c +endif + ifneq ($(CONFIG_BINFMT_DISABLE),y) ifeq ($(CONFIG_LIBC_EXECFUNCS),y) CSRCS += task_execv.c task_posixspawn.c @@ -66,6 +71,10 @@ ifeq ($(CONFIG_SCHED_ONEXIT),y) CSRCS += task_onexit.c endif +ifeq ($(CONFIG_CANCELLATION_POINTS),y) +CSRCS += task_cancelpt.c +endif + # Include task build support DEPPATH += --dep-path task diff --git a/sched/task/task.h b/sched/task/task.h index e81f0eaefcd..83ce71d3f53 100644 --- a/sched/task/task.h +++ b/sched/task/task.h @@ -80,4 +80,10 @@ int task_terminate(pid_t pid, bool nonblocking); void task_exithook(FAR struct tcb_s *tcb, int status, bool nonblocking); void task_recover(FAR struct tcb_s *tcb); +/* Cancellation points */ + +#ifdef CONFIG_CANCELLATION_POINTS +void notify_cancellation(FAR struct tcb_s *tcb); +#endif + #endif /* __SCHED_TASK_TASK_H */ diff --git a/sched/task/task_cancelpt.c b/sched/task/task_cancelpt.c new file mode 100644 index 00000000000..07b4a664c88 --- /dev/null +++ b/sched/task/task_cancelpt.c @@ -0,0 +1,324 @@ +/**************************************************************************** + * sched/task/task_cancelpt.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. + * + ****************************************************************************/ + +/**************************************************************************** + * Cancellation Points. + * + * Cancellation points shall occur when a thread is executing the following + * functions: + * + * accept() mq_timedsend() putpmsg() sigtimedwait() + * aio_suspend() msgrcv() pwrite() sigwait() + * clock_nanosleep() msgsnd() read() sigwaitinfo() + * close() msync() readv() sleep() + * connect() nanosleep() recv() system() + * creat() open() recvfrom() tcdrain() + * fcntl() pause() recvmsg() usleep() + * fdatasync() poll() select() wait() + * fsync() pread() sem_timedwait() waitid() + * getmsg() pselect() sem_wait() waitpid() + * getpmsg() pthread_cond_timedwait() send() write() + * lockf() pthread_cond_wait() sendmsg() writev() + * mq_receive() pthread_join() sendto() + * mq_send() pthread_testcancel() sigpause() + * mq_timedreceive() putmsg() sigsuspend() + * + * Each of the above function must call enter_cancellation_point() on entry + * in order to establish the cancellation point and leave_cancellation_point() + * on exit. These functions are described below. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include + +#include +#include + +#include "sched/sched.h" +#include "semaphore/semaphore.h" +#include "mqueue/mqueue.h" +#include "task/task.h" + +#ifdef CONFIG_CANCELLATION_POINTS + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: enter_cancellation_point + * + * Description: + * Called at the beginning of the cancellation point to establish the + * cancellation point. This function does the following: + * + * 1. If deferred cancellation does not apply to this thread, nothing is + * done, otherwise, it + * 2. Sets state information in the caller's TCB and increments a nesting + * count. + * 3. If this is the outermost nesting level, it checks if there is a + * pending cancellation and, if so, calls either exit() or + * pthread_exit(), depending upon the type of the thread. + * + * Input Parameters: + * None + * + * Returned Value + * true is returned if a cancellation is pending but cannot be performed + * now due to the nesting level. + * + ****************************************************************************/ + +bool enter_cancellation_point(void) +{ + FAR struct tcb_s *tcb = this_task(); + bool ret = false; + + /* Disabling pre-emption should provide sufficient protection. We only + * need the TCB to be stationary (no interrupt level modification is + * anticipated). + * + * REVISIT: is locking the scheduler sufficent in SMP mode? + */ + + sched_lock(); + + /* If cancellation is disabled on this thread or if this thread is using + * asynchronous cancellation, then do nothing. + * + * Special case: if the cpcount count is greater than zero, then we are + * nested and the above condition was certainly true at the outermost + * nesting level. + */ + + if (((tcb->flags & TCB_FLAG_NONCANCELABLE) == 0 && + (tcb->flags & TCB_FLAG_CANCEL_DEFERRED) != 0) || + tcb->cpcount > 0) + { + /* Check if there is a pending cancellation */ + + if ((tcb->flags & TCB_FLAG_CANCEL_PENDING) != 0) + { + /* Yes... return true (if we don't exit here) */ + + ret = true; + + /* If there is a pending cancellation and we are at the outermost + * nesting level of cancellation function calls, then exit + * according to the type of the thread. + */ + + if (tcb->cpcount == 0) + { +#ifndef CONFIG_DISABLE_PTHREAD + if ((tcb->flags & TCB_FLAG_TTYPE_MASK) == TCB_FLAG_TTYPE_PTHREAD) + { + pthread_exit(PTHREAD_CANCELED); + } + else +#endif + { + exit(EXIT_FAILURE); + } + } + } + + /* Otherwise, indicate that we are at a cancellation point by + * incrementing the nesting level of the cancellation point + * functions. + */ + + DEBUGASSERT(tcb->cpcount < INT16_MAX); + tcb->cpcount++; + } + + sched_unlock(); + return ret; +} + +/**************************************************************************** + * Name: leave_cancellation_point + * + * Description: + * Called at the end of the cancellation point. This function does the + * following: + * + * 1. If deferred cancellation does not apply to this thread, nothing is + * done, otherwise, it + * 2. Clears state information in the caller's TCB and decrements a + * nesting count. + * 3. If this is the outermost nesting level, it checks if there is a + * pending cancellation and, if so, calls either exit() or + * pthread_exit(), depending upon the type of the thread. + * + * Input Parameters: + * None + * + * Returned Value + * None + * + ****************************************************************************/ + +void leave_cancellation_point(void) +{ + FAR struct tcb_s *tcb = this_task(); + + /* Disabling pre-emption should provide sufficient protection. We only + * need the TCB to be stationary (no interrupt level modification is + * anticipated). + * + * REVISIT: is locking the scheduler sufficent in SMP mode? + */ + + sched_lock(); + + /* If cancellation is disabled on this thread or if this thread is using + * asynchronous cancellation, then do nothing. Here we check only the + * nesting level: if the cpcount count is greater than zero, then the + * required condition was certainly true at the outermost nesting level. + */ + + if (tcb->cpcount > 0) + { + /* Decrement the nesting level. If if would decrement to zero, then + * we are at the outermost nesting level and may need to do more. + */ + + if (tcb->cpcount == 1) + { + /* We are no longer at the cancellation point */ + + tcb->cpcount = 0; + + /* If there is a pending cancellation then just exit according to + * the type of the thread. + */ + + if ((tcb->flags & TCB_FLAG_CANCEL_PENDING) != 0) + { +#ifndef CONFIG_DISABLE_PTHREAD + if ((tcb->flags & TCB_FLAG_TTYPE_MASK) == TCB_FLAG_TTYPE_PTHREAD) + { + pthread_exit(PTHREAD_CANCELED); + } + else +#endif + { + exit(EXIT_FAILURE); + } + } + } + else + { + /* We are not at the outermost nesting level. Just decrment the + * nesting level count. + */ + + tcb->cpcount--; + } + } + + sched_unlock(); +} + +/**************************************************************************** + * Name: notify_cancellation + * + * Description: + * Called by task_delete() or pthread_cancel() if the cancellation occurs + * while we the thread is within the cancellation point. This logic + * behaves much like sending a signal: It will cause waiting threads + * to wake up and terminated with ECANCELED. A call to + * leave_cancellation_point() whould then follow, causing the thread to + * exit. + * + ****************************************************************************/ + +void notify_cancellation(FAR struct tcb_s *tcb) +{ + irqstate_t flags; + + /* We need perform the following operations from within a critical section + * because it can compete with interrupt level activity. + */ + + flags = enter_critical_section(); + + /* Make sure that the cancellation pending indication is set. */ + + tcb->flags |= TCB_FLAG_CANCEL_PENDING; + + /* We only notify the cancellation if (1) the thread has not disabled + * cancellation, (2) the thread uses the deffered cancellation mode, + * (3) the thread is waiting within a cancellation point. + */ + + if (((tcb->flags & TCB_FLAG_NONCANCELABLE) == 0 && + (tcb->flags & TCB_FLAG_CANCEL_DEFERRED) != 0) || + tcb->cpcount > 0) + { + /* If the thread is blocked waiting for a semaphore, then the thread + * must be unblocked to handle the cancellation. + */ + + if (tcb->task_state == TSTATE_WAIT_SEM) + { + sem_waitirq(tcb, ECANCELED); + } + + /* If the thread is blocked waiting on a message queue, then the + * thread must be unblocked to handle the cancellation. + */ + +#ifndef CONFIG_DISABLE_MQUEUE + if (tcb->task_state == TSTATE_WAIT_MQNOTEMPTY || + tcb->task_state == TSTATE_WAIT_MQNOTFULL) + { + mq_waitirq(tcb, ECANCELED); + } +#endif + } + + leave_critical_section(flags); +} + +#endif /* CONFIG_CANCELLATION_POINTS */ diff --git a/sched/task/task_delete.c b/sched/task/task_delete.c index 5b4c0f747dc..755584fd0c1 100644 --- a/sched/task/task_delete.c +++ b/sched/task/task_delete.c @@ -1,7 +1,7 @@ /**************************************************************************** * sched/task/task_delete.c * - * Copyright (C) 2007-2009, 2011-2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011-2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -40,6 +40,7 @@ #include #include +#include #include @@ -64,37 +65,111 @@ * redirected to exit(). This can only happen if a task calls task_delete() * in order to delete itself. * - * In fact, this function (and task_terminate) are the final functions - * called all task termination sequences. task_delete may be called - * from: - * - * - task_restart(), - * - pthread_cancel(), - * - and directly from user code. - * - * Other exit paths (exit(), _eixt(), and pthread_exit()) will go through - * task_terminate() + * This function obeys the semantics of pthread cancellation: task + * deletion is deferred if cancellation is disabled or if deferred + * cancellation is supported (with cancellation points enabled). * * Inputs: * pid - The task ID of the task to delete. A pid of zero * signifies the calling task. * * Return Value: - * OK on success; or ERROR on failure - * - * This function can fail if the provided pid does not correspond to a - * task (errno is not set) + * OK on success; or ERROR on failure with the errno variable set + * appropriately. * ****************************************************************************/ int task_delete(pid_t pid) { + FAR struct tcb_s *dtcb; FAR struct tcb_s *rtcb; + int ret; + + /* Check if the task to delete is the calling task: PID=0 means to delete + * the calling task. In this case, task_delete() is much like exit() + * except that it obeys the cancellation semantics. + */ + + rtcb = this_task(); + if (pid == 0) + { + pid = rtcb->pid; + } + + /* Get the TCB of the task to be deleted */ + + dtcb = (FAR struct tcb_s *)sched_gettcb(pid); + if (dtcb == NULL) + { + /* The pid does not correspond to any known thread. The task + * has probably already exited. + */ + + set_errno(ESRCH); + return ERROR; + } + + /* Only tasks and kernel threads should use this interface */ + + DEBUGASSERT((dtcb->flags & TCB_FLAG_TTYPE_MASK) != TCB_FLAG_TTYPE_PTHREAD); + + /* Check to see if this task has the non-cancelable bit set in its + * flags. Suppress context changes for a bit so that the flags are stable. + * (the flags should not change in interrupt handling). + */ + + sched_lock(); + if ((dtcb->flags & TCB_FLAG_NONCANCELABLE) != 0) + { + /* Then we cannot cancel the thread now. Here is how this is + * supposed to work: + * + * "When cancelability is disabled, all cancels are held pending + * in the target thread until the thread changes the cancelability. + * When cancelability is deferred, all cancels are held pending in + * the target thread until the thread changes the cancelability, calls + * a function which is a cancellation point or calls pthread_testcancel(), + * thus creating a cancellation point. When cancelability is asynchronous, + * all cancels are acted upon immediately, interrupting the thread with its + * processing." + */ + + dtcb->flags |= TCB_FLAG_CANCEL_PENDING; + sched_unlock(); + return OK; + } + +#ifdef CONFIG_CANCELLATION_POINTS + /* Check if this task supports deferred cancellation */ + + if ((dtcb->flags & TCB_FLAG_CANCEL_DEFERRED) != 0) + { + /* Then we cannot cancel the task asynchronously. Mark the cancellation + * as pending. + */ + + dtcb->flags |= TCB_FLAG_CANCEL_PENDING; + + /* If the task is waiting at a cancellation point, then notify of the + * cancellation thereby waking the task up with an ECANCELED error. + * + * REVISIT: is locking the scheduler sufficent in SMP mode? + */ + + if (dtcb->cpcount > 0) + { + notify_cancellation(dtcb); + } + + sched_unlock(); + return OK; + } +#endif /* Check if the task to delete is the calling task */ - rtcb = this_task(); - if (pid == 0 || pid == rtcb->pid) + sched_unlock(); + if (pid == rtcb->pid) { /* If it is, then what we really wanted to do was exit. Note that we * don't bother to unlock the TCB since it will be going away. @@ -103,7 +178,16 @@ int task_delete(pid_t pid) exit(EXIT_SUCCESS); } - /* Then let task_terminate do the heavy lifting */ + /* Otherwise, perform the asynchronous cancellation, letting + * task_terminate() do all of the heavy lifting. + */ - return task_terminate(pid, false); + ret = task_terminate(pid, false); + if (ret < 0) + { + set_errno(-ret); + return ERROR; + } + + return OK; } diff --git a/sched/task/task_exithook.c b/sched/task/task_exithook.c index cffae18e7d9..3c44135330c 100644 --- a/sched/task/task_exithook.c +++ b/sched/task/task_exithook.c @@ -73,6 +73,14 @@ static inline void task_atexit(FAR struct tcb_s *tcb) /* Make sure that we have not already left the group. Only the final * exiting thread in the task group should trigger the atexit() * callbacks. + * + * REVISIT: This is a security problem In the PROTECTED and KERNEL builds: + * We must not call the registered function in supervisor mode! See also + * on_exit() and pthread_cleanup_pop() callbacks. + * + * REVISIT: In the case of task_delete(), the callback would execute in + * the context the caller of task_delete() cancel, not in the context of + * the exiting task (or process). */ if (group && group->tg_nmembers == 1) @@ -133,6 +141,14 @@ static inline void task_onexit(FAR struct tcb_s *tcb, int status) /* Make sure that we have not already left the group. Only the final * exiting thread in the task group should trigger the atexit() * callbacks. + * + * REVISIT: This is a security problem In the PROTECTED and KERNEL builds: + * We must not call the registered function in supervisor mode! See also + * atexit() and pthread_cleanup_pop() callbacks. + * + * REVISIT: In the case of task_delete(), the callback would execute in + * he context the caller of task_delete() cancel, not in the context of + * the exiting task (or process). */ if (group && group->tg_nmembers == 1) @@ -596,6 +612,17 @@ void task_exithook(FAR struct tcb_s *tcb, int status, bool nonblocking) return; } +#ifdef CONFIG_CANCELLATION_POINTS + /* Mark the task as non-cancelable to avoid additional calls to exit() + * due to any cancellation point logic that might get kicked off by + * actions taken during exit processing. + */ + + tcb->flags |= TCB_FLAG_NONCANCELABLE; + tcb->flags &= ~TCB_FLAG_CANCEL_PENDING; + tcb->cpcount = 0; +#endif + #if defined(CONFIG_SCHED_ATEXIT) || defined(CONFIG_SCHED_ONEXIT) /* If exit function(s) were registered, call them now before we do any un- * initialization. diff --git a/sched/task/task_restart.c b/sched/task/task_restart.c index 21aec95b474..e499a6c5988 100644 --- a/sched/task/task_restart.c +++ b/sched/task/task_restart.c @@ -214,7 +214,7 @@ int task_restart(pid_t pid) ret = task_activate((FAR struct tcb_s *)tcb); if (ret != OK) { - (void)task_delete(pid); + (void)task_terminate(pid, true); errcode = -ret; goto errout_with_lock; } diff --git a/sched/task/task_setcancelstate.c b/sched/task/task_setcancelstate.c new file mode 100644 index 00000000000..d7003f3af7e --- /dev/null +++ b/sched/task/task_setcancelstate.c @@ -0,0 +1,164 @@ +/**************************************************************************** + * sched/task/task_setcancelstate.c + * + * Copyright (C) 2007, 2008, 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 "sched/sched.h" +#include "task/task.h" + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: task_setcancelstate + * + * Description: + * The task_setcancelstate() function atomically both sets the calling + * task's cancelability state to the indicated state and returns the + * previous cancelability state at the location referenced by oldstate. + * Legal values for state are TASK_CANCEL_ENABLE and TASK_CANCEL_DISABLE. + * + * The cancelability state and type of any newly created tasks are + * TASK_CANCEL_ENABLE and TASK_CANCEL_DEFERRED respectively. + * + * Input Parameters: + * state - the new cancellability state, either TASK_CANCEL_ENABLE or + * TASK_CANCEL_DISABLE + * oldstate - The location to return the old cancellability state. + * + * Returned Value: + * Zero (OK) on success; ERROR is returned on any failure with the + * errno value set appropriately. + * + ****************************************************************************/ + +int task_setcancelstate(int state, FAR int *oldstate) +{ + FAR struct tcb_s *tcb = this_task(); + int ret = OK; + + /* Suppress context changes for a bit so that the flags are stable. (the + * flags should not change in interrupt handling). + */ + + sched_lock(); + + /* Return the current state if so requrested */ + + if (oldstate != NULL) + { + if ((tcb->flags & TCB_FLAG_NONCANCELABLE) != 0) + { + *oldstate = TASK_CANCEL_DISABLE; + } + else + { + *oldstate = TASK_CANCEL_ENABLE; + } + } + + /* Set the new cancellation state */ + + if (state == TASK_CANCEL_ENABLE) + { + /* Clear the non-cancelable flag */ + + tcb->flags &= ~TCB_FLAG_NONCANCELABLE; + + /* Check if a cancellation was pending */ + + if ((tcb->flags & TCB_FLAG_CANCEL_PENDING) != 0) + { +#ifdef CONFIG_CANCELLATION_POINTS + /* If we are using deferred cancellation? */ + + if ((tcb->flags & TCB_FLAG_CANCEL_DEFERRED) != 0) + { + /* Yes.. If we are within a cancellation point, then + * notify of the cancellation. + */ + + if (tcb->cpcount > 0) + { + notify_cancellation(tcb); + } + } + else +#endif + { + /* No.. We are using asynchronous cancellation. If the + * cancellation was pending in this case, then just exit. + */ + + tcb->flags &= ~TCB_FLAG_CANCEL_PENDING; + +#ifndef CONFIG_DISABLE_PTHREAD + if ((tcb->flags & TCB_FLAG_TTYPE_MASK) == TCB_FLAG_TTYPE_PTHREAD) + { + pthread_exit(PTHREAD_CANCELED); + } + else +#endif + { + exit(EXIT_FAILURE); + } + } + } + } + else if (state == TASK_CANCEL_DISABLE) + { + /* Set the non-cancelable state */ + + tcb->flags |= TCB_FLAG_NONCANCELABLE; + } + else + { + set_errno(EINVAL); + ret = ERROR; + } + + sched_unlock(); + return ret; +} diff --git a/sched/pthread/pthread_setcancelstate.c b/sched/task/task_setcanceltype.c similarity index 57% rename from sched/pthread/pthread_setcancelstate.c rename to sched/task/task_setcanceltype.c index b9aab9a7d12..b7536f46258 100644 --- a/sched/pthread/pthread_setcancelstate.c +++ b/sched/task/task_setcanceltype.c @@ -1,7 +1,7 @@ /**************************************************************************** - * sched/pthread/pthread_setcancelstate.c + * sched/task/task_setcanceltype.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -37,19 +37,37 @@ * Included Files ****************************************************************************/ +#include + +#include #include +#include #include + #include "sched/sched.h" +#include "task/task.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: pthread_setcancelstate + * Name: task_setcancelstate + * + * Description: + * The task_setcanceltype() function atomically both sets the calling + * thread's cancelability type to the indicated type and returns the + * previous cancelability type at the location referenced by oldtype + * Legal values for type are TASK_CANCEL_DEFERRED and + * TASK_CANCEL_ASYNCHRONOUS. + * + * The cancelability state and type of any newly created threads, + * including the thread in which main() was first invoked, are + * TASK_CANCEL_ENABLE and TASK_CANCEL_DEFERRED respectively. + * ****************************************************************************/ -int pthread_setcancelstate(int state, FAR int *oldstate) +int task_setcanceltype(int type, FAR int *oldtype) { FAR struct tcb_s *tcb = this_task(); int ret = OK; @@ -60,43 +78,61 @@ int pthread_setcancelstate(int state, FAR int *oldstate) sched_lock(); - /* Return the current state if so requrested */ + /* Return the current type if so requrested */ - if (oldstate) + if (oldtype != NULL) { - if ((tcb->flags & TCB_FLAG_NONCANCELABLE) != 0) + if ((tcb->flags & TCB_FLAG_CANCEL_DEFERRED) != 0) { - *oldstate = PTHREAD_CANCEL_DISABLE; + *oldtype = TASK_CANCEL_DEFERRED; } else { - *oldstate = PTHREAD_CANCEL_ENABLE; + *oldtype = TASK_CANCEL_ASYNCHRONOUS; } } - /* Set the new cancellation state */ + /* Set the new cancellation type */ - if (state == PTHREAD_CANCEL_ENABLE) + if (type == TASK_CANCEL_ASYNCHRONOUS) { - unsigned flags = tcb->flags; + /* Clear the deferred cancellation bit */ - /* Clear the non-cancelable and cancel pending flags */ + tcb->flags &= ~TCB_FLAG_CANCEL_DEFERRED; - tcb->flags &= ~(TCB_FLAG_NONCANCELABLE | TCB_FLAG_CANCEL_PENDING); +#ifdef CONFIG_CANCELLATION_POINTS + /* If we just switched from deferred to asynchronous type and if a + * cancellation is pending, then exit now. + */ - /* If the cancel was pending, then just exit as requested */ - - if (flags & TCB_FLAG_CANCEL_PENDING) + if ((tcb->flags & TCB_FLAG_CANCEL_PENDING) != 0 && + (tcb->flags & TCB_FLAG_NONCANCELABLE) == 0) { - pthread_exit(PTHREAD_CANCELED); - } - } - else if (state == PTHREAD_CANCEL_DISABLE) - { - /* Set the non-cancelable state */ + tcb->flags &= ~TCB_FLAG_CANCEL_PENDING; - tcb->flags |= TCB_FLAG_NONCANCELABLE; + /* Exit according to the type of the thread */ + +#ifndef CONFIG_DISABLE_PTHREAD + if ((tcb->flags & TCB_FLAG_TTYPE_MASK) == TCB_FLAG_TTYPE_PTHREAD) + { + pthread_exit(PTHREAD_CANCELED); + } + else +#endif + { + exit(EXIT_FAILURE); + } + } +#endif } +#ifdef CONFIG_CANCELLATION_POINTS + else if (type == TASK_CANCEL_DEFERRED) + { + /* Set the deferred cancellation type */ + + tcb->flags |= TCB_FLAG_CANCEL_DEFERRED; + } +#endif else { ret = EINVAL; diff --git a/sched/task/task_setup.c b/sched/task/task_setup.c index 7b8b0864348..19736f86abb 100644 --- a/sched/task/task_setup.c +++ b/sched/task/task_setup.c @@ -378,6 +378,12 @@ static int thread_schedsetup(FAR struct tcb_s *tcb, int priority, tcb->flags &= ~TCB_FLAG_TTYPE_MASK; tcb->flags |= ttype; +#ifdef CONFIG_CANCELLATION_POINTS + /* Set the deferred cancellation type */ + + tcb->flags |= TCB_FLAG_CANCEL_DEFERRED; +#endif + /* Save the task ID of the parent task in the TCB and allocate * a child status structure. */ diff --git a/arch/arm/src/kl/kl_getc.h b/sched/task/task_testcancel.c similarity index 67% rename from arch/arm/src/kl/kl_getc.h rename to sched/task/task_testcancel.c index aff6b2a0b37..b0407173e3d 100644 --- a/arch/arm/src/kl/kl_getc.h +++ b/sched/task/task_testcancel.c @@ -1,7 +1,7 @@ -/************************************************************************************ - * arch/arm/src/kl/kl_getc.h +/**************************************************************************** + * sched/task/task_testcancel.c * - * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -31,18 +31,37 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************************************/ + ****************************************************************************/ -#ifndef __ARCH_ARM_SRC_KL_KINETIS_GETC_H -#define __ARCH_ARM_SRC_KL_KINETIS_GETC_H - -/************************************************************************************ +/**************************************************************************** * Included Files - ************************************************************************************/ + ****************************************************************************/ #include -#include "kl_config.h" -#include "chip/kl_uart.h" +#include +#include -#endif /* __ARCH_ARM_SRC_KL_KINETIS_GETC_H */ +#include + +#include "task/task.h" + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: task_testcancel + * + * Description: + * The task_testcancel() function creates a cancellation point in the + * calling thread. The task_testcancel() function has no effect if + * cancelability is disabled + * + ****************************************************************************/ + +void task_testcancel(void) +{ + (void)enter_cancellation_point(); + leave_cancellation_point(); +} diff --git a/syscall/syscall.csv b/syscall/syscall.csv index 8ecf52854fc..4dbcc98227f 100644 --- a/syscall/syscall.csv +++ b/syscall/syscall.csv @@ -64,6 +64,8 @@ "pthread_barrier_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrier_t*","FAR const pthread_barrierattr_t*","unsigned int" "pthread_barrier_wait","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrier_t*" "pthread_cancel","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t" +"pthread_cleanup_pop","pthread.h","defined(CONFIG_PTHREAD_CLEANUP)","void","int" +"pthread_cleanup_push","pthread.h","defined(CONFIG_PTHREAD_CLEANUP)","void","pthread_cleanup_t","FAR void*" "pthread_cond_broadcast","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_cond_t*" "pthread_cond_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_cond_t*" "pthread_cond_init","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_cond_t*","FAR const pthread_condattr_t*" @@ -87,7 +89,6 @@ "pthread_mutex_unlock","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_mutex_t*" "pthread_once","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_once_t*","CODE void (*)(void)" "pthread_setaffinity_np","pthread.h","!defined(CONFIG_DISABLE_PTHREAD) && defined(CONFIG_SMP)","int","pthread_t","size_t","FAR const cpu_set_t*" -"pthread_setcancelstate","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","int","FAR int*" "pthread_setschedparam","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t","int","FAR const struct sched_param*" "pthread_setschedprio","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t","int" "pthread_setspecific","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_key_t","FAR const void*" @@ -148,6 +149,9 @@ #"task_create","sched.h","","int","const char*","int","main_t","FAR char * const []|FAR char * const *" "task_delete","sched.h","","int","pid_t" "task_restart","sched.h","","int","pid_t" +"task_setcancelstate","sched.h","","int","int","FAR int*" +"task_setcanceltype","sched.h","defined(CONFIG_CANCELLATION_POINTS)","int","int","FAR int*" +"task_testcancel","pthread.h","defined(CONFIG_CANCELLATION_POINTS)","void" "telldir","dirent.h","CONFIG_NFILE_DESCRIPTORS > 0","off_t","FAR DIR*" "timer_create","time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","clockid_t","FAR struct sigevent*","FAR timer_t*" "timer_delete","time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","timer_t" diff --git a/syscall/syscall_lookup.h b/syscall/syscall_lookup.h index 0c16b8ce1e6..25807590d87 100644 --- a/syscall/syscall_lookup.h +++ b/syscall/syscall_lookup.h @@ -86,8 +86,14 @@ SYSCALL_LOOKUP(pgalloc, 2, STUB_pgalloc) #endif SYSCALL_LOOKUP(task_delete, 1, STUB_task_delete) SYSCALL_LOOKUP(task_restart, 1, STUB_task_restart) +SYSCALL_LOOKUP(task_setcancelstate, 2, STUB_task_setcancelstate) SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert) +# ifdef CONFIG_CANCELLATION_POINTS + SYSCALL_LOOKUP(task_setcanceltype, 2, STUB_task_setcanceltype) + SYSCALL_LOOKUP(task_testcancel, 0, STUB_task_testcancel) +# endif + /* The following can be individually enabled */ #ifdef CONFIG_ARCH_HAVE_VFORK @@ -290,7 +296,6 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert) SYSCALL_LOOKUP(pthread_mutex_trylock, 1, STUB_pthread_mutex_trylock) SYSCALL_LOOKUP(pthread_mutex_unlock, 1, STUB_pthread_mutex_unlock) SYSCALL_LOOKUP(pthread_once, 2, STUB_pthread_once) - SYSCALL_LOOKUP(pthread_setcancelstate, 2, STUB_pthread_setcancelstate) SYSCALL_LOOKUP(pthread_setschedparam, 3, STUB_pthread_setschedparam) SYSCALL_LOOKUP(pthread_setschedprio, 2, STUB_pthread_setschedprio) SYSCALL_LOOKUP(pthread_setspecific, 2, STUB_pthread_setspecific) @@ -304,6 +309,10 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert) SYSCALL_LOOKUP(pthread_kill, 2, STUB_pthread_kill) SYSCALL_LOOKUP(pthread_sigmask, 3, STUB_pthread_sigmask) # endif +# ifdef CONFIG_PTHREAD_CLEANUP + SYSCALL_LOOKUP(pthread_cleanup_push, 2, STUB_pthread_cleanup_push) + SYSCALL_LOOKUP(pthread_cleanup_pop, 1, STUB_pthread_cleanup_pop) +# endif #endif /* The following are defined only if message queues are enabled */ diff --git a/syscall/syscall_stublookup.c b/syscall/syscall_stublookup.c index f655e0800d0..fda336d5aa4 100644 --- a/syscall/syscall_stublookup.c +++ b/syscall/syscall_stublookup.c @@ -96,8 +96,14 @@ uintptr_t STUB_task_create(int nbr, uintptr_t parm1, uintptr_t parm2, uintptr_t parm3, uintptr_t parm4, uintptr_t parm5); uintptr_t STUB_task_delete(int nbr, uintptr_t parm1); uintptr_t STUB_task_restart(int nbr, uintptr_t parm1); +uintptr_t STUB_task_setcancelstate(int nbr, uintptr_t parm1, + uintptr_t parm2); uintptr_t STUB_up_assert(int nbr, uintptr_t parm1, uintptr_t parm2); +uintptr_t STUB_task_setcanceltype(int nbr, uintptr_t parm1, + uintptr_t parm2); +uintptr_t STUB_task_testcancel(int nbr); + /* The following can be individually enabled */ uintptr_t STUB_vfork(int nbr); @@ -290,8 +296,6 @@ uintptr_t STUB_pthread_mutex_lock(int nbr, uintptr_t parm1); uintptr_t STUB_pthread_mutex_trylock(int nbr, uintptr_t parm1); uintptr_t STUB_pthread_mutex_unlock(int nbr, uintptr_t parm1); uintptr_t STUB_pthread_once(int nbr, uintptr_t parm1, uintptr_t parm2); -uintptr_t STUB_pthread_setcancelstate(int nbr, uintptr_t parm1, - uintptr_t parm2); uintptr_t STUB_pthread_setschedparam(int nbr, uintptr_t parm1, uintptr_t parm2, uintptr_t parm3); uintptr_t STUB_pthread_setschedprio(int nbr, uintptr_t parm1, @@ -311,6 +315,10 @@ uintptr_t STUB_pthread_kill(int nbr, uintptr_t parm1, uintptr_t parm2); uintptr_t STUB_pthread_sigmask(int nbr, uintptr_t parm1, uintptr_t parm2, uintptr_t parm3); +uintptr_t STUB_pthread_cleanup_pop(int nbr, uintptr_t parm1); +uintptr_t STUB_pthread_cleanup_push(int nbr, uintptr_t parm1, + uintptr_t parm2); + /* The following are defined only if message queues are enabled */ uintptr_t STUB_mq_close(int nbr, uintptr_t parm1);