I'm starting to work on an old project originally compiled on some past version of IAR workbench. I've brought the code into ver 6.50.2 of the software and when I rebuild it I get a fatal error as follows:
Fatal Error[e72]: Segment ALTVECT_ID must be defined in a segment definition option (-Z, -b or -P)
Using a Find in Files search for any instance of ALTVECT_ID results in the following code sections within a file called cstartup.s43.
section1:
//
// Ensure that this is build with the same "positions independent
// code" settings as the compiler uses.
//
XPICRTMODEL
//
// Forward declarations of segments.
//
RSEG HEAP:DATA:NOROOT(1)
RSEG CSTACK:DATA:NOROOT
RSEG DATA16_Z:DATA:NOROOT
RSEG DATA16_I:DATA:NOROOT
RSEG DATA16_ID:CONST:NOROOT
RSEG CODE_I:DATA:NOROOT
RSEG CODE_ID:CONST:NOROOT
#if __CORE__==__430X_CORE__
RSEG DATA20_Z:DATA:NOROOT
RSEG DATA20_I:DATA:NOROOT
RSEG DATA20_ID:CONST:NOROOT
#endif
RSEG TLS16_I:DATA:NOROOT
RSEG TLS16_ID:CONST:NOROOT
RSEG ALTVECT_ID:CONST:ROOT
RSEG ALTVECT_I:DATA:ROOT
RSEG IMAGE_END:CONST:ROOT
section2:
?cstart_altvect_copy:
MOV #SFE(ALTVECT_I-0x80), CW0 // dest
XMOVROPIADDR SFB ALTVECT_ID, CW1 // src
MOV #sizeof ALTVECT_ID, CW2 // len
XXCALL __data16_memcpy
I'm out of my element as I'm not familiar with the machinations of the cstartup.s43 file's purpose and how to correct the error as such.