Inicial > brtos, ports, Projetos conjuntos > LwIP integrado ao demo do STM32F4

LwIP integrado ao demo do STM32F4

     Gostaríamos de anunciar mais uma novidade da equipe do BRTOS, o demo do stack TCP/IP LwIP integrado ao BRTOS para os microcontroladores STM32F4. A grande vantagem deste port é a utilização do compilador GNU GCC (integrado ao CoIDE)… ou seja, não há limitações de tamanho de código para o compilador. O kit utilizado foi novamente o STM32F4DISCOVERY, sendo que o módulo PHY ethernet utilizado (DP83848) e as conexões estão disponíveis aqui.

Faça o download do demo no google code do BRTOS e experimente !!!

Tags:, ,
  1. 31/10/2012 às 19:49

    Hi.
    We have been trying to get your BRTOS example with the lwIP stack to work on our Discovery board with the DP83848 phy board connected as described in our Blog post: http://blog.tkjelectronics.dk/2012/08/ethernet-on-stm32f4discovery-using-external-phy/
    Unfortunately nothing happens when testing your project.

    Or well, the orange LED is blinking with a rate of about 10Hz, which should be correct.
    But there is no Ethernet connectivity – which I can confirm as my router doesn’t see the board.

    Hopefully you have a solution or maybe some suggestions for us to try.

    Thanks a lot.

    Best Regards
    Thomas Jespersen

    • 01/11/2012 às 10:41

      Hi thomas,

      We are very glad you are giving a try to the BRTOS project!
      I have several questions in order to help us to help you. Let´s go:

      1. Which version of coocox ide and gnu gcc are you using?
      2. Do you also have a GLCD attached to your discovery kit?
      3. Are you using the USB CDC demo? If so, are you connecting the USB cable into your PC?
      4. Have you changed the IP address, gateway and netmask in order to meet your requirements?
      5. Have you performed “clean” and after “build” commands in your project?
      6. Have you verified if the project is compiling ok? Do you know that you have to select the correct path to the “m” and “gcc” linked libraries into Project->Configuration?

      PS.: In order to better debug, disable the compiler optimizations (None -O0) and comment this line in HAL.h file (comment just the asm instruction, not the complete line):
      #define OS_Wait //__asm(” WFI “);

      As soon you answer all this questions we will be able to help you !!!
      Best regards,
      Gustavo

  2. 01/11/2012 às 15:05

    Hi Gustavo.
    Thank you for your fast reply. Here is some answers to your questions.
    1. CooCox CoIDE V1.5.0
    2. No I don’t, and I’ve tried to remove the library from the BRTOS example code as I couldn’t succeed compiling the project properly with the GLCD library.
    3. I’m using this code: “BRTOS_STM32F4x_LwIP_USB_Virtual_Comm.rar”. So yeah, I guess I’m using the USB code – though I have not connected a USB Client cable.
    4. Yes I have – to our gateway and required IP address.
    5. Yup, have tried that.
    6. I have checked that, as I did also get some errors about missing FPU code. But I have changed/fixed the library folder so the m, gcc and fpu libraries are getting included properly.

    I haven’t tried the debugging fix yet, but I guess that was the cause of the problems I had when trying to debug the project.

    Let me know your suggestions.

    Regards Thomas

    • 01/11/2012 às 15:40

      Hi Thomas,

      I think we discovered your problem. I have never tested the code without the USB client cable. Now i have tested and found that without the USB client cable the ethernet server do not work.

      So, i recommend you to comment the GLCD and USB tasks in the main.c file like that:

      #if 0
      if(InstallTask(&Test_lcd,”LCD Task”,1536,2,NULL) != OK)
      {
      // Oh Oh
      // Não deveria entrar aqui !!!
      while(1){};
      };

      if(InstallTask(&SD_Task,”SD Card Task”,1024,4,NULL) != OK)
      {
      // Oh Oh
      // Não deveria entrar aqui !!!
      while(1){};
      };
      #endif

      This way i believe that this demo will work for you.

      PS.: You may also connect the USB client cable and not comment the code.

      Regards,
      Gustavo

      • 03/11/2012 às 9:37

        Dear Gustavo.

        I have now tried to run the project with these task disabled, but it still doesn’t seem to work.
        When debugging the project, with the OS_Wait assembler command commented and with -O0 I seems to restart the main code all the time.
        If I place a breakpoint at “if(InstallTask(&vBasicWEBServer…” and also at “if(BRTOSStart() != OK)” fx, it keeps running those lines over and over again.
        So I guess the processor jumps to the first line of code all the time?

        Regards Thomas

  3. 03/11/2012 às 9:42

    Dear Gustavo.
    It seems to be a problem with the Watchdog.
    Now it seems to be running and if I place a breakpoint at “vProcessConnection( pxNewConnection );” it also breaks there when I enter the IP address of the board in my browser.
    Unfortunately the page is never processed and sent.

    Regards Thomas

  4. 03/11/2012 às 9:48

    Sorry for all the comments 😉
    Problem has now been narrowed down to “pxRxBuffer = netconn_recv( pxNetCon );”
    This lwip receive command always returns NULL. Even when making a do-while statement it that keeps reading the netconn_recv it always return NULL.
    Any suggestions?

    Regards Thomas

    • 03/11/2012 às 12:04

      It seems that the problem is related with the malloc library. In the RTOS port for LwIP it is necessary to implement dynamic queue. I implemented that using malloc and free functions, which are currently dependent of the GNU toolchain. If the dynamic queues are not working correctly, this can be the cause of the NULL pointer.

      Are you sure to be selected the correct libraries from GNU toolchain? It must be:

      C:\Program Files\GNU Tools ARM Embedded\4.6 2012q2\arm-none-eabi\lib\armv7e-m\fpu\” libs=”m”/

      “C:\Program Files\GNU Tools ARM Embedded\4.6 2012q2\lib\gcc\arm-none-eabi\4.6.2\armv7e-m\fpu\” libs=”gcc”

      If this is not the problem, we can try another approach. You can send me your IP config. In this way i can compile the code and send the bin file to you (you can burn this bin file through the ST link software). If that work, the only reason is a project problem.

      What do you think about it? This problem you are facing is a little odd, cause we are using the same hardware. For us, the code is running like a charm.

      Best regards,
      Gustavo

  5. 03/11/2012 às 16:17

    My build.xml file contains the following lines for the libraries:

    And that seems to be what it should be, right? But it still doesn’t work.
    Though now it doesn’t keep restarting, it just hangs in the Default_Handler.

    You could make a test binary for me at IP: 192.168.0.70 with gateway: 192.168.0.1.
    Thanks.

  6. 03/11/2012 às 17:11

    Thomas,

    I made the bin file available to you in the BRTOS google code:
    http://code.google.com/p/brtos/downloads/list

    I realized another possibility. Is there any chance of you having regenerated the “startup_stm32f4xx.c” or the “arm-gcc-link.ld” files? Cause i modified such files in order to enable a configurable heap size. If so, you can try to download the project again and check these files. The startup_stm32f4xx.c also defines the ethernet and systems interrupt handlers.

    Anyway, you can try the bin file.

    Regards,
    Gustavo

    • 04/11/2012 às 19:29

      Dear Gustavo.
      With your binary file the LED blinks as supposed to.
      But I can still not reach the webserver at 192.168.0.70.

      Regards Thomas

      • 04/11/2012 às 20:48

        Dear Thomas,

        I really don’t know what is happening. I´ve been gradually incrementing the code, so i never tried the http server without the GLCD. I will try the code in this monday, but i don´t beleive that there is any dependency. I think the only possibility is the clock of a gpio used for both tasks and being initialized in the GLCD task and not in the http task.

        If the code without the GLCD and USB tasks work for me, i really won´t know the reason for your problem.

        Regards,
        Gustavo

      • 05/11/2012 às 9:32

        Hi Thomas,

        I posted a new demo in the BRTOS google code. In this demo i integrated the GNU libraries into the project and already comment the GLCD and SD tasks. The demo was developed in the Coocox 1.5.1. I tested the code right now and it is working for us. Just download the code and write then to the STM32F4DISCOVERY. If it not work, you can debug it and send to us what you are facing.

        Ps 1.: Do not forget to disable de code optimizatin and the OS_Wait instruction in order to debug the code.

        PS 2.: The watchdog is working for us too.

        PS 3.: if it not work, try to see if the ethernet interrupt is happening.

        Regards,
        Gustavo

      • 05/11/2012 às 11:13

        Thomas, i don´t know if you saw that there is a new version of CoCoox IDE. I posted a new demo in the BRTOS google code that is compatible with this version. It was necessary because the new CoIDE modified the heap for the malloc/free functions.

  7. 05/11/2012 às 15:51

    Nope, none of them works.
    When I try debugging and tries to catch the “vProcessConnection( pxNewConnection );” function being executed, it never breaks.
    Can you please tell me how you have connected the DP83848 PHY to the STM32F4DISCOVERY?

    Regards Thomas

    • 05/11/2012 às 16:55

      Hi Thomas,

      We connected the DP83848 based on this board (RMII):
      https://sites.google.com/site/miguelmoreto/home-eng/projects/stm32f4-adapter-board

      I notice that you mention a jumper in the ethernet board:

      “On the PHY Breakout board we found there is a jumper for an on board 50MHz oscillator. This jumper should not be installed to work in this project.”

      Which jumper is that? Cause we are using RMII interface, so we are using the 50Mhz oscillator of the DP83848 board in order to clock MAC and PHY, as refered in the STM32F4 Reference Manual (pag. 820).

      When you debug the code, in which line the code stops? Try to execute line by line in order to find out where the problem is.

      • 06/11/2012 às 18:14

        Sorry, my bad. It was the reset jumper.
        I still can’t get it working.
        Anyways, I really don’t know what happened, as my project has been working too.

        Thanks a lot.

    • 07/11/2012 às 14:07

      As last resource, i recommend you to substitute the code in the ethernet_bsp.c file by the code of your project. If that do not work, i really don’t know what to do. Can you give me some feedback about that?

      Regards,
      Gustavo

  8. Willian Mainieri
    04/11/2013 às 4:38

    Hi Gustavo, I’ve been trying to Study your BRTOS but as I’ve never used a RTOS before and I’m also new to STM32 MCU’s family, I’m struggling to get it to work. I’m using the BRTOS_STM32F4x_CoIDE1.6.0 project, and I’d like to deploy a Socket echo server example and a socket echo client example (udp and tcp). Do you have anything that could help me making it? like a code, links, articles? I really enjoyed BRTOS for stm32f4 and and, despite I’m new on STM32 and RTOS, also want to do my best on helping you supporting and improving your system. My idea is, while studying, deploying new examples to make a more effective examples library for stm32. After sockets I also want to deploy a SPI between two STM32 example, and wireless RF module examples also. I’m Brazilian also, by the way.
    Thank you in advance. Nice week!

    • 05/11/2013 às 10:54

      Hi Willian.

      We are glad by your interest in the BRTOS project. I have more questions than answers to you by now.
      Have you tried the http server example (available in the BRTOS google code)? How did you connected the ethernet board to the STM32 kit? We are using an adapter board of a friend and co-worker. You can access the board here:
      https://sites.google.com/site/miguelmoreto/home-eng/projects/stm32f4-adapter-board2

      In order to get a echo server based on lwip you must substitute the http server task by a echo server task. I´ve never implemented such application, but there are a lot of examples on the internet, such as:

      http://www.ultimaserial.com/avr_lwip_tcp.html

      Clique para acessar o 77-43093.pdf

      http://comments.gmane.org/gmane.network.lwip.general/6010
      http://lwip.100.n7.nabble.com/LWIP-Simple-echo-server-td6822.html

      Please, feel comfortable writing in portuguese on the blog.

      Best regards,
      Gustavo

      • Willian Mainieri
        06/11/2013 às 2:13

        Olá Gustavo,
        Eu tentei, a versão BRTOS_STM32F4x_CoIDE1.6.0, depois de sofrer um pouco consegui.. Não sabia que tinha que setar um ip no ethernetif.h, eu estou usando só o STM32Discovery e o módulo DP83848 (o mal-contato dos fios também foi um problema que enfrentei no início). Enfim. funcionou, mas fiquei curioso. Você já tentou comentar a instalação da task Test_Task_1? Se comentar, a task 2 não executa (os leds GPIO_Pin_12 e GPIO_Pin_13 (que piscavam anteriormente) não piscam, só ficam acesos, mas a task vBasicWEBServer continua funcionando. Você poderia me explicar se isso é normal e porque isso acontece?

        Será que é facil implementar DHCP?
        havia testado o FreeRtos do http://blog.tkjelectronics.dk/2012/08/ethernet-on-stm32f4discovery-using-external-phy/comment-page-1/#comments
        você acha que conseguiria portar o codigo de dhcp desse exemplo acima para o seu BRTOS?
        Achei estranho que o FreeRTOS tem delay de 130ms e o seu é de <1ms. Fiquei curioso do por que..

        Agradeço muito pelos links que me enviou acima, vou dar uma estudada neles. Por acaso ontem achei esse também:
        http://www.aimagin.com/tgr/tgr12/amgf4connect/doc/HTML/stm32f4x7_eth_lwip_(example_amg_f4_connect).zip
        que é o oficial do lwip acho.. há exemplos de tcp e udp echo server e client.
        Antes de ver isso eu havia pensado que poderia talvez facilmente modificar o seu httpd.c e vBasicWEBServer para criar um tcp echo server example mas acho q nao seria tão simples assim correto?

        Quanto às tarefas, eu fiquei confuso de como usá-las
        basta eu criar uma nova nova task e colocar o código que eu colocaria no main dentro dela?
        eu preciso usar uma das linhas abaixo? quando?
        (void)OSSemPend(SemTeste,0);
        (void)OSSemPost(SemTeste);
        desculpe minha falta de conhecimento, ainda não aprendi a trabalhar com semáforos, teria alguma dica para facilitar a vida de um leigo como eu?

        Achei o seu BRTOS fantástico! Apesar de eu não ter mexido muito nele ele aparenta ser muito melhor que o FreeRTOS.

        Peço desculpas por tantas perguntas,

      • 06/11/2013 às 11:30

        Olá Willian, seguem as respostas:

        1. Sim, posso explicar pq os LEDs param de piscar. O código da tarefa 1 post um semáforo que acorda a tarefa 2 (é um teste de semáforo do BRTOS). Se não houver o post, a tarefa 2 nunca acorda, parando de piscar os LEDs.
        GPIO_Pin_12 e GPIO_Pin_13

        2. Acredito que o DHCP faz parte do próprio Lwip. Portanto, seria só habilitá-lo, como informado na documentação do Lwip:

        To enable DHCP, you must make sure to compile and link in DHCP. You can do this by defining the LWIP_DHCP option in lwipopts.h to 1, which also then adds a field to netif for a pointer to a dhcp struct. The dhcp struct will be allocated during dhcp_start(). In addition, LWIP_UDP must be non-zero, since DHCP is a protocol that runs on UDP.

        Acredito tb que deves mudar algumas coisas no código da tarefa http do demo (vBasicWEBServer do arquivo httpd.c):

        Original:
        /* Create and configure the FEC interface. */
        IP4_ADDR( &xIpAddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 );
        IP4_ADDR( &xNetMast, configNET_MASK0, configNET_MASK1, configNET_MASK2, configNET_MASK3 );
        IP4_ADDR( &xGateway, configGW_ADDR0, configGW_ADDR1, configGW_ADDR2, configGW_ADDR3 );
        netif_add( &ENET_if, &xIpAddr, &xNetMast, &xGateway, NULL, ethernetif_init, tcpip_input );

        /* make it the default interface */
        netif_set_default( &ENET_if );

        /* bring it up */
        netif_set_up( &ENET_if );

        Modificado:
        xIpAddr.addr = 0;
        xNetMask.addr = 0;
        xNetMask.addr = 0;

        /* add data to netif */
        netif_add( &ENET_if, &xIpAddr, &xNetMast, &xGateway, NULL, ethernetif_init, tcpip_input );

        /* make it the default interface */
        netif_set_default( &ENET_if );

        /* bring it up */
        dhcp_start( &ENET_if );

        Quanto ao FreeRTOS ser mais lento, não sei o motivo.

        3. As tarefas são funções que são executadas em “paralelo”, dependendo da prioridade.
        Quanto a usar semáforos e outros recursos do BRTOS, recomendo a leitura do manual, pois existem exemplos.

        Fico contente que tenha gostado do BRTOS. Qualquer dúvida é só perguntar.

        Abraço.

  9. Willian Mainieri
    21/11/2013 às 3:14

    Olá novamente Gustavo,
    Consegui fazer o DHCP funcionar com os passos que você me mandou, pensei em mudar o codigo de setup do httpd.c para um arquivo próprio implementando outros métodos do esqueleto netconf.c proposto no LwIP. Assim quando setar dhcp o led ficará piscando até conectar (executado pela func “void LwIP_Periodic_Handle(__IO uint32_t localtime)” ). Quando eu conseguir terminar eu lhe envio para compartilhar com a comunidade.

    Agora surgiu outra dúvida, eu planejo fazer aquela adapter board que você mencionou desse site: https://sites.google.com/site/miguelmoreto/home-eng/projects/stm32f4-adapter-board2
    mas queria ver se vocês estão usando o mesmo display que ele e se você conseguiu usar o touchscreen sem os problemas de calibração do touchscreen mencionados nesse link: http://www.element14.com/community/groups/development-tools/blog/2012/05/26/stm32f4-discovery-hy32d-tft-lcd

    Também queria lhe perguntar.. O BRTOS_STM32F4x_LwIP_USB_Virtual_Comm.rar deu os seguintes erros quando tentei compilar (após link com as libs corretas do gcc) (FPU Hard)
    tem alguma idéia do que pode estar acontecendo? (CoIDE 1.7.4 e gcc 4.7 2012q4)

    ..
    [cc] Starting link
    [cc] arm-none-eabi-gcc -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -Wall -g -nostartfiles -Wl,-Map=BRTOS_STM32F4x.map -O2 -Wl,–gc-sections -LC:\CooCox\CoIDE174\configuration\ProgramData\BRTOS_STM32F4x -Wl,-TC:\CooCox\CoIDE174\configuration\ProgramData\BRTOS_STM32F4x/arm-gcc-link.ld -g -o BRTOS_STM32F4x.elf ..\obj\stm32f4xx_syscfg.o ..\obj\usb_core.o ..\obj\mem.o ..\obj\stm32f4xx_sdio.o ..\obj\tcp.o ..\obj\stm32f4xx_cryp_aes.o ..\obj\stm32f4xx_hash.o ..\obj\usb_terminal_commands.o ..\obj\err.o ..\obj\usbd_usr.o ..\obj\stm32f4xx_hash_sha1.o ..\obj\mib_structs.o ..\obj\tcp_in.o ..\obj\stm32f4xx_usart.o ..\obj\stm32f4xx_pwr.o ..\obj\memp.o ..\obj\stm32f4xx_can.o ..\obj\stm32f4_discovery_sdio_sd.o ..\obj\autoip.o ..\obj\stm32f4xx_wwdg.o ..\obj\ip_frag.o ..\obj\msg_out.o ..\obj\netbuf.o ..\obj\stm32f4xx_hash_md5.o ..\obj\tcpip.o ..\obj\asn1_dec.o ..\obj\stm32f4xx_dac.o ..\obj\BRTOS.o ..\obj\diskio.o ..\obj\startup_stm32f4xx.o ..\obj\stm32f4_discovery.o ..\obj\stm32f4x7_eth.o ..\obj\stm32f4xx_crc.o ..\obj\stm32f4xx_iwdg.o ..\obj\sys.o ..\obj\ip_addr.o ..\obj\usb_terminal.o ..\obj\inet_chksum.o ..\obj\usbd_core.o ..\obj\main.o ..\obj\stm32f4xx_rcc.o ..\obj\utils.o ..\obj\mib2.o ..\obj\netdb.o ..\obj\init.o ..\obj\stm32f4xx_adc.o ..\obj\stm32f4x7_eth_bsp.o ..\obj\gdisp_fonts.o ..\obj\ethernetif.o ..\obj\stm32f4xx_dcmi.o ..\obj\etharp.o ..\obj\mbox.o ..\obj\touch_7846.o ..\obj\HAL.o ..\obj\tasks.o ..\obj\httpd.o ..\obj\usbd_desc.o ..\obj\stm32f4xx_cryp_des.o ..\obj\syscall.o ..\obj\stm32f4xx_cryp.o ..\obj\pbuf.o ..\obj\stats.o ..\obj\inet.o ..\obj\stm32f4xx_fsmc.o ..\obj\msg_in.o ..\obj\netif.o ..\obj\asn1_enc.o ..\obj\api_msg.o ..\obj\stm32f4xx_gpio.o ..\obj\stm32f4xx_flash.o ..\obj\usbd_cdc_vcp.o ..\obj\debug_stack.o ..\obj\sys_arch.o ..\obj\system_stm32f4xx.o ..\obj\syscalls.o ..\obj\stm32f4xx_dma.o ..\obj\semaphore.o ..\obj\ccsbcs.o ..\obj\usb_bsp.o ..\obj\usbd_req.o ..\obj\queue.o ..\obj\usb_dcd_int.o ..\obj\mutex.o ..\obj\OS_RTC.o ..\obj\sockets.o ..\obj\igmp.o ..\obj\gdisp_lld.o ..\obj\usbd_cdc_core.o ..\obj\ff.o ..\obj\udp.o ..\obj\ip.o ..\obj\gdisp.o ..\obj\stm32f4xx_spi.o ..\obj\stm32f4xx_i2c.o ..\obj\stm32f4xx_rng.o ..\obj\stm32f4xx_exti.o ..\obj\icmp.o ..\obj\dns.o ..\obj\netifapi.o ..\obj\misc.o ..\obj\usb_dcd.o ..\obj\api_lib.o ..\obj\dhcp.o ..\obj\stm32f4xx_rtc.o ..\obj\usbd_ioreq.o ..\obj\stm32f4xx_cryp_tdes.o ..\obj\stm32f4xx_tim.o ..\obj\tcp_out.o ..\obj\stm32f4xx_dbgmcu.o ..\obj\raw.o “-LC:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu” “-LC:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu” -lg “-LC:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\lib\gcc\arm-none-eabi\4.7.3\armv7e-m” -lm -lgcc
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-malloc.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-malloc.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-mallocr.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-mallocr.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-memcpy.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-memcpy.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-memset.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-memset.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-mlock.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-reent.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-mlock.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-reent.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-sbrkr.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-sbrkr.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-sprintf.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-sprintf.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-stpcpy.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-stpcpy.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-strcpy.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-strcpy.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-strlen.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-strlen.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-strncmp.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-strncmp.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-svfprintf.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-svfprintf.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-dtoa.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-dtoa.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-freer.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-freer.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-impure.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-impure.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-locale.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-locale.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-memchr.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-memchr.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-mprec.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-mprec.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-s_fpclassify.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-s_fpclassify.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-strcmp.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-strcmp.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-svfiprintf.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-svfiprintf.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-callocr.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-callocr.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-memmove.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-memmove.o)
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-reallocr.o) uses VFP register arguments, BRTOS_STM32F4x.elf does not
    [cc] c:/program files (x86)/gnu tools arm embedded/4.7 2012q4/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\arm-none-eabi\lib\armv7e-m\fpu\libg.a(lib_a-reallocr.o)
    [cc] ..\obj\startup_stm32f4xx.o: In function `heap_zero_loop’:
    [cc] startup_stm32f4xx.c:(.text.Default_Reset_Handler+0x98): undefined reference to `__cs3_heap_start’
    [cc] startup_stm32f4xx.c:(.text.Default_Reset_Handler+0x9c): undefined reference to `__cs3_heap_end’
    [cc] ..\obj\syscalls.o: In function `_sbrk’:
    [cc] ..\obj\syscalls.o:(.data+0x0): undefined reference to `__cs3_heap_start’
    [cc] D:\BACKUP\_programming\MICROCONTROLLERS\STM32\BRTOS\BRTOS_STM32F4x_LwIP_USB_Virtual_Comm\BRTOS_STM32F4x\syscalls/syscalls.c:34: undefined reference to `__cs3_heap_end
    [cc] ‘
    [cc] collect2.exe: error: ld returned 1 exit status

    BUILD FAILED
    Total time: 25 seconds

    • 21/11/2013 às 10:02

      Olá willian,

      Que bom que o DHCP funcionou. Quanto ao LCD, estamos sim utilizando o mesmo display e não tivemos problemas na calibração calibração.

      Já o erro de compilação pode estar relacionado a versão do CoIDE + GNU gcc. Essa versão foi compilada com uma versão antiga do CoIDE. Atualmente utilizamos GNU gcc 4.7 2013q1 e o CoIDE 1.7.4. Existiam algumas diferenças no gerenciamento de bibliotecas e alocação dinâmica de memória entre as versões. Somente não recomendo instalar o CoIDE 1.7.5, pois com essa ultima versão não consegui mais gravar os códigos no ST. Se não me engano, a diferença nas versões foi uma modificação no arquivo syscalls.c. Já experimentou tb fazer um “clean” no projeto? A diferença de versões das bibliotecas pré-compiladas pode estar causando alguma incompatibilidade.

      Me parece que a última versão do demo possui todas as bibliotecas e tarefas implementadas até o momento. Quanto mais nova a versão, mais recursos. Portanto, o demo “BRTOS_STM32F4x_GUI” deve ter todos os recursos desse demo que você está tentando compilar.

      Abraço,

    • 21/11/2013 às 10:26

      Willian,

      Não estou conseguindo acessar o youtube pq tem bloqueio aqui no meu trabalho, mas embora a imagem esteja ruim aqui da pra ver a resposta do touch:

      • Willian Ma
        23/11/2013 às 21:05

        Obrigado Gustavo, que ótimo saber que funciona ok.
        estou aqui mexendo um pouco no código para implementar o feedback de led piscando enquanto aquarda dhcp e comunicação tcp e udp e serial debug. Na medida do possível eu penso que também posso colaborar para melhorar o BRTOS, se você estiver interessado; é claro..

        uma das modificações que estou fazendo é portando o init de toda parte ethernet para uma função em um arquivo separado ou para o main e incluindo o netconf.c que está disponível no exemplo LwIP TCP/IP stack demonstration for STM32F4x7 microcontrollers e no STM32F4DISCOVERY_Ethernet_Phy, que coloca toda a parte de inicialização do LwIP que você possui no httpd.c no netconf.c.
        Como vou desenvolver os exemplos TCP UDP client e server, acho que fica mais bem organizado. Queria ver o que você acha das modificações que estou fazendo antes de terminá-las.

      • 25/11/2013 às 14:37

        Olá Willian,

        Acredito que toda melhoria na organização de código é bem vinda. Me parece que a sua abordagem deixará o código mais claro para quem for utilizá-lo. Quanto a colaborações no projeto BRTOS, claro que temos interesse. Normalmente sugestões para melhorias passam por mim e pelo meu colega e, caso seja definido que trarão benefícios, passam a fazer parte do código no SVN com os devidos créditos.

        Abraço.

  10. Rodrigo Bezerra
    11/08/2014 às 10:43

    Gustavo, bom dia.

    Surgiu uma questão aqui na empresa de empregar a stack SIP (VoIP) no SMT32.. Você ja usou e/ou implementou isso na lwIP e/ou BRTOS?

    Obrigado,
    Eng. Rodrigo Bezerra

  1. No trackbacks yet.

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair /  Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair /  Alterar )

Conectando a %s

%d blogueiros gostam disto: