Skip to content

Commit

Permalink
stm32 -> stm32f
Browse files Browse the repository at this point in the history
  • Loading branch information
scaprile committed Dec 15, 2023
1 parent cd021da commit 450d4ac
Show file tree
Hide file tree
Showing 41 changed files with 564 additions and 502 deletions.
6 changes: 4 additions & 2 deletions examples/stm32/nucleo-f429zi-cube-baremetal-builtin/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.1904375652" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.156494483" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32=1"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32F
=1"/>
<listOptionValue builtIn="false" value="HTTP_URL=&quot;http://0.0.0.0/&quot;"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32F429xx"/>
Expand Down Expand Up @@ -199,7 +200,8 @@
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.656058677" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1004731843" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32=1"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32F
=1"/>
<listOptionValue builtIn="false" value="HTTP_URL=&quot;http://0.0.0.0/&quot;"/>
<listOptionValue builtIn="false" value="UART_DEBUG=USART1"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,15 @@ int main(void)
mg_log_set(MG_LL_DEBUG); // Set log level

// Initialise Mongoose network stack
struct mg_tcpip_driver_stm32_data driver_data = {.mdc_cr = 4};
struct mg_tcpip_driver_stm32f_data
driver_data = {.mdc_cr = 4};
struct mg_tcpip_if mif = {.mac = GENERATE_LOCALLY_ADMINISTERED_MAC(),
// Uncomment below for static configuration:
// .ip = mg_htonl(MG_U32(192, 168, 0, 223)),
// .mask = mg_htonl(MG_U32(255, 255, 255, 0)),
// .gw = mg_htonl(MG_U32(192, 168, 0, 1)),
.driver = &mg_tcpip_driver_stm32,
.driver = &mg_tcpip_driver_stm32f,

.driver_data = &driver_data};
mg_tcpip_init(&mgr, &mif);
mg_timer_add(&mgr, BLINK_PERIOD_MS, MG_TIMER_REPEAT, timer_fn, &mif);
Expand Down
6 changes: 4 additions & 2 deletions examples/stm32/nucleo-f429zi-cube-freertos-builtin/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.1904375652" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.156494483" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32=1"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32F
=1"/>
<listOptionValue builtIn="false" value="HTTP_URL=&quot;http://0.0.0.0/&quot;"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32F429xx"/>
Expand Down Expand Up @@ -207,7 +208,8 @@
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.656058677" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1004731843" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32=1"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32F
=1"/>
<listOptionValue builtIn="false" value="HTTP_URL=&quot;http://0.0.0.0/&quot;"/>
<listOptionValue builtIn="false" value="UART_DEBUG=USART1"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,13 +461,15 @@ void server(void *argument)
mg_log_set(MG_LL_DEBUG); // Set log level

