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

Improving and fixing typos for STM32CUBE build #391

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion IDE/STM32CUBE/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The wolfMQTT Cube Pack can be found [here](https://www.wolfssl.com/files/ide/I-C

4. In the `Software Packs` configuration category of the `.ioc` file, click on the wolfMQTT pack and enable the library by checking the box.

5. The Pack defaults to using custom IO provided by the user. Modify `IDE/STM32CUBE/userio_template.h` to supply the custom IO. If you'd like to use LwIP instead, configure the wolfMQTT IO settings in the `.ioc` to enable LwIP compatibilty. You'll also have to enable LwIP in the `Middleware` configuration category of the project.
5. The Pack defaults to using custom IO provided by the user. Modify `IDE/STM32CUBE/userio_template.h` to supply the custom IO. If you'd like to use LwIP instead, configure the wolfMQTT IO settings in the `.ioc` to enable LwIP compatibilty. You'll also have to enable LwIP in the `Middleware` configuration category of the project. Make sure that `LWIP_DNS (DNS Module)` is enabled in the LwIP general settings.

6. Save your changes and select yes to the prompt asking about generating code.

Expand Down
6 changes: 5 additions & 1 deletion IDE/STM32CUBE/default_conf.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ extern ${variable.value} ${variable.name};
/* ------------------------------------------------------------------------- */
/* wolfMQTT IO */
/* ------------------------------------------------------------------------- */
#if defined(WOLFMQTT_CONF_IO) && WOLFSSH_MQTT_IO == 2
#if defined(WOLFMQTT_CONF_IO) && WOLFMQTT_CONF_IO == 2
#define WOLFSSL_LWIP
#else
#define WOLFMQTT_USER_IO
Expand All @@ -127,6 +127,10 @@ typedef unsigned int size_t;

#define NO_MAIN_DRIVER

#ifdef WOLFSSL_LWIP
#define HAVE_SOCKET
#endif

#ifdef __cplusplus
}
#endif
Expand Down
6 changes: 4 additions & 2 deletions examples/mqttsimple/mqttsimple.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@
#endif

#include "wolfmqtt/mqtt_client.h"
#include "examples/mqttport.h"
#include "mqttsimple.h"

/* Requires BSD Style Socket */
#ifdef HAVE_SOCKET

#ifndef ENABLE_MQTT_TLS
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#ifndef WOLFSSL_LWIP
#include <netinet/in.h>
#endif
#include <netdb.h>
#include <unistd.h>
#endif
Expand Down
Loading