I noticed the example makefiles that come with Aeolus Development's newlib-lpc port build elf binaries for the tests by passing all the library's .o files to arm-elf-ld. I thought this was strange, so I changed it to instead link against libnewlib-lpc.a built from these same files ... but it doesn't work! The elf file is bigger, the .hex file is smaller and test2 doesn't output anything to the serial port. After trying a few things, I noticed that if you build one .o file from all the library C sources and another .o file from the library assembler sources and then build these into libnewlib-lpc.a, it works again. I still don't understand why it doesn't work if you build the library with one .o file for each source file. I tried a number of different variations checking that I was using the same versions of the files and they were specified in the same order. I'm using GNUARM and targeting an Olimex LPC-H2294 board. Brian
Message
Newlib-lpc ar/ld weirdness and workaround
2005-05-01 by deunhido
Attachments
- No local attachments were found for this message.