Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Maximite 2.5 -KSD With USB Mass Storage
Page 3 of 4 | |||||
Author | Message | ||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
Then it is possible to be a difference between the stock bootloader Ken burned again on his Max32 and your stock bootloader? Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
ArtBecker Regular Member Joined: 25/08/2011 Location: PhilippinesPosts: 47 |
Thanks for your suggestion. I just got the Max32 yesterday, from MicroChip. I paid lots extra to get it shipped here via FedEx and pay customs duty on it. I don't know if there are different bootloaders or not. Based on your suggestion, I'll see if I can figure out what I have. Then I had a thought, and tried loading a different avr hex file, using avrdude. It worked OK. It flashes the pin 13 LED. I had previously tested the Max32 using the IDE. :1000000012C02AC029C028C027C026C025C024C0CD :1000100023C022C021C020C01FC01EC01DC01CC0E4 :100020001BC01AC019C011241FBECFEDCDBF10E0F8 :10003000A0E6B0E0E4E0F1E003C0C89531960D928F :10004000A036B107D1F710E0A0E6B0E001C01D92E4 :10005000A036B107E1F716C0D3CF61157105810550 :10006000910579F027E630E140E050E0245030403F :100070004040504057FFFACF615070408040904060 :10008000ECCF0895CFEDD0E0DEBFCDBF8FEF87BBC3 :1000900018BA81E088BB68EC70E080E090E0DDDFBA :1000A00082E088BB68EC70E080E090E0D6DF84E01E :1000B00088BB68EC70E080E090E0CFDF88E088BB30 :1000C00068EC70E080E090E0C8DF80E188BB68EC1D :1000D00070E080E090E0C1DF80E288BB68EC70E017 :1000E00080E090E0BADF80E488BB68EC70E080E0FC :1000F00090E0B3DF80E888BB68EC70E080E090E0DF :04010000ACDFC7CFDA :00000001FF C:\bin>avrdude -C avrdude.conf -c stk500v2 -P com13 -p pic32 -b 115200 -U flash: w:testleds.hex:i -v avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch System wide configuration file is "avrdude.conf" Using Port : com13 Using Programmer : stk500v2 Overriding Baud Rate : 115200 AVR Part : 32MX795F512L Chip Erase delay : 9000 us PAGEL : PD7 BS2 : PA0 RESET disposition : dedicated RETRY pulse : SCK serial program mode : yes parallel program mode : yes Timeout : 200 StabDelay : 100 CmdexeDelay : 25 SyncLoops : 32 ByteDelay : 0 PollIndex : 3 PollValue : 0x53 Memory Detail : Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW Max W ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- --- -- --------- eeprom 65 10 8 0 no 4096 8 0 9000 90 00 0x00 0x00 flash 65 10 256 0 yes 524288 256 2048 4500 45 00 0x00 0x00 lfuse 0 0 0 0 no 1 0 0 9000 90 00 0x00 0x00 hfuse 0 0 0 0 no 1 0 0 9000 90 00 0x00 0x00 efuse 0 0 0 0 no 1 0 0 9000 90 00 0x00 0x00 lock 0 0 0 0 no 1 0 0 9000 90 00 0x00 0x00 calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00 signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 Programmer Type : STK500V2 Description : Atmel STK500 Version 2.x firmware Programmer Model: AVRISP Hardware Version: 15 Firmware Version Master : 2.10 Vtarget : 0.0 V SCK period : 191.0 us avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.06s avrdude: Device signature = 0x504943 avrdude: safemode: lfuse reads as 0 avrdude: safemode: hfuse reads as 0 avrdude: safemode: efuse reads as 0 avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option. avrdude: current erase-rewrite cycle count is -1145324613 (if being tracked) avrdude: erasing chip avrdude: reading input file "testleds.hex" avrdude: writing flash (260 bytes): Writing | ################################################## | 100% 0.32s avrdude: 260 bytes of flash written avrdude: verifying flash memory against testleds.hex: avrdude: load data flash data from input file testleds.hex: avrdude: input file testleds.hex contains 260 bytes avrdude: reading on-chip flash data: Reading | ################################################## | 100% 0.07s avrdude: verifying ... avrdude: 260 bytes of flash verified avrdude: safemode: lfuse reads as 0 avrdude: safemode: hfuse reads as 0 avrdude: safemode: efuse reads as 0 avrdude: safemode: Fuses OK avrdude done. Thank you. C:\bin> Thank you again, Vasi. |
||||
ArtBecker Regular Member Joined: 25/08/2011 Location: PhilippinesPosts: 47 |
I was able to install StickOS on the Max32, using the current avrdude.conf, with no problems at all. avrdude -C avrdude.conf -c stk500v2 -p pic32 -P COM13 -U flash:w:StickOS.max32.v1.84c.elf.hex StickOS for Microchip PIC32MX7-F512L chipKIT Max32 v1.84c (www.cpustick.com) |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
This feedback on StickOS site illustrate how well is received BASIC language in the PIC32 world: [quote]"Works like a charm! I can access all my pins now. When I bought my Cerebot 32MX4, I realized once I plugged it in and started messing around that I was in way over my head. I had only played with Arduino and PicBasic on some Pic16f84's. Looking at the demo led flashing program example on MPlab had me perplexed and I had put the board away with a confused look on my face. StickOS has opened the door for me to explore all the possibilities and the power of the Pic32 as it is more easy for me to understand. ... This is clearly going to blow away anything I've done with my Arduino :D StickOS ROCKS!!" -- e-mail, Mark H., 17 Mar, 2010.[/quote] Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
ArtBecker Regular Member Joined: 25/08/2011 Location: PhilippinesPosts: 47 |
Ken, The hex file you have on your web site is over 650 KB. The chipKIT Max32 board (actually, the PIC32MX795F512L chip) only has 512 KB of flash memory. That could explain why avrdude always, without fail, crashes, when trying to read the hex file. The hex file you provided is simply too big. It doesn't matter which pic32 part I use for avrdude, and I have tried this at least two dozen times, using every version of the PIC32 part that I could find. I also tried the other pic32-xxx parts which are essentially the same chip, and have been updated in the past few months. As I have said before, this looks like a problem with the hex file, and not the pic32 part. The official MaxiMite hex files are all around 450 KB, and the StickOS hex file is only 265 KB. They all load fine, using avrdude. |
||||
ksdesigns Senior Member Joined: 25/06/2011 Location: United StatesPosts: 143 |
OK went back thru and Retested it all and all seems fine all version #'s listed kens-iMac:Downloads codeman$ ./avrdude -C /opt/local/etc/avrdude.conf -c stk500v2 -P /dev/tty.usbserial-A5004FpV -p pic32 -b 115200 -U flash:w:Maximite-2.5-ksd-ChipKit-Max32.hex:i -v avrdude: Version 5.8cvs, compiled on Jan 15 2010 at 17:27:01 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch System wide configuration file is "/opt/local/etc/avrdude.conf" User configuration file is "/Users/codeman/.avrduderc" User configuration file does not exist or is not a regular file, skipping Using Port : /dev/tty.usbserial-A5004FpV Using Programmer : stk500v2 Overriding Baud Rate : 115200 AVR Part : 32MX795F512L Chip Erase delay : 9000 us PAGEL : PD7 BS2 : PA0 RESET disposition : dedicated RETRY pulse : SCK serial program mode : yes parallel program mode : yes Timeout : 200 StabDelay : 100 CmdexeDelay : 25 SyncLoops : 32 ByteDelay : 0 PollIndex : 3 PollValue : 0x53 Memory Detail : Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- eeprom 65 10 8 0 no 4096 8 0 9000 9000 0x00 0x00 flash 65 10 256 0 yes 524288 256 2048 4500 4500 0x00 0x00 lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00 signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 Programmer Type : STK500V2 Description : Atmel STK500 Version 2.x firmware Programmer Model: AVRISP Hardware Version: 15 Firmware Version Master : 2.10 Vtarget : 0.0 V SCK period : 0.1 us avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.05s avrdude: Device signature = 0x504943 avrdude: safemode: lfuse reads as 0 avrdude: safemode: hfuse reads as 0 avrdude: safemode: efuse reads as 0 avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option. avrdude: current erase-rewrite cycle count is -1145324613 (if being tracked) avrdude: erasing chip avrdude: reading input file "Maximite-2.5-ksd-ChipKit-Max32.hex" avrdude: writing flash (246776 bytes): Writing | ################################################## | 100% 30.66s avrdude: 246776 bytes of flash written avrdude: verifying flash memory against Maximite-2.5-ksd-ChipKit-Max32.hex: avrdude: load data flash data from input file Maximite-2.5-ksd-ChipKit-Max32.hex: avrdude: input file Maximite-2.5-ksd-ChipKit-Max32.hex contains 246776 bytes avrdude: reading on-chip flash data: Reading | ################################################## | 100% 38.52s avrdude: verifying ... avrdude: 246776 bytes of flash verified avrdude: safemode: lfuse reads as 0 avrdude: safemode: hfuse reads as 0 avrdude: safemode: efuse reads as 0 avrdude: safemode: Fuses OK avrdude done. Thank you. |
||||
ArtBecker Regular Member Joined: 25/08/2011 Location: PhilippinesPosts: 47 |
Did you check the hex files you have available for download on your web site? It is over 650 KB. The avrdude results you listed above show a file of only 246776 bytes was loaded to flash. What is the size of the Maximite-2.5-ksd-ChipKit-Max32.hex file that you used with avrdude here? I still don't understand how I can use the 650 KB hex file on your web site when the PIC32 chip only has 512 KB of flash memory. As I say over and over, avrdude crashes when trying to read your hex file, since it is larger than the flash memory of the chip. You actually had 2 Maximite-2.5-ksd-ChipKit-Max32 files on your site. On one page it was 668 KB, while on another page it is 652 KB. The former file is no longer on your site, when I checked an hour ago. You are also using avrdude version 5.8cvs, which is way old (something to do with you using a MAC?). The current available Windows version is 5.10 (5.11 was supposedly released as of a day or two ago), which is the one I've been using, since you kept saying to always use the most recent avrdude. It doesn't matter which version of avrdude.conf I use. avrdude crashes when trying to read your big hex file. |
||||
ksdesigns Senior Member Joined: 25/06/2011 Location: United StatesPosts: 143 |
The hex file is much much bigger because it represents the binary data in text . you can open it with a text editor if you like. ken |
||||
ArtBecker Regular Member Joined: 25/08/2011 Location: PhilippinesPosts: 47 |
I have looked at the hex file many times. It starts out with the same code as all the others, and ends with the same code as all the others. I can use avrdude to load some other programs with no problems. avrdude and windows always crash when trying to read your hex file. I have used every version of the conf file that I can find, and every pic32 & pic32-xxx part, and it makes no difference. I am using Windows 7. I installed the programs and files on a Windows Vista PC, and got the exact same failure trying to read the hex file. Vasi mentioned there might be a difference in bootloaders. The bootloader that comes with the UBW32 board supposedly isn't compatible with MaxiMite, and I can't load MaxiMite v2.5 to the chipKIT. I think Ken has a bootloader that does that. I've been up all night working on this, so I need to get some sleep now. I don't know what version bootloader came with my chipKIT Max32. The one available for download says it is 18.3 KB (18,780 bytes), and was created on August 4, 2011. I haven't figured out how to read files from the device using the MPIDE. I have a PICkit 3, so I'll try to figure out how to read the bootloader file using that. Thanks again for your assistance. |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
Hi Ken, From your last package with the sources is missing usb_config.h Also, are missing the two project files which permits using the Mplab IDE in compiling the project. No one is able to recompile the project without a little reverse engineering (let's say we copy and adapt those two from Gerard's project, and remain the usb_config.h and HardwareProfile.h file) Vasi _____________________ Now I see you used Mplab X IDE but those header files still missing so, no compilation possible... Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
ArtBecker Regular Member Joined: 25/08/2011 Location: PhilippinesPosts: 47 |
I loaded the chipKIT Max32 MPIDE software on my linux computer, running Ubuntu 10.10, and tried installing the Maximite-2.5-ksd-ChipKit-Max32.hex file. avrdude -C avrdude.conf -c stk500v2 -P /dev/ttyUSB0 -p pic32 -b 115200 -U flash:w:Maximite-2.5-ksd-ChipKit-Max32.hex:i -v It failed at the same point as the Windows version. When reading the hex file, linux gave me a "Segmentation fault" error. There are (or at least were) two versions of Maximite-2.5-ksd-ChipKit-Max32.hex on Ken's web site. One is 668 KB and the other is 653 KB. Both fail, using avrdude, when reading the hex file, and both give the segmentation fault error. The good news about installing the chipKIT under linux is that you just plug it in, with no extra work installing drivers. The bad news is that the MPIDE software needs some additional work, before it is functional. The good news is that this is explained well at chipkit.org/wiki ================== Once again I had no trouble installing StickOS (www.cpustick.com), to the chipKIT Max32, using the Ubuntu linux computer. avrdude -C avrdude.conf -c stk500v2 -p pic32 -P /dev/ttyUSB0 -U flash:w:StickOS.max32.v1.84c.elf.hex ================== I was going to try loading the Maximite-2.5-ksd-ChipKit-Max32 file, to the chipKIT, using Mac OS X 10.6, on my Hackintosh netbook, but there really seems no point. ================== Vasi, I sent a message to Diligent (makers of the chipKIT Max32) support, asking if there is more than one version of the bootloader, but no answer so far. |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
Hi, My board must arrive in a day or two, then I will be able to find a solution. First, compiling the Gerard's version (which will require making a minimal shield) using an .ld file for Chipkit, then, to see if I can manage to modify it for mass storage (and that means another shield). Of course, Ken's sources will be of some help. No promises but it is also my interest. Vasi P.S. All of this starting from the premise that you have the original, untouched stock bootloader and Ken a re-burned one. If my board is working with Ken's firmware from start then you will have to return your board. Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
Hi Ken. I can confirm, avrdude is crashing on both Windows Vista and Linux Ubuntu 10.10 . I have a warning from the linker: [code] C:\Apps\Microchip\C32\bin\..\lib\gcc\pic32mx\3.4.4\..\..\..\ ..\pic32mx\bin\ld.exe: warning: cannot find entry symbol _reset; defaulting to 9d001000[/code] The entry is missing from the .ld file provided with Chipkit Max32. Is that a reason to worry, the default address is ok? Man, I have a lot to learn about this board. Vasi Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
Hi ArtBecker, Can you try this .hex file? 2011-09-09_122816_Maximite.X.production.hex.zip Is a compilation of Maximite 2.5 source with MPLab X and C32 v2.01 under Ubuntu. I had a successful upload on my board but I'm not yet able to test it as I need to build a Maximite compatible shield. I didn't touched the source (in the hardware compatible sense, otherwise I had to correct some case sensitive file names and paths). I will when I will have a proper shield. Vasi The command used (for Maximite.hex file - rename yours accordingly) [code]avrdude -C ./avrdude.conf -D -c stk500v2 -ppic32 -P /dev/ttyUSB0 -U flash:w:Maximite.hex[/code] Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
ArtBecker Regular Member Joined: 25/08/2011 Location: PhilippinesPosts: 47 |
I was able to install the hex file OK, using windows, but afterwards I can't connect with the Max32, using PuTTY or TeraTerm, via the USB/serial connection. Is this due to incompatibilities with the Max32 bootloader and the bootloader from MM Basic v2.1? Or am I just missing the point? In normal operation, when the Max32 board is connected to the USB port, the green LED flashes fast for 4 seconds (bootloader), then blinks slowly afterwards. What happens now is strange. When I connect the Max32 to the USB port, the rx/tx led flashes, the green led flashes quickly for a second, then quicker for 3 more seconds, then the green led stays on solid. It is usually supposed to blink slowly at this point. When I try to connect usingPuTTY or TeraTerm, there is no rx/tx flash, but the green LED flashes quickly, then goes back solid again. Hitting <Enter> causes the rx/tx led to blink appropriately, but the green led stays solid. Nothing appears in the PuTTY or TeraTerm screen. What baud rate are you using (assuming that USB/serial communications are possible)? I tried several, but all with the same result. I reloaded StickOS and it works OK. |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
Hi ArtBecker, As I don't have the hardware ready for the original MMBasic, I compiled the sources of Ken where it uses UART2 for console and at least, I have a prompt: I will start hunting the error and also will try to "restore" the sources of the last firmware of Ken because are incomplete (and not compilable). ____________________________ P.S. The disadvantage of StickOS is that it consumes your erase/write cycles with every Basic program saved - it saves in Flash. Still, is a little better than using MPLab or MPIDE because allows multiple modifications of your current program on RAM and are saved in Flash only if you issue a command - in MPLab you need to write in flash every modification of the program. Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
ksdesigns Senior Member Joined: 25/06/2011 Location: United StatesPosts: 143 |
I will repackage the source files seems the Microchip package to zip files does not do a complete job .. Plus you have to make sure what ever term program you use to talk to it drops the DTR line or the pic will never leave reset !. Its best yo cut jumper J5 and add a header with a shunt ken |
||||
diodoman Newbie Joined: 01/01/2012 Location: MexicoPosts: 6 |
I use hexmate to merge chipkit max32 bootloader with mmbasic 2.5 from kenīs page, use pickit2 clone in breadboard with modified dat file and everything work, i tested with usb memory and work with some examples from mmbasic library. Now i have a question, i want to use ubw32 mmbasic 2.7, because it have more i/o, i try to load hid bootloader but no work or i cant make it work, anyone know how can i did. |
||||
ksdesigns Senior Member Joined: 25/06/2011 Location: United StatesPosts: 143 |
You would have to build 2.7 for ubw32 and use the chipkit linker script to get it to build correct .. ken |
||||
diodoman Newbie Joined: 01/01/2012 Location: MexicoPosts: 6 |
Using chipkit linker will build an hex to use with max32 bootloader? I can user terminal via onboard usb connector or i need tu use pins 26 and 27? |
||||
Page 3 of 4 |
Print this page |