This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

GCC problem finding gcc_startup_nrf52.s

Hi,

I've done a fair amount with the NRF51822 and Keil on Windows but decided it was time to switch to my native Mac instead of the VM!

Reading all the guides around the place and just stuck a little bit.

I've got all the cross compiling tools installed and paths setup (and I've modified the makefile.common)

I'm trying to compile the simple Blinky example for the new nRF52832 (yay!)

It seems to have trouble finding the gcc_startup_nrf52.s even tho the include paths are all there. I modified the make file to be quite verbose and I even 'ls' the file from the same folder..

Any help appreciated!

make
rm -rf _build
echo  Makefile
Makefile
mkdir _build
Compiling file: system_nrf52.c
arm-none-eabi-gcc -DCONFIG_GPIO_AS_PINRESET -DBOARD_PCA10036 -DNRF52 -DBSP_DEFINES_ONLY -mcpu=cortex-m4 -mthumb -mabi=aapcs --std=gnu99 -Wall -Werror -O3 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums -I../../../../../../components/toolchain/gcc -I../../../../../../components/toolchain -I../../.. -I../../../../../bsp -I../../../../../../components/device -I../../../../../../components/drivers_nrf/delay -I../../../../../../components/drivers_nrf/hal -c -o _build/system_nrf52.o ../../../../../../components/toolchain/system_nrf52.c
Compiling file: main.c
arm-none-eabi-gcc -DCONFIG_GPIO_AS_PINRESET -DBOARD_PCA10036 -DNRF52 -DBSP_DEFINES_ONLY -mcpu=cortex-m4 -mthumb -mabi=aapcs --std=gnu99 -Wall -Werror -O3 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums -I../../../../../../components/toolchain/gcc -I../../../../../../components/toolchain -I../../.. -I../../../../../bsp -I../../../../../../components/device -I../../../../../../components/drivers_nrf/delay -I../../../../../../components/drivers_nrf/hal -c -o _build/main.o ../../../main.c
Compiling file: nrf_delay.c
arm-none-eabi-gcc -DCONFIG_GPIO_AS_PINRESET -DBOARD_PCA10036 -DNRF52 -DBSP_DEFINES_ONLY -mcpu=cortex-m4 -mthumb -mabi=aapcs --std=gnu99 -Wall -Werror -O3 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums -I../../../../../../components/toolchain/gcc -I../../../../../../components/toolchain -I../../.. -I../../../../../bsp -I../../../../../../components/device -I../../../../../../components/drivers_nrf/delay -I../../../../../../components/drivers_nrf/hal -c -o _build/nrf_delay.o ../../../../../../components/drivers_nrf/delay/nrf_delay.c
Compiling file: gcc_startup_nrf52.s
make: /Applications/gcc-arm-none-eabi-4_9/bin/bin/arm-none-eabi-gcc: No such file or directory
make: *** [_build/gcc_startup_nrf52.o] Error 1

Lets take a peek if its there (using the include path that the Makefile is using) and it is!


Chriss-MacBook-Pro:armgcc christopher$ ls ../../../../../../components/toolchain/gcc/
Makefile.common		arm_common_tables.h	core_cm0.h		core_cmInstr.h		gcc_startup_nrf51.s	nrf51_xxaa.ld		nrf52_common.ld
Makefile.posix		arm_const_structs.h	core_cm4.h		core_cmSimd.h		gcc_startup_nrf52.s	nrf51_xxab.ld		nrf52_xxaa.ld
Makefile.windows	arm_math.h		core_cmFunc.h		gcc_nrf51_common.ld	nrf51_common.ld		nrf51_xxac.ld		nrf5x_common.ld
Chriss-MacBook-Pro:armgcc christopher$ ls ../../../../../../components/toolchain/gcc/gcc_startup_nrf52.s 
../../../../../../components/toolchain/gcc/gcc_startup_nrf52.s
Chriss-MacBook-Pro:armgcc christopher$ 
Chriss-MacBook-Pro:armgcc christopher$ 

Here's it with the 'make -n' command as requested

