Forums

Can't get HC12 EVB and metrowerks to program Flash on target board via BDM

Started by egp001 May 11, 2004
When I connect a target board to an HC12 EVB and use Metrowerks v2.0
freeware IDE, I can assemble, link, go to the debugger and download
into RAM. When I set my default.prm file for the linker to point to
flash, the download fails with the message:

Elf-Loader
Error while writing to 8000..80B4

Looking at the communications between the debugger and the EVB board,
I see that when I load RAM successfully, the debugger issues the LOAD
0800 command (ram is at 800). When I try to write to flash memory, the
debugger issues the LOAD 08000 command which of course will not work
(need to send FBULK followed by FLOAD commands according the EVB
Debug-12 command manual) which is why I get the error.

Looking at the memory configuration menu, the Flash memory area was
set to RAM and in the comment field was FLASH. Rather strange, so I
set the type to FLASH (from RAM), but it didn't help.

Also I programmed flash directly using Hyperterminal and manually
entering the commands and S records and it worked fine. Confirmed it
with a memory display (MD) debug-12 command.

Anyone know if programming flash is supported with freeware Metrowerks
v2.0?
Anyone know how to set up to project/stationary/hiwave to get this to
work?
Hello,

You shouldn't have a problem....
The free version (I suppose that you mean the "Special edition" will
allow you to program flash !

New project-> New project wizard -> select your processor-> .... ->
Motorola serial Monitro Hardware debugging

IF you ahve this problem of download, make sure that the PRM file that you
are using is the one adapted for your board !!

Stephane


On Tue, 11 May 2004 08:26:32 -0700, egp001 wrote:

> When I connect a target board to an HC12 EVB and use Metrowerks v2.0 > freeware IDE, I can assemble, link, go to the debugger and download > into RAM. When I set my default.prm file for the linker to point to > flash, the download fails with the message: > > Elf-Loader > Error while writing to 8000..80B4 > > Looking at the communications between the debugger and the EVB board, > I see that when I load RAM successfully, the debugger issues the LOAD > 0800 command (ram is at 800). When I try to write to flash memory, the > debugger issues the LOAD 08000 command which of course will not work > (need to send FBULK followed by FLOAD commands according the EVB > Debug-12 command manual) which is why I get the error. > > Looking at the memory configuration menu, the Flash memory area was > set to RAM and in the comment field was FLASH. Rather strange, so I > set the type to FLASH (from RAM), but it didn't help. > > Also I programmed flash directly using Hyperterminal and manually > entering the commands and S records and it worked fine. Confirmed it > with a memory display (MD) debug-12 command. > > Anyone know if programming flash is supported with freeware Metrowerks > v2.0? > Anyone know how to set up to project/stationary/hiwave to get this to > work?
In article <6ce58181.0405110726.563fb9df@posting.google.com>,
 fep002@motorola.com (egp001) wrote:

>When I connect a target board to an HC12 EVB and use Metrowerks v2.0 >freeware IDE, I can assemble, link, go to the debugger and download >into RAM. When I set my default.prm file for the linker to point to >flash, the download fails with the message: > >Elf-Loader >Error while writing to 8000..80B4 > >Looking at the communications between the debugger and the EVB board, >I see that when I load RAM successfully, the debugger issues the LOAD >0800 command (ram is at 800). When I try to write to flash memory, the >debugger issues the LOAD 08000 command which of course will not work >(need to send FBULK followed by FLOAD commands according the EVB >Debug-12 command manual) which is why I get the error. > >Looking at the memory configuration menu, the Flash memory area was >set to RAM and in the comment field was FLASH. Rather strange, so I >set the type to FLASH (from RAM), but it didn't help. > >Also I programmed flash directly using Hyperterminal and manually >entering the commands and S records and it worked fine. Confirmed it >with a memory display (MD) debug-12 command. > >Anyone know if programming flash is supported with freeware Metrowerks >v2.0? >Anyone know how to set up to project/stationary/hiwave to get this to >work?
I see Stephane answered. If you continue to have a problem you can get additional help on the codewarrior.embedded newsgroup or write to me directly and I'll try to get you some help. Ron -- Free Download - New Version Released CodeWarrior Development Studio for HC(S)12 Microcontrollers v3.1 offers "emulator-like" debugging support for HCS12 derivatives http://www.metrowerks.com/MW/Develop/Embedded/HC12/Default.htm Ron Liechty - MWRon@metrowerks.com - http://www.metrowerks.com