mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-24 20:21:49 +00:00
Merge pull request #3792 from cesanta/unamalgamated
Make unamalgamated builds work on STM32
This commit is contained in:
12 files changed
+38
No files matched your search
+15
@@ -2953,6 +2953,7 @@ void mg_error(struct mg_connection *c, const char *fmt, ...) {
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef MG_OTA_PUBLIC_KEY
|
||||
|
||||
|
||||
@@ -9809,6 +9810,10 @@ void mg_multicast_restore(struct mg_connection *c, uint8_t *from) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if MG_ENABLE_TCPIP
|
||||
#define MG_EPHEMERAL_PORT_BASE 32768
|
||||
#define PDIFF(a, b) ((size_t) (((char *) (b)) - ((char *) (a))))
|
||||
@@ -14455,6 +14460,7 @@ struct mg_flash *mg_flash = &s_mg_flash_frdm;
|
||||
|
||||
|
||||
|
||||
|
||||
#if MG_OTA == MG_OTA_STM32F
|
||||
|
||||
static bool mg_stm32f_write(void *, const void *, size_t);
|
||||
@@ -14710,6 +14716,7 @@ struct mg_flash *mg_flash = &s_mg_flash_stm32f;
|
||||
|
||||
|
||||
|
||||
|
||||
#if MG_OTA == MG_OTA_STM32H5 || MG_OTA == MG_OTA_STM32C5
|
||||
|
||||
static bool mg_stm32h5_write(void *, const void *, size_t);
|
||||
@@ -14883,6 +14890,7 @@ struct mg_flash *mg_flash = &s_mg_flash_stm32h5;
|
||||
|
||||
|
||||
|
||||
|
||||
#if MG_OTA == MG_OTA_STM32H7 || MG_OTA == MG_OTA_STM32H7_DUAL_CORE
|
||||
|
||||
// - H723/735 RM 4.3.3: Note: The application can simultaneously request a read
|
||||
@@ -34256,6 +34264,8 @@ bool __attribute__((weak)) mg_wifi_ap_stop(void) {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
enum { // ID1 ID2
|
||||
MG_PHY_KSZ8x = 0x22, // 0022 156x - KSZ8081RNB, KSZ8091RNB
|
||||
MG_PHY_DP83x = 0x2000,
|
||||
@@ -36580,6 +36590,9 @@ bool mg_wifi_ap_stop(void) {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_STM32F) && \
|
||||
MG_ENABLE_DRIVER_STM32F
|
||||
struct stm32f_eth {
|
||||
@@ -36832,6 +36845,8 @@ struct mg_tcpip_driver mg_tcpip_driver_stm32f = {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#if MG_ENABLE_TCPIP && (MG_ENABLE_DRIVER_STM32H || MG_ENABLE_DRIVER_MCXN || \
|
||||
MG_ENABLE_DRIVER_STM32N)
|
||||
// STM32C: vendor modded single-queue Synopsys v5.4, same settings as STM32H
|
||||
|
||||
@@ -4846,6 +4846,8 @@ void mg_tcpip_qwrite(void *buf, size_t len, struct mg_tcpip_if *ifp);
|
||||
// broadcast, or a non-NULL hint to set the target MAC field in the request.
|
||||
void mg_tcpip_arp_request(struct mg_tcpip_if *ifp, uint32_t ip, uint8_t *mac);
|
||||
|
||||
extern uint8_t mcast_addr[6]; // Multicast MAC address programmed by drivers
|
||||
|
||||
// Built-in hardware drivers. Assign one to mg_tcpip_if.driver before calling
|
||||
// mg_tcpip_init(). See the matching driver header for configuration and
|
||||
// initialisation helpers.
|
||||
@@ -6067,6 +6069,8 @@ extern struct mg_tcpip_driver mg_tcpip_driver_stm32f;
|
||||
#endif
|
||||
#if MG_ENABLE_DRIVER_STM32H || MG_ENABLE_DRIVER_MCXN || MG_ENABLE_DRIVER_STM32N
|
||||
|
||||
|
||||
|
||||
struct mg_tcpip_driver_stm32h_data {
|
||||
// MDC clock divider. MDC clock is derived from HCLK, must not exceed 2.5MHz
|
||||
// HCLK range DIVIDER mdc_cr VALUE
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#include "phy.h"
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
|
||||
enum { // ID1 ID2
|
||||
MG_PHY_KSZ8x = 0x22, // 0022 156x - KSZ8081RNB, KSZ8091RNB
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#include "net_builtin.h"
|
||||
#include "log.h"
|
||||
#include "phy.h"
|
||||
#include "util.h"
|
||||
|
||||
#if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_STM32F) && \
|
||||
MG_ENABLE_DRIVER_STM32F
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#include "net_builtin.h"
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
|
||||
#if MG_ENABLE_TCPIP && (MG_ENABLE_DRIVER_STM32H || MG_ENABLE_DRIVER_MCXN || \
|
||||
MG_ENABLE_DRIVER_STM32N)
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#endif
|
||||
#if MG_ENABLE_DRIVER_STM32H || MG_ENABLE_DRIVER_MCXN || MG_ENABLE_DRIVER_STM32N
|
||||
|
||||
#include "phy.h"
|
||||
|
||||
struct mg_tcpip_driver_stm32h_data {
|
||||
// MDC clock divider. MDC clock is derived from HCLK, must not exceed 2.5MHz
|
||||
// HCLK range DIVIDER mdc_cr VALUE
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "flash.h"
|
||||
#include "log.h"
|
||||
#include "ota.h"
|
||||
#include "util.h"
|
||||
#ifdef MG_OTA_PUBLIC_KEY
|
||||
#include "sha256.h"
|
||||
#include "tls_p256.h"
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#include "net_builtin.h"
|
||||
#include "bsd.h"
|
||||
#include "mdash.h"
|
||||
#include "ota.h"
|
||||
#include "printf.h"
|
||||
#include "profile.h"
|
||||
#include "tls.h"
|
||||
|
||||
#if MG_ENABLE_TCPIP
|
||||
#define MG_EPHEMERAL_PORT_BASE 32768
|
||||
|
||||
@@ -132,6 +132,8 @@ void mg_tcpip_qwrite(void *buf, size_t len, struct mg_tcpip_if *ifp);
|
||||
// broadcast, or a non-NULL hint to set the target MAC field in the request.
|
||||
void mg_tcpip_arp_request(struct mg_tcpip_if *ifp, uint32_t ip, uint8_t *mac);
|
||||
|
||||
extern uint8_t mcast_addr[6]; // Multicast MAC address programmed by drivers
|
||||
|
||||
// Built-in hardware drivers. Assign one to mg_tcpip_if.driver before calling
|
||||
// mg_tcpip_init(). See the matching driver header for configuration and
|
||||
// initialisation helpers.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "flash.h"
|
||||
#include "log.h"
|
||||
#include "ota.h"
|
||||
#include "util.h"
|
||||
|
||||
#if MG_OTA == MG_OTA_STM32F
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "flash.h"
|
||||
#include "log.h"
|
||||
#include "ota.h"
|
||||
#include "util.h"
|
||||
|
||||
#if MG_OTA == MG_OTA_STM32H5 || MG_OTA == MG_OTA_STM32C5
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "flash.h"
|
||||
#include "log.h"
|
||||
#include "ota.h"
|
||||
#include "util.h"
|
||||
|
||||
#if MG_OTA == MG_OTA_STM32H7 || MG_OTA == MG_OTA_STM32H7_DUAL_CORE
|
||||
|
||||
|
||||
Reference in new issue
Block a user