Guest
#1358769
I'm trying to use a #define value from a C header file in my boot
assembly file.
For example, say I have "#define VERSION 0x01020304" in file version.h.
In Boot.s I'd like to use ".word VERSION" to place the version constant
at a specific location.
To begin with I have boot.s and everything compiles successfully. When
I rename boot.s to boot.S (to enable preprocessing on the assembly file)
and attempt to complile, I get a warning from the linker "warning:
cannot find entry symbol _reset_handler; not setting start address".
Why is the preprocessor interfering with the linker finding
_reset_handler in Boot.S?
Also, if I attempt to call routines defined in the boot.S file from a .c
file they are not found when preprocessing is enabled. For example, the
line "asm volatile ("B _vectors");" gets the error "undefined
reference to `_vectors'" when preprocessing is enabled, but compiles
successfully when I rename boot.S back to boot.s
What am I missing here?