At 09:01 PM 30/01/2007, you wrote: >It sounds to me as though you're saying that you _can_ program through >DW - You CANNOT program the fuses through DW but Flash and EEPROM get programmed (or reprogrammed) automatically every time you enter a debug session or do a "build and run". ie you don't get the usual programming screen but the SUCCESSFULLY assembled or compiled hex and eep files just get dumped into the target chip. In other words DW is NOT intended as a general purpose programmer as you could use JTAG or ISP but there is no need to go into ISP, program the chip, enable DW, start a debug session, find a bug, exit DW, fix the bug and restart allover again as some people seem to do. >"AVR devices with debugWIRE interface are shipped with the DWEN fuse >un-programmed from the factory. The debugWIRE interface itself cannot >enable this fuse." This may refer to the DW setup of V+, GND and RESET pins only on which DW runs. If you just plug the usual 6 way ISP connector into your target, Studio will switch between ISP (all 6 pins needed) and DW (only 3 pins needed) as required. Try this out. With a new chip or a chip that has DW disabled. Enter ISP mode and program the fuses (EXCEPT DW) as required ie clock and BOD fuse. Leave the 6 way ISP cable in place. Go into a DW project, if you have already successfully generated both the .hex and eep files (if used) go into debug> start debugging. A window will appear prompting you to either retry DW (as it can't connect because DW is off at the moment) or enable DW though ISP. Select the latter. DW gets enable via ISP (remember that it's already connected above). FOLLOW THE DIRECTIONS about cycling the target power. You are now into DW mode, your code will be automatically dumped into the chip and the cursor will go the reset vector. You are now ready to either run, single step or whatever. If and when you find any bugs, fix them and do a "build and run", your code will be automatically dumped into the chip and the cursor will go the reset vector as above. If you find lots of errors it may be wise just to do a build untill successful and then do a "build and run". NEVER EXIT DW untill your code is completely debugged and you want to put the board into field use. If this is a workshop board used for debugging purpose you can leave DW enabled at all times. NOTE: The above is based on the Dragon but I suspect the JTAG mk2 will work the same as far as DW is concerned. The Miso, Mosi and CLK lines are not used in DW mode but I found some loading on those lines, so if you use any of those pins for input you may want to make a 3 wire "octopus" DW lead to completely free up those 3 pins. I think that the JTAG mk2 already comes with "octopus" leads. Regards John Samperi ******************************************************** Ampertronics Pty. Ltd. 11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA Tel. (02) 9674-6495 Fax (02) 9674-8745 Email: john@ampertronics.com.au Website http://www.ampertronics.com.au *Electronic Design * Custom Products * Contract Assembly ********************************************************
Message
Re: [AVR-Chat] (was) I Need A Compiler
2007-01-30 by John Samperi
Attachments
- No local attachments were found for this message.