I am attempting to set a config value in the module$use function in one of my modules. This particular config value I'm setting to the length of a config vector, which I'm treating as a constant in my C code. Multiple other modules use this particular module, and add values to the vector. By the end of the config process, the length config value, does not match param.length.
moda:
module$use()
{
moda.numVals = moda.Vals.length;
}
modb:
module$use()
{
moda = xdc.usemodule('moda');
moda.Vals.length++:
moda.Vals[moda.Vals.length] = 5;
}
modc:
module$use()
{
moda = xdc.usemodule('moda');
moda.Vals.length++:
moda.Vals[moda.Vals.length] = modc.something;
}
The docs on rtsc-pedia make is sound like moda's use function should be re-evaluated after modb and modc's functions.
Is there perhaps a better way to do this (looking to keep the final value a constant so it lands in ROM)
Thanks!