Compiler Help!!!

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Guy, I get a strange error when I go to include more files in makefile to build.

 

obj-y += examples/lcd/cerulean_filingsystem/exfat/clusters.o
obj-y += examples/lcd/cerulean_filingsystem/exfat/date_time.o
obj-y += examples/lcd/cerulean_filingsystem/exfat/directory_clusters.o
obj-y += examples/lcd/cerulean_filingsystem/exfat/exFat_checksums.o
obj-y += examples/lcd/cerulean_filingsystem/exfat/exFat.o
obj-y += examples/lcd/cerulean_filingsystem/exfat/interface.o

obj-y += examples/lcd/cerulean_filingsystem/fat32/clusters.o
obj-y += examples/lcd/cerulean_filingsystem/fat32/interface_stuff.o
obj-y += examples/lcd/cerulean_filingsystem/fat32/directories.o
obj-y += examples/lcd/cerulean_filingsystem/fat32/fat.o
obj-y += examples/lcd/cerulean_filingsystem/fat32/fat32.o
obj-y += examples/lcd/cerulean_filingsystem/fat32/legacy/fat_83.o

obj-y += examples/lcd/cerulean_filingsystem/fat32/interface.o
obj-y += examples/lcd/cerulean_filingsystem/fat32/name_utilities.o

obj-y += examples/lcd/cerulean_filingsystem/hardware_adaptation_layer/cache_ctrl.o
obj-y += examples/lcd/cerulean_filingsystem/hardware_adaptation_layer/file_system_driver.o

obj-y += examples/lcd/cerulean_filingsystem/partitions/partitions.o

obj-y += examples/lcd/cerulean_filingsystem/filing_system.o
obj-y += examples/lcd/cerulean_filingsystem/fs_stack.o

obj-y += examples/lcd/main.o

The error is as follows: 

00:04:58 **** Build of configuration Default for project EmbX ****
make TARGET=sama5d4-xplained
LINK build/sama5d4-xplained/ddram/ARM_Cortex-A5_SAMA5D_LCD.elf
c:/program files (x86)/gnu tools arm embedded/7 2018-q2-update/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: cannot find ./build/sama5d4-xplained/ddram: Permission denied
collect2.exe: error: ld returned 1 exit status
make: *** [../../scripts/Makefile.rules:119: build/sama5d4-xplained/ddram/ARM_Cortex-A5_SAMA5D_LCD.elf] Error 1

00:05:00 Build Finished (took 1s.592ms)

if however if I remove the group fat32 or exfat it works. Just not when both are included?

HELP!!!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

if I remove the group fat32 or exfat it works.

Some sort of windows "/" vs "\" thing?  Maybe /fat32 looks like a legal "switch" instead of a filename.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But if I either omit fat32 or exfat it works, just not when both are together!  I hope there is no limit to the number of object files you can include to the compiler...

 

Wm.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Usually limits to the compiler or linker are the maximum length of the command prompt.  Back in the day Windows machines had 256 character limits.  When linking lots of files especially with long path names this would go crazy and fail.  The work around was to list all the files in a separate text file then pass the filename to the linker.  Perhaps that's what's happening here?

 

Whenever build errors look strange the best approach is to echo the commands out instead of actually executing them.  Turn of command hiding in the makefile or batch file.  Or add a parameter to pass to the linker to just show the commands, no execute them.

 

This line is telling:  

cannot find ./build/sama5d4-xplained/ddram: Permission denied

Is there a directory or file named ddram in the project?  Is the relative path setup properly?  Again, echo out the build commands to confirm.  The "current working directory" when running the link command (...ld.exe) might not be where you think it is.

 

 

Last Edited: Tue. Sep 8, 2020 - 08:20 PM