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.

Error[Pa045]: function "__low_level_init" has no prototype when running AP as hub example

Other Parts Discussed in Thread: SIMPLICITI

I have written some code based on the AP as data hub but was seeing random, spontaneous reseting so I went back to the original, unmodified AP as data hub example because I felt like make something was going on with the WDT.

When I tried to compile the example, the message I got back was:


Error[Pa045]: function "__low_level_init" has no prototype C:\Texas Instruments\SimpliciTI-IAR-1.1.1\Components\bsp\boards\EXP461x\bsp_board.c 82

However, I looked and found in C:\Texas Instruments\SimpliciTI-IAR-1.1.1\Components\bsp\mcus\bsp_msp430_defs.h:

/* Initialization call provided in IAR environment before standard C-startup */
#include <intrinsics.h>
#define BSP_EARLY_INIT(void) __intrinsic int __low_level_init(void)

So, while the code that I wrote WOULD compile but would also reset, the example code would NOT compile.

So, I uninstalled SimpliciTI and removed the related folder to be sure. I reinstalled it but got the same error when trying to run the example file.

I then uninstalled IAR and removed the related folders in C:\program files. I reinstalled it but still got the same error.

 

Google search is turning up NOTHING. Does anyone have any ideas?

  • Hi mstarret,

    I don't actually have SimpliciTI installed on my machine, so I cannot look at the code. However, I consider myself knowledgeable enough with the IAR toolset that I think I can help you out.

    It sounds like your complaint is that the sample code doesn't compile because 


    Error[Pa045]: function "__low_level_init" has no prototype C:\Texas Instruments\SimpliciTI-IAR-1.1.1\Components\bsp\boards\EXP461x\bsp_board.c 82

    My bet is that the reason you are getting this error is because the project options are set to "Require Prototypes" (Project Options->C/C++ Compiler->Require Prototypes). This is A Very Good Thing in my opinion, but if you like, you can disable this feature and your error should go away.

    Alternatively, you can keep prototypes required, and just create a prototype for the function. Just paste this above your low_level_init function, and it should work.

    __intrinsic int __low_level_init(void)

    Good luck.

    darkwzrd

  • Oops! I forgot the semicolon on the prototype....

     

    __intrinsic int __low_level_init(void);

  • Thank you for the reply! Looking back, I remember turning that off on my modified application which explains why that works and the unmodified version does not.

    The one thing that still gets me, though, is that I feel as though the example should compile without my having to do that at all. Can anyone confirm that it works for them without modification? I feel as though I did not make any changes to it when I first installed SimpliciTI. Is there some reason why it would start doing that now?

  • I had posted this on Yahoo forum and got a reply from an IAR rep. I thought I'd share it here for those who are curious:

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

    The cause of the problem is that the project you are trying to build has
    the option "Require prototypes" set, and the function __low_level_init
    does not appear to have a declaration (also known as prototype).

    In newer versions of IAR Emebedded Workbench, this declaration is
    included in the "intrinsics.h" header file.

    You could try to downgrade the simplicity stack to an older version,
    upgrade your compiler, or simple uncheck "require prototypes" in the
    project.

    -- Anders Lindgren, IAR Systems

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