make -n
rm -rf _build
echo Compiling file: system_nrf52.c
echo arm-none-eabi-gcc -DCONFIG_GPIO_AS_PINRESET -DBOARD_PCA10036 -DNRF52 -DBSP_DEFINES_ONLY -mcpu=cortex-m4 -mthumb -mabi=aapcs --std=gnu99 -Wall -Werror -O3 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums -I../../../../../../components/toolchain/gcc -I../../../../../../components/toolchain -I../../.. -I../../../../../bsp -I../../../../../../components/device -I../../../../../../components/drivers_nrf/delay -I../../../../../../components/drivers_nrf/hal -c -o _build/system_nrf52.o ../../../../../../components/toolchain/system_nrf52.c
echo Compiling file: main.c
echo arm-none-eabi-gcc -DCONFIG_GPIO_AS_PINRESET -DBOARD_PCA10036 -DNRF52 -DBSP_DEFINES_ONLY -mcpu=cortex-m4 -mthumb -mabi=aapcs --std=gnu99 -Wall -Werror -O3 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums -I../../../../../../components/toolchain/gcc -I../../../../../../components/toolchain -I../../.. -I../../../../../bsp -I../../../../../../components/device -I../../../../../../components/drivers_nrf/delay -I../../../../../../components/drivers_nrf/hal -c -o _build/main.o ../../../main.c
echo Compiling file: nrf_delay.c
echo arm-none-eabi-gcc -DCONFIG_GPIO_AS_PINRESET -DBOARD_PCA10036 -DNRF52 -DBSP_DEFINES_ONLY -mcpu=cortex-m4 -mthumb -mabi=aapcs --std=gnu99 -Wall -Werror -O3 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums -I../../../../../../components/toolchain/gcc -I../../../../../../components/toolchain -I../../.. -I../../../../../bsp -I../../../../../../components/device -I../../../../../../components/drivers_nrf/delay -I../../../../../../components/drivers_nrf/hal -c -o _build/nrf_delay.o ../../../../../../components/drivers_nrf/delay/nrf_delay.c
echo Compiling file: gcc_startup_nrf52.s
'/Applications/gcc-arm-none-eabi-4_9/bin/bin/arm-none-eabi-gcc' -x assembler-with-cpp -DCONFIG_GPIO_AS_PINRESET -DBOARD_PCA10036 -DNRF52 -DBSP_DEFINES_ONLY -I../../../../../../components/toolchain/gcc -I../../../../../../components/toolchain -I../../.. -I../../../../../bsp -I../../../../../../components/device -I../../../../../../components/drivers_nrf/delay -I../../../../../../components/drivers_nrf/hal -c -o _build/gcc_startup_nrf52.o ../../../../../../components/toolchain/gcc/gcc_startup_nrf52.s
echo Linking target: nrf52832_xxaa.out
'/Applications/gcc-arm-none-eabi-4_9/bin/bin/arm-none-eabi-gcc' -Xlinker -Map=_build/nrf52832_xxaa.map -mthumb -mabi=aapcs -L ../../../../../../components/toolchain/gcc -Tblinky_gcc_nrf52.ld -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections --specs=nano.specs -lc -lnosys _build/system_nrf52.o _build/main.o _build/nrf_delay.o _build/gcc_startup_nrf52.o  -o _build/nrf52832_xxaa.out
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f  Makefile -C ./  -e finalize
echo Preparing: nrf52832_xxaa.bin
'/Applications/gcc-arm-none-eabi-4_9/bin/bin/arm-none-eabi-objcopy' -O binary _build/nrf52832_xxaa.out _build/nrf52832_xxaa.bin
echo Preparing: nrf52832_xxaa.hex
'/Applications/gcc-arm-none-eabi-4_9/bin/bin/arm-none-eabi-objcopy' -O ihex _build/nrf52832_xxaa.out _build/nrf52832_xxaa.hex
echo ''
'/Applications/gcc-arm-none-eabi-4_9/bin/bin/arm-none-eabi-size' _build/nrf52832_xxaa.out
echo ''
Parents
  • Well, technically I should be able to put the toolchain anywhere as long as I reference it correctly, therefore I threw it into my Applications folder so its global across users (mind you, I’m only one logged in). Some of the other tutorials have it under usr/local/bin or something like that from memory but technically shouldn’t matter as long as you point to it correctly.. I have it in my exports/path.. and in the .posix makefile.

    I see the problem there is it’s doubling the the ‘bin’ (see the /bin/bin which is wrong)… and yes I have it setup in the path so it should for the .s assembly files just reference it the same as it does for the .c files..

    Mmh.. now to find out where!

    /Applications/gcc-arm-none-eabi-4_9/bin/bin/arm-none-eabi-gcc'
    
Reply
  • Well, technically I should be able to put the toolchain anywhere as long as I reference it correctly, therefore I threw it into my Applications folder so its global across users (mind you, I’m only one logged in). Some of the other tutorials have it under usr/local/bin or something like that from memory but technically shouldn’t matter as long as you point to it correctly.. I have it in my exports/path.. and in the .posix makefile.

    I see the problem there is it’s doubling the the ‘bin’ (see the /bin/bin which is wrong)… and yes I have it setup in the path so it should for the .s assembly files just reference it the same as it does for the .c files..

    Mmh.. now to find out where!

    /Applications/gcc-arm-none-eabi-4_9/bin/bin/arm-none-eabi-gcc'
    
Children
No Data
Related