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>
pull/12937/head
robert-hh 2023-11-13 18:48:14 +01:00
rodzic d261a240a9
commit 516ac489d3
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 32EC5F755D5A3A93
23 zmienionych plików z 7 dodań i 109 usunięć

Wyświetl plik

@ -89,14 +89,6 @@ INC += -I$(TOP)/lib/tinyusb/src
INC += -I.
INC += -Ihal
ifeq ($(MICROPY_PY_BLUETOOTH),1)
INC += \
-I$(TOP)/extmod/nimble \
-I$(TOP)/lib/mynewt-nimble/nimble/host/include \
-I$(TOP)/lib/mynewt-nimble/nimble/include \
-I$(TOP)/lib/mynewt-nimble/porting/nimble/include
endif
# All settings for Ethernet support are controller by the value of MICROPY_PY_LWIP
ifeq ($(MICROPY_PY_LWIP),1)
INC += -Ilwip_inc
@ -246,13 +238,6 @@ SRC_C += \
ticks.c \
tusb_port.c \
ifeq ($(MICROPY_PY_BLUETOOTH),1)
SRC_C += \
drivers/ninaw10/nina_bt_hci.c \
mpbthciport.c \
mpnimbleport.c
endif
SHARED_SRC_C += \
shared/libc/printf.c \
shared/libc/string0.c \
@ -304,14 +289,6 @@ else
SRC_HAL_C += hal/$(FLEXSPI_FLASH_TYPE)_config.c
endif
ifeq ($(MICROPY_PY_BLUETOOTH),1)
SRC_C += mpbthciport.c
endif # MICROPY_PY_BLUETOOTH
ifeq ($(MICROPY_BLUETOOTH_NIMBLE),1)
SRC_C += mpnimbleport.c
endif
# Math library source files
ifeq ($(MICROPY_FLOAT_IMPL),double)
LIBM_SRC_C += $(SRC_LIB_LIBM_DBL_C)

Wyświetl plik

@ -27,8 +27,8 @@ dtcm_size = 0x00008000;
ocrm_start = 0x20200000;
ocrm_size = 0x00010000;
/* 10kiB stack. */
__stack_size__ = 0x2800;
/* 8kiB stack. */
__stack_size__ = 0x2000;
_estack = __StackTop;
_sstack = __StackLimit;

Wyświetl plik

@ -8,8 +8,6 @@ MICROPY_HW_FLASH_SIZE = 0x1000000 # 16MB
MICROPY_PY_BLUETOOTH ?= 1
MICROPY_BLUETOOTH_NIMBLE ?= 1
MICROPY_BOOT_BUFFER_SIZE = (32 * 1024)
MICROPY_PY_NETWORK_NINAW10 ?= 1
MICROPY_PY_SSL ?= 1
MICROPY_SSL_MBEDTLS ?= 1

Wyświetl plik

@ -1,5 +0,0 @@
include("../manifest.py")
require("bundle-networking")
# Bluetooth
require("aioble")

Wyświetl plik

@ -1,8 +0,0 @@
#ifndef MICROPY_INCLUDED_MBEDTLS_CONFIG_BOARD_H
#define MICROPY_INCLUDED_MBEDTLS_CONFIG_BOARD_H
#define MBEDTLS_ECP_NIST_OPTIM
#include "ports/mimxrt/mbedtls/mbedtls_config.h"
#endif /* MICROPY_INCLUDED_MBEDTLS_CONFIG_BOARD_H */

Wyświetl plik

@ -12,18 +12,10 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_PY_NETWORK = 1
MICROPY_PY_NETWORK_ESP_HOSTED = 1
CFLAGS += -DMICROPY_PY_NETWORK=$(MICROPY_PY_NETWORK)
MICROPY_PY_BLUETOOTH = 1
CFLAGS += -DMICROPY_PY_BLUETOOTH=$(MICROPY_PY_BLUETOOTH)
MICROPY_BLUETOOTH_NIMBLE = 1
MICROPY_BLUETOOTH_BTSTACK = 0
MBEDTLS_CONFIG_FILE = '"$(BOARD_DIR)/mbedtls_config_board.h"'
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
JLINK_PATH ?= /media/RT1020-EVK/
JLINK_COMMANDER_SCRIPT = $(BUILD)/script.jlink

Wyświetl plik

@ -1,5 +0,0 @@
include("../manifest.py")
require("bundle-networking")
# Bluetooth
require("aioble")

Wyświetl plik

@ -12,13 +12,7 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_PY_NETWORK = 1
MICROPY_PY_NETWORK_ESP_HOSTED = 1
CFLAGS += -DMICROPY_PY_NETWORK=$(MICROPY_PY_NETWORK)
MICROPY_PY_BLUETOOTH = 1
CFLAGS += -DMICROPY_PY_BLUETOOTH=$(MICROPY_PY_BLUETOOTH)
MICROPY_BLUETOOTH_NIMBLE = 1
MICROPY_BLUETOOTH_BTSTACK = 0
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py

Wyświetl plik

@ -1,3 +0,0 @@
include("../manifest.py")
require("bundle-networking")

Wyświetl plik

