This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMAP-L138: PRU Compiler Settings for MISRA compliant code

Part Number: OMAP-L138

Hi there,

we program OMAP-L138 PRU using TI's PRU C Compiler and we use Hexpru utility for generating a const uint32_t C-Array out of the PRU code.

This C-Array is stored to a Headerfile by Hexpru utility, this Headerfile we include into the Host CPU Firmware, and will be loaded to PRU at runtime.

Now I did some Misra-compliance checking and got a warning in the C-array of the PRU code, because there are the "U" suffixes missing in the C-Array generated by hexpru.

Is there a way to make Hexpru generate this "U" suffixes? Unfortunately, I did not find anything in the docs.

Another question:

Is it possible to hand some additional texts over to hexpru utility which it then writes just before and after the generated C-Array?

I would like to use an option like this to add an include guard to the generated Header-File.

Thank you in advance for your ideas.

Best regards and stay safe all of you guys,

Chris

  • I apologize for the delay.

    Christian Gienger said:
    Is there a way to make Hexpru generate this "U" suffixes?

    Unfortunately, no.

    Christian Gienger said:
    Is it possible to hand some additional texts over to hexpru utility which it then writes just before and after the generated C-Array?

    Unfortunately, no.

    I suggest you write a script in (pick one: Perl, Python, awk, etc.) to automatically modify the output of hexpru.

    Thanks and regards,

    -George

  • Hi George,

    thank you for your reply. I will follow your suggestions and compose an automated script for parsing and modifying the content hexpru generated.

    Regards,

    Chris