tmwtypes.h required in R2018a generated code

조회 수: 25 (최근 30일)
Analog Devices, Inc. Systems Development Group
답변: cui,xingxing 2019년 10월 12일
Hi,
I have a project that has been generating standalone C code from R2017b fine and I recently began testing the codegen tools with R2018a. When switching to R2018a the generated code now requires a header "tmwtypes.h". This is included with R2018a, but under a specific MathWorks license. So I cannot use it for my GPL project.
Is there a workaround for this or a flag I'm missing?
-- Reproduction Steps:--
The MATLAB project is available here: https://github.com/analogdevicesinc/ad936x-filter-wizard under the codegen-support branch.
Add the "test" folder to path and run the "generate_internal_designer" script to create the DLL source. Under the codegen->dll->internal_design_filter_cg folder the header "rtwtypes.h" has this header dependency.

답변 (2개)

Andy
Andy 2018년 4월 9일
Hi Travis,
If you set a specific "target hardware device" then rtwtypes.h won't include tmwtypes.h. In other words add something like the following on line 19 of your "generate_internal_designer.m" script:
cfg.HardwareImplementation.TargetHWDeviceType = 'Intel->x86-64 (Windows64)';
If you want to use a different device type you can get the string for it by doing the following:
>> cfg = coder.config('dll');
>> open cfg
Then click the "Hardware" button along the top of the "Project Settings" window, set Hardware Board to "None - Select device below", and set the device as desired.
Then enter:
>> cfg.HardwareImplementation.TargetHWDeviceType
And MATLAB will display the string you want.
Also, why do you think tmwtypes.h is under a specific license? Looking at the file I see there's a copyright but nothing indicating a specific license. It should be fine to package tmwtypes.h with your code.
  댓글 수: 1
Analog Devices, Inc. Systems Development Group
Yes, that did the trick thank you.
With regards to the copyright, I'm not a lawyer so I try to interpret these things as conservatively as possible. Especially since I'm providing source, just not binaries to customers.
-Travis

댓글을 달려면 로그인하십시오.


cui,xingxing
cui,xingxing 2019년 10월 12일
it is here: C:\Program Files\MATLAB\R2019a\extern\include

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by