Using Max32 board with Arduino SD card shield as a default configuration.
This commit is contained in:
21
Makefile
21
Makefile
@@ -12,25 +12,24 @@
|
||||
# Supported boards
|
||||
#
|
||||
MAX32 = sys/pic32/max32/MAX32
|
||||
MAX32-ETH = sys/pic32/max32-eth/MAX32-ETH
|
||||
UBW32 = sys/pic32/ubw32/UBW32
|
||||
UBW32UART = sys/pic32/ubw32-uart/UBW32-UART
|
||||
UBW32UARTSDRAM = sys/pic32/ubw32-uart-sdram/UBW32-UART-SDRAM
|
||||
FUBARINO = sys/pic32/fubarino/FUBARINO
|
||||
FUBARINOBIG = sys/pic32/fubarino/FUBARINO-UART2CONS-UART1-SRAMC
|
||||
SDXL = sys/pic32/sdxl/SDXL
|
||||
MAXIMITE = sys/pic32/maximite/MAXIMITE
|
||||
MAXCOLOR = sys/pic32/maximite-color/MAXCOLOR
|
||||
EXPLORER16 = sys/pic32/explorer16/EXPLORER16
|
||||
STARTERKIT = sys/pic32/starter-kit/STARTER-KIT
|
||||
DUINOMITE = sys/pic32/duinomite/DUINOMITE
|
||||
DUINOMITEUART = sys/pic32/duinomite-uart/DUINOMITE-UART
|
||||
DUINOMITEE = sys/pic32/duinomite-e/DUINOMITE-E
|
||||
DUINOMITEEUART = sys/pic32/duinomite-e-uart/DUINOMITE-E-UART
|
||||
BAREMETAL = sys/pic32/baremetal/BAREMETAL
|
||||
RETROONE = sys/pic32/retroone/RETROONE
|
||||
FUBARINO = sys/pic32/fubarino/FUBARINO
|
||||
FUBARINOBIG = sys/pic32/fubarino/FUBARINO-UART2CONS-UART1-SRAMC
|
||||
SDXL = sys/pic32/sdxl/SDXL
|
||||
MMBMX7 = sys/pic32/mmb-mx7/MMB-MX7
|
||||
WF32 = sys/pic32/wf32/WF32
|
||||
UBW32 = sys/pic32/ubw32/UBW32
|
||||
UBW32UART = sys/pic32/ubw32-uart/UBW32-UART
|
||||
UBW32UARTSDRAM = sys/pic32/ubw32-uart-sdram/UBW32-UART-SDRAM
|
||||
EXPLORER16 = sys/pic32/explorer16/EXPLORER16
|
||||
STARTERKIT = sys/pic32/starter-kit/STARTER-KIT
|
||||
BAREMETAL = sys/pic32/baremetal/BAREMETAL
|
||||
RETROONE = sys/pic32/retroone/RETROONE
|
||||
|
||||
# Select target board
|
||||
TARGET ?= $(MAX32)
|
||||
|
||||
27
README.md
27
README.md
@@ -40,23 +40,22 @@ To select another target board, edit a top-level user-specific Makefile called "
|
||||
and set a TARGET value:
|
||||
|
||||
```Makefile
|
||||
TARGET = $(UBW32) # for the UBW32 board with USB console
|
||||
TARGET = $(UBW32UART) # for the UBW32 board with UART console
|
||||
TARGET = $(UBW32UARTSDRAM) # for the UBW32 boars with UART console and 8MB SRAM ramdisk
|
||||
TARGET = $(MAX32) # for the chipKIT Max32 board with SD card shield (default)
|
||||
TARGET = $(FUBARINO) # Fubarino SD board
|
||||
TARGET = $(FUBARINOBIG) # Fubarino SD board with 8MB SRAM RAMDISK
|
||||
TARGET = $(MAXIMITE) # for the Maximite board
|
||||
TARGET = $(MAXCOLOR) # for the Colour Maximite board
|
||||
TARGET = $(EXPLORER16) # for the Explorer 16 board
|
||||
TARGET = $(STARTERKIT) # for the PIC32 USB or Ethernet Starter Kit
|
||||
TARGET = $(MAX32) # default
|
||||
TARGET = $(MAX32-ETH) # for the chipKIT MAX32 board with Arduino Ethernet shield
|
||||
TARGET = $(DUINOMITE) # for the Duinomite board with USB console
|
||||
TARGET = $(DUINOMITEUART) # for the Duinomite board with UART console
|
||||
TARGET = $(DUINOMITEE) # for the Duinomite E board with USB console
|
||||
TARGET = $(DUINOMITEEUART) # for the Duinomite E board with UART console
|
||||
TARGET = $(BAREMETAL) # Bare PIC32 chip on a breakout board
|
||||
TARGET = $(FUBARINO) # Fubarino SD board
|
||||
TARGET = $(FUBARINOBIG) # Fubarino SD board with 8MB SRAM RAMDISK
|
||||
TARGET = $(MMBMX7) # MMB MX7 board
|
||||
TARGET = $(UBW32) # for the UBW32 board with USB console
|
||||
TARGET = $(UBW32UART) # for the UBW32 board with UART console
|
||||
TARGET = $(UBW32UARTSDRAM) # for the UBW32 boars with UART console and 8MB SRAM ramdisk
|
||||
TARGET = $(EXPLORER16) # for the Explorer 16 board
|
||||
TARGET = $(STARTERKIT) # for the PIC32 USB or Ethernet Starter Kit
|
||||
TARGET = $(BAREMETAL) # Bare PIC32 chip on a breakout board
|
||||
```
|
||||
|
||||
You can also change a desired filesystem size and swap area size,
|
||||
@@ -94,11 +93,11 @@ Kernel image should be written to PIC32 flash memory. The procedure depends
|
||||
on a board used.
|
||||
|
||||
#### Max32 board:
|
||||
Use a pic32prog utility (http://code.google.com/p/pic32prog/)
|
||||
and a USB cable to install a kernel:
|
||||
|
||||
```shell
|
||||
$ cd sys/pic32/ubw32
|
||||
$ AVRTOOLS=/Applications/Mpide.app/Contents/Resources/Java/hardware/tools/avr
|
||||
$AVRTOOLS/bin/avrdude -C$AVRTOOLS/etc/avrdude.conf -c stk500v2 -p pic32 \
|
||||
-P /dev/tty.usbserial-* -b 115200 -v -U flash:w:unix.hex:i
|
||||
$ pic32prog -d /dev/ttyUSB0 sys/pic32/max32/unix.hex
|
||||
```
|
||||
|
||||
Here you need to change AVRTOOLS path and tty name according to your system.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Programs that live in subdirectories, and have makefiles of their own.
|
||||
#
|
||||
SUBDIR = baremetal duinomite duinomite-uart duinomite-e \
|
||||
duinomite-e-uart explorer16 max32 max32-eth maximite \
|
||||
duinomite-e-uart explorer16 max32 maximite \
|
||||
meb starter-kit sdxl ubw32 ubw32-uart \
|
||||
ubw32-uart-sdram baremetal fubarino mmb-mx7 maximite-color \
|
||||
32mxsdram-uart picadillo wf32
|
||||
|
||||
@@ -68,7 +68,7 @@ DEFS += -DUCB_METER
|
||||
|
||||
LDSCRIPT = ../../../tools/configsys/../../sys/pic32/cfg/bootloader-max32.ld
|
||||
|
||||
CONFIG = MAX32-ETH
|
||||
CONFIG = MAX32
|
||||
CONFIGPATH = ../../../tools/configsys
|
||||
|
||||
include ../../../tools/configsys/../../sys/pic32/kernel-post.mk
|
||||
@@ -38,8 +38,8 @@
|
||||
#define MASKD_PS2D (1 << 7)
|
||||
|
||||
#elif defined MAX32
|
||||
#define MASKD_CS0 (1 << 3) // D3: sd0 on SPI4
|
||||
#define MASKD_CS1 (1 << 4) // D4: sd1 on SPI4
|
||||
#define MASKC_CS0 (1 << 14) // C14: sd0 on SPI2
|
||||
#define MASKD_CS1 (1 << 1) // D1: sd1 on SPI2
|
||||
|
||||
#elif defined EXPLORER16
|
||||
#define MASKB_CS0 (1 << 1) // B1: sd0 on SPI1
|
||||
@@ -256,6 +256,13 @@ lat_c: d->lat_c = write_op (d->lat_c, *data, offset);
|
||||
dev_swap_ldaddr (cpu, 0);
|
||||
else
|
||||
dev_swap_ldaddr (cpu, 1);
|
||||
#endif
|
||||
#ifdef MAX32
|
||||
/* Control SD card 0 */
|
||||
if (d->lat_c & MASKC_CS0)
|
||||
dev_sdcard_select (cpu, 0, 0);
|
||||
else
|
||||
dev_sdcard_select (cpu, 0, 1);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
@@ -312,12 +319,6 @@ lat_c: d->lat_c = write_op (d->lat_c, *data, offset);
|
||||
} else {
|
||||
lat_d: d->lat_d = write_op (d->lat_d, *data, offset);
|
||||
#ifdef MAX32
|
||||
/* Control SD card 0 */
|
||||
if (d->lat_d & MASKD_CS0)
|
||||
dev_sdcard_select (cpu, 0, 0);
|
||||
else
|
||||
dev_sdcard_select (cpu, 0, 1);
|
||||
|
||||
/* Control SD card 1 */
|
||||
if (d->lat_d & MASKD_CS1)
|
||||
dev_sdcard_select (cpu, 1, 0);
|
||||
|
||||
@@ -21,7 +21,7 @@ start_address = 0x9d001000 # user program
|
||||
#
|
||||
# SD/MMC cards
|
||||
#
|
||||
sdcard_port = 4 # SPI4
|
||||
sdcard_port = 2 # SPI2
|
||||
sdcard0_size = 340 # Mbytes
|
||||
sdcard0_file_name = ../../sdcard.img
|
||||
|
||||
|
||||
Reference in New Issue
Block a user