// Initialise Mongoose network stack
struct mg_tcpip_driver_stm32_data driver_data = {.mdc_cr = 4};
struct mg_tcpip_driver_stm32f_data
driver_data = {.mdc_cr = 4};
struct mg_tcpip_if mif = {.mac = GENERATE_LOCALLY_ADMINISTERED_MAC(),
// Uncomment below for static configuration:
// .ip = mg_htonl(MG_U32(192, 168, 0, 223)),
// .mask = mg_htonl(MG_U32(255, 255, 255, 0)),
// .gw = mg_htonl(MG_U32(192, 168, 0, 1)),
.driver = &mg_tcpip_driver_stm32,
.driver = &mg_tcpip_driver_stm32f,

.driver_data = &driver_data};
mg_tcpip_init(&mgr, &mif);
mg_timer_add(&mgr, BLINK_PERIOD_MS, MG_TIMER_REPEAT, timer_fn, &mif);
Expand Down
6 changes: 4 additions & 2 deletions examples/stm32/nucleo-f429zi-cube-freertos-lwip/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.156494483" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="MEMP_NUM_NETCONN=10"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32=1"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32F
=1"/>
<listOptionValue builtIn="false" value="HTTP_URL=&quot;http://0.0.0.0/&quot;"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32F429xx"/>
Expand Down Expand Up @@ -245,7 +246,8 @@
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1004731843" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="MEMP_NUM_NETCONN=10"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32=1"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32F
=1"/>
<listOptionValue builtIn="false" value="HTTP_URL=&quot;http://0.0.0.0/&quot;"/>
<listOptionValue builtIn="false" value="UART_DEBUG=USART1"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
Expand Down
6 changes: 4 additions & 2 deletions examples/stm32/nucleo-f429zi-keil-baremetal/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@ int main(void) {
mg_log_set(MG_LL_DEBUG); // Set log level

// Initialise Mongoose network stack
struct mg_tcpip_driver_stm32_data driver_data = {.mdc_cr = 4};
struct mg_tcpip_driver_stm32f_data
driver_data = {.mdc_cr = 4};
struct mg_tcpip_if mif = {.mac = GENERATE_LOCALLY_ADMINISTERED_MAC(),
// Uncomment below for static configuration:
// .ip = mg_htonl(MG_U32(192, 168, 0, 223)),
// .mask = mg_htonl(MG_U32(255, 255, 255, 0)),
// .gw = mg_htonl(MG_U32(192, 168, 0, 1)),
.driver = &mg_tcpip_driver_stm32,
.driver = &mg_tcpip_driver_stm32f,

.driver_data = &driver_data};
mg_tcpip_init(&mgr, &mif);
mg_timer_add(&mgr, BLINK_PERIOD_MS, MG_TIMER_REPEAT, timer_fn, &mif);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,5 @@


// Add your customization below this comment
#define MG_ENABLE_DRIVER_STM32 1
#define MG_ENABLE_DRIVER_STM32F
1
6 changes: 4 additions & 2 deletions examples/stm32/nucleo-f429zi-keil-freertos/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ static void server(void *args) {
mg_log_set(MG_LL_DEBUG); // Set log level

// Initialise Mongoose network stack
struct mg_tcpip_driver_stm32_data driver_data = {.mdc_cr = 4};
struct mg_tcpip_driver_stm32f_data
driver_data = {.mdc_cr = 4};
struct mg_tcpip_if mif = {.mac = GENERATE_LOCALLY_ADMINISTERED_MAC(),
// Uncomment below for static configuration:
// .ip = mg_htonl(MG_U32(192, 168, 0, 223)),
// .mask = mg_htonl(MG_U32(255, 255, 255, 0)),
// .gw = mg_htonl(MG_U32(192, 168, 0, 1)),
.driver = &mg_tcpip_driver_stm32,
.driver = &mg_tcpip_driver_stm32f,

.driver_data = &driver_data};
mg_tcpip_init(&mgr, &mif);
mg_timer_add(&mgr, BLINK_PERIOD_MS, MG_TIMER_REPEAT, timer_fn, &mif);
Expand Down
3 changes: 2 additions & 1 deletion examples/stm32/nucleo-f429zi-keil-freertos/mongoose_custom.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,5 @@


// Add your customization below this comment
#define MG_ENABLE_DRIVER_STM32 1
#define MG_ENABLE_DRIVER_STM32F
1
6 changes: 4 additions & 2 deletions examples/stm32/nucleo-f429zi-make-baremetal-builtin/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@ int main(void) {
mg_log_set(MG_LL_DEBUG); // Set log level

// Initialise Mongoose network stack
struct mg_tcpip_driver_stm32_data driver_data = {.mdc_cr = 4};
struct mg_tcpip_driver_stm32f_data
driver_data = {.mdc_cr = 4};
struct mg_tcpip_if mif = {.mac = GENERATE_LOCALLY_ADMINISTERED_MAC(),
// Uncomment below for static configuration:
// .ip = mg_htonl(MG_U32(192, 168, 0, 223)),
// .mask = mg_htonl(MG_U32(255, 255, 255, 0)),
// .gw = mg_htonl(MG_U32(192, 168, 0, 1)),
.driver = &mg_tcpip_driver_stm32,
.driver = &mg_tcpip_driver_stm32f,

.driver_data = &driver_data};
mg_tcpip_init(&mgr, &mif);
mg_timer_add(&mgr, BLINK_PERIOD_MS, MG_TIMER_REPEAT, timer_fn, &mif);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
#define MG_ENABLE_CUSTOM_MILLIS 1
#define MG_ENABLE_CUSTOM_RANDOM 1
#define MG_ENABLE_PACKED_FS 1
#define MG_ENABLE_DRIVER_STM32 1
#define MG_ENABLE_DRIVER_STM32F
1
#define MG_ENABLE_LINES 1
6 changes: 4 additions & 2 deletions examples/stm32/nucleo-f429zi-make-freertos-builtin/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ static void server(void *args) {

// Initialise Mongoose network stack
ethernet_init();
struct mg_tcpip_driver_stm32_data driver_data = {.mdc_cr = 4};
struct mg_tcpip_driver_stm32f_data
driver_data = {.mdc_cr = 4};
struct mg_tcpip_if mif = {.mac = GENERATE_LOCALLY_ADMINISTERED_MAC(),
// Uncomment below for static configuration:
// .ip = mg_htonl(MG_U32(192, 168, 0, 223)),
// .mask = mg_htonl(MG_U32(255, 255, 255, 0)),
// .gw = mg_htonl(MG_U32(192, 168, 0, 1)),
.driver = &mg_tcpip_driver_stm32,
.driver = &mg_tcpip_driver_stm32f,

.driver_data = &driver_data};
mg_tcpip_init(&mgr, &mif);
mg_timer_add(&mgr, BLINK_PERIOD_MS, MG_TIMER_REPEAT, timer_fn, &mif);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
#define MG_ARCH MG_ARCH_FREERTOS

#define MG_ENABLE_TCPIP 1
#define MG_ENABLE_DRIVER_STM32 1
#define MG_ENABLE_DRIVER_STM32F
1
#define MG_IO_SIZE 256
#define MG_ENABLE_CUSTOM_RANDOM 1
#define MG_ENABLE_PACKED_FS 1
Expand Down
6 changes: 4 additions & 2 deletions examples/stm32/nucleo-f746zg-cube-baremetal-builtin/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.656778761" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1784614787" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32=1"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32F
=1"/>
<listOptionValue builtIn="false" value="HTTP_URL=&quot;http://0.0.0.0/&quot;"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32F746xx"/>
Expand Down Expand Up @@ -200,7 +201,8 @@
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.1892970613" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.850191092" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32=1"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32F
=1"/>
<listOptionValue builtIn="false" value="UART_DEBUG=USART1"/>
<listOptionValue builtIn="false" value="HTTP_URL=&quot;http://0.0.0.0/&quot;"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,15 @@ int main(void)
mg_log_set(MG_LL_DEBUG); // Set log level

// Initialise Mongoose network stack
struct mg_tcpip_driver_stm32_data driver_data = {.mdc_cr = 4};
struct mg_tcpip_driver_stm32f_data
driver_data = {.mdc_cr = 4};
struct mg_tcpip_if mif = {.mac = GENERATE_LOCALLY_ADMINISTERED_MAC(),
// Uncomment below for static configuration:
// .ip = mg_htonl(MG_U32(192, 168, 0, 223)),
// .mask = mg_htonl(MG_U32(255, 255, 255, 0)),
// .gw = mg_htonl(MG_U32(192, 168, 0, 1)),
.driver = &mg_tcpip_driver_stm32,
.driver = &mg_tcpip_driver_stm32f,

.driver_data = &driver_data};
mg_tcpip_init(&mgr, &mif);
mg_timer_add(&mgr, BLINK_PERIOD_MS, MG_TIMER_REPEAT, timer_fn, &mif);
Expand Down
6 changes: 4 additions & 2 deletions examples/stm32/nucleo-f746zg-cube-freertos-builtin/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.656778761" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1784614787" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32=1"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32F
=1"/>
<listOptionValue builtIn="false" value="HTTP_URL=&quot;http://0.0.0.0/&quot;"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
<listOptionValue builtIn="false" value="STM32F746xx"/>
Expand Down Expand Up @@ -208,7 +209,8 @@
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.546105713" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.508373843" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="DEBUG"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32=1"/>
<listOptionValue builtIn="false" value="MG_ENABLE_DRIVER_STM32F
=1"/>
<listOptionValue builtIn="false" value="UART_DEBUG=USART1"/>
<listOptionValue builtIn="false" value="HTTP_URL=&quot;http://0.0.0.0/&quot;"/>
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,15 @@ void server(void *argument)
mg_log_set(MG_LL_DEBUG); // Set log level

// Initialise Mongoose network stack
struct mg_tcpip_driver_stm32_data driver_data = {.mdc_cr = 4};
struct mg_tcpip_driver_stm32f_data
driver_data = {.mdc_cr = 4};
struct mg_tcpip_if mif = {.mac = GENERATE_LOCALLY_ADMINISTERED_MAC(),
// Uncomment below for static configuration:
// .ip = mg_htonl(MG_U32(192, 168, 0, 223)),
// .mask = mg_htonl(MG_U32(255, 255, 255, 0)),
// .gw = mg_htonl(MG_U32(192, 168, 0, 1)),
.driver = &mg_tcpip_driver_stm32,
.driver = &mg_tcpip_driver_stm32f,

.driver_data = &driver_data};
mg_tcpip_init(&mgr, &mif);
mg_timer_add(&mgr, BLINK_PERIOD_MS, MG_TIMER_REPEAT, timer_fn, &mif);
Expand Down
Loading

0 comments on commit 450d4ac

Please sign in to comment.