Running .elf generated using Microchip Software Package

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

Hi,

devkit ATSAMA5D27 : Image loaded linux4sam-buildroot-sama5d2_xplained-6.0.img.bz2

We have tried a cross-compilation of a simple "hello world" on linux(Ubuntu) using Compiler :-arm-linux-gnueabihf-gcc for the devkit ATSAMA5D27. ---->This works fine

 

But when we build the same project from within "Microchip Software Package" the generated hello.elf when run as executable fails to run on the devkit.We get a segmentation fault.

 

Can the .elf generated be used as an executable in the devkit?Is there any additional flags that need to be enabled etc?

 

One observation was the "Microchip Software Package" uses arm-none-eabi-gcc to compile

 

 

Last Edited: Thu. Feb 7, 2019 - 10:20 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use arm-none to compile for bare-metal ie not linux. Under linux, if you want to access the hardware directly, you need to write your own device drivers or go via the /proc interface.