Skip to content

Commit 516ac48

Browse files
committed
mimxrt: Clean up Makefile, MIMXRT1015.ld and board files.
- Makefile, main.c: Remove duplicated code and settings, which were added through combining several branches. - Install the proto-c compiler in ci.sh. - Move _dcd_data to the start of the .bss segment. This data item has to be 2k aligned. Moving it to the start of the segment avoids wasting memory. - Remove the board's manifest.py, now that many boards support networking. - Remove obsolete settings from mpconfigboard.mk files. Signed-off-by: robert-hh <robert@hammelrath.com>
1 parent d261a24 commit 516ac48

File tree

23 files changed

+7
-109
lines changed

23 files changed

+7
-109
lines changed

ports/mimxrt/Makefile

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,6 @@ INC += -I$(TOP)/lib/tinyusb/src
8989
INC += -I.
9090
INC += -Ihal
9191

92-
ifeq ($(MICROPY_PY_BLUETOOTH),1)
93-
INC += \
94-
-I$(TOP)/extmod/nimble \
95-
-I$(TOP)/lib/mynewt-nimble/nimble/host/include \
96-
-I$(TOP)/lib/mynewt-nimble/nimble/include \
97-
-I$(TOP)/lib/mynewt-nimble/porting/nimble/include
98-
endif
99-
10092
# All settings for Ethernet support are controller by the value of MICROPY_PY_LWIP
10193
ifeq ($(MICROPY_PY_LWIP),1)
10294
INC += -Ilwip_inc
@@ -246,13 +238,6 @@ SRC_C += \
246238
ticks.c \
247239
tusb_port.c \
248240

249-
ifeq ($(MICROPY_PY_BLUETOOTH),1)
250-
SRC_C += \
251-
drivers/ninaw10/nina_bt_hci.c \
252-
mpbthciport.c \
253-
mpnimbleport.c
254-
endif
255-
256241
SHARED_SRC_C += \
257242
shared/libc/printf.c \
258243
shared/libc/string0.c \
@@ -304,14 +289,6 @@ else
304289
SRC_HAL_C += hal/$(FLEXSPI_FLASH_TYPE)_config.c
305290
endif
306291

307-
ifeq ($(MICROPY_PY_BLUETOOTH),1)
308-
SRC_C += mpbthciport.c
309-
endif # MICROPY_PY_BLUETOOTH
310-
311-
ifeq ($(MICROPY_BLUETOOTH_NIMBLE),1)
312-
SRC_C += mpnimbleport.c
313-
endif
314-
315292
# Math library source files
316293
ifeq ($(MICROPY_FLOAT_IMPL),double)
317294
LIBM_SRC_C += $(SRC_LIB_LIBM_DBL_C)

ports/mimxrt/boards/MIMXRT1015.ld

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ dtcm_size = 0x00008000;
2727
ocrm_start = 0x20200000;
2828
ocrm_size = 0x00010000;
2929

30-
/* 10kiB stack. */
31-
__stack_size__ = 0x2800;
30+
/* 8kiB stack. */
31+
__stack_size__ = 0x2000;
3232
_estack = __StackTop;
3333
_sstack = __StackLimit;
3434

ports/mimxrt/boards/MIMXRT1015_EVK/mpconfigboard.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ MICROPY_HW_FLASH_SIZE = 0x1000000 # 16MB
88
MICROPY_PY_BLUETOOTH ?= 1
99
MICROPY_BLUETOOTH_NIMBLE ?= 1
1010

11-
MICROPY_BOOT_BUFFER_SIZE = (32 * 1024)
12-
1311
MICROPY_PY_NETWORK_NINAW10 ?= 1
1412
MICROPY_PY_SSL ?= 1
1513
MICROPY_SSL_MBEDTLS ?= 1

ports/mimxrt/boards/MIMXRT1020_EVK/manifest.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

ports/mimxrt/boards/MIMXRT1020_EVK/mbedtls_config_board.h

Lines changed: 0 additions & 8 deletions
This file was deleted.

ports/mimxrt/boards/MIMXRT1020_EVK/mpconfigboard.mk

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,10 @@ MICROPY_PY_LWIP = 1
1212
MICROPY_PY_SSL = 1
1313
MICROPY_SSL_MBEDTLS = 1
1414

15-
MICROPY_PY_NETWORK = 1
1615
MICROPY_PY_NETWORK_ESP_HOSTED = 1
17-
CFLAGS += -DMICROPY_PY_NETWORK=$(MICROPY_PY_NETWORK)
1816

