Skip to content

Commit

Permalink
Fixed USB serial zero length string bug.
Browse files Browse the repository at this point in the history
Added proper MPLAB debug support for MAX32.
  • Loading branch information
EmbeddedMan committed Sep 8, 2012
1 parent 4d04da8 commit c950a69
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
37 changes: 36 additions & 1 deletion hardware/pic32/boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -167,6 +167,41 @@ mega_usb_pic32.build.core=pic32
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

Expand Down
2 changes: 1 addition & 1 deletion hardware/pic32/cores/pic32/HardwareSerial_cdcacm.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ int buffersNeeded;
int m;
int previousInterrutLevel;

ASSERT(length);
// ASSERT(length);

if (! gCdcacm_attached || gDiscard || (length <= 0))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ _JUMP_ADDR = _RESET_ADDR;
SECTIONS
{
.config_BFC02FF0 : {
LONG(0x2207FFFF)
LONG(0x3AFFFFFF)
} > config3
.config_BFC02FF4 : {
LONG(0xFFF879D9)
Expand Down

0 comments on commit c950a69

Please sign in to comment.