Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- comment the entire code of "get_serial_number (void)" , if your board do ot have any serial number. and then in generate_and_store_mac_addr() assign to ser_num = 1;//get_serial_number(); and then inside if loop assign your own XX value /* This says the image is safe */ flash_content[0] = 0xfe; flash_content[1] = 0x5a; flash_content[2] = 0x0; flash_content[3] = 0x0; /* This is the Altera Vendor ID */ flash_content[4] = 0x00; flash_content[5] = 0x07; flash_content[6] = 0xED; /* Reserverd Board identifier for erase boards */ flash_content[7] = 0xXX;//FF; flash_content[8] = 0xXX;//(ser_num & 0xff00) >> 8; flash_content[9] = 0xXX;//ser_num & 0xff; once again in function generate_mac_addr(unsigned char mac_addr[6]) assign one to ser_num = 1;//get_serial_number(); and assign /* Reserverd Board identifier */ mac_addr[3] = 0xXX;//FF; mac_addr[4] = 0xXX;//(ser_num & 0xff00) >> 8; mac_addr[5] = 0xXX;//ser_num & 0xff; --- Quote End --- Thank you very much!Yes i get the mac address under your guide!But i also want to know how can i read the mac address from the flash.I test my boad with board_test_system which can read the mac address properly.So is it ture that the mac address still be availble without erasing?Also,i get a problem as below: Your Ethernet MAC address is 00:07:ed:1b:04:9e prepped 1 interface, initializing... [tse_mac_init] INFO : TSE MAC 0 found at address 0x0800a000 INFO : PHY Marvell 88E1111 found at PHY address 0x12 of MAC Group[0] INFO : PHY[0.0] - Automatically mapped to tse_mac_device[0] INFO : PHY[0.0] - Restart Auto-Negotiation, checking PHY link... INFO : PHY[0.0] - Auto-Negotiation PASSED MARVELL : Mode changed to RGMII/Modified MII to Copper mode MARVELL : Enable RGMII Timing Control MARVELL : PHY reset INFO : PHY[0.0] - Checking link... INFO : PHY[0.0] - Link not yet established, restart auto-negotiation... INFO : PHY[0.0] - Restart Auto-Negotiation, checking PHY link... INFO : PHY[0.0] - Auto-Negotiation PASSED INFO : PHY[0.0] - Link established INFO : PHY[0.0] - Speed = 100, Duplex = Full OK, x=0, CMD_CONFIG=0x00000000 MAC post-initialization: CMD_CONFIG=0x04000203 [tse_sgdma_read_init] RX descriptor chain desc (1 depth) created mctest init called IP address of et1 : 0.0.0.0 Created "Inet main" task (Prio: 2) Created "clock tick" task (Prio: 3) Acquired IP address via DHCP client for interface: et1 IP address : 192.168.1.101 Subnet Mask: 255.255.255.0 Gateway : 192.168.1.1 Simple Socket Server starting up [sss_task] Simple Socket Server listening on port 30 Created "simple socket server" task (Prio: 4) It has stopped at "simple socket server" task.Could you tell me why?Thank you!