Author Topic: Anybody else have problems with MAX 10 internal flash and Nios flash programmer?  (Read 12849 times)

0 Members and 1 Guest are viewing this topic.

Offline blueduck577Topic starter

  • Newbie
  • Posts: 7
Hey guys, I've been playing with the MAX 10 FPGA and have a pretty good prototype design.  I'd like to write my design to the internal flash but the Nios flash programmer just isn't having it.

The problem arises with sof2flash.  When I run it, I get error code 3 - Unrecognized device family in SOF.  This happens with the both the Nios flash programmer tool and sof2flash from the command line.  Everything else seems to be working fine.  I can convert just the SOF to a POF and program the flash using Quartus programmer.

A friend of a friend is a local representative for Altera and I've talked with him a bit, but he didn't seem to have a solution for me.  Some questions I've already answered for him that you'll probably ask:

  • Quartus Version: 14.0.2 Build 209 (freshly downloaded and installed yesterday)
  • Nios II EDS Version: 14.0.0.200 Build id: 201406181529
  • SBT4E Core Version: 14.0.0.209
  • I am using the Nios II Gen2
  • JTAG debug works
  • I have an instance of the On-Chip Flash IP in my design in Qsys
  • I can successfully download the design to RAM
  • I can successfully convert the SOF to a POF and program the flash using Quartus programmer

It just seems like the Nios tools aren't ready, and there isn't a way to convert and join my programming files so I can just use the Quartus programmer.  Has anybody else run into this issue?  I'm sure I can't be the first.

Has anybody else even successfully programmed the flash with a complete Nios II system (hardware and software)?

Thanks!
« Last Edit: October 15, 2014, 12:42:15 am by blueduck577 »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
I'm waiting for Arrow to carry theirs:

http://www.mouser.com/ProductDetail/Altera/EK-10M08E144ES-P/?qs=%2fha2pyFadug5SGINdZNV3MsMlTgI0l7zEuXLhyljE15EaIvj3kP77Q%3d%3d

But maybe you can find something in the full docs.
http://www.altera.com/literature/lit-max-10.jsp

I'm downloading the update 2 but since I don't have the device I won't be able to reproduce it.
 

Offline marshallh

  • Supporter
  • ****
  • Posts: 1462
  • Country: us
    • retroactive
Friend on the inside says 14.0 support for Max10 is very buggy, and to wait for 14.1 which is forthcoming.
Verilog tips
BGA soldering intro

11:37 <@ktemkin> c4757p: marshall has transcended communications media
11:37 <@ktemkin> He speaks protocols directly.
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
if you could find out when windows 10 will be supported in quartus ii, that'd be excellent.  it crashes for me every time as it's assembling the file to sent to the fpga.  i haven't tried it with a max10 yet, so it's probably gonna happen for any device.
 

Offline blueduck577Topic starter

  • Newbie
  • Posts: 7
Got some more information from a separate contact on the inside. Turns out there is no MAX 10 support in the latest release of sof2flash. Also, the up and coming release doesn't seem to have support either (well, not yet at least). At least we've now got a bug in Altera's ear and hopefully it will make it into the next release.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
I got my Max10 so I can try it now, I know I can flash it within Quartus II.
I haven't tried yet the NiosII lab, but I will.

Embedded Systems Lab @
http://www.alterawiki.com/wiki/BeMicro_MAX_10#Empty_Baseline_Project_.28starting_point_for_your_own_design.29

Do you think you can still program a Nios II soft core without using sof2flash?
I have not done much with NiosII in the past but I'll follow the lab and report if it works or not.
 

Offline blueduck577Topic starter

  • Newbie
  • Posts: 7
Just took a quick look at the tutorial. It goes as far as running the software application on the target (volatile), but never gets around to actually writing the software to the flash memory.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Sorry I never had a chance on the past two days to do it. Kind of have been busy whit the Seek thermal camera :)
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
If you're familiar with using Quartus to save to flash on other devices, I'm sure it's a very similar process.  It would be a matter of looking up the MAX10 datasheet and finding the encoding and that stuff.

I think.  Not sure.  I'm still pretty new at this kind of thing.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
He is talking about what this part of a tutorial does to use the soft core untethered, program and all:

https://sites.google.com/site/fpgaandco/NiosII-standalone#TOC-Making-it-stick-

Maybe I get some time this coming weekend
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
oh, you have to license the niosII core to run it untethered, I believe.  that may be the root issue, I don't know.  I'm jumping in to this conversation late and may not comprehend exactly what the problem is.  take my words with a pinch of salt.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
You can run the basic NIOS II untethered as far as I know it's license free.

 

Offline blueduck577Topic starter

  • Newbie
  • Posts: 7
