Forum Discussion
31 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- Hi, If your board is DE2-115, please visit the page http://www.alterawiki.com/wiki/linux_with_mmu_on_veek/t-pad and refer the section No.8. --- Quote End --- thank you. But I have an issue with this instruction. What i did: 1) connected my de2-115 board to my PC via "usb blaster" port. 2) downloaded this http://www.alterawiki.com/wiki/file:d115_selector.tar.gz 3) in NIOS commend shell
After that I had white screen on my vga monitor. 4)name@idea-PC /cygdrive/c/altera/13.1 $ quartus_pgm.exe -m jtag -c USB-Blaster -o "p;tPad_Selector.sof" Info: ******************************************************************* Info: Running Quartus II 32-bit Programmer Info: Version 13.1.0 Build 162 10/23/2013 SJ Web Edition Info: Copyright (coffee) 1991-2013 Altera Corporation. All rights reserved. Info: Your use of Altera Corporation's design tools, logic functions Info: and other software and tools, and its AMPP partner logic Info: functions, and any output files from any of the foregoing Info: (including device programming or simulation files), and any Info: associated documentation or information are expressly subject Info: to the terms and conditions of the Altera Program License Info: Subscription Agreement, Altera MegaCore Function License Info: Agreement, or other applicable license agreement, including, Info: without limitation, that your use is for the sole purpose of Info: programming logic devices manufactured by Altera and sold by Info: Altera or its authorized distributors. Please refer to the Info: applicable agreement for further details. Info: Processing started: Fri Mar 14 14:41:44 2014 Info: Command: quartus_pgm -m jtag -c USB-Blaster -o p;tPad_Selector.sof Info (213045): Using programming cable "USB-Blaster " Info (213011): Using programming file tPad_Selector.sof with checksum 0x00BBDF04 for device EP4CE115F29@1 Info (209060): Started Programmer operation at Fri Mar 14 14:41:49 2014 Info (209016): Configuring device index 1 Info (209017): Device 1 contains JTAG ID code 0x020F70DD Info (209007): Configuration succeeded -- 1 device(s) configured Info (209011): Successfully performed operation(s) Info (209061): Ended Programmer operation at Fri Mar 14 14:41:55 2014 Info: Quartus II 32-bit Programmer was successful. 0 errors, 0 warnings Info: Peak virtual memory: 191 megabytes Info: Processing ended: Fri Mar 14 14:41:55 2014 Info: Elapsed time: 00:00:11 Info: Total CPU time (on all processors): 00:00:04
There is an error:name@idea-PC /cygdrive/c/altera/13.1 $ nios2-flash-programmer.exe --epcs --base=0x0a001800 tPad_Selector.flash Using cable "USB-Blaster ", device 1, instance 0x00 Resetting and pausing target processor: OK No EPCS layout data - looking for section Unable to use EPCS device Leaving target processor pausedNo EPCS layout data - looking for section Unable to use EPCS device - Altera_Forum
Honored Contributor
Hi all,
When you download the 'Application Selector", if you get an error by "nios2-flash-programmer" like No EPCS layout data - looking for section [EPCS-010216] , please refer the page http://www.alteraforum.com/forum/showthread.php?t=20576 (http://www.alteraforum.com/forum/showthread.php?t=20576) or http://www.altera.com/literature/ug/ug_nios2_flash_programmer.pdf (http://www.altera.com/literature/ug/ug_nios2_flash_programmer.pdf) the section "A. Non-Standard Flash Memories" at pp.23 Kazu - Altera_Forum
Honored Contributor
Kazuyasu, thank you. I solve my problem by adding the following information to "nios2-flash-override.txt"
(for me it is located in "C:\altera\13.1\nios2eds\bin" )
But I have another question: How can i compile programms for this linux? I tried these instructions: http://www.alterawiki.com/wiki/binarytoolchain http://www.alterawiki.com/wiki/compile_hello I compile programm in this way: nios2-linux-uclibc-gcc hello.c -o hello -elf2flt Then i have a binary file. But when i try to run it on DE2-115 it gives me error like this:# EPCS64N (lead-free) sector_size = 65536 sector_count = 128syntax error: unexpected "(" - Altera_Forum
Honored Contributor
Hi,
--- Quote Start --- But I have another question: How can i compile programms for this linux? I tried these instructions: http://www.alterawiki.com/wiki/binarytoolchain http://www.alterawiki.com/wiki/compile_hello I compile programm in this way: nios2-linux-uclibc-gcc hello.c -o hello -elf2flt Then i have a binary file. But when i try to run it on DE2-115 it gives me error like this:
--- Quote End --- The welcome message is 'uClinux' , but the kernel is a "genuine" linux kernel which is using MMU. So you need the toolchain which supports those. Please refer http://www.rocketboards.org/foswiki/documentation/niosiilinuxusermanual or somewhere. I'm using the next version.syntax error: unexpected "("
Kazukazu-Latitude-E5500:~$ nios2-wrs-linux-gnu-gcc --version nios2-wrs-linux-gnu-gcc (Wind River Linux Sourcery G++ 4.1-176) 4.1.2 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - Altera_Forum
Honored Contributor
--- Quote Start --- The welcome message is 'uClinux' , but the kernel is a "genuine" linux kernel which is using MMU. So you need the toolchain which supports those. Please refer http://www.rocketboards.org/foswiki/documentation/niosiilinuxusermanual --- Quote End --- Thank you. It works. I downloaded compiller from https://sourcery.mentor.com/gnutoolchain/subscription42545 and I use this command to compile my programms:
I have one more question: DE2-115 has leds, buttons etc. Can i control them from linux?nios2-linux-gnu-gcc main.c - Altera_Forum
Honored Contributor
Hi,
--- Quote Start --- DE2-115 has leds, buttons etc. Can i control them from linux? --- Quote End --- I've connected almost all DE2-115's peripheral devices including KEY[3..0] (KEY[0] is abused for the system reset), SW[17..0], LEDR[17..0], LEDG[8..0] and LCD, etc. except Ethernet 1, SRAM, Video decoder and IDE 40pins GPIO. But drivers are not included, so you can't use them from the linux side now. If you have strong request, I will implement those drivers, but I can't imagine the those usage except for X'mas illuminations:confused:. What is your purpose for? Kazu - Altera_Forum
Honored Contributor
--- Quote Start --- Hi, I've connected almost all DE2-115's peripheral devices including KEY[3..0] (KEY[0] is abused for the system reset), SW[17..0], LEDR[17..0], LEDG[8..0] and LCD, etc. except Ethernet 1, SRAM, Video decoder and IDE 40pins GPIO. But drivers are not included, so you can't use them from the linux side now. If you have strong request, I will implement those drivers, but I can't imagine the those usage except for X'mas illuminations:confused:. What is your purpose for? Kazu --- Quote End --- Thanks. It is for study purposes. I opened "DE2_115_NIOS_HOST_MOUSE_VGA.qar" in Qsys and found base addresses:
Is it correct addresses? Qsys shows that this harware linked via "Avalon Memory Mapped Slave". Can you give me examples of working with It (for example how to switch on/off leds, use button, e.t.c.)?pio_green_led: BASE = 0x0000_00a0, END = 0x0000_00af pio_red_led: BASE = 0x0000_00b0, END = 0x0000_00bf pio_button: BASE = 0x0000_00d0, END = 0x0000_00df lcd: BASE = 0x0000_00e0, END = 0x0000_00ef - Altera_Forum
Honored Contributor
There is also an issue with eth0 interface. It works only in half duplex mode even when i write "ethtool -s eth0 autoneg off speed 100 duplex full ".
- Altera_Forum
Honored Contributor
Hi,
--- Quote Start ---
Is it correct addresses? --- Quote End --- These peripherals are connected to the Nios2 CPU via a "clock bridge". So the correct physical addresses arepio_green_led: BASE = 0x0000_00a0, END = 0x0000_00af pio_red_led: BASE = 0x0000_00b0, END = 0x0000_00bf pio_button: BASE = 0x0000_00d0, END = 0x0000_00df lcd: BASE = 0x0000_00e0, END = 0x0000_00ef
. --- Quote Start --- Can you give me examples of working with It (for example how to switch on/off leds, use button, e.t.c.)? --- Quote End --- These peripherals are connected via Altera's PIO IP cores, so you can control those only by reading and writing their registers. But to do so in your Linux system, you need appropriate drivers. --- Quote Start --- There is also an issue with eth0 interface. It works only in half duplex mode even when i write "ethtool -s eth0 autoneg off speed 100 duplex full ". --- Quote End --- Maybe it's your PC side problem. Please check that your PC's phy is set in autonegotiation mode. Kazupio_green_led: BASE = 0x0800_00a0, END = 0x0800_00af pio_red_led: BASE = 0x0800_00b0, END = 0x0800_00bf pio_button: BASE = 0x0800_00d0, END = 0x0800_00df lcd: BASE = 0x0800_00e0, END = 0x0800_00ef - Altera_Forum
Honored Contributor
Thanks.
--- Quote Start --- These peripherals are connected to the Nios2 CPU via a "clock bridge". So the correct physical addresses are
. These peripherals are connected via Altera's PIO IP cores, so you can control those only by reading and writing their registers. But to do so in your Linux system, you need appropriate drivers. --- Quote End --- Can i use "mmap" for getting access to this hardware from userspace? Are there any examples to use Altera's PIO IP cores? --- Quote Start --- Maybe it's your PC side problem. Please check that your PC's phy is set in autonegotiation mode. --- Quote End --- I connected it to the router and it showed that it works in half duplex mode. Ok. I will try to connect it directly to PC.pio_green_led: BASE = 0x0800_00a0, END = 0x0800_00af pio_red_led: BASE = 0x0800_00b0, END = 0x0800_00bf pio_button: BASE = 0x0800_00d0, END = 0x0800_00df lcd: BASE = 0x0800_00e0, END = 0x0800_00ef