• 0
Sign in to follow this  
evanrichter

Getting Atlys Webserver Demo to Work

Question

Hello, I'm trying to get http://www.digilentinc.com/Data/Products/ATLYS/Atlys_AXI_Web_Server_Demo_v_1_02.zip to work on my Atlys board but I'm running into errors in SDK.

 

After I clean & build, the elfcheck passes:

10:39:52 **** Incremental Build of configuration Debug for project Atlys_Webserver_Demo ****
make all 
'Building file: ../src/additional_sf_ops.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/additional_sf_ops.d" -MT"src/additional_sf_ops.d" -o "src/additional_sf_ops.o" "../src/additional_sf_ops.c"
../src/additional_sf_ops.c: In function 'hchartoi':
../src/additional_sf_ops.c:837:5: warning: array subscript has type 'char' [-Wchar-subscripts]
../src/additional_sf_ops.c:843:5: warning: array subscript has type 'char' [-Wchar-subscripts]
'Finished building: ../src/additional_sf_ops.c'
' '
'Building file: ../src/dispatch.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/dispatch.d" -MT"src/dispatch.d" -o "src/dispatch.o" "../src/dispatch.c"
../src/dispatch.c: In function 'print_headers':
../src/dispatch.c:31:9: warning: implicit declaration of function 'print_echo_app_header' [-Wimplicit-function-declaration]
../src/dispatch.c:34:9: warning: implicit declaration of function 'print_rxperf_app_header' [-Wimplicit-function-declaration]
../src/dispatch.c:37:9: warning: implicit declaration of function 'print_txperf_app_header' [-Wimplicit-function-declaration]
../src/dispatch.c:40:9: warning: implicit declaration of function 'print_tftp_app_header' [-Wimplicit-function-declaration]
../src/dispatch.c:43:9: warning: implicit declaration of function 'print_web_app_header' [-Wimplicit-function-declaration]
../src/dispatch.c: In function 'start_applications':
../src/dispatch.c:52:9: warning: implicit declaration of function 'start_echo_application' [-Wimplicit-function-declaration]
../src/dispatch.c:55:9: warning: implicit declaration of function 'start_rxperf_application' [-Wimplicit-function-declaration]
../src/dispatch.c:58:9: warning: implicit declaration of function 'start_txperf_application' [-Wimplicit-function-declaration]
../src/dispatch.c:61:9: warning: implicit declaration of function 'start_tftp_application' [-Wimplicit-function-declaration]
../src/dispatch.c:64:9: warning: implicit declaration of function 'start_web_application' [-Wimplicit-function-declaration]
../src/dispatch.c: In function 'transfer_data':
../src/dispatch.c:71:9: warning: implicit declaration of function 'transfer_echo_data' [-Wimplicit-function-declaration]
../src/dispatch.c:74:9: warning: implicit declaration of function 'transfer_rxperf_data' [-Wimplicit-function-declaration]
../src/dispatch.c:77:9: warning: implicit declaration of function 'transfer_txperf_data' [-Wimplicit-function-declaration]
../src/dispatch.c:80:9: warning: implicit declaration of function 'transfer_tftp_data' [-Wimplicit-function-declaration]
../src/dispatch.c:83:9: warning: implicit declaration of function 'transfer_web_data' [-Wimplicit-function-declaration]
../src/dispatch.c:84:1: warning: control reaches end of non-void function [-Wreturn-type]
../src/dispatch.c: In function 'start_applications':
../src/dispatch.c:65:1: warning: control reaches end of non-void function [-Wreturn-type]
'Finished building: ../src/dispatch.c'
' '
'Building file: ../src/echo.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/echo.d" -MT"src/echo.d" -o "src/echo.o" "../src/echo.c"
'Finished building: ../src/echo.c'
' '
'Building file: ../src/http_response.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/http_response.d" -MT"src/http_response.d" -o "src/http_response.o" "../src/http_response.c"
../src/http_response.c: In function 'do_delete_file':
../src/http_response.c:529:12: warning: unused variable 'fd' [-Wunused-variable]
../src/http_response.c: In function 'do_list_file':
../src/http_response.c:729:4: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
../src/http_response.c: In function 'do_http_get':
../src/http_response.c:868:4: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
../src/http_response.c: In function 'data_receive_callback':
../src/http_response.c:353:5: warning: 'pcb' may be used uninitialized in this function [-Wuninitialized]
../src/http_response.c: In function 'do_download_file':
../src/http_response.c:459:7: warning: 'buf' may be used uninitialized in this function [-Wuninitialized]
'Finished building: ../src/http_response.c'
' '
'Building file: ../src/main.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/main.d" -MT"src/main.d" -o "src/main.o" "../src/main.c"
../src/main.c: In function 'main':
../src/main.c:85:2: warning: implicit declaration of function 'lwip_init' [-Wimplicit-function-declaration]
../src/main.c:96:2: warning: implicit declaration of function 'platform_enable_interrupts' [-Wimplicit-function-declaration]
../src/main.c:116:3: warning: implicit declaration of function 'get_switch_state' [-Wimplicit-function-declaration]
../src/main.c:117:3: warning: implicit declaration of function 'get_pushbutton_state' [-Wimplicit-function-declaration]
'Finished building: ../src/main.c'
' '
'Building file: ../src/platform.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/platform.d" -MT"src/platform.d" -o "src/platform.o" "../src/platform.c"
../src/platform.c: In function 'timer_callback':
../src/platform.c:50:2: warning: implicit declaration of function 'tcp_fasttmr' [-Wimplicit-function-declaration]
../src/platform.c:54:3: warning: implicit declaration of function 'tcp_slowtmr' [-Wimplicit-function-declaration]
../src/platform.c: In function 'xadapter_timer_handler':
../src/platform.c:62:11: warning: unused variable 'tcsr' [-Wunused-variable]
../src/platform.c:61:12: warning: unused variable 'timer_base' [-Wunused-variable]
../src/platform.c: In function 'init_platform':
../src/platform.c:257:2: warning: implicit declaration of function 'platform_init_fs' [-Wimplicit-function-declaration]
'Finished building: ../src/platform.c'
' '
'Building file: ../src/platform_fs.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/platform_fs.d" -MT"src/platform_fs.d" -o "src/platform_fs.o" "../src/platform_fs.c"
'Finished building: ../src/platform_fs.c'
' '
'Building file: ../src/platform_gpio.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/platform_gpio.d" -MT"src/platform_gpio.d" -o "src/platform_gpio.o" "../src/platform_gpio.c"
'Finished building: ../src/platform_gpio.c'
' '
'Building file: ../src/prot_malloc.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/prot_malloc.d" -MT"src/prot_malloc.d" -o "src/prot_malloc.o" "../src/prot_malloc.c"
../src/prot_malloc.c: In function 'prot_mem_free':
../src/prot_malloc.c:39:1: warning: control reaches end of non-void function [-Wreturn-type]
'Finished building: ../src/prot_malloc.c'
' '
'Building file: ../src/rxperf.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/rxperf.d" -MT"src/rxperf.d" -o "src/rxperf.o" "../src/rxperf.c"
'Finished building: ../src/rxperf.c'
' '
'Building file: ../src/tftpserver.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/tftpserver.d" -MT"src/tftpserver.d" -o "src/tftpserver.o" "../src/tftpserver.c"
../src/tftpserver.c:57:8: warning: type defaults to 'int' in declaration of 'tftp_server_started' [-Wimplicit-int]
../src/tftpserver.c: In function 'tftp_process_read':
../src/tftpserver.c:191:13: warning: unused variable 'block' [-Wunused-variable]
../src/tftpserver.c:191:10: warning: unused variable 'n' [-Wunused-variable]
../src/tftpserver.c: In function 'tftp_process_write':
../src/tftpserver.c:276:13: warning: unused variable 'block' [-Wunused-variable]
../src/tftpserver.c:276:10: warning: unused variable 'n' [-Wunused-variable]
../src/tftpserver.c: In function 'start_tftp_application':
../src/tftpserver.c:406:1: warning: control reaches end of non-void function [-Wreturn-type]
'Finished building: ../src/tftpserver.c'
' '
'Building file: ../src/tftputils.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/tftputils.d" -MT"src/tftputils.d" -o "src/tftputils.o" "../src/tftputils.c"
'Finished building: ../src/tftputils.c'
' '
'Building file: ../src/txperf.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/txperf.d" -MT"src/txperf.d" -o "src/txperf.o" "../src/txperf.c"
'Finished building: ../src/txperf.c'
' '
'Building file: ../src/urxperf.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/urxperf.d" -MT"src/urxperf.d" -o "src/urxperf.o" "../src/urxperf.c"
'Finished building: ../src/urxperf.c'
' '
'Building file: ../src/utxperf.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/utxperf.d" -MT"src/utxperf.d" -o "src/utxperf.o" "../src/utxperf.c"
../src/utxperf.c: In function 'transfer_utxperf_data':
../src/utxperf.c:37:6: warning: unused variable 'copy' [-Wunused-variable]
'Finished building: ../src/utxperf.c'
' '
'Building file: ../src/web_utils.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/web_utils.d" -MT"src/web_utils.d" -o "src/web_utils.o" "../src/web_utils.c"
'Finished building: ../src/web_utils.c'
' '
'Building file: ../src/webserver.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/webserver.d" -MT"src/webserver.d" -o "src/webserver.o" "../src/webserver.c"
../src/webserver.c: In function 'http_sent_callback':
../src/webserver.c:86:13: warning: implicit declaration of function 'mfs_file_read' [-Wimplicit-function-declaration]
../src/webserver.c:91:17: warning: implicit declaration of function 'mfs_file_close' [-Wimplicit-function-declaration]
../src/webserver.c: In function 'http_recv_callback':
../src/webserver.c:115:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
../src/webserver.c:117:3: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
../src/webserver.c: In function 'start_web_application':
../src/webserver.c:158:2: warning: implicit declaration of function 'platform_init_gpios' [-Wimplicit-function-declaration]
'Finished building: ../src/webserver.c'
' '
'Building file: ../src/xquad_spi.c'
'Invoking: MicroBlaze gcc compiler'
mb-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp_0/microblaze_0/include -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP -MF"src/xquad_spi.d" -MT"src/xquad_spi.d" -o "src/xquad_spi.o" "../src/xquad_spi.c"
'Finished building: ../src/xquad_spi.c'
' '
'Building target: Atlys_Webserver_Demo.elf'
'Invoking: MicroBlaze gcc linker'
mb-gcc -Wl,-T -Wl,../src/lscript.ld -L../../standalone_bsp_0/microblaze_0/lib -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -Wl,--gc-sections -o "Atlys_Webserver_Demo.elf"  ./src/additional_sf_ops.o ./src/dispatch.o ./src/echo.o ./src/http_response.o ./src/main.o ./src/platform.o ./src/platform_fs.o ./src/platform_gpio.o ./src/prot_malloc.o ./src/rxperf.o ./src/tftpserver.o ./src/tftputils.o ./src/txperf.o ./src/urxperf.o ./src/utxperf.o ./src/web_utils.o ./src/webserver.o ./src/xquad_spi.o   -Wl,--start-group,-lxil,-lgcc,-lc,--end-group -Wl,--start-group,-lxil,-llwip4,-lgcc,-lc,--end-group
'Finished building target: Atlys_Webserver_Demo.elf'
' '
'Invoking: MicroBlaze Print Size'
mb-size Atlys_Webserver_Demo.elf  |tee "Atlys_Webserver_Demo.elf.size"
   text	   data	    bss	    dec	    hex	filename
 172996	   1552	34190284	34364832	20c5da0	Atlys_Webserver_Demo.elf
'Finished building: Atlys_Webserver_Demo.elf.size'
' '
'Invoking: Xilinx ELF Check'
elfcheck Atlys_Webserver_Demo.elf -hw ../../hw_platform/system.xml -pe microblaze_0  |tee "Atlys_Webserver_Demo.elf.elfcheck"
elfcheck
Xilinx EDK 14.7 Build EDK_P.20131013
Copyright (c) 1995-2012 Xilinx, Inc.  All rights reserved.

Command Line: elfcheck -hw ../../hw_platform/system.xml -pe microblaze_0
Atlys_Webserver_Demo.elf 

ELF file	: Atlys_Webserver_Demo.elf
elfcheck passed.
'Finished building: Atlys_Webserver_Demo.elf.elfcheck'
' '

10:40:03 Build Finished (took 11s.626ms)

However when I click program FPGA, I get

 

The following sections did not fit into Processor BRAM memory:
    Section .data (0xC002A3D0 - 0xC002A9CF)
    Section .rodata (0xC0027D04 - 0xC002A3CB)
    Section .dtors (0xC0027CFC - 0xC0027D03)
    Section .ctors (0xC0027CF4 - 0xC0027CFB)
    Section .fini (0xC0027CD4 - 0xC0027CF3)
    Section .init (0xC0027C98 - 0xC0027CD3)
    Section .text (0xC0000000 - 0xC0027C97)

