Permalink
Browse files

Fixed USB serial zero length string bug.

Added proper MPLAB debug support for MAX32.
  • Loading branch information...
1 parent 4d04da8 commit c950a6939217fdb1a5196af1b289d06959980945 @EmbeddedMan committed Sep 8, 2012
View
37 hardware/pic32/boards.txt
@@ -143,7 +143,7 @@ mega_usb_pic32.name=chipKIT MAX32-USB for Serial
# new items
mega_usb_pic32.platform=pic32
-mega_usb_pic32.board=_BOARD_MEGA_USB_
+mega_usb_pic32.board=_BOARD_MEGA_
mega_usb_pic32.board.define=-D_USE_USB_FOR_SERIAL_
mega_usb_pic32.ccflags=ffff
mega_usb_pic32.ldscript=chipKIT-application-32MX795F512.ld
@@ -168,6 +168,41 @@ mega_usb_pic32.build.variant=Max32
#mega_usb_pic32.upload.using=
############################################################
+mega_usb_debug_pic32.name=chipKIT MAX32-USB for Serial Debug
+
+# new items
+mega_usb_debug_pic32.platform=pic32
+mega_usb_debug_pic32.board=_BOARD_MEGA_
+mega_usb_debug_pic32.board.define=-D_USE_USB_FOR_SERIAL_
+mega_usb_debug_pic32.ccflags=-Map="map.map"
+mega_usb_debug_pic32.ldscript=chipKIT-MAX32-application-32MX795F512-nobootloader.ld
+# end of new items
+
+# Use a high -Gnum for devices that have less than 64K of data memory
+# For -G1024, objects 1024 bytes or smaller will be accessed by
+# gp-relative addressing
+mega_usb_debug_pic32.compiler.c.flags=-O0::-c::-mno-smart-io::-w::-ffunction-sections::-fdata-sections::-G1024::-g::-mdebugger::-Wcast-align
+mega_usb_debug_pic32.compiler.cpp.flags=-O0::-c::-mno-smart-io::-w::-fno-exceptions::-ffunction-sections::-fdata-sections::-G1024::-g::-mdebugger::-Wcast-align
+
+mega_usb_debug_pic32.upload.protocol=stk500v2
+mega_usb_debug_pic32.upload.maximum_size=520192
+mega_usb_debug_pic32.upload.speed=115200
+
+mega_usb_debug_pic32.bootloader.low_fuses=0xff
+mega_usb_debug_pic32.bootloader.high_fuses=0xdd
+mega_usb_debug_pic32.bootloader.extended_fuses=0x00
+mega_usb_debug_pic32.bootloader.path=not-supported
+mega_usb_debug_pic32.bootloader.file=not-supported
+mega_usb_debug_pic32.bootloader.unlock_bits=0x3F
+mega_usb_debug_pic32.bootloader.lock_bits=0x0F
+
+mega_usb_debug_pic32.build.mcu=32MX795F512L
+mega_usb_debug_pic32.build.f_cpu=80000000L
+mega_usb_debug_pic32.build.core=pic32
+mega_usb_debug_pic32.build.variant=Max32
+#mega_usb_pic32.upload.using=
+
+############################################################
chipkit_uc32.name=chipKIT uC32
# new items
View
2 hardware/pic32/cores/pic32/HardwareSerial_cdcacm.c
@@ -211,7 +211,7 @@ int buffersNeeded;
int m;
int previousInterrutLevel;
- ASSERT(length);
+// ASSERT(length);
if (! gCdcacm_attached || gDiscard || (length <= 0))
{
View
2 hardware/pic32/cores/pic32/chipKIT-application-32MX795F512-nobootloader.ld
@@ -130,7 +130,7 @@ _JUMP_ADDR = _RESET_ADDR;
SECTIONS
{
.config_BFC02FF0 : {
- LONG(0x2207FFFF)
+ LONG(0x3AFFFFFF)
} > config3
.config_BFC02FF4 : {
LONG(0xFFF879D9)

0 comments on commit c950a69

Please sign in to comment.