After generated code ,how to use FreeMaster ?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

After generated code ,how to use FreeMaster ?

1,601件の閲覧回数
niequanwei
Contributor III

After generated code ,how to use FreeMaster ?And How to use the generated code with CodeWarrior?

Can somebody give me some advice?

I will be very gratefu for your help?

ラベル(2)
1 返信

1,428件の閲覧回数
constantinrazva
NXP Employee
NXP Employee

Hello niequanwei@aochutec.com‌,

For you to use FreeMaster, you'll have to configure 2 parts:

[Simulink part]

First of all, you'll have to enable it from the configuration block/Simulink options (you can click on the Config block, click on Options menu or hit CTRL+E keys). From there, select Code Generation tab -> FreeMASTER Config. Here you can select the interface you want the board to communicate with the FreeMaster, the baud rate and the pins. If you use the SCI1 interface like in our examples, you'll have to check the jumpers for SCI TXD selector and SCI RXD selector (J27, J28). You have select the USB-to-SCI option (pins 2-3 for both).

pastedImage_3.jpg

[FreeMaster application part]

Here, after you opened the FreeMaster application, you'll to go to Project->Options. Here you have to configure:pastedImage_4.jpg

  [Comm tab] 

  - Communication - select what type of communication you're using. If you're going for the simple SCI1 as in our examples, you have to select RS232, and select the COM port on which the board is connected, or you can select COM_ALL and it will try to match every available port with it.

  - Speed - select the baud rate. Here you must select the same as you have in the Simulink Model..

  [MAP Files tab]

  - Select at Default symbol file the .elf that was generated with the toolbox.

pastedImage_5.jpg

Now you can click the Start/Stop communication button or just press CTRL+K. 

If everything goes well, you have to select some variables that you want to watch. For that right-click on the Variable Watch space, click create new variable. 

pastedImage_6.jpg

Here you must select from the Variable tab the Address - you can search it by the variable name. You can change the Sampling period and it's format ("show as"). After that, just click on OK.

pastedImage_7.jpg

Now if everything is ok, you must see your variable and it's value in the Variable Watch zone. If you want to create a scope, right click on "New Project" from the Project Tree, click on Create Scope. I recommend for the first scope you let all the defaults in the Main tab, you can change them after to see what changes what. You'll have to go to the Setup tab and click on a variable from "Graph vars" tab. After you've selected one of them, select from underneath it the variable you want to assign (the variable you added in the previous step) and click OK. If everything is ok, you should see how your variable changes in time.pastedImage_8.jpgpastedImage_9.jpg

Hope this helps,

Razvan.

0 件の賞賛
返信