Closed Amomum closed 7 years ago
@Amomum
Since startup_MDR32F9Qx.s uses preprocessor, it should be assembled not with as but with gcc, for example, like this:
-x assembler-with-cpp -mcpu=cortex-m3 -mthumb -DSTARTUP_CLEAR_BSS -DSTART=main -c
See example:
SRC = ... startup_MDR32F9Qx.S
And then compiled witharm-none-eabi-gcc ${CFLAGS} -DUSE_MDR1986VE9x -D__STARTUP_CLEAR_BSS -D__START=main -I${INC} -c ${src} -o ${src}.o
and
gcc
transfers defines (-D) toas
automatically. You can check this.And because readme now recommends adding -nostartfiles (and that's actually is a problem on its own), I had to add -D__START=main; otherwise I got an error undefined reference to_start'`.
It is only one example, it isn't rule for using.
Since startup_MDR32F9Qx.s uses preprocessor, it should be assembled not with
as
but withgcc
, for example, like this:-x assembler-with-cpp -mcpu=cortex-m3 -mthumb -DSTARTUP_CLEAR_BSS -DSTART=main -c
And because readme now recommends adding -nostartfiles (and that's actually is a problem on its own), I had to add -D__START=main; otherwise I got an error
undefined reference to
_start'`.