Using the simulator with "unlimited" memory?

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

Using the simulator with "unlimited" memory?

Jump to solution
1,227 Views
Brynas
Contributor I

Hi,

I am using the simulator to run unit tests on portions of our code. The unit test program creates a lot of overhead when using the more powerful settings but this is ok - the point of running the code in the simulator is just to execute the test cases in an environment as close as the real thing as possible (not necessarily as far as memory is concerned since this is very different to the actual firmware anyway).

 

Now to my question: is it possible to tweak the simulator so that it thinks that it is a specific derivative BUT with unlimited memory? Now I quite easily run out of RAM / ROM when trying to run too many test cases at once.

Labels (1)
Tags (1)
0 Kudos
1 Solution
717 Views
kef
Specialist I

Yes, it is possible. To make linker accepting more code or RAM, you should edit PRM file. Debugger should accept all additional code and RAM.

 

View solution in original post

0 Kudos
6 Replies
717 Views
CrasyCat
Specialist III

Hello

 

- Which CPU are you targeting (HC08, HC12, Coldfire, ..)
- Which version of CodeWarrior are you using?
   To retrieve that info:

   If you are using a version < 10.0
    - Start CodeWarrior
    - Select Help -> About Freescale CodeWarrior
    - Click on "Install Products"
    - CodeWarrior version used is displayed on top in the Installed Products dialog.

 

  If you are using a version >= 10.0

    - Start CodeWarrior
    - Select Help -> About CodeWarrior Development Studio

    - Click on the icon with tool tip "Freescale SemiConductor - MCU"

    Version number is indicated there.

 

 

CrasyCat

0 Kudos
717 Views
Brynas
Contributor I

Hello,

 

I am targeting HC12. On top of the installed products dialog it stands "CodeWarrior Development Studio for the S12(X) Version 5.0, build 9061"

 

/ Brynas

0 Kudos
718 Views
kef
Specialist I

Yes, it is possible. To make linker accepting more code or RAM, you should edit PRM file. Debugger should accept all additional code and RAM.

 

0 Kudos
717 Views
Brynas
Contributor I

Do I need to configure the debugger in some way? I've tried to increase RAM and ROM in my PRM file but when I execute the program in the simulator the command prompt prints out "reading from reserved register" and then finally it stops on an illegal breakpoint

0 Kudos
717 Views
kef
Specialist I

Not all peripherals are simulated. I don't remember what this messae means. Does simulation stop on read from reserved register? If it doesn't stop, then this warning is really not memory size related and means that your code is accessing registers of not simulated peripherals. Anyway you always can go in simulator to FCS menu->Configure..., change memory mode from auto on load to user defined and add all required memory blocks. Configuration can be saved.

0 Kudos
717 Views
NavidadRedivivu
Contributor III

By my knowledge the simulator is agnostic when it comes to memory ranges, so you can in fact extend the size of the RAM (or ROM). Still, it is a full chip simulator, which means that it is aware of the locations of the various memory mapped registers.  You probably need to check the device memory map and use the non-implemented memory ranges as additional memory. Just my two cents.

0 Kudos