From c631ae5d437cd820537639184f8c6a40616aa1ed Mon Sep 17 00:00:00 2001 From: Serge Vakulenko Date: Tue, 8 Sep 2015 14:25:59 -0700 Subject: [PATCH] Kconfig: generate xxx_ENABLED defines automatically. --- sys/pic32/32mxsdram/Config | 6 - sys/pic32/32mxsdram/Makefile | 13 +- sys/pic32/Config.generic | 20 --- sys/pic32/baremetal/Config | 5 - sys/pic32/baremetal/Makefile | 9 +- sys/pic32/devsw.c | 7 +- sys/pic32/duinomite-emega/Config | 5 - sys/pic32/duinomite-emega/Config-uart | 5 - sys/pic32/duinomite-emega/Makefile | 9 +- sys/pic32/duinomite/Config | 5 - sys/pic32/duinomite/Config-uart | 5 - sys/pic32/duinomite/Makefile | 9 +- sys/pic32/explorer16/Config | 5 - sys/pic32/explorer16/Makefile | 9 +- sys/pic32/fubarino/Config | 6 - sys/pic32/fubarino/Config-uart-sramc | 7 - sys/pic32/fubarino/Makefile | 11 +- sys/pic32/max32/Config | 9 -- sys/pic32/max32/Makefile | 15 +- sys/pic32/maximite-color/Config | 5 - sys/pic32/maximite-color/Makefile | 9 +- sys/pic32/maximite/Config | 5 - sys/pic32/maximite/Makefile | 9 +- sys/pic32/mmb-mx7/Config | 6 - sys/pic32/mmb-mx7/Makefile | 11 +- sys/pic32/picadillo/Config | 6 - sys/pic32/picadillo/Config-rambo | 7 - sys/pic32/picadillo/Makefile | 11 +- sys/pic32/pinguino-micro/Config | 5 - sys/pic32/pinguino-micro/Makefile | 9 +- sys/pic32/sdxl/Config | 6 - sys/pic32/sdxl/Makefile | 11 +- sys/pic32/starter-kit/Config | 5 - sys/pic32/starter-kit/Makefile | 9 +- sys/pic32/ubw32/Config | 5 - sys/pic32/ubw32/Config-uart | 5 - sys/pic32/ubw32/Makefile | 10 +- sys/pic32/wf32/Config | 5 - sys/pic32/wf32/Makefile | 9 +- tools/kconfig/Makefile | 3 +- tools/kconfig/main.c | 1 - tools/kconfig/mkheaders.c | 200 -------------------------- tools/kconfig/mkmakefile.c | 21 ++- 43 files changed, 110 insertions(+), 423 deletions(-) delete mode 100644 tools/kconfig/mkheaders.c diff --git a/sys/pic32/32mxsdram/Config b/sys/pic32/32mxsdram/Config index 6cd67c5..a2f63e6 100644 --- a/sys/pic32/32mxsdram/Config +++ b/sys/pic32/32mxsdram/Config @@ -40,14 +40,12 @@ config unix root on sd0a # Serial UART ports device uart3 -options "UART3_ENABLED" # TODO: delete this option # Console options options "CONSOLE_DEVICE=tty2" # /dev/tty2 # SPI ports controller spi4 # SD card -options "SPI_ENABLED" # TODO: delete this option # sdcard's definition for the SPI port, sdcard's chipselect and high-side power switch # because of a mod on the board we use power=B13, otherwise it shall be D12 @@ -61,19 +59,15 @@ options "SD0_ENA_PIN=13" # ...use pin RB13 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option # Use SDRAM driver for the external ramdisk disk sdramp0 # SDRAM on external memory bus -options "SDRAMP_ENABLED" # TODO: delete this option options "KERNEL_EXECUTABLE_RAM" # allow kernel code in RAM area # This defines the swap size and a fs partition size on the external ramdisk. diff --git a/sys/pic32/32mxsdram/Makefile b/sys/pic32/32mxsdram/Makefile index a591bdb..c78572d 100644 --- a/sys/pic32/32mxsdram/Makefile +++ b/sys/pic32/32mxsdram/Makefile @@ -1,21 +1,22 @@ PARAM = -DCUSTOM_32MXSDRAM PARAM += -DPIC32MX7 +PARAM += -DUART3_ENABLED +PARAM += -DSPI4_ENABLED +PARAM += -DSD_ENABLED +PARAM += -DGPIO_ENABLED +PARAM += -DADC_ENABLED +PARAM += -DPWM_ENABLED +PARAM += -DSDRAMP_ENABLED PARAM += -DNMOUNT=3 PARAM += -DPARTITION='sdramp0:sa@2048,fs@14000' PARAM += -DKERNEL_EXECUTABLE_RAM -PARAM += -DSDRAMP_ENABLED -PARAM += -DPWM_ENABLED -PARAM += -DADC_ENABLED -PARAM += -DGPIO_ENABLED PARAM += -DSD0_ENA_PIN=13 PARAM += -DSD0_ENA_PORT=TRISB PARAM += -DSD0_CS_PIN=3 PARAM += -DSD0_CS_PORT=TRISF PARAM += -DSD0_PORT=4 PARAM += -DSD0_MHZ=10 -PARAM += -DSPI_ENABLED PARAM += -DCONSOLE_DEVICE=tty2 -PARAM += -DUART3_ENABLED PARAM += -DLED_TTY_PIN=14 PARAM += -DLED_TTY_PORT=TRISA PARAM += -DLED_SWAP_PIN=14 diff --git a/sys/pic32/Config.generic b/sys/pic32/Config.generic index d20d782..bab1bbe 100644 --- a/sys/pic32/Config.generic +++ b/sys/pic32/Config.generic @@ -63,10 +63,6 @@ device uart1 # Serial-to-USB converter device uart2 device uart3 device uart4 -options "UART1_ENABLED" # TODO: delete this option -options "UART2_ENABLED" # TODO: delete this option -options "UART3_ENABLED" # TODO: delete this option -options "UART4_ENABLED" # TODO: delete this option options "UART1_BAUD=115200" # default speed options "UART2_BAUD=115200" # default speed options "UART3_BAUD=115200" # default speed @@ -78,7 +74,6 @@ options "UART4_ENA_PIN=13" # ...use pin RB13 device uartusb # USB device mode, CDC function options "UARTUSB_BAUD=115200" # default speed options "USB_AUTOBOOT=YES" # don't wait for on boot -options "UARTUSB_ENABLED" # TODO: delete this option options "USB_MAX_EP_NUMBER=3" # parameters of USB device... options "USB_NUM_STRING_DESCRIPTORS=3" # ...specific for CDC function @@ -89,7 +84,6 @@ options "CONSOLE_DEVICE=tty0" # /dev/tty0 # SPI ports controller spi2 # SD card -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi2 flags 0x3e # select pin RC14 @@ -102,41 +96,32 @@ options "SD0_ENA_PIN=5" # ...use pin RA5 # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option options "GPIO_CLEAR_PORT=TRISA" # clear on startup... options "GPIO_CLEAR_PIN=5" # ...pin RA5 # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option # GLCD driver device glcd -options "GLCD_ENABLED" # TODO: delete this option # HX8357 driver device hxtft -options "HX8357_ENABLED" # TODO: delete this option # Skeleton driver device skel0 -options "SKEL_ENABLED" # TODO: delete this option # Pseudo terminals pseudo-device pty 4 -options "PTY_ENABLED" # TODO: delete this option # System log pseudo-device log -options "LOG_ENABLED" # TODO: delete this option # Power control pseudo-device power -options "POWER_ENABLED" # TODO: delete this option options "POWER_LED_PORT=TRISA" # for power LED... options "POWER_LED_PIN=3" # ...use pin RA3 options "POWER_SWITCH_PORT=TRISA" # for power switch... @@ -150,12 +135,10 @@ options "POWER_CONTROL_PIN=5" # ...use pin RA5 # sdramp - SDRAM block device disk sdramp0 # SDRAM on external memory bus -options "SDRAMP_ENABLED" # TODO: delete this option options "KERNEL_EXECUTABLE_RAM" # allow kernel code in RAM area # sramc - SRAM block device disk sramc0 # SRAM via 4-wire CPLD interface -options "SRAMC_ENABLED" # TODO: delete this option options "SRAMC_DATA_PORT=TRISE" # for DATA signal... options "SRAMC_DATA_PIN=0" # ...use pin RE0 options "SRAMC_LDA_PORT=TRISC" # for LDA signal... @@ -168,7 +151,6 @@ options "SRAMC_WR_PIN=0" # ...use pin RF0 # picga - SPI block device controller spi1 # RAM disk: picga disk picga0 at spi1 -options "PICGA_ENABLED" # TODO: delete this option options "PICGA_BUS=SPI1CON" # TODO: delete this option options "PICGA_CS_PORT=TRISA" # for CS... options "PICGA_CS_PIN=4" # ...use pin RA4 @@ -176,7 +158,6 @@ options "PICGA_CS_PIN=4" # ...use pin RA4 # mrams - SPI block device controller spi1 # RAM disk: mrams disk mrams0 at spi1 -options "MRAMS_ENABLED" # TODO: delete this option options "MRAMS_PORT=SPI1CON" # TODO: delete this option options "MRAMS_CHIPS=6" # number of chips options "MRAMS_CHIPSIZE=512" # chip size in kbytes @@ -209,7 +190,6 @@ options "MRAMS_LED5_PIN=5" # ...use pin RF5 # spirams - SPI block device controller spi1 # RAM disk: spirams disk spirams0 at spi1 -options "SPIRAMS_ENABLED" # TODO: delete this option options "SPIRAMS_PORT=SPI1CON" # TODO: delete this option options "SPIRAMS_CHIPSIZE=128" # chip size in kbytes options "SPIRAMS_CHIPS=16" # number of chips diff --git a/sys/pic32/baremetal/Config b/sys/pic32/baremetal/Config index 149e516..6316613 100644 --- a/sys/pic32/baremetal/Config +++ b/sys/pic32/baremetal/Config @@ -36,14 +36,12 @@ config unix root on sd0a # Serial UART ports device uart1 -options "UART1_ENABLED" # TODO: delete this option # Console options options "CONSOLE_DEVICE=tty0" # /dev/tty0 # SPI ports controller spi2 # SD card -options "SPI_ENABLED" # TODO: delete this option # SD card disk sd0 at spi2 flags 0x41 # select pin RD1 @@ -54,12 +52,9 @@ options "SD0_CS_PIN=1" # ...use pin RD1 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option diff --git a/sys/pic32/baremetal/Makefile b/sys/pic32/baremetal/Makefile index 4e7a101..55d8765 100644 --- a/sys/pic32/baremetal/Makefile +++ b/sys/pic32/baremetal/Makefile @@ -1,15 +1,16 @@ PARAM = -DBAREMETAL PARAM += -DPIC32MX7 -PARAM += -DPWM_ENABLED -PARAM += -DADC_ENABLED +PARAM += -DUART1_ENABLED +PARAM += -DSPI2_ENABLED +PARAM += -DSD_ENABLED PARAM += -DGPIO_ENABLED +PARAM += -DADC_ENABLED +PARAM += -DPWM_ENABLED PARAM += -DSD0_CS_PIN=1 PARAM += -DSD0_CS_PORT=TRISD PARAM += -DSD0_PORT=2 PARAM += -DSD0_MHZ=16 -PARAM += -DSPI_ENABLED PARAM += -DCONSOLE_DEVICE=tty0 -PARAM += -DUART1_ENABLED PARAM += -DLED_TTY_PIN=12 PARAM += -DLED_TTY_PORT=TRISD PARAM += -DLED_DISK_PIN=2 diff --git a/sys/pic32/devsw.c b/sys/pic32/devsw.c index 1cdb59d..7dd562e 100644 --- a/sys/pic32/devsw.c +++ b/sys/pic32/devsw.c @@ -17,6 +17,7 @@ #include #include #include +#include #include @@ -31,9 +32,6 @@ extern int strcmp(char *s1, char *s2); #ifdef ADC_ENABLED # include #endif -#ifdef SPI_ENABLED -# include -#endif #ifdef GLCD_ENABLED # include #endif @@ -215,7 +213,8 @@ const struct cdevsw cdevsw[] = { #endif }, { /* 12 - spi */ -#ifdef SPI_ENABLED +#if defined(SPI1_ENABLED) || defined(SPI2_ENABLED) || \ + defined(SPI3_ENABLED) || defined(SPI4_ENABLED) spidev_open, spidev_close, spidev_read, spidev_write, spidev_ioctl, nulldev, 0, seltrue, nostrategy, 0, 0, spidevs diff --git a/sys/pic32/duinomite-emega/Config b/sys/pic32/duinomite-emega/Config index 9a05422..2c8daa9 100644 --- a/sys/pic32/duinomite-emega/Config +++ b/sys/pic32/duinomite-emega/Config @@ -39,13 +39,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB # Virtual UART on USB pseudo-device uartusb -options "UARTUSB_ENABLED" # TODO: delete this option options "USB_MAX_EP_NUMBER=3" options "USB_NUM_STRING_DESCRIPTORS=3" # SPI ports controller spi3 # SD card -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi3 flags 0x7c # select pin RG12 @@ -57,12 +55,9 @@ options "SD0_ENA_PIN=13" # ...use pin RG13 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option diff --git a/sys/pic32/duinomite-emega/Config-uart b/sys/pic32/duinomite-emega/Config-uart index ffba897..e8af882 100644 --- a/sys/pic32/duinomite-emega/Config-uart +++ b/sys/pic32/duinomite-emega/Config-uart @@ -39,13 +39,11 @@ options "CONSOLE_DEVICE=tty4" # Console on UART5 # Serial UART ports device uart5 # RS-232 port -options "UART5_ENABLED" # TODO: delete this option options "UART5_ENA_PORT=TRISB" # for RS-232 enable... TODO: use flags options "UART5_ENA_PIN=13" # ...use pin RB13 TODO: use flags # SPI ports controller spi3 # SD card -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi3 flags 0x7c # select pin RG12 @@ -57,12 +55,9 @@ options "SD0_ENA_PIN=13" # ...use pin RG13 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option diff --git a/sys/pic32/duinomite-emega/Makefile b/sys/pic32/duinomite-emega/Makefile index d2acab7..a7d3454 100644 --- a/sys/pic32/duinomite-emega/Makefile +++ b/sys/pic32/duinomite-emega/Makefile @@ -1,17 +1,18 @@ PARAM = -DDUINOMITE PARAM += -DPIC32MX7 -PARAM += -DPWM_ENABLED -PARAM += -DADC_ENABLED +PARAM += -DUARTUSB_ENABLED +PARAM += -DSPI3_ENABLED +PARAM += -DSD_ENABLED PARAM += -DGPIO_ENABLED +PARAM += -DADC_ENABLED +PARAM += -DPWM_ENABLED PARAM += -DSD0_ENA_PIN=13 PARAM += -DSD0_ENA_PORT=TRISG PARAM += -DSD0_CS_PIN=12 PARAM += -DSD0_CS_PORT=TRISG PARAM += -DSD0_PORT=3 -PARAM += -DSPI_ENABLED PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3 PARAM += -DUSB_MAX_EP_NUMBER=3 -PARAM += -DUARTUSB_ENABLED PARAM += -DCONSOLE_DEVICE=ttyUSB0 PARAM += -DLED_DISK_PIN=1 PARAM += -DLED_DISK_PORT=TRISC diff --git a/sys/pic32/duinomite/Config b/sys/pic32/duinomite/Config index 2d2dc3b..436f0fe 100644 --- a/sys/pic32/duinomite/Config +++ b/sys/pic32/duinomite/Config @@ -38,13 +38,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB # Virtual UART on USB pseudo-device uartusb -options "UARTUSB_ENABLED" # TODO: delete this option options "USB_MAX_EP_NUMBER=3" options "USB_NUM_STRING_DESCRIPTORS=3" # SPI ports controller spi3 # SD card -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi3 flags 0x45 # select pin RD5 @@ -56,12 +54,9 @@ options "SD0_ENA_PIN=13" # ...use pin RB13 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option diff --git a/sys/pic32/duinomite/Config-uart b/sys/pic32/duinomite/Config-uart index 57d5ee3..bc0820d 100644 --- a/sys/pic32/duinomite/Config-uart +++ b/sys/pic32/duinomite/Config-uart @@ -38,13 +38,11 @@ options "CONSOLE_DEVICE=tty4" # Console on UART5 # Serial UART ports device uart5 # RS-232 port -options "UART5_ENABLED" # TODO: delete this option options "UART5_ENA_PORT=TRISB" # for RS-232 enable... TODO: use flags options "UART5_ENA_PIN=13" # ...use pin RB13 TODO: use flags # SPI ports controller spi3 # SD card -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi3 flags 0x45 # select pin RD5 @@ -56,12 +54,9 @@ options "SD0_ENA_PIN=13" # ...use pin RB13 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option diff --git a/sys/pic32/duinomite/Makefile b/sys/pic32/duinomite/Makefile index 12ae392..3c09c0d 100644 --- a/sys/pic32/duinomite/Makefile +++ b/sys/pic32/duinomite/Makefile @@ -1,17 +1,18 @@ PARAM = -DDUINOMITE PARAM += -DPIC32MX7 -PARAM += -DPWM_ENABLED -PARAM += -DADC_ENABLED +PARAM += -DUARTUSB_ENABLED +PARAM += -DSPI3_ENABLED +PARAM += -DSD_ENABLED PARAM += -DGPIO_ENABLED +PARAM += -DADC_ENABLED +PARAM += -DPWM_ENABLED PARAM += -DSD0_ENA_PIN=13 PARAM += -DSD0_ENA_PORT=TRISB PARAM += -DSD0_CS_PIN=5 PARAM += -DSD0_CS_PORT=TRISD PARAM += -DSD0_PORT=3 -PARAM += -DSPI_ENABLED PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3 PARAM += -DUSB_MAX_EP_NUMBER=3 -PARAM += -DUARTUSB_ENABLED PARAM += -DCONSOLE_DEVICE=ttyUSB0 PARAM += -DLED_DISK_PIN=12 PARAM += -DLED_DISK_PORT=TRISB diff --git a/sys/pic32/explorer16/Config b/sys/pic32/explorer16/Config index a3290ef..b29202b 100644 --- a/sys/pic32/explorer16/Config +++ b/sys/pic32/explorer16/Config @@ -38,14 +38,12 @@ config unix root on sd0a # Serial UART ports device uart2 -options "UART2_ENABLED" # TODO: delete this option # Console options options "CONSOLE_DEVICE=tty1" # /dev/tty1 # SPI ports controller spi1 # SD card -options "SPI_ENABLED" # TODO: delete this option # SD card disk sd0 at spi1 flags 0x21 # select pin RB1 @@ -56,12 +54,9 @@ options "SD0_CS_PIN=1" # ...use pin RB1 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option diff --git a/sys/pic32/explorer16/Makefile b/sys/pic32/explorer16/Makefile index 532a5cc..d498544 100644 --- a/sys/pic32/explorer16/Makefile +++ b/sys/pic32/explorer16/Makefile @@ -1,15 +1,16 @@ PARAM = -DEXPLORER16 PARAM += -DPIC32MX7 -PARAM += -DPWM_ENABLED -PARAM += -DADC_ENABLED +PARAM += -DUART2_ENABLED +PARAM += -DSPI1_ENABLED +PARAM += -DSD_ENABLED PARAM += -DGPIO_ENABLED +PARAM += -DADC_ENABLED +PARAM += -DPWM_ENABLED PARAM += -DSD0_CS_PIN=1 PARAM += -DSD0_CS_PORT=TRISB PARAM += -DSD0_PORT=1 PARAM += -DSD0_MHZ=10 -PARAM += -DSPI_ENABLED PARAM += -DCONSOLE_DEVICE=tty1 -PARAM += -DUART2_ENABLED PARAM += -DLED_SWAP_PIN=3 PARAM += -DLED_SWAP_PORT=TRISA PARAM += -DLED_TTY_PIN=2 diff --git a/sys/pic32/fubarino/Config b/sys/pic32/fubarino/Config index 37b8e05..88904ac 100644 --- a/sys/pic32/fubarino/Config +++ b/sys/pic32/fubarino/Config @@ -36,13 +36,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB # Virtual UART on USB pseudo-device uartusb -options "UARTUSB_ENABLED" # TODO: delete this option options "USB_MAX_EP_NUMBER=3" options "USB_NUM_STRING_DESCRIPTORS=3" # SPI ports controller spi2 # SD card -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi2 flags 0x79 # select pin RG9 @@ -52,16 +50,12 @@ options "SD0_CS_PIN=9" # ...use pin RA9 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option # GLCD driver device glcd0 -options "GLCD_ENABLED" # TODO: delete this option diff --git a/sys/pic32/fubarino/Config-uart-sramc b/sys/pic32/fubarino/Config-uart-sramc index 95319d8..e455e03 100644 --- a/sys/pic32/fubarino/Config-uart-sramc +++ b/sys/pic32/fubarino/Config-uart-sramc @@ -42,12 +42,9 @@ options "CONSOLE_DEVICE=tty1" # Console on UART2 # Serial UART ports device uart1 # Additional serial port device uart2 # Console -options "UART1_ENABLED" # TODO: delete this option -options "UART2_ENABLED" # TODO: delete this option # SPI ports controller spi2 # SD card -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi2 flags 0x79 # select pin RG9 @@ -58,17 +55,13 @@ options "SD0_MHZ=20" # increase data speed # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option # sramc - SRAM block device disk sramc0 # SRAM via 4-wire CPLD interface -options "SRAMC_ENABLED" # TODO: delete this option options "PARTITION='sramc0:sa@2048,fs@6140'" # Partition schema diff --git a/sys/pic32/fubarino/Makefile b/sys/pic32/fubarino/Makefile index 11a354e..6b1bdb0 100644 --- a/sys/pic32/fubarino/Makefile +++ b/sys/pic32/fubarino/Makefile @@ -1,16 +1,17 @@ PARAM = -DFUBARINO PARAM += -DPIC32MX7 -PARAM += -DGLCD_ENABLED -PARAM += -DPWM_ENABLED -PARAM += -DADC_ENABLED +PARAM += -DUARTUSB_ENABLED +PARAM += -DSPI2_ENABLED +PARAM += -DSD_ENABLED PARAM += -DGPIO_ENABLED +PARAM += -DADC_ENABLED +PARAM += -DPWM_ENABLED +PARAM += -DGLCD_ENABLED PARAM += -DSD0_CS_PIN=9 PARAM += -DSD0_CS_PORT=TRISG PARAM += -DSD0_PORT=2 -PARAM += -DSPI_ENABLED PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3 PARAM += -DUSB_MAX_EP_NUMBER=3 -PARAM += -DUARTUSB_ENABLED PARAM += -DCONSOLE_DEVICE=ttyUSB0 PARAM += -DLED_KERNEL_PIN=5 PARAM += -DLED_KERNEL_PORT=TRISE diff --git a/sys/pic32/max32/Config b/sys/pic32/max32/Config index 1d32f9e..09f9fe5 100644 --- a/sys/pic32/max32/Config +++ b/sys/pic32/max32/Config @@ -35,17 +35,12 @@ device uart1 # Serial-to-USB converter device uart2 device uart3 device uart4 -options "UART1_ENABLED" # TODO: delete this option -options "UART2_ENABLED" # TODO: delete this option -options "UART3_ENABLED" # TODO: delete this option -options "UART4_ENABLED" # TODO: delete this option # Console options options "CONSOLE_DEVICE=tty0" # /dev/tty0 # SPI ports controller spi2 # SD card -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi2 flags 0x3e # select pin RC14 @@ -56,16 +51,12 @@ options "SD0_CS_PIN=14" # ...use pin RC14 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option # Skeleton driver #device skel0 -#options "SKEL_ENABLED" # TODO: delete this option diff --git a/sys/pic32/max32/Makefile b/sys/pic32/max32/Makefile index 907db31..d2ccf00 100644 --- a/sys/pic32/max32/Makefile +++ b/sys/pic32/max32/Makefile @@ -1,18 +1,19 @@ PARAM = -DMAX32 PARAM += -DPIC32MX7 -PARAM += -DPWM_ENABLED -PARAM += -DADC_ENABLED +PARAM += -DUART1_ENABLED +PARAM += -DUART2_ENABLED +PARAM += -DUART3_ENABLED +PARAM += -DUART4_ENABLED +PARAM += -DSPI2_ENABLED +PARAM += -DSD_ENABLED PARAM += -DGPIO_ENABLED +PARAM += -DADC_ENABLED +PARAM += -DPWM_ENABLED PARAM += -DSD0_CS_PIN=14 PARAM += -DSD0_CS_PORT=TRISC PARAM += -DSD0_PORT=2 PARAM += -DSD0_MHZ=10 -PARAM += -DSPI_ENABLED PARAM += -DCONSOLE_DEVICE=tty0 -PARAM += -DUART4_ENABLED -PARAM += -DUART3_ENABLED -PARAM += -DUART2_ENABLED -PARAM += -DUART1_ENABLED PARAM += -DLED_KERNEL_PIN=3 PARAM += -DLED_KERNEL_PORT=TRISA PARAM += -DBUS_DIV=1 diff --git a/sys/pic32/maximite-color/Config b/sys/pic32/maximite-color/Config index 5822665..cca3e8d 100644 --- a/sys/pic32/maximite-color/Config +++ b/sys/pic32/maximite-color/Config @@ -38,13 +38,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB # Virtual UART on USB pseudo-device uartusb -options "UARTUSB_ENABLED" # TODO: delete this option options "USB_MAX_EP_NUMBER=3" options "USB_NUM_STRING_DESCRIPTORS=3" # SPI ports controller spi4 # SD card -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi4 flags 0x11 # select pin RA1 @@ -54,12 +52,9 @@ options "SD0_CS_PIN=1" # ...use pin RA1 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option diff --git a/sys/pic32/maximite-color/Makefile b/sys/pic32/maximite-color/Makefile index b1caa01..17f5dc3 100644 --- a/sys/pic32/maximite-color/Makefile +++ b/sys/pic32/maximite-color/Makefile @@ -1,15 +1,16 @@ PARAM = -DMAXIMITE_COLOR PARAM += -DPIC32MX7 -PARAM += -DPWM_ENABLED -PARAM += -DADC_ENABLED +PARAM += -DUARTUSB_ENABLED +PARAM += -DSPI4_ENABLED +PARAM += -DSD_ENABLED PARAM += -DGPIO_ENABLED +PARAM += -DADC_ENABLED +PARAM += -DPWM_ENABLED PARAM += -DSD0_CS_PIN=1 PARAM += -DSD0_CS_PORT=TRISA PARAM += -DSD0_PORT=4 -PARAM += -DSPI_ENABLED PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3 PARAM += -DUSB_MAX_EP_NUMBER=3 -PARAM += -DUARTUSB_ENABLED PARAM += -DCONSOLE_DEVICE=ttyUSB0 PARAM += -DLED_DISK_PIN=1 PARAM += -DLED_DISK_PORT=TRISE diff --git a/sys/pic32/maximite/Config b/sys/pic32/maximite/Config index 7192dd5..ac7a571 100644 --- a/sys/pic32/maximite/Config +++ b/sys/pic32/maximite/Config @@ -39,13 +39,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB # Virtual UART on USB pseudo-device uartusb -options "UARTUSB_ENABLED" # TODO: delete this option options "USB_MAX_EP_NUMBER=3" options "USB_NUM_STRING_DESCRIPTORS=3" # SPI ports controller spi4 # SD card -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi4 flags 0x50 # select pin RE0 @@ -55,12 +53,9 @@ options "SD0_CS_PIN=0" # ...use pin RE0 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option diff --git a/sys/pic32/maximite/Makefile b/sys/pic32/maximite/Makefile index 0822f83..2282a0a 100644 --- a/sys/pic32/maximite/Makefile +++ b/sys/pic32/maximite/Makefile @@ -1,15 +1,16 @@ PARAM = -DMAXIMITE PARAM += -DPIC32MX7 -PARAM += -DPWM_ENABLED -PARAM += -DADC_ENABLED +PARAM += -DUARTUSB_ENABLED +PARAM += -DSPI4_ENABLED +PARAM += -DSD_ENABLED PARAM += -DGPIO_ENABLED +PARAM += -DADC_ENABLED +PARAM += -DPWM_ENABLED PARAM += -DSD0_CS_PIN=0 PARAM += -DSD0_CS_PORT=TRISE PARAM += -DSD0_PORT=4 -PARAM += -DSPI_ENABLED PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3 PARAM += -DUSB_MAX_EP_NUMBER=3 -PARAM += -DUARTUSB_ENABLED PARAM += -DCONSOLE_DEVICE=ttyUSB0 PARAM += -DLED_DISK_PIN=1 PARAM += -DLED_DISK_PORT=TRISE diff --git a/sys/pic32/mmb-mx7/Config b/sys/pic32/mmb-mx7/Config index 8f83a3f..8486336 100644 --- a/sys/pic32/mmb-mx7/Config +++ b/sys/pic32/mmb-mx7/Config @@ -42,17 +42,14 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB # Virtual UART on USB pseudo-device uartusb -options "UARTUSB_ENABLED" # TODO: delete this option options "USB_MAX_EP_NUMBER=3" options "USB_NUM_STRING_DESCRIPTORS=3" # Serial UART ports device uart1 # RS-232 port -options "UART1_ENABLED" # TODO: delete this option # SPI ports controller spi1 # SD card -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi1 flags 0x19 # select pin RA9 @@ -63,14 +60,11 @@ options "SD0_CS_PIN=9" # ...use pin RA9 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option options "GPIO_CLEAR_PORT=TRISD" # clear on startup... options "GPIO_CLEAR_PIN=2" # ...pin RD2 # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option diff --git a/sys/pic32/mmb-mx7/Makefile b/sys/pic32/mmb-mx7/Makefile index 8be1bcb..38ba0b2 100644 --- a/sys/pic32/mmb-mx7/Makefile +++ b/sys/pic32/mmb-mx7/Makefile @@ -1,19 +1,20 @@ PARAM = -DMMB_MX7 PARAM += -DPIC32MX7 -PARAM += -DPWM_ENABLED +PARAM += -DUARTUSB_ENABLED +PARAM += -DUART1_ENABLED +PARAM += -DSPI1_ENABLED +PARAM += -DSD_ENABLED +PARAM += -DGPIO_ENABLED PARAM += -DADC_ENABLED +PARAM += -DPWM_ENABLED PARAM += -DGPIO_CLEAR_PIN=2 PARAM += -DGPIO_CLEAR_PORT=TRISD -PARAM += -DGPIO_ENABLED PARAM += -DSD0_CS_PIN=9 PARAM += -DSD0_CS_PORT=TRISA PARAM += -DSD0_MHZ=8 PARAM += -DSD0_PORT=1 -PARAM += -DSPI_ENABLED -PARAM += -DUART1_ENABLED PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3 PARAM += -DUSB_MAX_EP_NUMBER=3 -PARAM += -DUARTUSB_ENABLED PARAM += -DCONSOLE_DEVICE=ttyUSB0 PARAM += -DLED_TTY_INVERT PARAM += -DLED_TTY_PIN=1 diff --git a/sys/pic32/picadillo/Config b/sys/pic32/picadillo/Config index 0933e60..f5d535c 100644 --- a/sys/pic32/picadillo/Config +++ b/sys/pic32/picadillo/Config @@ -29,14 +29,12 @@ config unix root on sd0a # Serial UART ports device uart1 # Serial-to-USB converter -options "UART1_ENABLED" # TODO: delete this option # Console options options "CONSOLE_DEVICE=tty0" # /dev/tty0 # SPI ports controller spi2 # SD card -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi2 flags 0x79 # select pin RG9 @@ -47,16 +45,12 @@ options "SD0_CS_PIN=9" # ...use pin RG9 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option # HX8357 TFT display driver device hxtft0 -options "HX8357_ENABLED" # TODO: delete this option diff --git a/sys/pic32/picadillo/Config-rambo b/sys/pic32/picadillo/Config-rambo index 531e6dc..c4815ae 100644 --- a/sys/pic32/picadillo/Config-rambo +++ b/sys/pic32/picadillo/Config-rambo @@ -29,7 +29,6 @@ config unix root on sd0a # Serial UART ports device uart1 # Serial-to-USB converter -options "UART1_ENABLED" # TODO: delete this option # Console options options "CONSOLE_DEVICE=tft0" # LCD screen @@ -37,7 +36,6 @@ options "CONSOLE_DEVICE=tft0" # LCD screen # SPI ports controller spi2 # SD card controller spi4 # RAM disk: spirams -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi2 flags 0x79 # select pin RG9 @@ -48,24 +46,19 @@ options "SD0_CS_PIN=9" # ...use pin RG9 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option # HX8357 TFT display driver device hxtft0 -options "HX8357_ENABLED" # TODO: delete this option # spirams - SPI block device disk spirams0 at spi4 options "PARTITION='spirams0:sa@2040'" # Partition schema -options "SPIRAMS_ENABLED" # TODO: delete this option options "SPIRAMS_PORT=SPI4CON" # TODO: delete this option options "SPIRAMS_CHIPSIZE=128" # chip size in kbytes options "SPIRAMS_CHIPS=16" # number of chips diff --git a/sys/pic32/picadillo/Makefile b/sys/pic32/picadillo/Makefile index 48d69b6..fb07079 100644 --- a/sys/pic32/picadillo/Makefile +++ b/sys/pic32/picadillo/Makefile @@ -1,16 +1,17 @@ PARAM = -DPICADILLO_35T PARAM += -DPIC32MX7 -PARAM += -DHX8357_ENABLED -PARAM += -DPWM_ENABLED -PARAM += -DADC_ENABLED +PARAM += -DUART1_ENABLED +PARAM += -DSPI2_ENABLED +PARAM += -DSD_ENABLED PARAM += -DGPIO_ENABLED +PARAM += -DADC_ENABLED +PARAM += -DPWM_ENABLED +PARAM += -DHXTFT_ENABLED PARAM += -DSD0_CS_PIN=9 PARAM += -DSD0_CS_PORT=TRISG PARAM += -DSD0_PORT=2 PARAM += -DSD0_MHZ=10 -PARAM += -DSPI_ENABLED PARAM += -DCONSOLE_DEVICE=tty0 -PARAM += -DUART1_ENABLED PARAM += -DBUS_DIV=1 PARAM += -DBUS_KHZ=80000 PARAM += -DCPU_KHZ=80000 diff --git a/sys/pic32/pinguino-micro/Config b/sys/pic32/pinguino-micro/Config index 62414d1..f40460b 100644 --- a/sys/pic32/pinguino-micro/Config +++ b/sys/pic32/pinguino-micro/Config @@ -36,13 +36,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB # Virtual UART on USB pseudo-device uartusb -options "UARTUSB_ENABLED" # TODO: delete this option options "USB_MAX_EP_NUMBER=3" options "USB_NUM_STRING_DESCRIPTORS=3" # SPI ports controller spi2 # SD card -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi2 flags 0x2d # select pin RB13 @@ -52,12 +50,9 @@ options "SD0_CS_PIN=13" # ...use pin RB13 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option diff --git a/sys/pic32/pinguino-micro/Makefile b/sys/pic32/pinguino-micro/Makefile index abe89fb..024442a 100644 --- a/sys/pic32/pinguino-micro/Makefile +++ b/sys/pic32/pinguino-micro/Makefile @@ -1,15 +1,16 @@ PARAM = -DPINGUINO_MICRO PARAM += -DPIC32MX7 -PARAM += -DPWM_ENABLED -PARAM += -DADC_ENABLED +PARAM += -DUARTUSB_ENABLED +PARAM += -DSPI2_ENABLED +PARAM += -DSD_ENABLED PARAM += -DGPIO_ENABLED +PARAM += -DADC_ENABLED +PARAM += -DPWM_ENABLED PARAM += -DSD0_CS_PIN=13 PARAM += -DSD0_CS_PORT=TRISB PARAM += -DSD0_PORT=2 -PARAM += -DSPI_ENABLED PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3 PARAM += -DUSB_MAX_EP_NUMBER=3 -PARAM += -DUARTUSB_ENABLED PARAM += -DCONSOLE_DEVICE=ttyUSB0 PARAM += -DLED_KERNEL_INVERT PARAM += -DLED_KERNEL_PIN=1 diff --git a/sys/pic32/sdxl/Config b/sys/pic32/sdxl/Config index aa40d50..9847b05 100644 --- a/sys/pic32/sdxl/Config +++ b/sys/pic32/sdxl/Config @@ -37,13 +37,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB # Virtual UART on USB pseudo-device uartusb -options "UARTUSB_ENABLED" # TODO: delete this option options "USB_MAX_EP_NUMBER=3" options "USB_NUM_STRING_DESCRIPTORS=3" # SPI ports controller spi2 # SD card -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi2 flags 0x79 # select pin RG9 @@ -53,16 +51,12 @@ options "SD0_CS_PIN=9" # ...use pin RA9 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option # GLCD driver device glcd0 -options "GLCD_ENABLED" # TODO: delete this option diff --git a/sys/pic32/sdxl/Makefile b/sys/pic32/sdxl/Makefile index 5f49cd5..c49e37f 100644 --- a/sys/pic32/sdxl/Makefile +++ b/sys/pic32/sdxl/Makefile @@ -1,16 +1,17 @@ PARAM = -DSDXL PARAM += -DPIC32MX7 -PARAM += -DGLCD_ENABLED -PARAM += -DPWM_ENABLED -PARAM += -DADC_ENABLED +PARAM += -DUARTUSB_ENABLED +PARAM += -DSPI2_ENABLED +PARAM += -DSD_ENABLED PARAM += -DGPIO_ENABLED +PARAM += -DADC_ENABLED +PARAM += -DPWM_ENABLED +PARAM += -DGLCD_ENABLED PARAM += -DSD0_CS_PIN=9 PARAM += -DSD0_CS_PORT=TRISG PARAM += -DSD0_PORT=2 -PARAM += -DSPI_ENABLED PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3 PARAM += -DUSB_MAX_EP_NUMBER=3 -PARAM += -DUARTUSB_ENABLED PARAM += -DCONSOLE_DEVICE=ttyUSB0 PARAM += -DLED_KERNEL_PIN=7 PARAM += -DLED_KERNEL_PORT=TRISE diff --git a/sys/pic32/starter-kit/Config b/sys/pic32/starter-kit/Config index e931286..6d58c38 100644 --- a/sys/pic32/starter-kit/Config +++ b/sys/pic32/starter-kit/Config @@ -38,13 +38,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB # Virtual UART on USB pseudo-device uartusb -options "UARTUSB_ENABLED" # TODO: delete this option options "USB_MAX_EP_NUMBER=3" options "USB_NUM_STRING_DESCRIPTORS=3" # SPI ports controller spi1 # SD card -options "SPI_ENABLED" # TODO: delete this option # SD card disk sd0 at spi1 flags 0x21 # select pin RB1 @@ -54,12 +52,9 @@ options "SD0_CS_PIN=1" # ...use pin RB1 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option diff --git a/sys/pic32/starter-kit/Makefile b/sys/pic32/starter-kit/Makefile index 993fbd8..f381907 100644 --- a/sys/pic32/starter-kit/Makefile +++ b/sys/pic32/starter-kit/Makefile @@ -1,15 +1,16 @@ PARAM = -DSTARTERKIT PARAM += -DPIC32MX7 -PARAM += -DPWM_ENABLED -PARAM += -DADC_ENABLED +PARAM += -DUARTUSB_ENABLED +PARAM += -DSPI1_ENABLED +PARAM += -DSD_ENABLED PARAM += -DGPIO_ENABLED +PARAM += -DADC_ENABLED +PARAM += -DPWM_ENABLED PARAM += -DSD0_CS_PIN=1 PARAM += -DSD0_CS_PORT=TRISB PARAM += -DSD0_PORT=1 -PARAM += -DSPI_ENABLED PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3 PARAM += -DUSB_MAX_EP_NUMBER=3 -PARAM += -DUARTUSB_ENABLED PARAM += -DCONSOLE_DEVICE=ttyUSB0 PARAM += -DLED_KERNEL_PIN=2 PARAM += -DLED_KERNEL_PORT=TRISD diff --git a/sys/pic32/ubw32/Config b/sys/pic32/ubw32/Config index ce9fac0..4d68d71 100644 --- a/sys/pic32/ubw32/Config +++ b/sys/pic32/ubw32/Config @@ -47,13 +47,11 @@ options "CONSOLE_DEVICE=ttyUSB0" # Console on USB # Virtual UART on USB pseudo-device uartusb -options "UARTUSB_ENABLED" # TODO: delete this option options "USB_MAX_EP_NUMBER=3" options "USB_NUM_STRING_DESCRIPTORS=3" # SPI ports controller spi1 # SD card -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi1 flags 0x19 # select pin RA9 @@ -67,12 +65,9 @@ options "SD1_CS_PIN=10" # ...use pin RA9 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option diff --git a/sys/pic32/ubw32/Config-uart b/sys/pic32/ubw32/Config-uart index 29b3e11..195830a 100644 --- a/sys/pic32/ubw32/Config-uart +++ b/sys/pic32/ubw32/Config-uart @@ -46,11 +46,9 @@ options "CONSOLE_DEVICE=tty1" # Console on UART2 # Serial UART ports device uart2 # USB-to-serial adapter -options "UART2_ENABLED" # TODO: delete this option # SPI ports controller spi1 # SD card -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi1 flags 0x19 # select pin RA9 @@ -64,12 +62,9 @@ options "SD1_CS_PIN=10" # ...use pin RA9 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option diff --git a/sys/pic32/ubw32/Makefile b/sys/pic32/ubw32/Makefile index 5ddf092..f1bac69 100644 --- a/sys/pic32/ubw32/Makefile +++ b/sys/pic32/ubw32/Makefile @@ -1,18 +1,20 @@ PARAM = -DUBW32 PARAM += -DPIC32MX7 -PARAM += -DPWM_ENABLED -PARAM += -DADC_ENABLED +PARAM += -DUARTUSB_ENABLED +PARAM += -DSPI1_ENABLED +PARAM += -DSD_ENABLED +PARAM += -DSD1_ENABLED PARAM += -DGPIO_ENABLED +PARAM += -DADC_ENABLED +PARAM += -DPWM_ENABLED PARAM += -DSD1_CS_PIN=10 PARAM += -DSD1_CS_PORT=TRISA PARAM += -DSD1_PORT=1 PARAM += -DSD0_CS_PIN=9 PARAM += -DSD0_CS_PORT=TRISA PARAM += -DSD0_PORT=1 -PARAM += -DSPI_ENABLED PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3 PARAM += -DUSB_MAX_EP_NUMBER=3 -PARAM += -DUARTUSB_ENABLED PARAM += -DCONSOLE_DEVICE=ttyUSB0 PARAM += -DLED_TTY_INVERT PARAM += -DLED_TTY_PIN=3 diff --git a/sys/pic32/wf32/Config b/sys/pic32/wf32/Config index 5beec81..0646681 100644 --- a/sys/pic32/wf32/Config +++ b/sys/pic32/wf32/Config @@ -34,14 +34,12 @@ config unix root on sd0a # Serial UART ports device uart1 # Serial-to-USB converter -options "UART1_ENABLED" # TODO: delete this option # Console options options "CONSOLE_DEVICE=tty0" # /dev/tty0 # SPI ports controller spi2 # SD card -options "SPI_ENABLED" # TODO: delete this option # microSD card disk sd0 at spi2 flags 0x44 # select pin RD4 @@ -52,12 +50,9 @@ options "SD0_CS_PIN=4" # ...use pin RD4 TODO: use fl # General purpose I/O ports device gpio0 -options "GPIO_ENABLED" # TODO: delete this option # ADC driver device adc0 -options "ADC_ENABLED" # TODO: delete this option # PWM driver device pwm0 -options "PWM_ENABLED" # TODO: delete this option diff --git a/sys/pic32/wf32/Makefile b/sys/pic32/wf32/Makefile index 50e5b89..9e37973 100644 --- a/sys/pic32/wf32/Makefile +++ b/sys/pic32/wf32/Makefile @@ -1,15 +1,16 @@ PARAM = -DWF32 PARAM += -DPIC32MX7 -PARAM += -DPWM_ENABLED -PARAM += -DADC_ENABLED +PARAM += -DUART1_ENABLED +PARAM += -DSPI2_ENABLED +PARAM += -DSD_ENABLED PARAM += -DGPIO_ENABLED +PARAM += -DADC_ENABLED +PARAM += -DPWM_ENABLED PARAM += -DSD0_CS_PIN=4 PARAM += -DSD0_CS_PORT=TRISD PARAM += -DSD0_PORT=2 PARAM += -DSD0_MHZ=10 -PARAM += -DSPI_ENABLED PARAM += -DCONSOLE_DEVICE=tty0 -PARAM += -DUART1_ENABLED PARAM += -DLED_TTY_PIN=1 PARAM += -DLED_TTY_PORT=TRISA PARAM += -DLED_DISK_PIN=0 diff --git a/tools/kconfig/Makefile b/tools/kconfig/Makefile index 57f981f..c2cee01 100644 --- a/tools/kconfig/Makefile +++ b/tools/kconfig/Makefile @@ -2,8 +2,7 @@ CC = gcc -g CFLAGS = -O -Wall -Werror YACC = byacc -d DESTDIR = /usr/local -OBJS = config.o main.o lang.o mkioconf.o mkmakefile.o mkheaders.o \ - mkswapconf.o +OBJS = config.o main.o lang.o mkioconf.o mkmakefile.o mkswapconf.o PROG = kconfig all: $(PROG) $(PROG).0 diff --git a/tools/kconfig/main.c b/tools/kconfig/main.c index ab3f6f0..9e9465a 100644 --- a/tools/kconfig/main.c +++ b/tools/kconfig/main.c @@ -87,7 +87,6 @@ usage: fputs("usage: kconfig [-gp] sysname\n", stderr); exit(1); } makefile(); /* build Makefile */ - headers(); /* make a lot of .h files */ swapconf(); /* swap config files */ exit(0); } diff --git a/tools/kconfig/mkheaders.c b/tools/kconfig/mkheaders.c deleted file mode 100644 index 76eec47..0000000 --- a/tools/kconfig/mkheaders.c +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (c) 1980, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* - * Make all the .h files for the optional entries - */ -#include -#include "config.h" -#include "y.tab.h" - -void do_header(dev, hname, count) - char *dev, *hname; - int count; -{ - char *file, *name, *inw, *toheader(), *tomacro(); - struct file_list *fl, *fl_head, *tflp; - FILE *inf, *outf; - int inc, oldcount; - - file = toheader(hname); - name = tomacro(dev); - inf = fopen(file, "r"); - oldcount = -1; - if (inf == 0) { - outf = fopen(file, "w"); - if (outf == 0) { - perror(file); - exit(1); - } - fprintf(outf, "#define %s %d\n", name, count); - (void) fclose(outf); - return; - } - fl_head = NULL; - for (;;) { - char *cp; - if ((inw = get_word(inf)) == 0 || inw == (char *)EOF) - break; - if ((inw = get_word(inf)) == 0 || inw == (char *)EOF) - break; - inw = strdup(inw); - cp = get_word(inf); - if (cp == 0 || cp == (char *)EOF) - break; - inc = atoi(cp); - if (eq(inw, name)) { - oldcount = inc; - inc = count; - } - cp = get_word(inf); - if (cp == (char *)EOF) - break; - fl = (struct file_list *) malloc(sizeof *fl); - bzero(fl, sizeof(*fl)); - fl->f_fn = inw; - fl->f_type = inc; - fl->f_next = fl_head; - fl_head = fl; - } - (void) fclose(inf); - if (count == oldcount) { - for (fl = fl_head; fl != NULL; fl = tflp) { - tflp = fl->f_next; - free(fl); - } - return; - } - if (oldcount == -1) { - fl = (struct file_list *) malloc(sizeof *fl); - bzero(fl, sizeof(*fl)); - fl->f_fn = name; - fl->f_type = count; - fl->f_next = fl_head; - fl_head = fl; - } - outf = fopen(file, "w"); - if (outf == 0) { - perror(file); - exit(1); - } - for (fl = fl_head; fl != NULL; fl = tflp) { - fprintf(outf, - "#define %s %u\n", fl->f_fn, count ? fl->f_type : 0); - tflp = fl->f_next; - free(fl); - } - (void) fclose(outf); -} - -/* - * count all the devices of a certain type and recurse to count - * whatever the device is connected to - */ -void do_count(dev, hname, search) - register char *dev, *hname; - int search; -{ - register struct device *dp, *mp; - register int count, hicount; - - /* - * After this loop, "count" will be the actual number of units, - * and "hicount" will be the highest unit declared. do_header() - * must use this higher of these values. - */ - for (hicount = count = 0, dp = dtab; dp != 0; dp = dp->d_next) - if (dp->d_unit != -1 && eq(dp->d_name, dev)) { - if (dp->d_type == PSEUDO_DEVICE) { - count = - dp->d_slave != UNKNOWN ? dp->d_slave : 1; - break; - } - count++; - /* - * Allow holes in unit numbering, - * assumption is unit numbering starts - * at zero. - */ - if (dp->d_unit + 1 > hicount) - hicount = dp->d_unit + 1; - if (search) { - mp = dp->d_conn; - if (mp != 0 && mp->d_conn != 0) { - do_count(mp->d_name, hname, 0); - search = 0; - } - } - } - do_header(dev, hname, count > hicount ? count : hicount); -} - -void headers() -{ - register struct file_list *fl; - - for (fl = ftab; fl != 0; fl = fl->f_next) - if (fl->f_needs != 0) - do_count(fl->f_needs, fl->f_needs, 1); -} - -/* - * convert a dev name to a .h file name - */ -char * -toheader(dev) - char *dev; -{ - static char hbuf[80]; - - (void) strcpy(hbuf, dev); - (void) strcat(hbuf, ".h"); - return (hbuf); -} - -/* - * convert a dev name to a macro name - */ -char *tomacro(dev) - register char *dev; -{ - static char mbuf[20]; - register char *cp; - - cp = mbuf; - *cp++ = 'N'; - while (*dev) - *cp++ = islower(*dev) ? toupper(*dev++) : *dev++; - *cp++ = 0; - return (mbuf); -} diff --git a/tools/kconfig/mkmakefile.c b/tools/kconfig/mkmakefile.c index 838781a..05ca4e7 100644 --- a/tools/kconfig/mkmakefile.c +++ b/tools/kconfig/mkmakefile.c @@ -410,6 +410,7 @@ void makefile() char line[BUFSIZ]; struct opt *op; struct cputype *cp; + struct device *dp; read_files(); strcpy(line, "../Makefile.kconf"); @@ -432,6 +433,12 @@ void makefile() for (cp = cputype; cp; cp = cp->cpu_next) { fprintf(ofp, "PARAM += -D%s\n", cp->cpu_name); } + for (dp = dtab; dp != 0; dp = dp->d_next) { + if (dp->d_unit <= 0) + fprintf(ofp, "PARAM += -D%s_ENABLED\n", raise(dp->d_name)); + else + fprintf(ofp, "PARAM += -D%s%d_ENABLED\n", raise(dp->d_name), dp->d_unit); + } for (op = opt; op; op = op->op_next) { if (op->op_value) fprintf(ofp, "PARAM += -D%s=\"%s\"\n", op->op_name, op->op_value); @@ -523,16 +530,20 @@ do_systemspec(f, fl, first) return (fl); } +/* + * Convert a name to uppercase. + * Return a pointer to a static buffer. + */ char * raise(str) register char *str; { - register char *cp = str; + static char buf[100]; + register char *cp = buf; while (*str) { - if (islower(*str)) - *str = toupper(*str); - str++; + *cp++ = islower(*str) ? toupper(*str++) : *str++; } - return (cp); + *cp = 0; + return buf; }