Open pbkdf3 opened 9 years ago
ok, "make blh" works better, but linker script is missing it looks like.
$ make blh arm-none-eabi-gcc -std=c99 -Os -g -Wextra -Wshadow -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -fno-common -ffunction-sections -fdata-sections -MD -Wall -Wundef -I../libopencm3/include -DSTM32F3 --static -nostartfiles -L../libopencm3/lib -Tstm32f373cc.ld -Wl,-Map=blh.map -Wl,--gc-sections -Wl,--print-gc-sections blh.c -lopencm3_stm32f3 -Wl,--start-group -lc_nano -lgcc -lnosys -Wl,--end-group -o blh /Users/admin/bin/gcc-arm-none-eabi-4_8-2014q2/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld: cannot open linker script file stm32f373cc.ld: No such file or directory collect2: error: ld returned 1 exit status make: *\ [blh] Error 1
The correct make invocation is "make" or "make blh.elf", so your idea in the second comment isn't it. :(
Unfortunately, I failed to reproduce this on my (Debian Jessie) box with a fresh clone. This is the command sequence I ran, and I got a 'blh.elf'.
$ git clone http://github.com/jepler/blh7601fw # got ref 3ba4868 led blink battery voltage monitor
$ cd blh7601fw
$ git submodule update --init --recursive
$ make -C libopencm3 -j4
$ cd src
$ make
Jessie's make is newer than yours, but I haven't intentionally used any advanced features of gnu make. $ make -v GNU Make 4.0
My project apparently is unusual in that it uses the "Makefile.linker" method to generate its linker script (I learned from cm3 irc that this feature may not be ready for primetime yet).
If you have additional information that might be helpful in diagnosing what's going on, please feel free to add it to this issue.
My steps were a little different, especially in the case of libopencm3 and I suspect that was most of my problem. I was doing something like clone, cd, git submodules init, git submodules update, cd libopencm3, make, cd ../src, make (approximately). With those steps, Ubuntu 13.10 also produced same results (as shown above from OSX).
On OSX your verbatim steps led to a different error:
... everything great up to here (just made libopencm3)
blh7601fw admin$ cd src
src admin$ make
io.c: In function '_write':
io.c:137:65: warning: unused parameter 'mode' [-Wunused-parameter]
int _write(FILEHANDLE fh, const uint8_t _buf, uint32t len, int mode) {
^
/var/folders/r8/14lfphg57hj82q0h3cfxwgq00000gn/T//ccMglNfS.s: Assembler messages:
/var/folders/r8/14lfphg57hj82q0h3cfxwgq00000gn/T//ccMglNfS.s:143: Error: selected processor does not support ARM mode cpsid I' /var/folders/r8/14lfphg57hj82q0h3cfxwgq00000gn/T//ccMglNfS.s:195: Error: selected processor does not support ARM mode
cpsie I'
make: ** [io.o] Error 1
I tried two different versions of toolchain on OSX (with your verbatim steps) both had above error. gcc-arm-none-eabi-4_8-2014q2 gcc-arm-none-eabi-4_9-2014q4
On Ubuntu 13.10 your verbatim steps result in success!
Ubuntu 13.10 make, interesting (same as OSX) $ make -v GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
also, thanks! really do appreciate the help. I don't care if my OSX building works particularly, but if you are interested am happy to try more things / gather more info for you. I have had good luck building a number of other arm based projects successfully with the same OSX environment.
Initialized and updated submodules, have relatively current arm toolchain in path. OSX.
$ make make: *\ No rule to make target
blh.elf', needed by
elf'. Stop.$ make -v GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.