Using the simulator with "unlimited" memory?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Using the simulator with "unlimited" memory?

跳至解决方案
1,236 次查看
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.

标签 (1)
标记 (1)
0 项奖励
1 解答
726 次查看
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 项奖励
6 回复数
726 次查看
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 项奖励
726 次查看
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 项奖励
727 次查看
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 项奖励
726 次查看
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 项奖励
726 次查看
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 项奖励
726 次查看
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 项奖励