Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

Programming Cyclone III (EP3C16Q240C8N) on ARM board

Hi

My interest is to know if someone have try to install Quartus II programmer on a ARM linux and if it worked?

My second interest is to see the source code that do that. I have not see the source code of Quartus II Programmer, is it available?

My last question is if anybody have any suggestion of open source project that could do the programmation of cyclone III using USB blaster or JTAG?

Best Regards,

Kevyn-Alexandre

14 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I'm not sure what source you are referring to (i.e., where the jbistub.c source code comes from), but if you are looking at a port that uses the parallel port, you have to realize that the 'classic' parallel port is output only at the DATA registers, and then input is obtained from either the CONTROL or STATUS registers. Those registers need to have their output drivers disabled by basically writing 1's to the port, so that an external signal can drive the pin low. Hence a line like:

    write(com_port, &ch_data, 1);

    to port 1 could simple be deasserting the contol lines so that the TDO signal can be read.

    Just a guess ...

    Cheers,

    Dave
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I'm not sure what source you are referring to (i.e., where the jbistub.c source code comes from),

    --- Quote End ---

    So I'm using JAM STAPL from there:

    http://www.altera.com/support/devices/tools/jam/tls-jam.html

    The source code from there:

    https://www.altera.com/download/legacy/jam/dnl-byte_code_player.jsp

    unzip the exe you will found the file that I was speaking about (jbistub.c)

    From source line 244 you can see what I was speaking about.

    --- Quote Start ---

    but if you are looking at a port that uses the parallel port, you have to realize that the 'classic' parallel port is output only at the DATA registers, and then input is obtained from either the CONTROL or STATUS registers. Those registers need to have their output drivers disabled by basically writing 1's to the port, so that an external signal can drive the pin low. Hence a line like:

    write(com_port, &ch_data, 1);

    to port 1 could simple be deasserting the contol lines so that the TDO signal can be read.

    Just a guess ...

    Cheers,

    Dave

    --- Quote End ---

    So this 0x7e will be a parallel port specific thing! I will make some test with or without to see.

    thx

    kap
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    So this 0x7e will be a parallel port specific thing!

    --- Quote End ---

    Its not parallel port related. The code shows its clearly related to serial port communications.

    What the codes mean is related to the protocol the serial device uses. For example, elsewhere you will find code like:

    
    data = 0x70; write(com_port, &data, 1); /* TDO echo off */
    data = 0x72; write(com_port, &data, 1); /* auto LEDs off */
    data = 0x74; write(com_port, &data, 1); /* ERROR LED off */
    data = 0x76; write(com_port, &data, 1); /* DONE LED off */
    data = 0x60; write(com_port, &data, 1); /* signals low */
    
    Unless you own whatever serial device they are communicating with, just ignore that code.

    I haven't looked at the "byte code" player, just the jam player ...

    https://www.altera.com/download/legacy/jam/dnl-player.jsp

    Cheers,

    Dave
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Its not parallel port related. The code shows its clearly related to serial port communications.

    What the codes mean is related to the protocol the serial device uses. For example, elsewhere you will find code like:

    
    data = 0x70; write(com_port, &data, 1); /* TDO echo off */
    data = 0x72; write(com_port, &data, 1); /* auto LEDs off */
    data = 0x74; write(com_port, &data, 1); /* ERROR LED off */
    data = 0x76; write(com_port, &data, 1); /* DONE LED off */
    data = 0x60; write(com_port, &data, 1); /* signals low */
    
    Unless you own whatever serial device they are communicating with, just ignore that code.

    --- Quote End ---

    Thx for the clarification. The fact that they have put comments on all of them and not on the 0x7E made me doubt.

    --- Quote Start ---

    I haven't looked at the "byte code" player, just the jam player ...

    https://www.altera.com/download/legacy/jam/dnl-player.jsp

    Cheers,

    Dave

    --- Quote End ---

    mmm I have used byte code player since this what they were explaining in:

    http://www.altera.com/support/devices/tools/jam/tls-jam.html?gsa_pos=2&wt.oss_r=1&wt.oss=jam%20stapl

    Section Related Documents:

    Using Jam STAPL for ISP via an Embedded Processor (PDF) chapter of the MAX II Handbook

    So a quick difference between file of each is that the JAM Player have more files then byte code player:

    tree jbi_22/code/

    jbi_22/code/

    ├── JBICOMP.C

    ├── JBICOMP.H

    ├── JBIEXPRT.H

    ├── JBIJTAG.C

    ├── JBIJTAG.H

    ├── JBIMAIN.C

    ├── jbiport.h

    └── JBISTUB.C

    0 directories, 8 files

    tree jp_25/source/

    jp_25/source/

    ├── JAMARRAY.C

    ├── JAMARRAY.H

    ├── jamcomp.c

    ├── jamcomp.h

    ├── JAMCRC.C

    ├── JAMDEFS.H

    ├── JAMEXEC.C

    ├── JAMEXEC.H

    ├── JAMEXP.C

    ├── JAMEXP.H

    ├── jamexprt.h

    ├── JAMHEAP.C

    ├── JAMHEAP.H

    ├── jamjtag.c

    ├── jamjtag.h

    ├── JAMNOTE.C

    ├── jamport.h

    ├── JAMSTACK.C

    ├── JAMSTACK.H

    ├── jamstub.c

    ├── JAMSYM.C

    ├── JAMSYM.H

    ├── JAMUTIL.C

    ├── JAMUTIL.H

    ├── JAMYTAB.H

    └── makefile.mak

    So what I'm seeing from the diff of these files are the same files with add-on. I will use the JAM PLAYER to benefit from the add-on.

    thx

    Kevyn-Alexandre