diff --git a/sys/pic32/32mxsdram-uart/32mxsdram-schematics.pdf b/sys/pic32/32mxsdram-uart/32mxsdram-schematics.pdf new file mode 100644 index 0000000..57a37d5 Binary files /dev/null and b/sys/pic32/32mxsdram-uart/32mxsdram-schematics.pdf differ diff --git a/sys/pic32/Makefile b/sys/pic32/Makefile index e0f9f93..18049c8 100644 --- a/sys/pic32/Makefile +++ b/sys/pic32/Makefile @@ -1,11 +1,9 @@ # Programs that live in subdirectories, and have makefiles of their own. # -SUBDIR = baremetal duinomite duinomite-emega \ - explorer16 max32 maximite \ - meb starter-kit sdxl ubw32 ubw32-uart \ - ubw32-uart-sdram baremetal fubarino mmb-mx7 maximite-color \ - 32mxsdram-uart picadillo wf32 pinguino-micro +SUBDIR = baremetal duinomite duinomite-emega explorer16 \ + fubarino max32 maximite maximite-color meb mmb-mx7 \ + picadillo pinguino-micro sdxl starter-kit ubw32 wf32 default: diff --git a/sys/pic32/picadillo/Makefile b/sys/pic32/picadillo/Makefile-old similarity index 100% rename from sys/pic32/picadillo/Makefile rename to sys/pic32/picadillo/Makefile-old diff --git a/sys/pic32/picadillo_rambo/Makefile b/sys/pic32/picadillo/Makefile-rambo-old similarity index 77% rename from sys/pic32/picadillo_rambo/Makefile rename to sys/pic32/picadillo/Makefile-rambo-old index a37cfa6..17c6479 100644 --- a/sys/pic32/picadillo_rambo/Makefile +++ b/sys/pic32/picadillo/Makefile-rambo-old @@ -18,30 +18,6 @@ DEFS += -DCPU_KHZ=80000 DEFS += -DCPU_MUL=20 DEFS += -DCPU_ODIV=1 DEFS += -DCRYSTAL=8 -DEFS += -DDC0_DEBUG=DEVCFG0_DEBUG_DISABLED -DEFS += -DDC0_ICE=0 -DEFS += -DDC1_CKM=0 -DEFS += -DDC1_CKS=0 -DEFS += -DDC1_FNOSC=DEVCFG1_FNOSC_PRIPLL -DEFS += -DDC1_IESO=DEVCFG1_IESO -DEFS += -DDC1_OSCIOFNC=0 -DEFS += -DDC1_PBDIV=DEVCFG1_FPBDIV_1 -DEFS += -DDC1_POSCMOD=DEVCFG1_POSCMOD_HS -DEFS += -DDC1_SOSC=0 -DEFS += -DDC1_WDTEN=0 -DEFS += -DDC1_WDTPS=DEVCFG1_WDTPS_1 -DEFS += -DDC2_PLLIDIV=DEVCFG2_FPLLIDIV_2 -DEFS += -DDC2_PLLMUL=DEVCFG2_FPLLMUL_20 -DEFS += -DDC2_PLLODIV=DEVCFG2_FPLLODIV_1 -DEFS += -DDC2_UPLL=0 -DEFS += -DDC2_UPLLIDIV=DEVCFG2_UPLLIDIV_2 -DEFS += -DDC3_CAN=DEVCFG3_FCANIO -DEFS += -DDC3_ETH=DEVCFG3_FETHIO -DEFS += -DDC3_MII=DEVCFG3_FMIIEN -DEFS += -DDC3_SRS=DEVCFG3_FSRSSEL_7 -DEFS += -DDC3_USBID=DEVCFG3_FUSBIDIO -DEFS += -DDC3_USERID=0xffff -DEFS += -DDC3_VBUSON=DEVCFG3_FVBUSONIO DEFS += -DEXEC_AOUT DEFS += -DEXEC_ELF DEFS += -DEXEC_SCRIPT @@ -96,7 +72,7 @@ DEFS += -DUCB_METER LDSCRIPT = ../../../tools/configsys/../../sys/pic32/cfg/bootloader-max32.ld -CONFIG = PICADILLO_RAMBO +CONFIG = PICADILLO-RAMBO CONFIGPATH = ../../../tools/configsys include ../../../tools/configsys/../../sys/pic32/kernel-post.mk diff --git a/sys/pic32/picadillo/PICADILLO b/sys/pic32/picadillo/PICADILLO index 5fd32a7..e036a10 100644 --- a/sys/pic32/picadillo/PICADILLO +++ b/sys/pic32/picadillo/PICADILLO @@ -2,8 +2,8 @@ # Picadillo 35T board # =================== # -# Console on UART1 -# SD/MMC card driver on SPI2 +# Console on UART1. +# SD/MMC card driver on SPI2. core pic32mx7 mapping picadillo diff --git a/sys/pic32/picadillo_rambo/PICADILLO_RAMBO b/sys/pic32/picadillo/PICADILLO-RAMBO similarity index 86% rename from sys/pic32/picadillo_rambo/PICADILLO_RAMBO rename to sys/pic32/picadillo/PICADILLO-RAMBO index 9e8dd20..66ddc86 100644 --- a/sys/pic32/picadillo_rambo/PICADILLO_RAMBO +++ b/sys/pic32/picadillo/PICADILLO-RAMBO @@ -1,6 +1,10 @@ # # Picadillo 35T board # =================== +# +# Console on TFT display. +# SD/MMC card driver on SPI2. +# SPI RAM on SPI4. core pic32mx7 mapping picadillo diff --git a/sys/pic32/picadillo_rambo/.gitignore b/sys/pic32/picadillo_rambo/.gitignore deleted file mode 100644 index 6a22af6..0000000 --- a/sys/pic32/picadillo_rambo/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -.compileversion -.deps/ -.oldversion -machine -sys -unix.bin -unix.map -usbboot.map -vers.c diff --git a/sys/pic32/retroone/Makefile b/sys/pic32/retroone/Makefile index c08ebdd..c97605e 100644 --- a/sys/pic32/retroone/Makefile +++ b/sys/pic32/retroone/Makefile @@ -9,7 +9,7 @@ vpath %.c $(M):$(S) vpath %.S $(M):$(S) # Kernel options. -DEFS += -I. -I$(H) -DKERNEL -DUCB_METER -DPIC32MX7 +DEFS += -I. -I$(H) -DKERNEL -DPIC32MX7 DEFS += -DGLOBAL_DEBUG # CPU frequency 80 MHz. @@ -38,13 +38,16 @@ ASFLAGS = $(DEFS) $(DEPFLAGS) include ../gcc-config.mk -CC = $(GCCPREFIX)gcc -EL -g -mips32r2 +CC = $(MIPS_GCC_PREFIX)gcc -EL -g -mips32r2 CC += -nostdinc -fno-builtin -Werror -Wall -fno-dwarf2-cfi-asm -LDFLAGS += -nostdlib -T ../cfg/bare.ld -Wl,-Map=unix.map -SIZE = $(GCCPREFIX)size -OBJDUMP = $(GCCPREFIX)objdump -OBJCOPY = $(GCCPREFIX)objcopy -MPIDE = /Applications/Mpide.app/Contents/Resources/Java/ +LDFLAGS = -nostdlib -T ../cfg/bare.ld -Wl,-Map=unix.map +SIZE = $(MIPS_GCC_PREFIX)size +OBJDUMP = $(MIPS_GCC_PREFIX)objdump +OBJCOPY = $(MIPS_GCC_PREFIX)objcopy + +ifneq (${MIPS_GCC_FORMAT},) + LDFLAGS += -Wl,--oformat=${MIPS_GCC_FORMAT} +endif # Machine-dependent files: # startup.o MUST be loaded first. @@ -60,6 +63,7 @@ KERNOBJ += init_main.o init_sysent.o kern_clock.o \ subr_log.o subr_prf.o subr_rmap.o \ sys_generic.o sys_inode.o syscalls.o \ sys_pipe.o sys_process.o tty.o exec_conf.o exec_subr.o \ + exec_aout.o exec_elf.o exec_script.o \ tty_subr.o tty_tty.o ufs_alloc.o ufs_bio.o \ ufs_bmap.o ufs_dsort.o ufs_fio.o \ ufs_inode.o ufs_mount.o ufs_namei.o ufs_subr.o \ @@ -76,20 +80,20 @@ KERNOBJ += vers.o devcfg.o -include Makefile.local # GPIO driver -KERNOBJ += gpio.o -DEFS += -DGPIO_ENABLED +KERNOBJ += gpio.o +DEFS += -DGPIO_ENABLED # ADC driver -KERNOBJ += adc.o -DEFS += -DADC_ENABLED +KERNOBJ += adc.o +DEFS += -DADC_ENABLED # GLCD driver -KERNOBJ += glcd.o -DEFS += -DGLCD_ENABLED +KERNOBJ += glcd.o +DEFS += -DGLCD_ENABLED # PWM driver -KERNOBJ += pwm.o -DEFS += -DPWM_ENABLED +KERNOBJ += pwm.o +DEFS += -DPWM_ENABLED all: .deps sys machine unix.elf $(SIZE) unix.elf diff --git a/sys/pic32/retroone/devcfg.c b/sys/pic32/retroone/devcfg.c index e17d102..a955010 100644 --- a/sys/pic32/retroone/devcfg.c +++ b/sys/pic32/retroone/devcfg.c @@ -23,3 +23,10 @@ PIC32_DEVCFG ( DEVCFG3_USERID(0xffff) | /* User-defined ID */ DEVCFG3_FSRSSEL_7 | /* Assign irq priority 7 to shadow set */ DEVCFG3_FETHIO); /* Default Ethernet i/o pins */ + +#include "sys/param.h" +#include "sys/conf.h" + +dev_t rootdev = makedev(0, 1); /* sd0a */ +dev_t dumpdev = makedev(0, 2); /* sd0b */ +dev_t swapdev = makedev(0, 2); /* sd0b */ diff --git a/sys/pic32/ubw32-uart-sdram/.gitignore b/sys/pic32/ubw32-uart-sdram/.gitignore deleted file mode 100644 index 6a22af6..0000000 --- a/sys/pic32/ubw32-uart-sdram/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -.compileversion -.deps/ -.oldversion -machine -sys -unix.bin -unix.map -usbboot.map -vers.c diff --git a/sys/pic32/ubw32-uart-sdram/devcfg.c b/sys/pic32/ubw32-uart-sdram/devcfg.c deleted file mode 100644 index ad48c89..0000000 --- a/sys/pic32/ubw32-uart-sdram/devcfg.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Chip configuration. - */ -#include "machine/pic32mx.h" - -PIC32_DEVCFG ( - DEVCFG0_DEBUG_DISABLED, /* ICE debugger enabled */ - - DEVCFG1_FNOSC_PRIPLL | /* Primary oscillator with PLL */ - DEVCFG1_POSCMOD_HS | /* HS oscillator */ - DEVCFG1_FPBDIV_1 | /* Peripheral bus clock = SYSCLK/1 */ - DEVCFG1_IESO | /* Internal-external switch over */ - DEVCFG1_WDTPS_1, /* Watchdog postscale = 1/1 */ - - DEVCFG2_FPLLIDIV_2 | /* PLL divider = 1/2 */ - DEVCFG2_FPLLMUL_20 | /* PLL multiplier = 20x */ - DEVCFG2_UPLLIDIV_2 | /* USB PLL divider = 1/2 */ - DEVCFG2_FPLLODIV_1, /* PLL postscaler = 1/1 */ - - DEVCFG3_USERID(0xffff) | /* User-defined ID */ - DEVCFG3_FSRSSEL_7 | /* Assign irq priority 7 to shadow set */ - DEVCFG3_FUSBIDIO | /* USBID pin: controlled by USB */ - DEVCFG3_FVBUSONIO | /* VBuson pin: controlled by USB */ - DEVCFG3_FCANIO | /* Default CAN pins */ - DEVCFG3_FETHIO); /* Default Ethernet i/o pins */ diff --git a/sys/pic32/ubw32-uart/.gitignore b/sys/pic32/ubw32-uart/.gitignore deleted file mode 100644 index 6a22af6..0000000 --- a/sys/pic32/ubw32-uart/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -.compileversion -.deps/ -.oldversion -machine -sys -unix.bin -unix.map -usbboot.map -vers.c diff --git a/sys/pic32/ubw32-uart/devcfg.c b/sys/pic32/ubw32-uart/devcfg.c deleted file mode 100644 index ad48c89..0000000 --- a/sys/pic32/ubw32-uart/devcfg.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Chip configuration. - */ -#include "machine/pic32mx.h" - -PIC32_DEVCFG ( - DEVCFG0_DEBUG_DISABLED, /* ICE debugger enabled */ - - DEVCFG1_FNOSC_PRIPLL | /* Primary oscillator with PLL */ - DEVCFG1_POSCMOD_HS | /* HS oscillator */ - DEVCFG1_FPBDIV_1 | /* Peripheral bus clock = SYSCLK/1 */ - DEVCFG1_IESO | /* Internal-external switch over */ - DEVCFG1_WDTPS_1, /* Watchdog postscale = 1/1 */ - - DEVCFG2_FPLLIDIV_2 | /* PLL divider = 1/2 */ - DEVCFG2_FPLLMUL_20 | /* PLL multiplier = 20x */ - DEVCFG2_UPLLIDIV_2 | /* USB PLL divider = 1/2 */ - DEVCFG2_FPLLODIV_1, /* PLL postscaler = 1/1 */ - - DEVCFG3_USERID(0xffff) | /* User-defined ID */ - DEVCFG3_FSRSSEL_7 | /* Assign irq priority 7 to shadow set */ - DEVCFG3_FUSBIDIO | /* USBID pin: controlled by USB */ - DEVCFG3_FVBUSONIO | /* VBuson pin: controlled by USB */ - DEVCFG3_FCANIO | /* Default CAN pins */ - DEVCFG3_FETHIO); /* Default Ethernet i/o pins */ diff --git a/sys/pic32/ubw32/Makefile b/sys/pic32/ubw32/Makefile-old similarity index 100% rename from sys/pic32/ubw32/Makefile rename to sys/pic32/ubw32/Makefile-old diff --git a/sys/pic32/ubw32-uart/Makefile b/sys/pic32/ubw32/Makefile-uart-old similarity index 100% rename from sys/pic32/ubw32-uart/Makefile rename to sys/pic32/ubw32/Makefile-uart-old diff --git a/sys/pic32/ubw32-uart-sdram/Makefile b/sys/pic32/ubw32/Makefile-uart-sdram-old similarity index 100% rename from sys/pic32/ubw32-uart-sdram/Makefile rename to sys/pic32/ubw32/Makefile-uart-sdram-old diff --git a/sys/pic32/ubw32-uart/UBW32-UART b/sys/pic32/ubw32/UBW32-UART similarity index 100% rename from sys/pic32/ubw32-uart/UBW32-UART rename to sys/pic32/ubw32/UBW32-UART diff --git a/sys/pic32/ubw32-uart-sdram/UBW32-UART-SDRAM b/sys/pic32/ubw32/UBW32-UART-SDRAM similarity index 100% rename from sys/pic32/ubw32-uart-sdram/UBW32-UART-SDRAM rename to sys/pic32/ubw32/UBW32-UART-SDRAM