SlideShare une entreprise Scribd logo
1  sur  27
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)

Contenu connexe

Tendances

Common linuxcommandspocketguide07
Common linuxcommandspocketguide07Common linuxcommandspocketguide07
Common linuxcommandspocketguide07
Teja Bheemanapally
 
1. openvpn simple
1. openvpn simple1. openvpn simple
1. openvpn simple
khanh02l1
 
망고100 보드로 놀아보자 7
망고100 보드로 놀아보자 7망고100 보드로 놀아보자 7
망고100 보드로 놀아보자 7
종인 전
 
Cacti安装手册
Cacti安装手册Cacti安装手册
Cacti安装手册
Yiwei Ma
 

Tendances (17)

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

Similaire à Programming OpenRISC on Altera De0_nano

LCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platformLCU14 302- How to port OP-TEE to another platform
LCU14 302- How to port OP-TEE to another platform
Linaro
 
SANS @Night There's Gold in Them Thar Package Management Databases
SANS @Night There's Gold in Them Thar Package Management DatabasesSANS @Night There's Gold in Them Thar Package Management Databases
SANS @Night There's Gold in Them Thar Package Management Databases
Phil Hagen
 

Similaire à Programming OpenRISC on Altera De0_nano (20)

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

Dernier

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Dernier (20)

WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 

Programming OpenRISC on Altera De0_nano