mirror of
https://github.com/cesanta/mongoose.git
synced 2026-12-04 21:58:22 +00:00
SPI flash support, with xiao nrf52 and portenta-h7
This commit is contained in:
1 parent
57e30ab2e9
commit
f02ea9859e
17 files changed
+442
-17
No files matched your search
@@ -12,7 +12,7 @@ NRFUTIL ?= adafruit-nrfutil
|
||||
CFLAGS = -W -Wall -Wextra -Werror -Wshadow -Wdouble-promotion
|
||||
CFLAGS += -Wformat-truncation -fno-common -Wno-conversion -Wno-sign-conversion
|
||||
CFLAGS += -g3 -Os -ffunction-sections -fdata-sections
|
||||
CFLAGS += -I. -I$(MGDIR) -Icmsis_core/CMSIS/Core/Include -Inrfx/mdk
|
||||
CFLAGS += -I. -I$(MGDIR) -Icmsis_core/CMSIS/Core/Include -Inrfx/mdk -Ilittlefs
|
||||
CFLAGS += -DNRF52840_XXAA -D__STARTUP_CLEAR_BSS -D__START=main -D__HEAP_SIZE=0
|
||||
CFLAGS += -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16
|
||||
CFLAGS += $(CFLAGS_EXTRA)
|
||||
@@ -22,13 +22,15 @@ LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs=nano.specs -lc -lgcc
|
||||
LDFLAGS += -Wl,--gc-sections -Wl,-Map=$@.map
|
||||
|
||||
SOURCES = hal.c main.c $(MGDIR)/mongoose.c
|
||||
SOURCES += littlefs/lfs.c littlefs/lfs_util.c
|
||||
CFLAGS += -Wno-shadow # Disabled for littlefs/lfs.c
|
||||
SOURCES += $(MGDIR)/tutorials/device-dashboard/full/dashboard.c
|
||||
SOURCES += $(MGDIR)/tutorials/device-dashboard/full/file_data.c
|
||||
SOURCES += nrfx/mdk/system_nrf52840.c nrfx/mdk/gcc_startup_nrf52840.S
|
||||
|
||||
all build: firmware.hex firmware.bin
|
||||
|
||||
firmware.elf: cmsis_core nrfx $(SOURCES) $(wildcard *.h) link.ld Makefile
|
||||
firmware.elf: cmsis_core nrfx littlefs $(SOURCES) $(wildcard *.h) link.ld Makefile
|
||||
arm-none-eabi-gcc $(SOURCES) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
arm-none-eabi-size --format=berkeley $@
|
||||
|
||||
@@ -52,10 +54,14 @@ cmsis_core:
|
||||
nrfx:
|
||||
git clone -q -c advice.detachedHead=false --depth 1 -b v2.11.0 https://github.com/NordicSemiconductor/nrfx $@
|
||||
|
||||
littlefs/lfs.c littlefs/lfs_util.c: littlefs
|
||||
littlefs:
|
||||
git clone -q -c advice.detachedHead=false --depth 1 -b v2.11.3 https://github.com/littlefs-project/littlefs $@
|
||||
|
||||
$(MGDIR)/tutorials/device-dashboard/full/file_data.c: $(MGDIR)/tutorials/device-dashboard/full/dashboard.html
|
||||
cd $(dir $@) && $(MAKE) $(notdir $@)
|
||||
|
||||
clean:
|
||||
rm -rf firmware.* cmsis_core nrfx
|
||||
rm -rf firmware.* cmsis_core nrfx littlefs
|
||||
|
||||
.PHONY: all build flash clean
|
||||
Reference in new issue
Block a user