Yes, you can run the Nios II/e untethered no problem.  But that isn't the question - the Nios hardware is embedded in the .sof which can be written to flash using the Quartus programmer.

The problem lies in the process of joining the .sof and .elf into one programming file to write to flash.

He is talking about what this part of a tutorial does to use the soft core untethered, program and all:

https://sites.google.com/site/fpgaandco/NiosII-standalone#TOC-Making-it-stick-

Maybe I get some time this coming weekend

This is a similar process to what I've tried.  This is for the DE0 nano board though (Cyclone series), not a MAX 10 device.  I can successfully take Nios hardware and software, follow this procedure and successfully program the flash on a Cyclone IV dev board I have.

Edit: to clarify, the Nios II flash programmer tool is a nice GUI for the command-line tools.  It simply makes a script that calls the command-line tools.  Using either approach results in the same thing: sof2flash complains that the MAX 10 isn't supported.
« Last Edit: October 28, 2014, 06:52:29 pm by blueduck577 »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
So I did follow the sample (they have some mistakes in the doc that I had to overcome, not to mention that the first sample they posted half a month ago didn't work and the new one was using too many m9k blocks because they trying for 32KB on chip as well as other things, so I had to reduce the memory on-chip to 24K so the fitter would not complain)

Anyways, because they use some opencores IPs and because the NiosII version is not licensed I had to run tethered.

The sample code in eclipse is just a counter upper and down and up by three and the LEDs light up. The NiosII core has other things done including external memory accelerometer support, flash memory etc..

The thing is that because I don't have a license I can't burn it into flash. I might try to do a simple NiosII/E or whichever is the one that doesn't need the license.

Here is the led control program running, didn't try the rest of their labs programs.

Code: [Select]

bemicro_led_control program starting...

CONGRATULATIONS!  You have successfully compiled a Nios II project!

Press 'u' to count up
Press 'd' to count down
Press '3' to count by threes

u
You selected: 'u'
 -  counting up by 1
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e3 0xe4 0xe5 0xe6 0xe7 0xe8 0xe9 0xea 0xeb 0xec 0xed 0xee 0xef
0xf0 0xf1 0xf2 0xf3 0xf4 0xf5 0xf6 0xf7 0xf8 0xf9 0xfa 0xfb 0xfc 0xfd 0xfe 0xff


BeMicro LED control program completed its loop ...


Press 'u' to count up
Press 'd' to count down
Press '3' to count by threes
You selected: 'd'
 -  counting down by 1
0xff 0xfe 0xfd 0xfc 0xfb 0xfa 0xf9 0xf8 0xf7 0xf6 0xf5 0xf4 0xf3 0xf2 0xf1 0xf0
0xef 0xee 0xed 0xec 0xeb 0xea 0xe9 0xe8 0xe7 0xe6 0xe5 0xe4 0xe3 0xe2 0xe1 0xe0
0xdf 0xde 0xdd 0xdc 0xdb 0xda 0xd9 0xd8 0xd7 0xd6 0xd5 0xd4 0xd3 0xd2 0xd1 0xd0
0xcf 0xce 0xcd 0xcc 0xcb 0xca 0xc9 0xc8 0xc7 0xc6 0xc5 0xc4 0xc3 0xc2 0xc1 0xc0
0xbf 0xbe 0xbd 0xbc 0xbb 0xba 0xb9 0xb8 0xb7 0xb6 0xb5 0xb4 0xb3 0xb2 0xb1 0xb0
0xaf 0xae 0xad 0xac 0xab 0xaa 0xa9 0xa8 0xa7 0xa6 0xa5 0xa4 0xa3 0xa2 0xa1 0xa0
0x9f 0x9e 0x9d 0x9c 0x9b 0x9a 0x99 0x98 0x97 0x96 0x95 0x94 0x93 0x92 0x91 0x90
0x8f 0x8e 0x8d 0x8c 0x8b 0x8a 0x89 0x88 0x87 0x86 0x85 0x84 0x83 0x82 0x81 0x80
0x7f 0x7e 0x7d 0x7c 0x7b 0x7a 0x79 0x78 0x77 0x76 0x75 0x74 0x73 0x72 0x71 0x70
0x6f 0x6e 0x6d 0x6c 0x6b 0x6a 0x69 0x68 0x67 0x66 0x65 0x64 0x63 0x62 0x61 0x60
0x5f 0x5e 0x5d 0x5c 0x5b 0x5a 0x59 0x58 0x57 0x56 0x55 0x54 0x53 0x52 0x51 0x50
0x4f 0x4e 0x4d 0x4c 0x4b 0x4a 0x49 0x48 0x47 0x46 0x45 0x44 0x43 0x42 0x41 0x40
0x3f 0x3e 0x3d 0x3c 0x3b 0x3a 0x39 0x38 0x37 0x36 0x35 0x34 0x33 0x32 0x31 0x30
0x2f 0x2e 0x2d 0x2c 0x2b 0x2a 0x29 0x28 0x27 0x26 0x25 0x24 0x23 0x22 0x21 0x20
0x1f 0x1e 0x1d 0x1c 0x1b 0x1a 0x19 0x18 0x17 0x16 0x15 0x14 0x13 0x12 0x11 0x10
0xf 0xe 0xd 0xc 0xb 0xa 0x9 0x8 0x7 0x6 0x5 0x4 0x3 0x2 0x1 0x0


BeMicro LED control program completed its loop ...


Press 'u' to count up
Press 'd' to count down
Press '3' to count by threes

3
You selected: '3'
 -  counting up by 3
0x0 0x3 0x6 0x9 0xc 0xf 0x12 0x15 0x18 0x1b 0x1e 0x21 0x24 0x27 0x2a 0x2d
0x30 0x33 0x36 0x39 0x3c 0x3f 0x42 0x45 0x48 0x4b 0x4e 0x51 0x54 0x57 0x5a 0x5d
0x60 0x63 0x66 0x69 0x6c 0x6f 0x72 0x75 0x78 0x7b 0x7e 0x81 0x84 0x87 0x8a 0x8d
0x90 0x93 0x96 0x99 0x9c 0x9f 0xa2 0xa5 0xa8 0xab 0xae 0xb1 0xb4 0xb7 0xba 0xbd
0xc0 0xc3 0xc6 0xc9 0xcc 0xcf 0xd2 0xd5 0xd8 0xdb 0xde 0xe1 0xe4 0xe7 0xea 0xed
0xf0 0xf3 0xf6 0xf9 0xfc 0xff

BeMicro LED control program completed its loop ...


Press 'u' to count up
Press 'd' to count down
Press '3' to count by threes

« Last Edit: October 29, 2014, 08:48:31 am by miguelvp »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
That said if I try to use the Nios II Flash Programmer I do get your same errors, but then again my sof is a time limited one.


Code: [Select]
Info: Oct 29, 2014 3:19:15 AM - (FINE) sof2flash: Starting
Info: Oct 29, 2014 3:19:15 AM - (SEVERE) sof2flash: Unrecognized device family in SOF.
Info: The sof2flash utility takes an FPGA configuration file in SOF format and
Info: translates it to a FLASH file that can be programmed into the flash
Info: memory connected to an Altera FPGA.
Info:
Info: usage: sof2flash [--programmingmode=programmingmode] [--log=file]
Info:        [--activeparallel] [--epcq] [--options=file] [--epcs] [--pfl] [--debug]
Info:        [--offset=addr] [--timestamp] [--optionbit=optionbitaddress] [--verbose]
Info:        [--output=file] [--epcq128] [--save] [--help] [--input=file] [--quiet]
Info:        [--compress]
Info:
Info: Options may be specified in any order.
Info:
Info:     --activeparallel                      create parallel flash contents
Info:                                           for active parallel programming
Info:     --compress                            compress the SOF
Info:     --debug                               debug mode
Info:     --epcq                                EPCQ flash mode of size
Info:                                           256Mbits
Info:     --epcq128                             EPCQ flash mode of size
Info:                                           128Mbits or less
Info:     --epcs                                EPCS flash mode
Info:     --help                                print this message
Info:     --input=<file>                        input SOF file to process
Info:     --log=<file>                          file for logging progress
Info:     --offset=<addr>                       design location within the
Info:                                           flash
Info:     --optionbit=<optionbitaddress>        Option Bit Address
Info:     --options=<file>                      intermediate Options file (for
Info:                                           EPCS only)
Info:     --output=<file>                       output flash file
Info:     --pfl                                 Pfl mode
Info:     --programmingmode=<programmingmode>   Programming mode
Info:     --quiet                               only print errors
Info:     --save                                save intermediate files
Info:     --timestamp                           produce a s0 record with
Info:                                           timestamp of input file
Info:     --verbose                             lots of interesting
Info:                                           information
Error: Error code: 3 for command: sof2flash --input="D:/projects/FPGA/BeMicro/MAX10/bemicro_m10_embedded_lab_14_0/output_files/bemicro_m10_nios2_top_time_limited.sof" --output="D:/projects/FPGA/BeMicro/MAX10/bemicro_m10_embedded_lab_14_0/flash/bemicro_m10_nios2_top_time_limited_serial_flash_controller.flash" --offset=0x0 --verbose
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf