element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Software Application Development Illegal Instruction
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 5 replies
  • Subscribers 328 subscribers
  • Views 976 views
  • Users 0 members are here
Related

Illegal Instruction

Former Member
Former Member over 10 years ago

Hi all,

I just purchased the microZed board and followed the getting started manual. Now I tried to compile the example helloworld based on Adam Taylor's tutorial. But when I upload the elf file into the sd card and execute on terminal. It gives an "illegal instruction" error. Currently I do not have a JTAG cable thus copying the file is the only option. I suppose this error is related to instruction set used for ARM version.BTW, I'm using 2015.2 vivado.

Could someone with more experience shed light on what might be the causes behinds this error.

Thanks in advance.

  • Sign in to reply
  • Cancel
Parents
  • Former Member
    0 Former Member over 10 years ago

    If I understand correctly you just copied your .elf file to the SD Card, changed the MicroZed boot option to SD CARD, and tried to boot the MicroZed?

     

    The helloworld .elf file you generated is an executable file but it does not contain any mechanism for initializing the Zynq PS (Processing System). When you use the SDK to download the application via JTAG it is using the ps7_init.tcl file to initialized the Zynq PS prior to running the application. In order to boot directly from the SD Card and run your application you will need to create a boot.bin file that includes an FSBL (First Stage Boot Loader) along with your application code.

     

    You might want to take a look at the Avnet Zynq SW Speedway workshop material. It will take you through the process and has hands on labs for your MicroZed board as well.:

    Developing ZynqRegistered-7000 All Programmable SoC Software (Vivado 2013.3 and 2014.4.1)

     

    -Gary

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to Former Member

    Thanks for the reply. I copied the elf file and the entire default boot image from the website. I boot the microZed successfully from the SD card and connect it through URAT with a terminal on my PC. Then from the terminal I execute the elf file with typical linux cmd:

    zynq> ./test.elf

    which is my hello world executable.

    I'll look at the tutorial. Thanks!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to Former Member

    Ahh, I misunderstood, I thought that you were trying to boot and run a 'stand alone' application rather than a Linux application.

     

    Did you select 'Linux Application' as opposed to 'Standalone Application' when you generated your helloworld app in the SDK?

     

    This Xilinx Tutorial Video might be helpful: http://www.xilinx.com/training/zynq/how-to-create-linux-application-using-xilinx-sdk.htm

     

    -Gary

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to Former Member

    Oh, now I understand what's going on. I've made a standalone app which should be boot directly by FSBL.
    Another related question, in the linux application, I will no longer have access to all the hardware like GPIOs or SPI interface?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to Former Member

    You can have access to hardware features like GPIO and SPI from a Linux application. But there must be a driver for the hardware either as part of the basic Linux (like sysfs) or by adding a driver. You also have to make sure that Linux is aware of your hardware by adding it to your devicetree if it is not already supported or added.

     

    The PicoZed FMC Carrier Card has a current example of using GPIO:

    http://zedboard.org/sites/default/files/documentations/PicoZed_FMC_CC_GettingStarted_v2_0_0.pdf

     

    You can look at the Xilinx wiki for more general information on Linux drivers: http://www.wiki.xilinx.com/Linux+Drivers

     

    Your best option would probably be to take a look at some of the very good training videos on Linux, drivers, etc. available on the Xilinx zynq training page: http://www.xilinx.com/training/zynq/

    Look under "Runtime Software: FSBL, Linux...."

     

    -Gary

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • Former Member
    0 Former Member over 10 years ago in reply to Former Member

    You can have access to hardware features like GPIO and SPI from a Linux application. But there must be a driver for the hardware either as part of the basic Linux (like sysfs) or by adding a driver. You also have to make sure that Linux is aware of your hardware by adding it to your devicetree if it is not already supported or added.

     

    The PicoZed FMC Carrier Card has a current example of using GPIO:

    http://zedboard.org/sites/default/files/documentations/PicoZed_FMC_CC_GettingStarted_v2_0_0.pdf

     

    You can look at the Xilinx wiki for more general information on Linux drivers: http://www.wiki.xilinx.com/Linux+Drivers

     

    Your best option would probably be to take a look at some of the very good training videos on Linux, drivers, etc. available on the Xilinx zynq training page: http://www.xilinx.com/training/zynq/

    Look under "Runtime Software: FSBL, Linux...."

     

    -Gary

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube