Jump to content
  • 0

Save Baremetal Software Projects to Flash Tutorial


Sunny

Question

Hello,

I am using the Arty A7-35T board and follow through the Baremetal Software Projects tutorial

https://digilent.com/reference/programmable-logic/guides/getting-started-with-ipi

I have successfully complete the tutorial.

1. Created the Microblaze project in Vivado 2020.1.

2. Export Hardware and generated the .XDC file.

3. Created an Application Project (dip_led) with the .XDC in Vitis 2020.1.

4. Created main.c and copy and pasted the source code from the tutorial.

5. Modified the BTN_ID, LED_ID, BTN_CHANNEL and LED_CHANNEL to match the Microblaze project.

6. Build the project and generate the dip_led.elf file

7. Run as -> 1 Lanch on Hardware (Single Application Debug)

8. Board is running and I can press the push button to turn on the LED.  Also able to see console output "Entered function main" using PUTTY on my PC.  (That is the end of the tutorial)

 

My question is: How do I make this program run as a standalone program on the Arty-A7-35T board.  (Power cycle the board and the program will run again.)

I tried the followings:

1. Program FPGA  (Screen shot attached).  Doesn't work. 

2. Program Flash (Screen shot attached).  Doesn't work.

3. Go back to Vivado Block Design, associated the dip_led.elf with the Microblaze  (Screen shot attached)

    Regenerate bitstream, and using Hardware Manager to program the flash device .  (Screen shot attached)

None of the above works so far.  Are there any tutorial that will show me how to create a standalone Microblaze project in Arty Board?

Thanks.

 

ProgramFPGA.PNG

ProgramFlash.PNG

AssociatedELF.PNG

HardwareManager.PNG

Edited by Sunny
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
Quote

 

How do I know (or how do I configure) if my dip_led.elf is to run from DDR memory or run from MicroBlaze local memory.  

Check the linker script in the Vitis project source files, lscript.ld. Memory regions for each executable section can be assigned there. It will list either MIG or local memory for each section, if local memory is selected for all, should be good.

In addition to associating the elf, the Vivado project needs to enable the Master SPI x4 programming mode in order to boot directly on power-up. I think currently, without it enabled, you can still boot the project by pressing the PROG button. See steps 2.3 - 2.7 here: https://digilent.com/reference/learn/programmable-logic/tutorials/arty-programming-guide/start - the guide is written for an older board and older versions of the tools, however, the process is largely the same in recent versions.

Thanks,

Arthur

 

Link to comment
Share on other sites

  • 0

Updated:  I also try in Vitis2020 "Program Flash" with boot.bin (Screen shot attached)

It is programmed successfully but after power cycle the Arty board, the "DONE" LED will not turn on and the program will not run.

This is the console message:

cmd /C program_flash -f C:/project/XilinxVitis2020/dip_led/_ide/flash/BOOT.bin -offset 0 \
-flash_type s25fl128sxxxxxx0-spi-x1_x2_x4 -verify -cable type xilinx_tcf url \
TCP:127.0.0.1:3121 

****** Xilinx Program Flash
****** Program Flash v2020.1 (64-bit)
  **** SW Build 2902540 on Wed May 27 19:54:49 MDT 2020
    ** Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.


Connected to hw_server @ TCP:127.0.0.1:3121
Available targets and devices:
Target 0 : jsn-Arty A7-35T-210319AB52A1A
    Device 0: jsn-Arty A7-35T-210319AB52A1A-0362d093-0

Retrieving Flash info...

Initialization done, programming the memory
Performing Erase Operation...
Erase Operation successful.
Performing Program and Verify Operations...
0%...30%...60%...90%...100%
Program/Verify Operation successful.

Flash Operation Successful
 

ProgramFlash2.PNG

Edited by Sunny
Link to comment
Share on other sites

  • 0

If dip_elf is to run out of DDR memory, a bootloader would be needed. Assuming it's running out of microblaze local memory, the flow of associating the elf file with the Microblaze IP ought to work - the elf file needs to get merged into the bitstream to create a boot binary.

Please check the position of the programming mode select jumper, JP1.

Thanks,

Arthur

Link to comment
Share on other sites

  • 0

Hi Arthus,

Thanks for replying.  How do I know (or how do I configure) if my dip_led.elf is to run from DDR memory or run from MicroBlaze local memory.  

I assume the "Baremetal Software Project" is small enough that can run from MicroBlaze local memory.

1. The JP1 jumper on Eval board is on.  (Image attached. JP1:top right corner.)

2. Once I associated the dip_led.elf to the MicroBlaze, I saved and "Generate Bitstream."

3. Open Hardware Manager, select "impl_1/design_1_wrapper.bin" file and click "Program". 

    The Arty board runs and the "Done" LED turns on.  (HWManagerProgram.PNG)    Power cycle and the program goes away.

   

However, if I try to make the board to boot and run as standalone.  (It does not work.)

    1. Choose the "Program Configuration Memory Device"  (HWManagerFlash.PNG)

    2. Configuration file:  Same "impl_1/design_1_wrapper.bin" and Click OK (HWManagerFlashConfig.PNG)

    3. Flash program without error.  (HWManagerFlashDone.PNG)

Power cycle Arty Board, the board will not run and the "Done" LED is off.

IMG_20230607_100655r.jpg

HWManagerProgram.PNG

HWManagerFlashDone.PNG

HWManagerFlash.PNG

HWManagerFlashConfig.PNG

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...