Try using the linker script generation tools to generate an ELF that maps
correctly to your hardware design.

elfcheck -hw 
C:/Users/C16Evan.Richter/Desktop/microBlaze/final_project/hw_platform/system.xml -mode 
bootload -mem BRAM -pe microblaze_0 
C:/Users/C16Evan.Richter/Desktop/microBlaze/final_project/Atlys_Webserver_Demo/Debug/Atlys_Webserver_Demo.elf 
elfcheck
Xilinx EDK 14.7 Build EDK_P.20131013
Copyright (c) 1995-2012 Xilinx, Inc.  All rights reserved.

Command Line: elfcheck -hw
C:/Users/C16Evan.Richter/Desktop/microBlaze/final_project/hw_platform/system.xml
-mode bootload -mem BRAM -pe microblaze_0
C:/Users/C16Evan.Richter/Desktop/microBlaze/final_project/Atlys_Webserver_Demo/D
ebug/Atlys_Webserver_Demo.elf 

ELF file	:
C:/Users/C16Evan.Richter/Desktop/microBlaze/final_project/Atlys_Webserver_Demo/D
ebug/Atlys_Webserver_Demo.elf
ERROR:EDK:3165 - elfcheck failed!
The following sections did not fit into Processor BRAM memory:
	Section .data (0xC002A3D0 - 0xC002A9CF)
	Section .rodata (0xC0027D04 - 0xC002A3CB)
	Section .dtors (0xC0027CFC - 0xC0027D03)
	Section .ctors (0xC0027CF4 - 0xC0027CFB)
	Section .fini (0xC0027CD4 - 0xC0027CF3)
	Section .init (0xC0027C98 - 0xC0027CD3)
	Section .text (0xC0000000 - 0xC0027C97)

