diff --git a/sys/pic32/explorer16/.gitignore b/sys/pic32/explorer16/.gitignore index 6a22af6..2b28c2d 100644 --- a/sys/pic32/explorer16/.gitignore +++ b/sys/pic32/explorer16/.gitignore @@ -4,6 +4,7 @@ machine sys unix.bin +boot.bin unix.map usbboot.map vers.c diff --git a/sys/pic32/kernel-post.mk b/sys/pic32/kernel-post.mk index b73fd0e..5f161c8 100644 --- a/sys/pic32/kernel-post.mk +++ b/sys/pic32/kernel-post.mk @@ -40,7 +40,9 @@ unix.elf: $(KERNOBJ) $(LDSCRIPT) $(CC) $(LDFLAGS) $(KERNOBJ) -o $@ chmod -x $@ $(OBJDUMP) -d -S $@ > unix.dis - $(OBJCOPY) -O binary $@ unix.bin + $(OBJCOPY) -O binary -R .boot -R .config $@ unix.bin + $(OBJCOPY) -O binary -j .boot -j .config $@ boot.bin + test -s boot.bin || rm boot.bin $(OBJCOPY) -O ihex --change-addresses=0x80000000 $@ unix.hex chmod -x $@ unix.bin diff --git a/tools/virtualmips/Makefile b/tools/virtualmips/Makefile index ad1f9db..46ae104 100644 --- a/tools/virtualmips/Makefile +++ b/tools/virtualmips/Makefile @@ -6,6 +6,9 @@ # chipKIT Max32 CFLAGS = -DSIM_PIC32 -DPIC32MX7 -DMAX32 +# Maximite +#CFLAGS = -DSIM_PIC32 -DPIC32MX7 -DMAXIMITE + # Microchip Explorer 16 #CFLAGS = -DSIM_PIC32 -DPIC32MX7 -DEXPLORER16 diff --git a/tools/virtualmips/pic32_explorer16.conf b/tools/virtualmips/pic32_explorer16.conf index fbde208..211e9d0 100644 --- a/tools/virtualmips/pic32_explorer16.conf +++ b/tools/virtualmips/pic32_explorer16.conf @@ -16,14 +16,21 @@ flash_size = 492 # kbytes flash_phy_address = 0x1d000000 flash_file_name = ../../sys/pic32/explorer16/unix.bin -start_address = 0x9d001000 # user program +# +# Boot flash +# +boot_flash_size = 12 # kbytes +boot_flash_address = 0x1fc00000 +boot_file_name = ../../sys/pic32/explorer16/boot.bin + +start_address = 0x9fc00000 # user program # # SD/MMC cards # sdcard_port = 1 # SPI1 -sdcard0_size = 16 # Mbytes -sdcard0_file_name = ../../filesys.img +sdcard0_size = 340 # Mbytes +sdcard0_file_name = ../../sdcard.rd # # UARTs 1..6 diff --git a/tools/virtualmips/pic32_max32.conf b/tools/virtualmips/pic32_max32.conf index 2bce54f..b962fa1 100644 --- a/tools/virtualmips/pic32_max32.conf +++ b/tools/virtualmips/pic32_max32.conf @@ -28,7 +28,7 @@ sdcard0_file_name = ../../sdcard.rd # # UARTs 1..6 # -uart1_type = console +uart1_type = console # # Debug level: @@ -38,4 +38,4 @@ uart1_type = console # 3 - trace all inctructions # debug_level = 0 -#trace_address = 0x9d00720c +#trace_address = 0x9d00720c diff --git a/tools/virtualmips/pic32_maximite.conf b/tools/virtualmips/pic32_maximite.conf index 28e103d..8dcdc7f 100644 --- a/tools/virtualmips/pic32_maximite.conf +++ b/tools/virtualmips/pic32_maximite.conf @@ -22,7 +22,7 @@ start_address = 0x9d006000 # user program # SD/MMC cards # sdcard_port = 4 # SPI4 -sdcard0_size = 16 # Mbytes +sdcard0_size = 340 # Mbytes sdcard0_file_name = ../../filesys.img # diff --git a/tools/virtualmips/pic32_ubw32.conf b/tools/virtualmips/pic32_ubw32.conf index 2ccd87b..ab5649d 100644 --- a/tools/virtualmips/pic32_ubw32.conf +++ b/tools/virtualmips/pic32_ubw32.conf @@ -22,7 +22,7 @@ start_address = 0x9d006000 # user program # SD/MMC cards # sdcard_port = 1 # SPI1 -sdcard0_size = 16 # Mbytes +sdcard0_size = 340 # Mbytes sdcard0_file_name = ../../filesys.img #sdcard1_size = 2 # Mbytes #sdcard1_file_name = ../../home.img