2012-08-11 12:46 AM
About 45 minutes into playing with my new VLDiscovery board, I seem to have bricked it. I downloaded a ''bad'' program onto the thing and now it's telling me that the device is protected and resists all my attempts to put a ''good'' program into flash.
I'm doing all this on OS X (Lion) with opened 0.6.0-rc1. Openocd seemed to work well enough to put the bad code down, so I've got to believe there's some magic incantation that will let me use the same setup to get it working again. The board cost less than $10, but it'd be a shame to throw it away because of some bad bits. I'm pretty sure my opened setup is workable because I can successfully flash a STMF4Discovery board with good code. What I'm missing is some way to bring the VLDiscovery board back.Unfortunately, I don't have access to a windows environment and CrossWorks chokes when I try to install the STM32 packages and thus never sees my board via USB.The board seems generally hosed now with bogus values coming back for the size of flash memory. Is it just a paperweight now?--------------------------------------$ telnet localhost 4444Trying 127.0.0.1...Connected to localhost.Escape character is '^]'.Open On-Chip Debugger> halttarget was in unknown state when halt was requestedtarget state: haltedtarget halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc> mdw 0 4 0x00000000: 40000080 00000000 00000000 00000000 > flash erase_sector 0 0 lastdevice id = 0x10016420flash size = 5384kbyteserased sectors 0 through 5383 on flash bank 0 in 0.029046s> cd /Users/andy/code/chibios/demos/ARMCM3-STM32F100-DISCOVERY> flash write_image build/ch.elfPadding image section 0 with 4 bytesflash write algorithm aborted by targettarget state: haltedtarget halted due to breakpoint, current mode: Thread xPSR: 0x41000000 pc: 0x2000003a msp: 0xfffffffcflash write failed at address 0x8000002flash memory write protectederror writing to flash at address 0x08000000 at offset 0x00000000in procedure 'flash'2012-08-13 10:54 AM
That was a somehow cryptical expression of disfavour for Apples Closed-Source / Customer Lock-in strategy. That is much more expressed in its iphone/ipad product lines.
I can't see any special reason to choose Mac for SW development, apart from the OS and the GUI. And this is where personal taste comes in, and flame wars start ...2012-08-13 12:48 PM
Then again I can see the appeal of an IPS screen with 2880x1800, or one of the 2560x1440 or 2560x1600 displays.
I'm just scared by the delta in cost compared to a 6 core PC with a 28'' 1920x1200 display.2012-08-13 10:28 PM
Agree.
Nothing against a Mac, except for the rather astronomical costs, compared to an equivalent Non-Mac system.2012-08-13 11:04 PM
I dunno if they're ''astronomical''--worst case, the Apple tax is what, 50% more? My desktop box is a '10 mac mini server. It's fast enough (just), super small and quiet as well. Development work isn't all that demanding of a system (unlike gaming or database work), so it suits my needs fine. Occasionally, I lust after something more beefy, but I'm holding out for when Apple gets around to refreshing the minis with Ivy Bridge.
Besides, the whole rounded corner brushed aluminum thing looks a lot better than ''beige.''http://turkish.smugmug.com/Electronics/Panasonic-13XX/i-bRXLMVh/0/X2/IMG0380-X2.jpgFrom: fmPosted: Tuesday, August 14, 2012 7:28 AMSubject: I bricked my brand new VLDiscovery board
Agree.
Nothing against a Mac, except for the rather astronomical costs, compared to an equivalent Non-Mac system.2012-08-16 08:05 AM
Received the board, it appear to be locked in ''Read Out Protection'' mode, the ST-Link utilities wouldn't read the content, using the options I had it turn ROP off, which achieved that and mass erased the part. Now appears to be working, I brought up the Blinky example in Keil.
2012-08-16 10:32 AM
Excellent! I wonder how the readout protection got turned on? Yikes.
You'll be pleased to know that I haven't bricked my F4 board. Yet. ;)2012-08-16 10:33 AM
Oh, I forgot to ask whether it's reporting a valid flash memory size now.
2012-08-16 01:07 PM
Yes, now reports 128KB, before it was reporting some stupidly large values as I recall.
Did you try and set the options bytes before it died?2012-08-16 03:20 PM
''Did you try and set the options bytes before it died?''
Not in code on the device. I did make several hamfisted attempts to crack it open with OOCD. That's probably where it went off the rails.2012-08-27 05:24 PM
I do believe I have broken my STM32F0-Discovery by assigning USART2 to the pins PA14 & PA15 ---- one of those pins is shared with the SWD.
I am looking for the jumper for BOOT0...