1917
MICROPY_PY_BLUETOOTH = 1
20-
CFLAGS += -DMICROPY_PY_BLUETOOTH=$(MICROPY_PY_BLUETOOTH)
2118
MICROPY_BLUETOOTH_NIMBLE = 1
22-
MICROPY_BLUETOOTH_BTSTACK = 0
23-
24-
MBEDTLS_CONFIG_FILE = '"$(BOARD_DIR)/mbedtls_config_board.h"'
25-
26-
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
2719

2820
JLINK_PATH ?= /media/RT1020-EVK/
2921
JLINK_COMMANDER_SCRIPT = $(BUILD)/script.jlink

ports/mimxrt/boards/MIMXRT1050_EVK/manifest.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

ports/mimxrt/boards/MIMXRT1050_EVK/mpconfigboard.mk

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,7 @@ MICROPY_PY_LWIP = 1
1212
MICROPY_PY_SSL = 1
1313
MICROPY_SSL_MBEDTLS = 1
1414

15-
MICROPY_PY_NETWORK = 1
1615
MICROPY_PY_NETWORK_ESP_HOSTED = 1
17-
CFLAGS += -DMICROPY_PY_NETWORK=$(MICROPY_PY_NETWORK)
1816

1917
MICROPY_PY_BLUETOOTH = 1
20-
CFLAGS += -DMICROPY_PY_BLUETOOTH=$(MICROPY_PY_BLUETOOTH)
2118
MICROPY_BLUETOOTH_NIMBLE = 1
22-
MICROPY_BLUETOOTH_BTSTACK = 0
23-
24-
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py

ports/mimxrt/boards/MIMXRT1060_EVK/manifest.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

ports/mimxrt/boards/MIMXRT1060_EVK/mpconfigboard.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ MICROPY_PY_LWIP = 1
1212
MICROPY_PY_SSL = 1
1313
MICROPY_SSL_MBEDTLS = 1
1414

15-
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
16-
1715
JLINK_PATH ?= /media/RT1060-EVK/
1816
JLINK_COMMANDER_SCRIPT = $(BUILD)/script.jlink
1917

ports/mimxrt/boards/MIMXRT1064_EVK/manifest.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

ports/mimxrt/boards/MIMXRT1064_EVK/mpconfigboard.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ MICROPY_PY_LWIP = 1
1212
MICROPY_PY_SSL = 1
1313
MICROPY_SSL_MBEDTLS = 1
1414

15-
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
16-
1715
JLINK_PATH ?= /media/RT1064-EVK/
1816

1917
deploy: $(BUILD)/firmware.bin

ports/mimxrt/boards/MIMXRT1170_EVK/mpconfigboard.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ MICROPY_PY_LWIP = 1
1414
MICROPY_PY_SSL = 1
1515
MICROPY_SSL_MBEDTLS = 1
1616

17-
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
18-
1917
CFLAGS += -DCPU_MIMXRT1176DVMAA_cm7 \
2018
-DMIMXRT117x_SERIES \
2119
-DENET_ENHANCEDBUFFERDESCRIPTOR_MODE=1 \

ports/mimxrt/boards/SEEED_ARCH_MIX/manifest.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

ports/mimxrt/boards/SEEED_ARCH_MIX/mpconfigboard.mk

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,9 @@ MICROPY_PY_LWIP = 1
1212
MICROPY_PY_SSL = 1
1313
MICROPY_SSL_MBEDTLS = 1
1414

15-
MICROPY_PY_NETWORK = 1
1615
MICROPY_PY_NETWORK_ESP_HOSTED = 1
17-
CFLAGS += -DMICROPY_PY_NETWORK=$(MICROPY_PY_NETWORK)
1816

1917
MICROPY_PY_BLUETOOTH = 1
20-
CFLAGS += -DMICROPY_PY_BLUETOOTH=$(MICROPY_PY_BLUETOOTH)
2118
MICROPY_BLUETOOTH_NIMBLE = 1
22-
MICROPY_BLUETOOTH_BTSTACK = 0
23-
24-
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
2519

2620
CFLAGS += -DSPI_RETRY_TIMES=1000000

ports/mimxrt/boards/TEENSY40/mpconfigboard.mk

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,10 @@ MICROPY_PY_LWIP = 1
1010
MICROPY_PY_SSL = 1
1111
MICROPY_SSL_MBEDTLS = 1
1212

