purduesigbots / pros

Source code for PROS kernel: open source C/C++ development for the VEX V5 microcontroller
https://pros.cs.purdue.edu
Other
262 stars 76 forks source link

Cannot open linker script file STM32F10x.ld #58

Closed sealj553 closed 6 years ago

sealj553 commented 6 years ago

I have resolved the issue myself, but I thought it would be good to bring to your attention.

Expected Behavior:

Running make in the template directory after running build.sh will successfully compile the template project.

Actual Behavior:

CC -I../include -I../src opcontrol.c
CC -I../include -I../src init.c
CC -I../include -I../src auto.c
LN ./bin/auto.o ./bin/init.o ./bin/opcontrol.o ./firmware/libpros.a -lgcc -lm to bin/output.elf
/usr/lib/gcc/arm-none-eabi/7.3.0/../../../../arm-none-eabi/bin/ld: cannot open linker script file STM32F10x.ld: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:60: bin/output.elf] Error 1

Steps to reproduce:

Clone the git repository, run build.sh, then run make.

Steps to resolve:

On line 2 of pros/template/firmware/firmware/cortex.ld, change INCLUDE "STM32F10x.ld" to INCLUDE "firmware/STM32F10x.ld"

System information:

Arch Linux arm-none-eabi-gcc gcc version 7.3.0 (Arch Repository) pros, version 2.6.1

nhantt92 commented 5 years ago

change INCLUDE STM32F10x.ld to INCLUDE cortex-m-generic.ld