Rasperry Pi Code Generation Implicit Parameter Update on Configuration Reference

1 view (last 30 days)
Hi everybody,
we are currently merging a quite large codebase from 2016a to 2018b. There seems to be some changes in the handling of configuration references, which prevent us from generating code for a RasperryPi Target using the Support Package.
Steps to reproduce:
  • Do not connect a Rasperry Pi to the computer
  • Create a new model with a simple transfer function
  • Set the Hardware Implementation to "Rasperry Pi"
  • Create a configuration reference from this model configuration
The key step is the very last step. Without a configuration reference everything works fine, however it is not an option for us to drop the usage of references. The following errors occur:
### Starting build procedure for model: untitled2
### Generating code and artifacts to 'Model specific' folder structure
Code Generation 1
Elapsed: 33 sec
### Generating code into build folder: xxxx\untitled2_ert_rtw
### Invoking Target Language Compiler on untitled2.rtw
### Using System Target File: C:\Program Files\MATLAB\R2018b\rtw\c\ert\ert.tlc
### Loading TLC function libraries
### Initial pass through model to cache user defined code
### Caching model source code
### Writing header file untitled2_types.h
.
### Writing header file untitled2.h
### Writing header file rtwtypes.h
### Writing source file untitled2.c
### Writing header file untitled2_private.h
### Writing source file untitled2_data.c
.
### Writing header file rtmodel.h
### Writing source file ert_main.c
### TLC code generation complete.
### Evaluating PostCodeGenCommand specified in the model
### Using toolchain: GNU GCC Raspberry Pi v1.0 | gmake (64-bit Windows)
### Creating 'xxxx\untitled2_ert_rtw\untitled2.mk' ...
### Building 'untitled2': make -f untitled2.mk all
### Build procedure for model: 'untitled2' aborted due to an error.
Parameter update is not supported for a configuration reference. Update parameter in the configuration set that it references.
Some other remarkable things:
  • This issue disappears for simple model configurations if a rasperry pi is connected but stays for more complex models. Even though, the very same model with a standard configuration object delivers an SSH error if no rasperry pi is connected instead of a parameter update error.
  • We found that the 'atan2' function also breaks to build with exactly the same error message under some circumstances which are hard to reproduce
Does anyone have an idea whats the issue here? I suspect that the toolchain is trying to change some parameters but I dont have a clue which and why. As this error remains with more complex models (referenced models) even if a rasperry pi is connected, I do not believe that the deploy toolchain itself is the problem.
Best Regards and Thanks!

Answers (1)

Vishal Bhutani
Vishal Bhutani on 8 Jan 2019
A configuration set reference does not allow writing to parameters in the source configuration set .
If the top model uses a configuration set reference, these calls will result in the above error at the diagnostic viewer.
As a possible workaround, convert the configset reference int a configset, debugged the real error message that is trying to be thrown, then set up again to configset reference.
It will at least give you a helpful error message about what is the actual problem rather than the internal one.
Hope it helps.

Categories

Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!