SlideShare a Scribd company logo
Programming OpenRISC on
Altera De0-nano
Yi-Chiao Lin
Path set
1.安裝quartus:
chmod +x ~/Downloads/altera_installer.external.sh
~/Downloads/altera_installer.external.sh
2.vim .bashrc
3.Add $PATH:
Make (.sof)
git://openrisc.net/stefan/orpsoc
cd ~/orpsoc/boards/altera/de0_nano/syn/quartus/run
make asm
Make (.sof)
De0_nano USB BLASTER(.rules)
cd /etc/udev/rules.d/
gedit 51-usbblaster.rules
killall jtagd
sudo /opt/altera/12.1sp1/quartus/bin/jtagd
Programming Hardware
make pgm
(quartus_pgm --mode=jtag -o p;orpsoc.sof)
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
OpenOCD Troubleshooting
1.error:libusb-1.x
Solution:
sudo apt-get install libftdi-dev libusb-1.0-0-dev
OpenOCD Troubleshooting
2.TCL error:
Solution:
Remove $PATH : /opt/altera/12.1sp1/quartus/bin
Check Uart pin
cd ~/orpsoc/boards/altera/de0_nano/syn/quartus/tcl
vim UART0_pin_assignments.tcl
Check Uart pin
TX
RX
De0_nano FPGA
OpenOCD Start
cd openocd
sudo ./src/openocd -s ./tcl -f ./tcl/interface/altera-usb-blaster.cfg -
f ./tcl/board/or1k_generic.cfg
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
FreeRTOS
 Select De0_nano
DemoOpenRISC_OR1200_GCCarchboard.h
FreeRTOS
 Check toolchain PATH
FreeRTOS
 Make
FreeRTOS(main.c)
Or1ksim
 Running for simulator
Programming Software(.or32 or .ihex)
telnet localhost 4444
halt; load_image /<path to yours>/<file>; reg npc 0x100; reset
FreeRTOS
GDB-Debug
cd ~/orpsoc/boards/altera/de0_nano/quartus/run
make pgm (programming hardware)
GDB-Debug
cd openocd
sudo ./src/openocd -s ./tcl -f ./tcl/interface/altera-
usb-blaster.cfg -f ./tcl/board/or1k_generic.cfg
GDB-Debug
or32-elf-gdb xxx.or32
--eval-command='target remote localhost:3333'
GDB-Debug
load
GDB-Debug
jump *0x100
GDB-Debug
 b <symbol> (Breakpoint)
 br *0xffff (Memory address breakpoint)
 x/3uh 0xffff (Memory address value)
 n (Next step)
 c (Countinue)

More Related Content

PDF
PDF
最後の楽園の開発をちょこっとだけ手伝った話
PDF
【Manifes2018】私が考えるPCの"最新"学習方法
PDF
3 manual installation of open vpn
TXT
Network
PDF
Creación de máquinas virtuales basada en kernel usando qemu y virsh
PPTX
Build Your Own Android Tablet
TXT
Cluster setup multinode_aws
最後の楽園の開発をちょこっとだけ手伝った話
【Manifes2018】私が考えるPCの"最新"学習方法
3 manual installation of open vpn
Network
Creación de máquinas virtuales basada en kernel usando qemu y virsh
Build Your Own Android Tablet
Cluster setup multinode_aws

What's hot (17)