Try using the linker script generation tools to generate an ELF that maps
correctly to your hardware design.
Programming the FPGA failed due to errors from elfcheck

My lscript.ld file is as follows:

/*******************************************************************/
/*                                                                 */
/* This file is automatically generated by linker script generator.*/
/*                                                                 */
/* Version: Xilinx EDK 14.3 EDK_P.40xd                                */
/*                                                                 */
/* Copyright (c) 2010 Xilinx, Inc.  All rights reserved.           */
/*                                                                 */
/* Description : MicroBlaze Linker Script                          */
/*                                                                 */
/*******************************************************************/

_STACK_SIZE = DEFINED(_STACK_SIZE) ? _STACK_SIZE : 0x1000000;
_HEAP_SIZE = DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 0x1000000;

/* Define Memories in the system */

MEMORY
{
   microblaze_0_i_bram_ctrl_microblaze_0_d_bram_ctrl : ORIGIN = 0x00000050, LENGTH = 0x00007FB0
   mcb_ddr2_S0_AXI_BASEADDR : ORIGIN = 0xC0000000, LENGTH = 0x08000000
}

/* Specify the default entry point to the program */

ENTRY(_start)

/* Define the sections, and where they are mapped in memory */

SECTIONS
{
.vectors.reset 0x00000000 : {
   *(.vectors.reset)
} 

.vectors.sw_exception 0x00000008 : {
   *(.vectors.sw_exception)
} 

.vectors.interrupt 0x00000010 : {
   *(.vectors.interrupt)
} 

.vectors.hw_exception 0x00000020 : {
   *(.vectors.hw_exception)
} 

.text : {
   *(.text)
   *(.text.*)
   *(.gnu.linkonce.t.*)
} > mcb_ddr2_S0_AXI_BASEADDR

.init : {
   KEEP (*(.init))
} > mcb_ddr2_S0_AXI_BASEADDR

.fini : {
   KEEP (*(.fini))
} > mcb_ddr2_S0_AXI_BASEADDR

.ctors : {
   __CTOR_LIST__ = .;
   ___CTORS_LIST___ = .;
   KEEP (*crtbegin.o(.ctors))
   KEEP (*(EXCLUDE_FILE(*crtend.o) .ctors))
   KEEP (*(SORT(.ctors.*)))
   KEEP (*(.ctors))
   __CTOR_END__ = .;
   ___CTORS_END___ = .;
} > mcb_ddr2_S0_AXI_BASEADDR

.dtors : {
   __DTOR_LIST__ = .;
   ___DTORS_LIST___ = .;
   KEEP (*crtbegin.o(.dtors))
   KEEP (*(EXCLUDE_FILE(*crtend.o) .dtors))
   KEEP (*(SORT(.dtors.*)))
   KEEP (*(.dtors))
   PROVIDE(__DTOR_END__ = .);
   PROVIDE(___DTORS_END___ = .);
} > mcb_ddr2_S0_AXI_BASEADDR

.rodata : {
   __rodata_start = .;
   *(.rodata)
   *(.rodata.*)
   *(.gnu.linkonce.r.*)
   __rodata_end = .;
} > mcb_ddr2_S0_AXI_BASEADDR

.sdata2 : {
   . = ALIGN(8);
   __sdata2_start = .;
   *(.sdata2)
   *(.sdata2.*)
   *(.gnu.linkonce.s2.*)
   . = ALIGN(8);
   __sdata2_end = .;
} > mcb_ddr2_S0_AXI_BASEADDR

.sbss2 : {
   __sbss2_start = .;
   *(.sbss2)
   *(.sbss2.*)
   *(.gnu.linkonce.sb2.*)
   __sbss2_end = .;
} > mcb_ddr2_S0_AXI_BASEADDR

.data : {
   . = ALIGN(4);
   __data_start = .;
   *(.data)
   *(.data.*)
   *(.gnu.linkonce.d.*)
   __data_end = .;
} > mcb_ddr2_S0_AXI_BASEADDR

.got : {
   *(.got)
} > mcb_ddr2_S0_AXI_BASEADDR

.got1 : {
   *(.got1)
} > mcb_ddr2_S0_AXI_BASEADDR

.got2 : {
   *(.got2)
} > mcb_ddr2_S0_AXI_BASEADDR

.eh_frame : {
   *(.eh_frame)
} > mcb_ddr2_S0_AXI_BASEADDR

.jcr : {
   *(.jcr)
} > mcb_ddr2_S0_AXI_BASEADDR

.gcc_except_table : {
   *(.gcc_except_table)
} > mcb_ddr2_S0_AXI_BASEADDR

.sdata : {
   . = ALIGN(8);
   __sdata_start = .;
   *(.sdata)
   *(.sdata.*)
   *(.gnu.linkonce.s.*)
   __sdata_end = .;
} > mcb_ddr2_S0_AXI_BASEADDR

.sbss (NOLOAD) : {
   . = ALIGN(4);
   __sbss_start = .;
   *(.sbss)
   *(.sbss.*)
   *(.gnu.linkonce.sb.*)
   . = ALIGN(8);
   __sbss_end = .;
} > mcb_ddr2_S0_AXI_BASEADDR

.tdata : {
   __tdata_start = .;
   *(.tdata)
   *(.tdata.*)
   *(.gnu.linkonce.td.*)
   __tdata_end = .;
} > mcb_ddr2_S0_AXI_BASEADDR

.tbss : {
   __tbss_start = .;
   *(.tbss)
   *(.tbss.*)
   *(.gnu.linkonce.tb.*)
   __tbss_end = .;
} > mcb_ddr2_S0_AXI_BASEADDR

.bss (NOLOAD) : {
   . = ALIGN(4);
   __bss_start = .;
   *(.bss)
   *(.bss.*)
   *(.gnu.linkonce.b.*)
   *(COMMON)
   . = ALIGN(4);
   __bss_end = .;
} > mcb_ddr2_S0_AXI_BASEADDR

_SDA_BASE_ = __sdata_start + ((__sbss_end - __sdata_start) / 2 );

_SDA2_BASE_ = __sdata2_start + ((__sbss2_end - __sdata2_start) / 2 );

/* Generate Stack and Heap definitions */

.heap (NOLOAD) : {
   . = ALIGN(8);
   _heap = .;
   _heap_start = .;
   . += _HEAP_SIZE;
   _heap_end = .;
} > mcb_ddr2_S0_AXI_BASEADDR

.stack (NOLOAD) : {
   _stack_end = .;
   . += _STACK_SIZE;
   . = ALIGN(8);
   _stack = .;
   __stack = _stack;
} > mcb_ddr2_S0_AXI_BASEADDR

_end = .;
}


