Altera_Forum
Honored Contributor
14 years agoBeMicro SDK - how to access SD card
updated 7th november - change title from BeMicro SDK - how to access SD card to
bemicro sdk - how to make the web server run from epcs memoryHi All The reference board I am using is the.... BeMicro SDK bemicro sdk (http://www.arrownac.com/solutions/bemicro-sdk/) or bemicro sdk (http://www.altera.com/b/bemicro-sdk.html) Its supposed to be a SDK (software development kit) but does not provide working / documented examples to use with Ethernet or the uSD Card. strange for a sdk kit? :( Anyway, I want to test the performance of HTTP downloads etc using the ucos and the iniche stack. I downloaded the material "BeMicro SDK Lab Materials v1.22" from the above web site. In the NOIS II development environment there is an option to create a simple web server, its actually for a different development kit. It does not compile, you have to comment out accesses to flash memory in the file network_utilities.c as follows:-#if 0 /* RLF comment out flash accesses as no memory */ /* Write the MAC address to flash */ flash_handle = alt_flash_open_dev(EXT_FLASH_NAME); if (flash_handle) { alt_write_flash(flash_handle, last_flash_sector_offset, flash_content, 32); alt_flash_close_dev(flash_handle); error = 0; } # endif .....and.................... #if 0 /* RLF comment out flash accesses as no memory */ /* Get the flash sector with the MAC address. */ error = FindLastFlashSectorOffset(&last_flash_sector_offset); if (!error) last_flash_sector = EXT_FLASH_BASE + last_flash_sector_offset; /* This last_flash_sector region of flash is examined to see if * valid network settings are present, indicated by a signature of 0x00005afe at * the first address of the last flash sector. This hex value is chosen as the * signature since it looks like the english word "SAFE", meaning that it is * safe to use these network address values. */ if (!error) { signature = IORD_32DIRECT(last_flash_sector, 0); if (signature != 0x00005afe) { error = generate_and_store_mac_addr(); } } # endif .....and.................... /* RLF comment out accesse and hardcode teh mac address */ /* mac_addr[0] = IORD_8DIRECT(last_flash_sector, 4); mac_addr[1] = IORD_8DIRECT(last_flash_sector, 5); mac_addr[2] = IORD_8DIRECT(last_flash_sector, 6); mac_addr[3] = IORD_8DIRECT(last_flash_sector, 7); mac_addr[4] = IORD_8DIRECT(last_flash_sector, 8); mac_addr[5] = IORD_8DIRECT(last_flash_sector, 9); */ /* RLF Modded as example from mobile DDR stack */ /* Hard code MAC address here $$ */ mac_addr[0] = 0x00; mac_addr[1] = 0x15; mac_addr[2] = 0x17; mac_addr[3] = 0x26; mac_addr[4] = 0x63; mac_addr[5] = 0xf8; At first it would not run.... In the BSP make sure the following is set sys_clk_timer is set to sys_timer timestamp_timer is set to high_res_timer The development board now starts up, ipaddress allocated from the DNS server okay etc. Accessing the web server generates the following error message:- "can't find the requested file file. have you programmed the flash filing system into flash?"
On further reading its because the webpages which are stored in ro_zipfs.zip which should be programmed to flash. However this board does not have flash... (apart from configuration EPROM) As the board has 64Mbytes of DDR ram and the program is running from DDR ram, could I load this into RAM ???? (I could find no way) If anyone knows how to do this with the tools supplied with the SDK board please let me know?? Okay...I could use the uSD card slot to store web pages.... But the ip belongs to slscorp (http://www.slscorp.com/ip-cores/memory/sd-host-controller.html), no HAL driver is provided so no way to access the uSD card slot. If I have missed something please let me know. I'm a software developer, I don't want to or know how to change the reference hardware design (FPGA), all the bits are there so I should be able to use it. Any help much appreciated