@ -12,8 +12,6 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
JLINK_PATH ?= /media/RT1060-EVK/
JLINK_COMMANDER_SCRIPT = $(BUILD)/script.jlink

Wyświetl plik

@ -1,3 +0,0 @@
include("../manifest.py")
require("bundle-networking")

Wyświetl plik

@ -12,8 +12,6 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
JLINK_PATH ?= /media/RT1064-EVK/
deploy: $(BUILD)/firmware.bin

Wyświetl plik

@ -14,8 +14,6 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
CFLAGS += -DCPU_MIMXRT1176DVMAA_cm7 \
-DMIMXRT117x_SERIES \
-DENET_ENHANCEDBUFFERDESCRIPTOR_MODE=1 \

Wyświetl plik

@ -1,3 +0,0 @@
include("../manifest.py")
require("bundle-networking")

Wyświetl plik

@ -12,15 +12,9 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_PY_NETWORK = 1
MICROPY_PY_NETWORK_ESP_HOSTED = 1
CFLAGS += -DMICROPY_PY_NETWORK=$(MICROPY_PY_NETWORK)
MICROPY_PY_BLUETOOTH = 1
CFLAGS += -DMICROPY_PY_BLUETOOTH=$(MICROPY_PY_BLUETOOTH)
MICROPY_BLUETOOTH_NIMBLE = 1
MICROPY_BLUETOOTH_BTSTACK = 0
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
CFLAGS += -DSPI_RETRY_TIMES=1000000

Wyświetl plik

@ -10,16 +10,10 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_PY_NETWORK = 1
MICROPY_PY_NETWORK_ESP_HOSTED = 1
CFLAGS += -DMICROPY_PY_NETWORK=$(MICROPY_PY_NETWORK)
MICROPY_PY_BLUETOOTH = 1
CFLAGS += -DMICROPY_PY_BLUETOOTH=$(MICROPY_PY_BLUETOOTH)
MICROPY_BLUETOOTH_NIMBLE = 1
MICROPY_BLUETOOTH_BTSTACK = 0
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
deploy: $(BUILD)/firmware.hex
teensy_loader_cli --mcu=imxrt1062 -v -w $<

Wyświetl plik

@ -1,5 +0,0 @@
include("../manifest.py")
require("bundle-networking")
# Bluetooth
require("aioble")

Wyświetl plik

@ -10,16 +10,10 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_PY_NETWORK = 1
MICROPY_PY_NETWORK_ESP_HOSTED = 1
CFLAGS += -DMICROPY_PY_NETWORK=$(MICROPY_PY_NETWORK)
MICROPY_PY_BLUETOOTH = 1
CFLAGS += -DMICROPY_PY_BLUETOOTH=$(MICROPY_PY_BLUETOOTH)
MICROPY_BLUETOOTH_NIMBLE = 1
MICROPY_BLUETOOTH_BTSTACK = 0
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
deploy: $(BUILD)/firmware.hex
teensy_loader_cli --mcu=imxrt1062 -v -w $<

Wyświetl plik

@ -237,6 +237,7 @@ SECTIONS
__START_BSS = .;
__bss_start__ = .;
__bss_section_table = .;
*(.bss._dcd_data)
*(m_usb_dma_noninit_data)
*(.bss)
*(.bss*)

Wyświetl plik

@ -4,6 +4,7 @@ require("onewire")
require("ds18x20")
require("dht")
require("neopixel")
require("bundle-networking")
include(
"$(MPY_LIB_DIR)/micropython/bluetooth/aioble/manifest.py",
client=True,

Wyświetl plik

@ -55,10 +55,6 @@
#include "systick.h"
#include "extmod/modnetwork.h"
#if MICROPY_PY_BLUETOOTH
#include "extmod/modbluetooth.h"
#include "mpbthciport.h"
#endif
extern uint8_t _sstack, _estack, _gc_heap_start, _gc_heap_end;
@ -69,10 +65,6 @@ int main(void) {
ticks_init();
pendsv_init();
#if MICROPY_PY_BLUETOOTH
mp_bluetooth_hci_init();
#endif
#if MICROPY_PY_LWIP
// lwIP doesn't allow to reinitialise itself by subsequent calls to this function
// because the system timeout list (next_timeout) is only ever reset by BSS clearing.
@ -83,10 +75,6 @@ int main(void) {
#endif
#endif
#if MICROPY_PY_BLUETOOTH
mp_bluetooth_hci_init();
#endif
#if MICROPY_PY_NETWORK_CYW43
{
cyw43_init(&cyw43_state);

Wyświetl plik

@ -26,6 +26,8 @@
#ifndef MICROPY_INCLUDED_MBEDTLS_CONFIG_H
#define MICROPY_INCLUDED_MBEDTLS_CONFIG_H
#define MBEDTLS_ECP_NIST_OPTIM
// Time hook.
#include <time.h>
extern time_t mimxrt_rtctime_seconds(time_t *timer);

Wyświetl plik

@ -197,6 +197,7 @@ function ci_webassembly_run_tests {
function ci_mimxrt_setup {
ci_gcc_arm_setup
sudo apt-get install protobuf-c-compiler
}
function ci_mimxrt_build {