I have not modified any files given in the demo. Can someone please help me figure out what to do so that the project compiles and can be programmed on my Atlys board?

 

Thanks

Edited by KaitlynFranz

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Mihaita, thanks for the reply. I tried what you said and received this console output. It seems that the BRAM is not large enough for the program.

...
...
'Building target: Atlys_Webserver_Demo.elf'
'Invoking: MicroBlaze gcc linker'
mb-gcc -Wl,-T -Wl,../src/lscript.ld -L../../standalone_bsp_0/microblaze_0/lib -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mcpu=v8.40.b -mno-xl-soft-mul -Wl,--no-relax -Wl,--gc-sections -o "Atlys_Webserver_Demo.elf"  ./src/additional_sf_ops.o ./src/dispatch.o ./src/echo.o ./src/http_response.o ./src/main.o ./src/platform.o ./src/platform_fs.o ./src/platform_gpio.o ./src/prot_malloc.o ./src/rxperf.o ./src/tftpserver.o ./src/tftputils.o ./src/txperf.o ./src/urxperf.o ./src/utxperf.o ./src/web_utils.o ./src/webserver.o ./src/xquad_spi.o   -Wl,--start-group,-lxil,-lgcc,-lc,--end-group -Wl,--start-group,-lxil,-llwip4,-lgcc,-lc,--end-group
c:/xilinx/14.7/ise_ds/edk/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.6.4/../../../../microblaze-xilinx-elf/bin/ld.exe: Atlys_Webserver_Demo.elf section `.text' will not fit in region `microblaze_0_i_bram_ctrl_microblaze_0_d_bram_ctrl'
c:/xilinx/14.7/ise_ds/edk/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.6.4/../../../../microblaze-xilinx-elf/bin/ld.exe: region `microblaze_0_i_bram_ctrl_microblaze_0_d_bram_ctrl' overflowed by 779976 bytes
collect2: ld returned 1 exit status
make: *** [Atlys_Webserver_Demo.elf] Error 1

22:37:51 Build Finished (took 8s.634ms)


Should I look at manually configuring the linker file/generator, or adding BRAM in EDK (which I haven't been very successful at)?

Share this post


Link to post
Share on other sites
  • 0

Try deleting the linker script file and generating it again by right clicking Atlys_Webser_Demo -> Generate Linker Script.

 

 

Mihaita

Share this post


Link to post
Share on other sites
  • 0

From looking at the original linker script it seems like the software runs out of DDR2 so when regenerating the liker script make sure you place code, data, heap and stack into DDR2.

 

 

Mihaita

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this