lwIP/http default example not working compiled with gcc

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
RaAl_4361976
Level 1
Level 1
First reply posted First question asked First like given

Hello. I have the FM4-216-ETHERNET board and compiled the default example of s6e2cc_ethernet_lwip-v11 with gcc but it is not fully working, the lwIP http functionality hangs. However the default hex compiled with Keil that comes by default works correctly and web page is shown. With the srec file compiled with gcc the Hmi Menu works but no TPC/IPpackages are sent and when loading the web page, the micro hangs, even Hmi Menu stops working.

I checked that the code is similar to other lwIP example with http in other micros, so I thought it could be that the example was only tested with Keil tool and that the gcc compilation has wrong flag/s. Here I send the linking flags. If you had any idea what could be the root cause or how to investigate the problem, I would be very thankful.

D:/arm/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -specs=nano.specs -specs=nosys.specs -Os -L -Larmv7e-m/fpu -T S6E2CCA_rom.ld -I.  -lg -lstdc++ -lsupc++ -lm -lgcc -lc -lnosys -o output/release/s6e2cc_ethe

rnet_lwip.elf

D:/arm/bin/arm-none-eabi-objcopy -I elf32-little -O binary output/release/s6e2cc_ethernet_lwip.elf output/release/s6e2cc_ethernet_lwip.bin

D:/arm/bin/arm-none-eabi-objcopy -O srec output/release/s6e2cc_ethernet_lwip.elf output/release/s6e2cc_ethernet_lwip.srec

Printing size

D:/arm/bin/arm-none-eabi-size --totals output/release/s6e2cc_ethernet_lwip.elf

   text    data     bss     dec     hex filename

  47696     184   55712  103592   194a8 output/release/s6e2cc_ethernet_lwip.elf

  47696     184   55712  103592   194a8 (TOTALS)

D:/arm/bin/arm-none-eabi-objdump -D output/release/s6e2cc_ethernet_lwip.elf > output/release/s6e2cc_ethernet_lwip.lst

D:/arm/bin/arm-none-eabi-nm output/release/s6e2cc_ethernet_lwip.elf > output/release/s6e2cc_ethernet_lwip-symbol-table.txt

Make was successful done.

0 Likes
1 Solution

Hi,

may I ask how you use the GCC? Using the make environment? Which GCC version you are using.

The example includes 5 projects and has been tested with the given tool chain versions, see readme.txt.

ARM    5.11
Atollic / GCC4.3.1
IAR    7.30
iSYSTEM / GCC9.12.213
make / GCCsame as iSYSTEM

Working from home-office unfortunately I have no board available to verify the example.

As the example code is roughly 5 yrs old I can imagine, that newer GCC version may cause the issue.

My suggestion would be to download iSYSTEM WinIDEA open, it's for free and includes full device support of S6E2CC.

Regards,

Holger

View solution in original post

3 Replies
RaAl_4361976
Level 1
Level 1
First reply posted First question asked First like given

Addtional information. I had to change the rom map S6E2CCA_rom adding to .bss the last entry "end = _end;". If not the link was giving a problem with "in function `_sbrk': undefined reference to `end'".

  .bss :

  {

    _sbss = .;

    *(.shbss)

    *(.bss .bss.* .gnu.linkonce.b.*)

    *(COMMON)

    *(.ram.b)

    . = ALIGN (8);

    _ebss = .;

    _end = .;

    __end = .;

    end = _end;

  } >ram AT>rom

0 Likes

Hi,

may I ask how you use the GCC? Using the make environment? Which GCC version you are using.

The example includes 5 projects and has been tested with the given tool chain versions, see readme.txt.

ARM    5.11
Atollic / GCC4.3.1
IAR    7.30
iSYSTEM / GCC9.12.213
make / GCCsame as iSYSTEM

Working from home-office unfortunately I have no board available to verify the example.

As the example code is roughly 5 yrs old I can imagine, that newer GCC version may cause the issue.

My suggestion would be to download iSYSTEM WinIDEA open, it's for free and includes full device support of S6E2CC.

Regards,

Holger

Hello Holger,

Thanks very much for your replay.

I downloaded gcc-arm-none-eabi-5_4-2016q3-20160926-win32 from 2016 and now the example is FULLY WORKING.

Thanks very much for your hint.

Kind regards,

Raúl

0 Likes