Simulink production function block error in br compilation (NAN and INFINITY)

Hi,

yeah, you’re right, patching math.h would influence everything that’s using that header file, independent if it’s Simulink generated code or not.
One idea to handle that could be:

  • preparing a patched math.h, but keep also the original one.
  • using the AS configuration pre-build step togehter with a batch file or similar script to decide, if the patched header should be used or not (e.g. by copying the wanted version of math.h into the gnu installation directory before starting compile).

Of course then one more manual step has to be done (setting up the pre-build step), but it could prevent using the patched file if not wanted. But to be honest, I’ve not the possibility right now to try if it really works in that way, or if that causes “trouble” with temp file of the AS project.

Best regards!

1 Like