ADSP-21160N Embedded Coder Support
2 次查看(过去 30 天)
显示 更早的评论
I have some ADSP-21160N boards and would like to use them for PIL-simulation. As I found out this particular board doesn't seem to be supported for a full turnkey solution, so I can't automate build and debugging process directly from MATLAB. Correct? Or, there are no peripheral driver blocks for my particular board, but I still can automate a build process? If so, can you give me a link or two to deal with custom driver blocks. Thanks.
1 个评论
Anthony Seely
2012-11-29
Hi Alexander,
Mathworks has come out with a 'lightweight' PIL method that they've put here:
C:\Program Files\MATLAB\R2012b\toolbox\rtw\rtwdemos\examplePilF28335
Its still a decent amount of work, but not nearly as much as it would be to make a custom target PIL work using the TLC methods that all of the published examples show.
And, they provide the makefile for you (ec_target.tmf). You just customize target_tools.mk with paths to your specific compiler, linker as well as options and that's almost all you need to build.
You have to port the four functions open() close() send() recv() over in the F28335SerialRtiostream folder to your target but this is pretty easy.
The trickiest steps (in my opinion) are under the +f23885pil folder, there are a few subclass files there that you need to customize.
The launcher for TI targets is easy -- there is actually a utility called 'loadti' that does the job of the .js scripts that are included in the example folder and can download to any TI target. Maybe ADI has something similar (or, you could try C6000 ;)
The 'TargetApplicationFramework' file is where you register any additional sources that you need. In our case we have a program called 'HalCoGen' that generates driver functions based on a graphical config tool and leaves you at main(). So just including these drivers in the build gets the chip up and running properly.
The ConnectivityConfig and the sl_customization.m files are mainly gluing the pieces together and telling simulink about them.
There's more but that's kind of an overview.
The things that threw me the most so far have been: a) you don't make your own .TLC like all the examples out there show, you use 'ert.tlc' and just change the makefile to 'ec_target.tmf'. b) you tell simulink you want a particular target in the hardware configuration tab instead... c) I'm new to PIL and I kept expecting the PIl build to occur when I pressed CTRL-B. But that builds something of a standalone app. The PIL build itself with your drivers and Rtiostream doesn't get kicked off until you try to launch the simulation.
Best Regards, Anthony
回答(1 个)
TAB
2012-5-24
Developing custom target for simuink requires lots of effort. You need to create s-functions blocks, write TLCs and make GUIs. For introduction you can refer this.
Some custom blocksets are already available from some vendors. You can refer them as starting point. Blockset for STM32 microcontroller is available here.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!