Project

General

Profile

We need a toolchain and library.... (problem on Windows 10)

Added by doewie about 1 month ago

Following the instructions I'm unable to install a working toolchain on W10.

I have these installs:
gcc version: 5.4.1 20160919
make version: GNU Make 3.81
environment var LIBOPEN_CM3 pointing to libopencm3 library

running make gives following errors:

Any ideas ?

D:\data\myf103apps\blink>make V=1
Access denied - .
File not found - -NAME
Using D:\data\libopencm3 path to library
  LD      blink.elf
arm-none-eabi-gcc --static -nostartfiles -T../stm32f103.ld -mthumb -mcpu=cortex-m3 -msoft-float -mfix-cortex-m3-ldrd -Wl,-Map=blink.map -Wl,--gc-sections -LD:\data\libopencm3/lib  blink.o -lopencm3_stm32f1 -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group -o blink.elf
d:/exe/gnu_tools_arm_embedded/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: cannot open linker script file libopencm3_stm32f1.ld: No such file or directory
collect2.exe: error: ld returned 1 exit status
make: *** [blink.elf] Error 1

Replies (11)

RE: We need a toolchain and library.... (problem on Windows 10) - Added by jcw about 1 month ago

Hm - I don't use Windows, so I'll be mostly guessing...

Can you show the output of "make -n"?

I'm guessing that the "-NAME" error could have something to do with this line in ../rules.mk:

STYLECHECKFILES := $(shell find . -name '*.[ch]')

If nothing else comes up, you could try building one of the examples in the libopencm3-examples project.

Edit: is the reported location of libopencm3 correct?

RE: We need a toolchain and library.... (problem on Windows 10) - Added by doewie about 1 month ago

make -n reports:

D:\data\myf103apps\blink>make -n
Access denied - .
File not found - -NAME
printf "  CC      blink.c\n"
arm-none-eabi-gcc -Os -std=c99 -g -mthumb -mcpu=cortex-m3 -msoft-float -mfix-cortex-m3-ldrd -Wextra -Wshadow -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes -fno-common -ffunction-sections -fdata-sections  -MD -Wall -Wundef -DSTM32F1 -ID:\data\libopencm3/include  -o blink.o -c blink.c
printf "  LD      blink.elf\n"
arm-none-eabi-gcc --static -nostartfiles -T../stm32f103.ld -mthumb -mcpu=cortex-m3 -msoft-float -mfix-cortex-m3-ldrd -Wl,-Map=blink.map -Wl,--gc-sections -LD:\data\libopencm3/lib  blink.o -lopencm3_stm32f1 -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group -o blink.elf
printf "  OBJCOPY blink.bin\n"
arm-none-eabi-objcopy -Obinary blink.elf blink.bin

and the reported location of libopencm3 indeed is the rootdir of this library.

I was hoping there is an obvious reason for this error. For a 'toolchain'-newby like me all these settings are very overwhelming.

RE: We need a toolchain and library.... (problem on Windows 10) - Added by jcw about 1 month ago

This very much points to that STYLECHECKFILES line being related to this problem. It's called before make starts processing the individual rules.

Do you have the find tool installed? Is it part of cygwin or something? It's been a long time since I've worked on Windows - I'm hoping that someone more in the know can help here.

BTW, if this is indeed the problem, then it's really a libopencm3 issue - might be an idea to ask about this on their mailing list, IRC, or Gitter.

RE: We need a toolchain and library.... (problem on Windows 10) - Added by doewie 30 days ago

I think the toolchain now is working fine on Windows 10. But it took quit some more steps before it works.
If there is more interest, I can make a step-by-step plan for W10

RE: We need a toolchain and library.... (problem on Windows 10) - Added by doewie 25 days ago

@michalm
Thxs for this pointer. I'll have a look at it!

RE: We need a toolchain and library.... (problem on Windows 10) - Added by Dillon1337 24 days ago

I'm seeing a similar issue on a mac... any pointers?

Dillon$ make
LD blink.elf
/Users/Dillon/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld: cannot open linker script file libopencm3_stm32f1.ld: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [blink.elf] Error 1

RE: We need a toolchain and library.... (problem on Windows 10) - Added by michalm 24 days ago

You can try mbed cli as wrapper for git/hg, gcc, ... - unified toolchain environment for Windows, Linux and Mac OS X
https://github.com/ARMmbed/mbed-cli
BTW it has nice library manager

RE: We need a toolchain and library.... (problem on Windows 10) - Added by Dillon1337 24 days ago

Thanks michalm. Can you give me an example of how I could use this to assist me with my current issue? This tool looks very powerful, but also seems to have a steep learning curve.

RE: We need a toolchain and library.... (problem on Windows 10) - Added by Dillon1337 24 days ago

The problem was that I didn't make the libopencm3 after downloading. It wasn't explicitly stated in the article, but I found it on the GitHub for that project.

RE: We need a toolchain and library.... (problem on Windows 10) - Added by jcw 24 days ago

Ah, thanks for catching that - I've been bitten by this as well, but had forgotten all about it. I'll update the article.

    (1-11/11)