You are here: Home DOCUMENTATION Debugging Tools uBug12JE User Manual - Programming the Module

Technological Arts Inc.

Your Shopping Cart

Your Cart is currently empty.

uBug12JE User Manual - Programming the Module

Article Index
uBug12JE User Manual
Installation
Connecting to the Module
Programming the Module
Extending uBug12 INSTALL
Assemblers
Developing Software Using Projects
Script Command Buttons
uBug12 Miscellaneous Features
Command Glossary
Writing Compatible Applications
Appendix
All Pages

Programming the Module

The most common use for uBug12 will be to program the Flash and/or EEPROM memory, if it exists. This can easily be done with the FBULK, FLOAD, and ELOAD commands. FBULK will clear both Flash and EEPROM memory. FLOAD will program Flash, and ELOAD will load an S-record into EEPROM. Both FLOAD and ELOAD, when run, will prompt for you to select the S-record file to load into memory.

uBug12 will accept both S1 and S2 type S-record files. S2 files are interpreted to be in a banked or linear format. (The software figures this out from the address field and the memory type being programmed.) Banked format means that the most significant byte of the 24 bit address in each record line is used to program the associated PAGE register for the memory. (The S12X series for example has multiple PAGE registers, PPAGE for Flash, and EPAGE for EEPROM.) The other 16 bits in the address must be in the bank area for that memory. For Flash this mean between $8000 and $BFFF. EEPROM S2 records must have the 16 bit address in the range for your MCU type. What this means is that to use an S2 file to program Flash on an S12X series device starting at $4000, the S-record will have its start address as $FD8000. Standard S12 devices would use $3D8000.

WARNING: If you are planning to use the serial monitor to program and erase EEPROM, it is recommended that you NOT write the EEPROM write protect byte. (Location $0FFD for S12X devices.  Check your MCU documentation to get the location for your board.) This will set write protection for the EEPROM, which includes that location. This means the module will prevent further erasing or programming of the specified section by the serial monitor. If this is done, the possibility exists that a value could be accidentally written into this memory location that will disable the entire EEPROM from any further writing or erasure. Should that occur, the only way to reset the EEPROM memory will be with the use of a BDM pod.

After memory is programmed, uBug12 will report how long it took to accomplish. If there is a time of zero reported, it most likely means that uBug12 found the S2 record was not formatted as expected.  (I.e. Incorrect address range.)



Last Updated ( Tuesday, 13 September 2016 08:12 )