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

Error compiling for ESP8266 #1

Open
fbalestrini opened this issue Jan 27, 2023 · 7 comments
Open

Error compiling for ESP8266 #1

fbalestrini opened this issue Jan 27, 2023 · 7 comments

Comments

@fbalestrini
Copy link

I would use the library on ESP8266 boards but there are some errors compiling the source code of my demo project.

This is the most significant piece of my mos.yml:

config_schema:
  - ["modbus.enable", true]
conds:
  - when: mos.platform == "esp8266"
    apply:
      config_schema:
        - ["modbus.uart_no", 0]
        - ["modbus.tx_en_enable", false]
        - ["modbus.uart_tx_pin", 1]
        - ["modbus.uart_rx_pin", 3]
        - ["debug.stdout_uart", 1]
        - ["debug.stderr_uart", 1]
libs:
  - origin: https://github.com/mongoose-os-libs/modbus

These are some of the compile errors:

deps/modbus/src/mgos_modbus.c:498:17: error: 'struct mgos_uart_dev_config' has no member named 'rx_gpio'
deps/modbus/src/mgos_modbus.c:501:17: error: 'struct mgos_uart_dev_config' has no member named 'tx_gpio'
deps/modbus/src/mgos_modbus.c:518:42: error: 'struct mgos_uart_dev_config' has no member named 'tx_gpio'
deps/modbus/src/mgos_modbus.c:517:56: error: 'struct mgos_uart_dev_config' has no member named 'rx_gpio'
deps/modbus/src/mgos_modbus.c:512:13: error: 'struct mgos_uart_dev_config' has no member named 'hd'
...

Looking forward for your support.
Many thanks in advance.

@fbalestrini fbalestrini changed the title Error compilig for ESP8266 Error compiling for ESP8266 Jan 27, 2023
@fbalestrini
Copy link
Author

@pimvanpelt in order to let this library working on ESP8266, I developed a SOFTUART library for Mongoose OS. I would like to get your directions on how to publish my library to mongoose-os-libs organization.

@pimvanpelt
Copy link
Collaborator

I would socialize your library with the maintainers of Mongoose OS - @cpq can help navigate. I did a lot of work for Mongoose OS over the years, but more recently have been more of a user :)

@fbalestrini
Copy link
Author

I thank you for your feedback. I met @cpq on Skype years go while my company (ABB SpA) was exploring Mongoose OS. I really hope he can help me.

@cpq
Copy link

cpq commented Apr 19, 2023

@fbalestrini thank you!
Created https://github.com/mongoose-os-libs/soft-uart/ and invited you there as a maintainer.

@fbalestrini
Copy link
Author

@cpq many thanks.
The https://github.com/mongoose-os-libs/soft-uart/ library is now ready to use (on ESP8266 at least)

@fbalestrini
Copy link
Author

Dear @rojer
I cloned your modbus library for integrating the use of the soft-uart library. This makes your library usable on ESP8266 as well.

In addition, I did some optimizations to the source code and I applied the standard naming convention for public function names.

I would like to have your support for testing my changes on ESP32 and merging them into your official library with your blessing. This will fix this compile time issue as well.

Looking forward for your reply.

@fbalestrini
Copy link
Author

Hi @cpq,
I did finalize the soft-uart library. Now I would integrate it into the modbus library in order to make it compatible with ESP8266 as well.

Is there any chance to share and discuss these changes with you or with @rojer before creating the pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants