Hi all,
I have searched the forums high and low but still can't find a definitive answer. I'm hoping there are some gurus out there that can point me in the right direction.
My question is: How do I successfully include a 'c' header file in the STARTUP.A51 file? NB: My c header file only includes #defines etc
I was under the impression that the C preprocessor should be able to do this easily? Alas, I can't compile my code because the compiler doesn't recognize the symbols in my STARTUP.A51 (which are specified in my header file).
In case you were wondering, here's some background info:
Basically, I have had to edit the STARTUP.A51 file, in order to redirect some interrupts for my bootloader application.
The interrupts jump to a memory address that I have called (say) "APPLICATION_VECTOR_TABLE_ADDRESS"
This all works fine.
All I want to do is #define APPLICATION_VECTOR_TABLE_ADDRESS in my c header file - because this needs to be shared amongst several source files.
I am using the uVision4 IDE, and C51 compiler V9.01.
Look forward to some responses. Cheers
Oh I forgot to mention ... if I actually compile the code above (ie: with the #include memorymap.h"), I get the following error:
..\Common\STARTUP.A51(238): error A45: UNDEFINED SYMBOL (PASS-2)
The "UNDEFINED SYMBOL" is refering to APP_VEC_ADDRESS.
Cheers, T
Anyone have any ideas here? Cheers, T
My guess is that your startup file isn't sent through the preprocessor, in which case the assembler will see a strange and unknown symbol, instead of the hexadecimal value you intended the assembler to see.
http://www.keil.com/support/man/docs/a51/a51_mp_c.htm
note the difference between IF and $IF, etc: http://www.keil.com/support/man/docs/a51/a51_ap_conditional.htm and check if there are other such variations or limitations of any other directives that you use...