Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: Ethernet lwip Boards.txt hack? where is it documented?

  1. #1
    Senior Member
    Join Date
    Mar 2016
    Posts
    198

    Ethernet lwip Boards.txt hack? where is it documented?

    I overwrote my boards.txt file and lost the "hack". For the life of me, I can't find the readme that describes what to do. Could some kind soul point me in the right direction?

  2. #2
    Senior Member
    Join Date
    Mar 2016
    Posts
    198
    Hmmm, is it supposed to be in the readme.txt here - https://github.com/PaulStoffregen/te...aster/t41ether

    There is a note that says "adjust include paths for Arduino" for the README.TXT but nothing in the readme. There is this in the readme:
    but the link gives me a permission error.

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,196
    Is it this:

    Added this for this machine to boards.txt: teensy41.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib -IT:\tCode\libraries\lwip\src\include
    replace "tCode" with personal sketchbook folder name and the drive letter instead of "T:"

  4. #4
    Senior Member
    Join Date
    Mar 2016
    Posts
    198
    Thank you.

    I'm trying to build lwip_websrv the T4.1 under TD 1.53. I built it successfully under an earlier TD version (1.51, iirc) but am getting this error:
    lwip_websrv:191: error: cannot convert 'uint8_t* {aka unsigned char*}' to 'ip_addr_t* {aka ip4_addr*}' for argument '2' to 'void enet_init(ip_addr_t*, ip_addr_t*, ip_addr_t*)'
    enet_init(PHY_ADDR, mac, &ip, &mask, &gateway);
    ^
    Using library lwip at version 2.0.2 in folder: D:\Documents\Arduino\libraries\lwip
    cannot convert 'uint8_t* {aka unsigned char*}' to 'ip_addr_t* {aka ip4_addr*}' for argument '2' to 'void enet_init(ip_addr_t*, ip_addr_t*, ip_addr_t*)'
    I thought it was the hack problem but I edited boards.txt with the change and still get the error. maybe it's something else? It looks like there are the wrong number of arguments to enet_init based on lwip_t41.h.

    My sketch folder is d:\Documents\Arduino.
    Boards.txt entry is now
    teensy41.build.flags.common=-g -Wall -ffunction-sections -fdata-sections -nostdlib -ID:\Documents\Arduino\libraries\lwip\src\include
    I can see the arduino IDE using the that in the command line and can open files in the lwip directory via that path so it's a correct path.

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,196
    seems the file locations were migrated ... maybe something else.

  6. #6
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,574
    ddrown refactored the lwip include files so boards.txt no longer needs to be modified. As you noted, he also changed (cleaned up) enet_init()
    visit https://github.com/ddrown/teensy41_ethernet and see examples/ also see https://forum.pjrc.com/threads/61581...4-1-NTP-server

    you might also like the Arduino Ethernet API for the T4.1 native ethernet, https://forum.pjrc.com/threads/60857...hernet-Library
    Last edited by manitou; 07-11-2020 at 11:11 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •