реклама на сайте
подробности

 
 
> Nios-2-flash-programmer Error code: 8, Проблема с прошивкой через nios-2-flash-programmer
en-valb
сообщение Apr 28 2017, 09:29
Сообщение #1


Участник
*

Группа: Участник
Сообщений: 45
Регистрация: 18-04-14
Из: Екатеринбург
Пользователь №: 81 446



Всем доброго времени суток! Имеется плата DE0nano, пытаюсь зашить с помощью NIOS II flash programer простейший проект. Device and pin option все поставил в Use as regular I/O. Reset назначил на EPCS. В pin planer все выводы epcs контроллера назначил в соответствии со схемой DE0nano data0 на h2, dclk на h1, sce на d2, sdo на c1. Выдает ошибку Error code: 8 for command:.....
В чем может быть проблема?
Собирал этот же проект на своей проверенной плате с EP4CE40F23I7 и EPCS128 и все нормально прошивается.

Указание из usermanual тоже выполнил

Before programming the EPCS via nios-2-flash-programmer, users must add an EPCS patch file
nios-flash-override.txt into the Nios II EDS folder. The patch file is available in the folder
Demonstation\EPCS_Patch of DE0-Nano System CD. Please copy this file to the folder
[QuartusInstalledFolder]\nios2eds\bin (e.g. C:\altera\11.1\nios2eds\bin)


Info: 28.04.2017 14:00:08 - (FINE) sof2flash: Starting
Info: Info: *******************************************************************
Info: Info: Running Quartus Prime Convert_programming_file
Info: Info: Command: quartus_cpf --no_banner --convert --device=EPCS128 --option=D:/Projects/Quartus/Q15_1/Test_DEL/software/Hello_World_bsp/flash/test_epcs.opt D:/Projects/Quartus/Q15_1/Test_DEL/output_files/test.sof D:/Projects/Quartus/Q15_1/Test_DEL/software/Hello_World_bsp/flash/test_epcs.pof
Info: Info (210033): Memory Map File D:/Projects/Quartus/Q15_1/Test_DEL/software/Hello_World_bsp/flash/test_epcs.map contains memory usage information for file D:/Projects/Quartus/Q15_1/Test_DEL/software/Hello_World_bsp/flash/test_epcs.pof
Info: Info: Quartus Prime Convert_programming_file was successful. 0 errors, 0 warnings
Info: Info: Peak virtual memory: 255 megabytes
Info: Info: Processing ended: Fri Apr 28 14:00:10 2017
Info: Info: Elapsed time: 00:00:01
Info: Info: Total CPU time (on all processors): 00:00:01
Info: Info: *******************************************************************
Info: Info: Running Quartus Prime Convert_programming_file
Info: Info: Command: quartus_cpf --no_banner --convert D:/Projects/Quartus/Q15_1/Test_DEL/software/Hello_World_bsp/flash/test_epcs.pof D:/Projects/Quartus/Q15_1/Test_DEL/software/Hello_World_bsp/flash/test_epcs.rpd
Info: Info: Quartus Prime Convert_programming_file was successful. 0 errors, 0 warnings
Info: Info: Peak virtual memory: 248 megabytes
Info: Info: Processing ended: Fri Apr 28 14:00:13 2017
Info: Info: Elapsed time: 00:00:02
Info: Info: Total CPU time (on all processors): 00:00:02
Info: 28.04.2017 14:00:13 - (FINE) sof2flash: Done
Info: Using cable "USB-Blaster [USB-0]", device 1, instance 0x00
Info: Resetting and pausing target processor: OK
Info: Reading System ID at address 0x00012000: verified
Info: Processor data bus width is 32 bits
Info: Looking for EPCS registers at address 0x00011000 (with 32bit alignment)
Info: Initial values: 0001703A 04C00074 9801483A 9CFFF804 983FFD1E 0000203A
Info: Not here: reserved fields are non-zero
Info: Looking for EPCS registers at address 0x00011100 (with 32bit alignment)
Info: Initial values: 93000237 6300080C 603FFD26 90000335 A8000C26 03010004
Info: Not here: reserved fields are non-zero
Info: Looking for EPCS registers at address 0x00011200 (with 32bit alignment)
Info: Initial values: 02C02004 002EE03A 00000F06 90000335 4000683A 0017883A
Info: Not here: reserved fields are non-zero
Info: Looking for EPCS registers at address 0x00011300 (with 32bit alignment)
Info: Initial values: 003FD006 5280040C 501496FA 701CD07A 729CB03A 843FFFC4
Info: Not here: reserved fields are non-zero
Info: Looking for EPCS registers at address 0x00011400 (with 32bit alignment)
Info: Initial values: 00000000 00000000 00000260 00000000 00000000 00000001
Info: Valid registers found
Info: EPCS signature is 0x16
Info: EPCS identifier is 0x014017
Info: No EPCS layout data - looking for section [EPCS-014017]
Info: Unable to use EPCS device
Info: Leaving target processor paused
Error: Error code: 8 for command: nios2-flash-programmer "D:/Projects/Quartus/Q15_1/Test_DEL/software/Hello_World_bsp/flash/test_epcs.flash" --base=0x11000 --epcs --sidp=0x12000 --id=0x123 --timestamp=1493369814 --device=1 --instance=0 '--cable=USB-Blaster on localhost [USB-0]' --program --verbose


Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов
en-valb
сообщение Apr 29 2017, 15:45
Сообщение #2


Участник
*

Группа: Участник
Сообщений: 45
Регистрация: 18-04-14
Из: Екатеринбург
Пользователь №: 81 446



_Anatoliy, в общем сделал еще два батника

my_script.bat
Код
"C:\altera\15.1\nios2eds\Nios II Command Shell.bat" sh D:/Projects/Quartus/Q15_1/Test_DEL/script/my_script.sh


и

download.bat
Код
set name_prj=test
@set name_jic=%name_prj%.jic
@set full_path="D:\Projects\Quartus\Q15_1\Test_DEL"

@c:\altera\15.1\quartus\bin64\quartus_cpf -c output_file.cof
@c:\altera\15.1\quartus\bin64\quartus_pgm -m JTAG -o pvbi;"%full_path%\%name_jic%"



Еще создал *.cof файл с помощью Convert Programing File.


output_file.cof
Код
<?xml version="1.0" encoding="US-ASCII" standalone="yes"?>
<cof>
    <eprom_name>EPCS64</eprom_name>
    <flash_loader_device>EP4CE22</flash_loader_device>
    <output_filename>test.jic</output_filename>
    <n_pages>0</n_pages>
    <width>1</width>
    <mode>7</mode>
    <hex_block>
        <hex_filename>D:/Projects/Quartus/Q15_1/Test_DEL/flash/new.hex</hex_filename>
        <hex_addressing>absolute</hex_addressing>
    </hex_block>
    <hex_block>
        <hex_filename>D:/Projects/Quartus/Q15_1/Test_DEL/flash/test_sof.hex</hex_filename>
        <hex_addressing>absolute</hex_addressing>
    </hex_block>
    <version>9</version>
    <create_cvp_file>0</create_cvp_file>
    <create_hps_iocsr>0</create_hps_iocsr>
    <auto_create_rpd>1</auto_create_rpd>
    <create_fif_file>0</create_fif_file>
    <options>
        <map_file>1</map_file>
    </options>
    <advanced_options>
        <ignore_epcs_id_check>2</ignore_epcs_id_check>
        <ignore_condone_check>2</ignore_condone_check>
        <plc_adjustment>0</plc_adjustment>
        <post_chain_bitstream_pad_bytes>-1</post_chain_bitstream_pad_bytes>
        <post_device_bitstream_pad_bytes>-1</post_device_bitstream_pad_bytes>
        <bitslice_pre_padding>1</bitslice_pre_padding>
    </advanced_options>
</cof>



Первый батник запускает на выполнение скрипт my_script.sh, который создает из *.sof и *.elf файлов *.hex файлы.

Второй создает с помощью команды quartus_cpf *.jic файл из *.hex и *.cof файлов и команда quartus_pgm программирует ПЛИС.



Объединить оба батника в один файл не получается т.к. после запуска и выполнения Nios II Command Shell последующие команды не выполняются. Буду думать дальше. Еще надо будет с путями и именами файлов продумать так чтобы эти батники можно было с минимальными телодвижениями из проекта в проект таскать. Но в любом случае запустил два батника и все готово и работает. _Anatoly, спасибо за подсказку!

Go to the top of the page
 
+Quote Post



Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 11th August 2025 - 10:40
Рейтинг@Mail.ru


Страница сгенерированна за 0.01413 секунд с 7
ELECTRONIX ©2004-2016