13-
MICROPY_PY_NETWORK = 1
1413
MICROPY_PY_NETWORK_ESP_HOSTED = 1
15-
CFLAGS += -DMICROPY_PY_NETWORK=$(MICROPY_PY_NETWORK)
1614

1715
MICROPY_PY_BLUETOOTH = 1
18-
CFLAGS += -DMICROPY_PY_BLUETOOTH=$(MICROPY_PY_BLUETOOTH)
1916
MICROPY_BLUETOOTH_NIMBLE = 1
20-
MICROPY_BLUETOOTH_BTSTACK = 0
21-
22-
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
2317

2418
deploy: $(BUILD)/firmware.hex
2519
teensy_loader_cli --mcu=imxrt1062 -v -w $<

ports/mimxrt/boards/TEENSY41/manifest.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

ports/mimxrt/boards/TEENSY41/mpconfigboard.mk

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,10 @@ MICROPY_PY_LWIP = 1
1010
MICROPY_PY_SSL = 1
1111
MICROPY_SSL_MBEDTLS = 1
1212

13-
MICROPY_PY_NETWORK = 1
1413
MICROPY_PY_NETWORK_ESP_HOSTED = 1
15-
CFLAGS += -DMICROPY_PY_NETWORK=$(MICROPY_PY_NETWORK)
1614

1715
MICROPY_PY_BLUETOOTH = 1
18-
CFLAGS += -DMICROPY_PY_BLUETOOTH=$(MICROPY_PY_BLUETOOTH)
1916
MICROPY_BLUETOOTH_NIMBLE = 1
20-
MICROPY_BLUETOOTH_BTSTACK = 0
21-
22-
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
2317

2418
deploy: $(BUILD)/firmware.hex
2519
teensy_loader_cli --mcu=imxrt1062 -v -w $<

ports/mimxrt/boards/common.ld

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ SECTIONS
237237
__START_BSS = .;
238238
__bss_start__ = .;
239239
__bss_section_table = .;
240+
*(.bss._dcd_data)
240241
*(m_usb_dma_noninit_data)
241242
*(.bss)
242243
*(.bss*)

ports/mimxrt/boards/manifest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
require("ds18x20")
55
require("dht")
66
require("neopixel")
7+
require("bundle-networking")
78
include(
89
"$(MPY_LIB_DIR)/micropython/bluetooth/aioble/manifest.py",
910
client=True,

ports/mimxrt/main.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@
5555

5656
#include "systick.h"
5757
#include "extmod/modnetwork.h"
58-
#if MICROPY_PY_BLUETOOTH
59-
#include "extmod/modbluetooth.h"
60-
#include "mpbthciport.h"
61-
#endif
6258

6359
extern uint8_t _sstack, _estack, _gc_heap_start, _gc_heap_end;
6460

@@ -69,10 +65,6 @@ int main(void) {
6965
ticks_init();
7066
pendsv_init();
7167

72-
#if MICROPY_PY_BLUETOOTH
73-
mp_bluetooth_hci_init();
74-
#endif
75-
7668
#if MICROPY_PY_LWIP
7769
// lwIP doesn't allow to reinitialise itself by subsequent calls to this function
7870
// because the system timeout list (next_timeout) is only ever reset by BSS clearing.
@@ -83,10 +75,6 @@ int main(void) {
8375
#endif
8476
#endif
8577

86-
#if MICROPY_PY_BLUETOOTH
87-
mp_bluetooth_hci_init();
88-
#endif
89-
9078
#if MICROPY_PY_NETWORK_CYW43
9179
{
9280
cyw43_init(&cyw43_state);

ports/mimxrt/mbedtls/mbedtls_config_port.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#ifndef MICROPY_INCLUDED_MBEDTLS_CONFIG_H
2727
#define MICROPY_INCLUDED_MBEDTLS_CONFIG_H
2828

29+
#define MBEDTLS_ECP_NIST_OPTIM
30+
2931
// Time hook.
3032
#include <time.h>
3133
extern time_t mimxrt_rtctime_seconds(time_t *timer);

tools/ci.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ function ci_webassembly_run_tests {
197197

198198
function ci_mimxrt_setup {
199199
ci_gcc_arm_setup
200+
sudo apt-get install protobuf-c-compiler
200201
}
201202

202203
function ci_mimxrt_build {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy