Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pico rp2040 ethernet branch build failure (tcpecho_raw.h not found) #62

Open
trinityworld opened this issue Nov 29, 2022 · 18 comments
Open
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@trinityworld
Copy link

i am trying to Ethernet( ENC28J60 ) configuration with pico rp2040 as per main...kripton:ethernet) but get error..

Screenshot from 2022-11-29 16-06-32

Screenshot from 2022-11-29 16-09-51

@kripton
Copy link
Member

kripton commented Nov 29, 2022

Thanks for the report. In my repo, I can see that file located at lib/lwip/contrib/apps/tcpecho_raw/tcpecho_raw.h. Can you confirm this in your local copy?
If not, can you please cd into the directory lib/lwip, run git describe and show us its output? For me it is showing STABLE-2_1_0_RELEASE-522-g88ce4385

@kripton
Copy link
Member

kripton commented Nov 29, 2022

Besides, do you have any specific reason to use the ENC28J60? I'm currently re-designing the PCBs and I would switch to the WZ5500 chip since there are modules available which are cheaper and easier to integrate. If there are no objections or things that the ENC28J60 can do better.

@kripton kripton changed the title pico rp2040 and Ethernet hardware configuration pico rp2040 ethernet branch build failure (tcpecho_raw.h not found) Nov 29, 2022
@kripton kripton self-assigned this Nov 29, 2022
@kripton kripton added bug Something isn't working enhancement New feature or request labels Nov 29, 2022
@trinityworld
Copy link
Author

Besides, do you have any specific reason to use the ENC28J60? I'm currently re-designing the PCBs and I would switch to the WZ5500 chip since there are modules available which are cheaper and easier to integrate. If there are no objections or things that the ENC28J60 can do better.

  • No reason , just want to drive with Ethernet & this repository already working on it
  • W5500 > yes, i also recommend this module (they have internal ip stack )
  • If you have any documents with w5500(schematic,workflow,firmware) i will work on that & add pull request
  • should i try this board (as 6 to 21 Gpio is used for 16 parallel output) for SPI need bitbang or some other trick

image

- if not > what will pin connection with Ethernet module (0 to 5 Gpio)

@trinityworld
Copy link
Author

Screenshot from 2022-11-30 11-56-23

i remove this line " #include "tcpecho_raw.h" from "lwip_integration.c" file as per above mention repository then my previous error solved.
Screenshot from 2022-11-30 12-09-05

but here,
lwip/../../http/fs.c

library error occurred.

Screenshot from 2022-11-30 12-09-05

@trinityworld
Copy link
Author

why not add this ->> "lwip_integration.c" file in add_executable list CMakeLists.txt ?..

Screenshot from 2022-11-30 18-33-21

@kripton
Copy link
Member

kripton commented Nov 30, 2022

* No reason , just want to drive with Ethernet & this repository already working on it

Well, yes. The ethernet branch is really work-in-progress, it's nothing production-ready. Also the Pico got stuck whan a lot of traffic was created (Denial-of-service :()

* W5500 > yes, i also recommend this module (they have internal ip stack )

I know that they have an internal stack but I don't plan to use it. I'd rather keep the software generic to not depend on a specific chip model

* If you have any documents with w5500(schematic,workflow,firmware) i will work on that & add pull request

The W5500 (the WIZ850io module to be exact) is added in this branch: https://github.com/kripton/rp2040-dmxsun/tree/kicadUpdates. The baseboard_4slots has a socket for the module and the IRQ line is shared with the nRF24 module. For the new baseboard_2lots, there is a jumper and configurable IRQ pins since less are used for the DMX output. PDFs of schematic and board are available via the actions: https://github.com/kripton/rp2040-dmxsun/actions/runs/3578552144

* should i try this board (as 6 to 21 Gpio is used for 16 parallel output) for SPI need bitbang or some other trick

Yes, 6 to 21 are used for DMX output. However, SPI is used to communicate with the nRF24 and I shared this SPI with the WIZ850io. Thus, only one additional CHIP-SELECT pin is required (and the former debug trigger PIN is used as shared IRQ).

- if not > what will pin connection with Ethernet module (0 to 5 Gpio)

Yes, I've seen that module. Unfortunately, the pinout seems to be incompatible with what I've chosen for the dmxsun

@kripton
Copy link
Member

kripton commented Nov 30, 2022

i remove this line " #include "tcpecho_raw.h" from "lwip_integration.c" file as per above mention repository then my previous error solved
but here, lwip/../../http/fs.c

library error occurred.

It all looks to me like the lwip submodule doesn't match what the other files are expecting. Please see my request from above to show us the output of git describe in the lib/lwip directory. You can also try running git submodule update after you checked out the ethernet branch. This should bring the lwip submodule to the correct revision.
In the meantime, I will try with a fresh clone in a clean environment.

@kripton
Copy link
Member

kripton commented Nov 30, 2022

why not add this ->> "lwip_integration.c" file in add_executable list CMakeLists.txt ?..

Because usually, one links in / references the CMakeLists file from all libraries and the libraries should add the files to be compiled by themselves.

I've just tried compiling this from scratch. On my RPi4 it fails, but with another error and the reason is that gcc 8.3 is the latest version available and that doesn't support C++20, which is required for src/webserver.cpp. On my development machine, the ethernet branch still compiles fine and creates the .uf2-file.

@trinityworld
Copy link
Author

i remove this line " #include "tcpecho_raw.h" from "lwip_integration.c" file as per above mention repository then my previous error solved
but here, lwip/../../http/fs.c
library error occurred.

It all looks to me like the lwip submodule doesn't match what the other files are expecting. Please see my request from above to show us the output of git describe in the lib/lwip directory. You can also try running git submodule update after you checked out the ethernet branch. This should bring the lwip submodule to the correct revision. In the meantime, I will try with a fresh clone in a clean environment.

Screenshot from 2022-12-01 16-13-51

@trinityworld
Copy link
Author

can you please check where is my mistake for assign spi and INT_PIN PIN..

1>lib/pico-enc28j60/enc28j60_lwip_glue.c

enc28j60_lwip_glue

2> lib/pico-enc28j60/enc28j60_lwip_glue.h
enc28j60_lwip_glue_h

3>src/lwip_integration.c

lwip_integration

4>src/pin.h

pin_h

5>src/main.c

main
main_

@trinityworld
Copy link
Author

here, i get .uf2 file but ..

image

when i ping this static IP address.

enc28j60_lwip_glue_c

"Destination Host Unreachable" error generate

error

@trinityworld
Copy link
Author

pico RP2040 Ethernet branch build successfully..

@kripton
Copy link
Member

kripton commented Dec 19, 2022

Oh nice, tbis is good to hear. Do you mind sharing some insights whaf fixed it for you?

@kripton
Copy link
Member

kripton commented Dec 28, 2022

@trinityworld do you want to tell us what was wrong or how you fixed it? Otherwise I would close this issue.

@trinityworld
Copy link
Author

GPIO 27 use for ENC-INT pin then problem solved..

now i am build project only get 16 parallel output.

https://github.com/trinityworld/pico_dmx/blob/b34064bc0b26339a80139178447e03a13bfb78d1/src/main.c#L102

trying to fill wavetable buffer from 16 universe data (buffer)and after than buffer transfer to 16 gpio as parallel.but here :( not get dmx output.

@kripton
Copy link
Member

kripton commented Jan 6, 2023

Okay, I never used the ENC's INT pin on the dmxsun

And I'm getting a HTTP 404 when I try to access your link

@kripton
Copy link
Member

kripton commented Jan 5, 2024

@trinityworld : I'd propose to close this issue since it's mainly about the ENC28J60 which will not be used for the dmxsun. I will rather go with the W5500. If you want to keep the support in your fork and it doesn't conflict with other parts, I will gladly accept a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants