element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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 & Tria Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Avnet Boards General Simple LED_ON Code Does Not Work (Zedboard Green PCB)
  • 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 358 subscribers
  • Views 673 views
  • Users 0 members are here
  • Using Xilinx Tools
  • ZedBoard General Questions
  • Zedboard Hardware Design
  • Software Application Development
Related

Simple LED_ON Code Does Not Work (Zedboard Green PCB)

aimar500
aimar500 over 6 years ago

Hello, I have following very simple code trying to turn on a LED (LD9), but it does not work... would you help to point the error out, please?

There is no PL hardware design, a boot.bin image has been generated from elf output, and the bin file has been copied on SD card.

The jumpers have been set properly (MIO4 and MIO5 High), but the LED was not turned on.

Thank you very much in advance,

 

P.S.  attachment includes all source code and boot.bin file.

 

##################################### boot.s ################################################################

.org 0

.text

.global _boot

.section .boot, "axS"

 

_boot:

            LDR     R0,=0x0F800071C     @ MIO_PIN_07 address

            LDR     R1,=0x0FFFFF600    

            STR     R1,[R0]

 

            LDR     R0,=0xE000A204     @ DIRM_0 address

            MOV     R1,#0x00000080

            STR     R1,[R0]

 

            LDR     R0,=0xE000A208     @ OEN_0 address

            MOV     R1,#0x00000080

            STR     R1,[R0]

 

            LDR     R0,=0xE000A040     @ DATA_0 address

            MOV     R1,#0x00000080     @Turn On LED

            STR     R1,[R0]                      

MAIN_LOOP:

            B       MAIN_LOOP

.end

##########################################################################################################

 

 

##################################### linker file #############################################################

SECTIONS

{

.boot 0x00000000: {

   *(.boot)

   *(.text)

   *(.gnu.linkonce.t.*)

}

}

##########################################################################################################

 

##################################### bif file #############################################################

the_ROM_image:

{

[bootloader] led_on.elf

}

##########################################################################################################

Attachments:
6102.led_on.zip
  • Sign in to reply
  • Cancel
  • jafoste4
    0 jafoste4 over 6 years ago

    Hi,


    Please take a look at Issue 10 and 11 of the MicroZed Chronicles.

     

    http://adiuvoengineering.com/microzed-chronicles/

     

    -Josh

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • aimar500
    0 aimar500 over 6 years ago in reply to jafoste4

    Hi Josh, Thank you very much for your reply. I don't think the posts you mentioned are related to my issues. I doubt my problem is related to the PS booting procedure. The code is linked to the address 0x00000000, but probably it is not executed properly. I can't find the problem even I had spent a certain amount of time on it ....

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • jafoste4
    0 jafoste4 over 6 years ago in reply to aimar500

    Hi Peng,

     

    Does your application work over JTAG? Looking at your notes, it looks like your either booting from QSPI or SD Card.

     

    May I ask why your not using a hardware platform in your design? Are you at the very least using the default one built into SDK so it know the ARM processors available to it on your Zedboard?

     

    -Josh

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • aimar500
    0 aimar500 over 6 years ago in reply to jafoste4

    Hi Josh,

    very nice to hear from you again. I wrote this simple code is to test whether my understanding of booting procedure is correct or not. From my point of view, after the zed board powered up, it first executes the code from BootROM (Stage-0 Boot) which will find the valid image according to the Jumper settings. In my situation, my image (bootloader or boot.bin, generated by led_on.elf) is in SD card. Then, the image (located in SD card) will be loaded to OCM and execute the first instructor from address 0x00000000. In my code, I linked the function (turn on the LED) at 0x00000000 and then, loop the CPU (without ).  I believe the LED should be turned on except my understanding on the procedure of booting is wrong....  Please kindly let me know any of my understanding mistakes. Thank you very much.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • bhfletcher
    0 bhfletcher over 6 years ago in reply to aimar500

    If you would like a deeper dive explanation of the Zynq-7000 boot procedure, you can certainly read the Zynq TRM. You may also find this presentation from X-Fest 2014 interesting:

     

    Zynq Boot and Configuration Procedures

    Nasser Poureh

    http://avnet.me/ZynqBootXF2014

     

    Bryan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
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 © 2026 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