CodeWarrior --> simulation s12dp256b

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CodeWarrior --> simulation s12dp256b

2,218 Views
bakair
Contributor I
hello all

i'm trying to simulate my application on the code warrior simulator for s12dp256 and i'm facing some problems with my memory configuration. It seems that my prm entries are not taken as expected (please see prm file below). Did I forget to set any additional preference in my simulation, or in general has anyone ever had the some problem?
--> Code Warrior for HCS(x)112 v4.6,build 6345

PRM-File:

/* This is a linker parameter file for the MC9S12DG256 */
NAMES END

/* CodeWarrior will pass all the needed files to the linker by command line. But here you may add your own files too. */
SEGMENTS
    MY_RAM = READ_WRITE 0x3000 TO 0x3F0A                 // ram
      ALIGN 2 [< 2: 1];
    STACK_RAM = READ_WRITE 0x3F0B TO 0x3FFF              // ram
      ALIGN 2 [< 2: 1];

    KEY_FLASH_BEGIN   = READ_ONLY 0x4000 TO 0x4007;    // flash
    IDENT_AND_ITASW   = READ_ONLY 0x4008 TO 0x4117;    // flash
    NON_BANKED_ROM_3E = READ_ONLY 0x4118 TO 0x7FFF;    // flash 
    FPROT_INIT_SEG    = READ_ONLY 0xFF00 TO 0xFF0F;    // flash 

    BANK_38_AREA      = READ_ONLY  0x388000 TO 0x38BFFF;
    BANK_39_AREA      = READ_ONLY  0x398000 TO 0x39BFFF;
    BANK_3A_AREA      = READ_ONLY  0x3A8000 TO 0x3ABFFF;
    BANK_3B_AREA      = READ_ONLY  0x3B8000 TO 0x3BBFFF;
    BANK_3C_AREA      = READ_ONLY  0x3C8000 TO 0x3CBFFF;
    BANK_3D_AREA      = READ_ONLY  0x3D8000 TO 0x3DBFF7;
    KEY_FLASH_END     = READ_ONLY  0x3DBFF8 TO 0x3DBFFF;    // flash
END
PLACEMENT
    SKEY_1_FLASH        INTO KEY_FLASH_BEGIN;
    IT_ASW,
    IDENTIFICATION      INTO IDENT_AND_ITASW;
    AIFT_SECTION,
    BIFT_SECTION,
    ROMBYTE,
    ROMWORD,
    _PRESTART,
    STARTUP,
    ROM_VAR,
    CALBYTE,
    CALWORD,
    CAN_NON_BANKED,
    NON_BANKED          INTO  NON_BANKED_ROM_3E;
    FPROT_INIT          INTO  FPROT_INIT_SEG;

    DEFAULT_ROM         INTO  BANK_38_AREA,BANK_39_AREA,BANK_3A_AREA,BANK_3B_AREA,BANK_3C_AREA,BANK_3D_AREA;  //flash
    SKEY_2_FLASH        INTO  KEY_FLASH_END;

    STARTUP_DATA,
    SHARED_RAM,
    SKEY_RAM,
    SBW_RAM,
    SCHK_RAM,
    RAMBYTE,
    RAMWORD,
    SRAMBIT,
    SRAMWORD,
    RAMINSTRU,
    CAN_SAVED,
    DEFAULT_RAM         INTO  MY_RAM;
    TOP_STACK_RAM,
    SSTACK,
    BOTTOM_STACK_RAM    INTO  STACK_RAM;
END
STACKSIZE 0xF0
ENTRIES
   rs_SharedRam
   caub_SecurityKey_1
   caub_SecurityKey_2
   cat_ApplId
   cat_AswAreaAddr
   __virtual_interrupt_table
END

//VECTOR 0 _Startup /* reset vector: this is the default entry point for a C/C++ application. */
//VECTOR 0 Entry  /* reset vector: this is the default entry point for an Assembly application. */
//INIT Entry      /* for assembly applications: that this is as well the initialization entry point */

Labels (1)
0 Kudos
2 Replies

275 Views
CompilerGuru
NXP Employee
NXP Employee
What's the problem you actually have when debugging?

There is a memory configuration dialog which can be used  to setup the available memory in the simulator too.
By default it simulates all the used memory out of the ELF file.

Daniel

0 Kudos

275 Views
J2MEJediMaster
Specialist I
Compared to the vanilla Full_Chip_Simulation.prm CW generates for the S12DP256B part, you've got a lot of changes in there. Nothing wrong with that, other than without other information on these other parts, I don't know how valid those entries are. Also, it's not clear what problems you are having. Is the "download" to the simulator giving you errors? Or does it just not run? If it's the latter, check the last several lines of your prm file. You should either have the statement VECTOR 0 _Startup (C language program) or VECTOR 0 Entry and INIT Entry (assembly language program) uncommented so that on a virtual reset, the emulator can find your program's starting point.

---Tom
0 Kudos