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.

RM57L843: Include Safety Library in RM57L project using IAR Embedded Workbench

Part Number: RM57L843
Other Parts Discussed in Thread: HALCOGEN

Dear Support,

I intend to integrate the safety library into my project, for the RM57L843 microcontroller.
I followed the HalCoGen example "Example_SafetyLib.c" for step 1 - 3 but encountered a problem in Step 4, where the "HL_sys_link.cmd" has to be modified.

Instead of using Code Composer Studio, Im using IAR Embedded Workbench - ARM v.8.50.9. I configured HalCoGen to create an IAR Project, however this causes the .cmd to look different, than I expected it.
There is no "SECTIONS" block where I could add the lines.

The error I get from simply ignoring Step 4 is in the file "sl_asm_api_IAR.asm" in line 42 where it says "INCLUDE sl_asm_IAR.inc" and the error says:
Error[2]: Failed to open #include file 'sl_asm_IAR.inc'
Error while running Assembler

I assume Im not the first who wants to add the safety library to an IAR project, therefore it would be great if somebody could provide me with the correct .cmd file for my project.

Thank you

Dorian

-----------------------------------------------

Tools:

     microcontroller: RM57L843

     HalCoGen: v.04.07.01

     IAR Embedded Workbench - ARM v.8.50.9

     Safety Library v.2.4.0

  • I was able to solve the origina error.
    I forgot to add the includes path not only to the C/C++ Preprocessor but also to the Assembler Preprocessor.

    From the Safety Library Example for the RM48 I was able to extract the "HL_sys_link.cmd" file and copy it to my project.
    But it appears the memory addresses and sizes differ between the RM48 and the RM57.

    Therefore, a working version of the .cmd file for the RM57 is still requested.


    Also I copied the code for the "HL_start_up.c" file from the HalCoGen example and got a bunch of errors.
    Mostly that there is no definition for "ulHighHandlerLoadStart", "ulHighHandlerLoadEnd" .... from line 65 to line 69 and no definition for "case CPU1_RESET:"

    Is the code in HalCoGen not up to date or is it also only viable for Code Composer Studio?

    Greetings Dorian

  • Mostly that there is no definition for "ulHighHandlerLoadStart", "ulHighHandlerLoadEnd" .... from line 65 to line 69 and no definition for "case CPU1_RESET:"

    "ulHighHandlerLoadStart" and "ulHighHandlerLoadEnd" are defined in linker cmd file. I don't know how to port CCS linker cmd file to IAR linker cmd file. 

    The .sl_stflash_SRAM section (sl_selftest_flash()) should be loaded into Flash, but run from SRAM.

  • I appears that manual porting from CCS to IAR is quiet a difficult task and surpasses my skill level.

    Instead I will try to port the IAR example for the RM48 to the RM57.
    Wish me luck, that this works. Smiley