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.

HALCOGEN and HET for RM46 - Endianness problem

Other Parts Discussed in Thread: HALCOGEN

Just wondering if I am missing something, as this seems like it should be a rather obvious issue, but when I try to include HET IDE files in my project through Halcogen I cannot get them to compile for the RM46 because the std_nhet.h source file that is generated has the precompiler condition "#if defined(_TMS470_BIG) || defined(__big_endian__)" ONLY, and the RM46 is a little endian device. Removing this line lets me compile and get code running, but the NHET doesn't appear to be working (at least not as it does in the simulator).

Any info would be appreciated, 

Thanks,

Jonathan

PS: Info on my setup here:

HALCOgen 4.0.0, using the IAR compiler/IDE and the HET-IDE to generate the NHET source files that are linked into the project through HALCOGEN. I am building this project for the RM46L852ZWT, but I am also working on a smaller in scope project doing something similar with the RM42L432PZ and have the same problem.

  • Hi Jonathan,

    Doesn't your std_nhet.h have a section that begins #elif defined(_TMS470_LITTLE) || defined(__little_endian__)?

     

  • hmm IAR probably isn't defining _TMS470_LITTLE or __little_endian__ ... will need to check on that.

    you said you were using the IAR compiler - correct?

    EDIT:

    They don't seem to be in this list.  So you probably need to do something like add them manually in the places where you include het.h -- before including HET.h.  Or you could define these on the command line (normally a -D option but you'd need to check the IAR manual for this...)

  • Anthony,

    Searching for that, it does include that line. It appears that IAR is treating this statement as if it is nested within the big endian definition. I am fine modifying this file manually to just include the little endian definitions, thanks for pointing this out.

    I've attached the header file that is output by halcogen if you want to take a look. 8081.std_nhet.h

    Thank you for your help,

  • Hi Jonathan,

    Do you say it's nested because you click on something like this ('-') in notepad++ and it collapses the whole #if, #elif, #endif?

     

    That was confusing me too but I don't think its right that its' nested, I think little endian is a separate case.

    Saying this because this file has been this way for at least 2 yrs and I've build numerous little endian projects with it.

     

    I really think the issue is that the file is setup to use the macros that are automatically defined by the TI compiler and you are using IAR.

    I'd suggest manually defining these macros instead of manually editing the std_nhet.h file.

    Otherwise - every time you run through HalCoGen to change some setting you will have to make the edits to std_nhet.h again...  since there is no usercode section to preserve your edits.  (You also cannot manually just add usercode areas to your own file - it wont' recognize these).