Environment Codewarrier 5.1 for M9S12Xdp512 on WIN 7 64 bit. Programmer was Multilink Universal and .ini file and .prm configured to place 32 bytes into EEROM at 0C00. Tapped F5 and debugger loads .abs file and erases and initializes EEROM with default data.
Now I have a Multilink Universal FX which doesn't work at all with Codewarrier and my non FX unit won't be back for a week or so. I had also bought the P&E PROG12Z which does recognize the Multilink Universal FX so I thought I'd try programming with that.
First I have to translate the logical address S records to physical ones using the P&E application LOG2PHYS application. A little bit of digging and I see that there is no set of S records describing my default EEROM values.
In one of the files I have declared:
typedef BYTE TEEPROM_DATA[1000]; #pragma DATA_SEG EEPROM_DATA extern TEEPROM_DATA EEPROM_Storage;#pragma DATA_SEG DEFAULT
The EEROM is declared in EEROM_cfg.h (attached):
#pragma DATA_SEG EEPROM_DATA TEEPROM_DATA EEPROM_Storage = { 0x01, //! 0 MODBUS Module # 0x00,0x00, //! 1,2 Spare for COM1. 65, //! 3 MODBUS Bit Rate 19200 (COM2) 0x01,0x23, //! 4,5 MODBUS 3.5 character Delay Time. CANRATE_250K, //! 6 CAN Channel 0 CANRATE_500K, //! 7 CAN Channel 1 CANRATE_500K, //! 8 CAN Channel 2 CANRATE_500K, //! 9 CAN Channel 3 CANRATE_250K, //! 10 CAN Channel 4 0x00,0x00,0x00,0x00,0x00, //! Spare 11,12, 13, 14, 15 0xE7, //! 16 ELCON Charger ID for Tray #1 0xE8, //! 17 ELCON Charger ID for Tray #2 0xE9, //! 18 ELCON Charger ID for Tray #3 0xE5, //! 19 ELCON Charger ID for Tray #4 80,80,80,80, //! 20..23 Max Current (Amps) Tray #1..#4 29,29,29,29, //! 24..27 Max Voltage (Volts) Tray #1..#4 10,10,10,10 //! 28..31 MIN SOC before Automatic Charging Starts };#pragma DATA_SEG DEFAULT
Also attached is the linker.prm file.
How do I tell the linker that I want it do create 19 records for the non-paged EEROM?
Thanks
John