PDF
Scaling IO-bound microservices
PDF
Beagleboard xm-setup
PDF
Control-M 800 - Infrastructure Example
PDF
UP Board AI Core Configuration memo
PDF
Default bootloader DFU + UART
PDF
Common linuxcommandspocketguide07
PDF
How To Train Your ARM(SBC)
PDF
My First AMD EPYC 7251 memo
KEY
Python setup
ODP
Qemu x86 BIOS @ https://youtu.be/F71LGSrj9cc
PDF
Jvm的最小使用内存测试
PDF
Troubleshooting linux booting process
RTF
1. openvpn simple
PPTX
망고100 보드로 놀아보자 7
PDF
SPDK benchmark memo
DOCX
Cacti安装手册
PDF
Pres
Scaling IO-bound microservices
Beagleboard xm-setup
Control-M 800 - Infrastructure Example
UP Board AI Core Configuration memo
Default bootloader DFU + UART
Common linuxcommandspocketguide07
How To Train Your ARM(SBC)
My First AMD EPYC 7251 memo
Python setup
Qemu x86 BIOS @ https://youtu.be/F71LGSrj9cc
Jvm的最小使用内存测试
Troubleshooting linux booting process
1. openvpn simple
망고100 보드로 놀아보자 7
SPDK benchmark memo
Cacti安装手册
Pres
Ad

Similar to Programming OpenRISC on Altera De0_nano (20)

DOCX
PDF
005 skyeye
PDF
unix-rosetta
PDF
Linux Containers From Scratch
PDF
How to burn your GPU with CUDA9.1
ODP
Description of GRUB 2
PDF
Linux Common Command
PPTX
Advanced Level Training on Koha / TLS (ToT)
PPT
Andresen 8 21 02
PPT
Qt native built for raspberry zero
PPT
101 4.3 control mounting and unmounting of filesystems
PDF
[ETHCon Korea 2019] Shin mansun 신만선
PDF
LCU14 302- How to port OP-TEE to another platform
PDF
Solaris_quickref.pdf
PDF
EuroBSDCon 2023 - (auto)Installing BSD Systems - Cases using pfSense, TrueNAS...
PDF
Linux Tracing Superpowers by Eugene Pirogov
PPT
Linux Troubleshooting
PDF
Linux seccomp(2) vs OpenBSD pledge(2)
PPT
Qemu - Raspberry | while42 Singapore #2
PDF
SANS @Night There's Gold in Them Thar Package Management Databases
005 skyeye
unix-rosetta
Linux Containers From Scratch
How to burn your GPU with CUDA9.1
Description of GRUB 2
Linux Common Command
Advanced Level Training on Koha / TLS (ToT)
Andresen 8 21 02
Qt native built for raspberry zero
101 4.3 control mounting and unmounting of filesystems
[ETHCon Korea 2019] Shin mansun 신만선
LCU14 302- How to port OP-TEE to another platform
Solaris_quickref.pdf
EuroBSDCon 2023 - (auto)Installing BSD Systems - Cases using pfSense, TrueNAS...
Linux Tracing Superpowers by Eugene Pirogov
Linux Troubleshooting
Linux seccomp(2) vs OpenBSD pledge(2)
Qemu - Raspberry | while42 Singapore #2
SANS @Night There's Gold in Them Thar Package Management Databases
Ad

Recently uploaded (20)

PDF
System and Network Administration Chapter 2
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Nekopoi APK 2025 free lastest update
PDF
top salesforce developer skills in 2025.pdf
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
AI in Product Development-omnex systems
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Introduction to Artificial Intelligence
PPTX
ai tools demonstartion for schools and inter college
PPTX
Essential Infomation Tech presentation.pptx
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Digital Strategies for Manufacturing Companies
PDF
medical staffing services at VALiNTRY
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
history of c programming in notes for students .pptx
System and Network Administration Chapter 2
Operating system designcfffgfgggggggvggggggggg
VVF-Customer-Presentation2025-Ver1.9.pptx
Nekopoi APK 2025 free lastest update
top salesforce developer skills in 2025.pdf
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Design an Analysis of Algorithms II-SECS-1021-03
AI in Product Development-omnex systems
Design an Analysis of Algorithms I-SECS-1021-03
Introduction to Artificial Intelligence
ai tools demonstartion for schools and inter college
Essential Infomation Tech presentation.pptx
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
2025 Textile ERP Trends: SAP, Odoo & Oracle
Digital Strategies for Manufacturing Companies
medical staffing services at VALiNTRY
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
How Creative Agencies Leverage Project Management Software.pdf
history of c programming in notes for students .pptx

Programming OpenRISC on Altera De0_nano