Forum Discussion
Altera_Forum
Honored Contributor
16 years agoI eventually compared the templates that generate those files for the ecos and uC OS chains, and found out how to correct this, using solution 3. If someone is interested, you need to correct the nios2ecos/packages/hal/nios2/arch/current/gtf/devices.h.gtf, look for the following lines, and add the lines in red:
<for_each variable="MODULE" ptf_path="SYSTEM/MODULE">
<if true="and( ptf_module_is_mastered_by( %MODULE%, %CPU% ), !=( %MODULE%, %CPU% ) )">
<set_variable variable="MODULE_CLASS" ptf_path="SYSTEM/MODULE %MODULE%/class"/>
<if condition="eq( %MODULE_CLASS%, no_legacy_module )">
<set_variable variable="MODULE_CLASS" ptf_path="SYSTEM/MODULE %MODULE%/gtf_class_name"/>
</if>
<!-- did we already add it to ECOS_COMPONENT_LIST? (we don't want duplicate defines) --> It looks like a ugly hack, but it is what Altera is doing in the uC OS BSP anyway, so I guess it's ok ;) I still don't know why there can be two different parameters for the component class name, though.