Forum Discussion
Altera_Forum
Honored Contributor
17 years agoJrunner + Serial Flash Loader (SFL) + EPCS4 [How to programm EPCS without Quartus II]
Hello,
I'd like to adapt Jrunner to work with Serial Flash Loader. I've integrated SFL megafunction into my design and it works great. When I click auto detect in quartus II programmer it detects Cyclone II and EPCS4 which is good. How does it detect EPCS4? I'd like to modify Jrunner so I can read sillicon ID of EPCS4, erase or programm it. Reading sillicon ID is the simplest operation so I will implement it first. I've read AN39 (JTAG in Altera Devices) but there is nothing about "talking" with secondary device (EPCS) by SFL. I don't know which JTAG instruction mode I should use. I just only know that read sillicon ID operation code is "1010 1011" for EPCS devices and that the answer should be 0x12 for EPCS4. Do you have any suggestions?32 Replies
- Altera_Forum
Honored Contributor
What a pity. But could you please paste here (send them to me by private message) the I/O routines that you have written to the ARM ports? That would help me a lot.
- Altera_Forum
Honored Contributor
I didn't use linux, so I can't help here.
- Altera_Forum
Honored Contributor
--- Quote Start --- 1) configure pins on ports 2) put all *.jic data into array, like const char my_data[DATA_SIZE] = { ... }; and pass it to jrunnr like an input file :) It takes a lot of flash memory to keep such const data array, but lpc2138 has enough of it. :) 3) removed some Jrunner checks. --- Quote End --- Hello EnotAruz! I'm trying to port the JRunner to a LPC uC too, but I'm having some trouble. My uC is an ARM7, with a uCLinux running. I did not undestand very well how you gave to the program the parameters needed. You have created an array with data, which data? the path to the .rbf file and what else? (then you modified the code so that the program gets this information from that array?) Thank you very much in advance! - Altera_Forum
Honored Contributor
My modified JRunner uses an array of bytes, which is made from jic file:
--- Quote Start --- I use *.jic file without first "147+44" bytes :), to programm FPGA and the same file without first 147 bytes to programm EPCS. --- Quote End --- - Altera_Forum
Honored Contributor
--- Quote Start --- 1) configure pins on ports 2) put all *.jic data into array, like const char my_data[DATA_SIZE] = { ... }; and pass it to jrunnr like an input file :) It takes a lot of flash memory to keep such const data array, but lpc2138 has enough of it. :) 3) removed some Jrunner checks. --- Quote End --- .jic file is the same to .rbf ?The Jrunner can down the jic to the FPGA?or else the JTAG instruction PROGRAM support that ?:confused::p - Altera_Forum
Honored Contributor
1) configure pins on ports
2) put all *.jic data into array, like const char my_data[DATA_SIZE] = { ... }; and pass it to jrunnr like an input file :) It takes a lot of flash memory to keep such const data array, but lpc2138 has enough of it. :) 3) removed some Jrunner checks. - Altera_Forum
Honored Contributor
Hi EnotAruz !!!
how did you configure Jrunner to work on LPC because i want make the same thing with an other microcontroller(st10). Thanks in advance. - Altera_Forum
Honored Contributor
The problem was in that difference between *.rbf and *.jic files in 44 bytes header. When configuring FPGA, these 44 bytes are ignored (for CycloneII). But they are written to EPCS.
So, now I use *.jic file without first "147+44" bytes :) , to programm FPGA and the same file without the first 147 bytes to programm EPCS. Everything works fine. - Altera_Forum
Honored Contributor
I use .rbf files and ALT_ASMI_PARALLEL and it works.
Are you sure you clear the memory before writing to it ? - Altera_Forum
Honored Contributor
Hmmm... *.rbf data differs from what has been written to EPCS by quartus programmer with first bits in the beginning (adress 21). here's the fragment
0x6A, 0xD7, 0xFF, 0x40, 0x00, 0x20, - rbf 0x6A, 0xD7, 0xFF, 0x40, 0x00, 0x30, - whts written by Quartus. Maybe this is the problem. I'll check it tomorrow and report. :)