Forum Discussion
Altera_Forum
Honored Contributor
13 years agoProblem with Zip file
Hello guys,
Good day. I have problem after download zip file into flash. I already download .sof file and zip file without any error. Just warnings appear. Should appear at LCD display is " Welcome to Barcode System". However, it appear "No Database". Is there any settings that I need to consider? :( Thank you17 Replies
- Altera_Forum
Honored Contributor
You should debug your embedded software to check that it finds the filesystem, can list the files there and open them.
- Altera_Forum
Honored Contributor
- Altera_Forum
Honored Contributor
I'm not sure, I don't use the IDE myself... Can't you step in the software anyway? It looks like the options are active and the breakpoint is reached.
In the BSP settings when you enabled the zip filesystem, did you put the correct mointpoint? Did you check that you disabled compression when creating the zip file? The zip filesystem doesn't support compression. - Altera_Forum
Honored Contributor
--- Quote Start --- I'm not sure, I don't use the IDE myself... Can't you step in the software anyway? It looks like the options are active and the breakpoint is reached. In the BSP settings when you enabled the zip filesystem, did you put the correct mointpoint? Did you check that you disabled compression when creating the zip file? The zip filesystem doesn't support compression. --- Quote End --- Dear Daixiwen, In Nios BSP Editor setting, I set the exeption_stack_memory_region_name to epcs_flash_controller and interrupt_stack_memory_region_name to onchip_mem. Whilst, in SOPC Builder, I set the reset vector to epcs_flash_controller and exception vector to onchip_mem. I'm not sure whether I put the correct mointpoint for the altera_ro_zipfs setting (as in the figure attached). Did I make any mistake?:confused: Hope for your advise. Thanks in advance. - Altera_Forum
Honored Contributor
The mount point looks ok. Is your flash mapped at address 0x1400000, as you configured in the rozipfs?
How do you write the zip to the flash? Are you sure 0x17fffff is the correct offset? - Altera_Forum
Honored Contributor
--- Quote Start --- The mount point looks ok. Is your flash mapped at address 0x1400000, as you configured in the rozipfs? How do you write the zip to the flash? Are you sure 0x17fffff is the correct offset? --- Quote End --- Hi Daixiwen, The zip file is write into cfi_flash using flash programmer. Actually the mount point is the default setting after I enable the zipfile system (in BSP setting). How to know the right flash mapped address and offset value? Thanks for your cooperation and concern - Altera_Forum
Honored Contributor
You can get the address of the flash memory from SOPC builder, and the offset is something you can fix in the flash programmer when you add the zip file.
But I just saw you mentioned epcs_flash_controller. I wasn't sure serial flash memories were supported in rozipfs (the documentation doesn't say which type of flash is supported) so I had a quick look at the source code. From what I see only parallel flash chips are supported, as this filesystem requires a direct memory map access to the contents. If you want to use it with an EPCS you will need to modify it, especially the read_word, read_word_inc, read_half_word, and read_half_word_inc functions. I think someone else on the forum did this but I don't remember if the modified source code was ever published. - Altera_Forum
Honored Contributor
Hi Daixiwen,
Thanks for your fast response. In Flash Programmer, I write .sof file in epcs_flash_controller and .zip file in cfi_flash. What mean of "If you want to use it with an EPCS you will need to modify it, especially the read_word, read_word_inc, read_half_word, and read_half_word_inc functions."?. Is it I need to modify the source file (.c) in Nios? I have try to search similar problem but don't get it until now, already a week I debug the code :(. Any other advises? Thanks in advance - Altera_Forum
Honored Contributor
Okay I didn't know you had both a CFI and an EPCS. If you put the zip file into the CFI flash then the rozipfs should work without modification.
The ro_zipfs_base parameter should be the CFI component base address, as seen in SOPC builder, and the ro_zipfs_offset should be the offset of the zip file as seen in the flash programmer. If you only have the zip file in the CFI I guess the offset should be 0. - Altera_Forum
Honored Contributor
--- Quote Start --- Okay I didn't know you had both a CFI and an EPCS. If you put the zip file into the CFI flash then the rozipfs should work without modification. The ro_zipfs_base parameter should be the CFI component base address, as seen in SOPC builder, and the ro_zipfs_offset should be the offset of the zip file as seen in the flash programmer. If you only have the zip file in the CFI I guess the offset should be 0. --- Quote End --- Hi Daixiwen, I have set back all the parameter for CFI and EPCS as your suggestion. But, I have another confusion for the Nios BSP editor (Linker Script tab). I'm not sure if I set the Linker Region Name (under Linker Section Mappings) in the right way. What exactly means for .bss,.heap,.rodata,.rwdata,.stack, and .text? Thanks in advance