Your SlideShare is downloading. ×
  • Like
Programming OpenRISC on Altera De0_nano
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Programming OpenRISC on Altera De0_nano

  • 536 views
Published

 

Published in Software , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
536
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
16
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Programming OpenRISC on Altera De0-nano Yi-Chiao Lin
  • 2. Path set 1.安裝quartus: chmod +x ~/Downloads/altera_installer.external.sh ~/Downloads/altera_installer.external.sh 2.vim .bashrc 3.Add $PATH:
  • 3. Make (.sof) git://openrisc.net/stefan/orpsoc cd ~/orpsoc/boards/altera/de0_nano/syn/quartus/run make asm
  • 4. Make (.sof)
  • 5. De0_nano USB BLASTER(.rules) cd /etc/udev/rules.d/ gedit 51-usbblaster.rules killall jtagd sudo /opt/altera/12.1sp1/quartus/bin/jtagd
  • 6. Programming Hardware make pgm (quartus_pgm --mode=jtag -o p;orpsoc.sof)
  • 7. OpenOCD install (1)git clone git://repo.or.cz/openocd.git (2) cd ~/openocd (3) ./bootstrap (4) ./configure --enable-ftdi --enable-usb_blaster_libftdi --enable-maintainer-mode (5) make
  • 8. OpenOCD Troubleshooting 1.error:libusb-1.x Solution: sudo apt-get install libftdi-dev libusb-1.0-0-dev
  • 9. OpenOCD Troubleshooting 2.TCL error: Solution: Remove $PATH : /opt/altera/12.1sp1/quartus/bin
  • 10. Check Uart pin cd ~/orpsoc/boards/altera/de0_nano/syn/quartus/tcl vim UART0_pin_assignments.tcl
  • 11. Check Uart pin TX RX
  • 12. De0_nano FPGA
  • 13. OpenOCD Start cd openocd sudo ./src/openocd -s ./tcl -f ./tcl/interface/altera-usb-blaster.cfg - f ./tcl/board/or1k_generic.cfg
  • 14. FreeRTOS Path Project: FreeRTOS_OpenRISC/Demo/OpenRISC_OR1200_GCC Port layer: FreeRTOS_OpenRISC/Source/portable/GCC/OpenRISC Port.c Portmacro.h Portasm.S Port_spr_defs.h
  • 15. FreeRTOS  Select De0_nano DemoOpenRISC_OR1200_GCCarchboard.h
  • 16. FreeRTOS  Check toolchain PATH
  • 17. FreeRTOS  Make
  • 18. FreeRTOS(main.c)
  • 19. Or1ksim  Running for simulator
  • 20. Programming Software(.or32 or .ihex) telnet localhost 4444 halt; load_image /<path to yours>/<file>; reg npc 0x100; reset
  • 21. FreeRTOS
  • 22. GDB-Debug cd ~/orpsoc/boards/altera/de0_nano/quartus/run make pgm (programming hardware)
  • 23. GDB-Debug cd openocd sudo ./src/openocd -s ./tcl -f ./tcl/interface/altera- usb-blaster.cfg -f ./tcl/board/or1k_generic.cfg
  • 24. GDB-Debug or32-elf-gdb xxx.or32 --eval-command='target remote localhost:3333'
  • 25. GDB-Debug load
  • 26. GDB-Debug jump *0x100
  • 27. GDB-Debug  b <symbol> (Breakpoint)  br *0xffff (Memory address breakpoint)  x/3uh 0xffff (Memory address value)  n (Next step)  c (Countinue)