Jay
1) I notice that you are using the V1.4-4B version and not the release version. There is no problemen with this but I oriiginally tested with the release.
2) The target is set to debug in the V1.4-4B so I would set it back to release (the LPC2103 has very limited SRAm so a debug version from RAM is not very useful anyway).
3) The warnings about
_DEBUG_CODE_ is due to the fact that the define is declared in 2 places; in the compiler pre-processor setting and in the file
app_hw_lpc23xx.h. Generally the
_DEBUG_CODE_ can be removed form the proprocessor setup but it doesn't affect the release build and is not actually a problem.
4) I did the same procedure with the V1.4-4B and it also builds normally. That is, I don't get any problem with the missing '
__vector' string, whatever that is.
5) I tried making mistakes during the process but whatever I did wrong it wouldn't give me this error.
6) I then seached all projects to try to find a variable with this name but I couldn't; this variable doesn't exist in the project.
7) Then I searched the Internet and found the following:
http://supp.iar.com/Support/?note=80474&from=note+40394This seems to make it clear. I think that you have changed a target setting to the LPC2103 and then the linker is trying to calculate a checksum for the vectors table, where it uses the formular
"IElfToolPostProcess=--checksum __vector+0x14:4,sum32:2;__vector-__vector+0x1f". It thus expects to find a symbol in the project, whereby
__vector is in fact the value 0.
The simplest modification to ensure compatibility with IAR (how it works also changes a bit from one version to another) is to add the following to
CstartupIAR5_LPC21XX.s:
Original:
PUBLIC resetVector
ARM
resetVector:
LDR pc, =reset ; ResetNew:
PUBLIC resetVector
PUBLIC __vector
ARM
__vector:
resetVector:
LDR pc, =reset ; ResetThis simply sets the value of
__vector to be the same as resetVector (both are 0x00000000) and now the linker can generate its checksum.
Whether the checksum is of interest or not depends on how the code is loaded to the board (a target for SRAM never needs it). The checksum is inserted into the vector table so that the internal boot loader in the LPC2103 can verify that the loaded code is also valid [more details here:
http://www.utasker.com/forum/index.php?topic=109.0].
If you are loading to the the board using FlashMagic this is also not needed since FlashMagic will calculate the value during the download and insert it automatically.
It is probably needed when loading to flash using the IAR loader.
As comparison, some projects simply put a fixed value at the reserved vector location since it is actually fixed for a particular start up file; eg. the GCC project simply puts the value 0xB8A06F88 there...
Therefore I expect that this will finally allow the project to operate correctly with your set up.
Regards
Mark