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
@@ -9,11 +9,14 @@ CFLAGS = -W -Wall -Wextra -Werror -Wundef -Wshadow -Wdouble-promotion
|
||||
CFLAGS += -Wformat-truncation -fno-common -Wconversion -Wno-sign-conversion
|
||||
CFLAGS += -g3 -Os -ffunction-sections -fdata-sections
|
||||
CFLAGS += -I. -I$(MGDIR) -Icmsis_core/CMSIS/Core/Include -Icmsis_h7/Include
|
||||
CFLAGS += -Ilittlefs
|
||||
CFLAGS += -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-d16 -DCORE_CM7
|
||||
CFLAGS += $(CFLAGS_EXTRA)
|
||||
LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,--gc-sections
|
||||
|
||||
SOURCES = main.c hal.c $(MGDIR)/mongoose.c
|
||||
SOURCES += littlefs/lfs.c littlefs/lfs_util.c
|
||||
CFLAGS += -Wno-conversion -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 += cmsis_h7/Source/Templates/gcc/startup_stm32h747xx.s
|
||||
@@ -24,7 +27,7 @@ firmware.bin: firmware.elf
|
||||
arm-none-eabi-objcopy -O binary $< $@
|
||||
arm-none-eabi-size --format=berkeley $<
|
||||
|
||||
firmware.elf: cmsis_core cmsis_h7 $(SOURCES) $(wildcard *.h) $(MGDIR)/mongoose.h link.ld Makefile
|
||||
firmware.elf: cmsis_core cmsis_h7 littlefs $(SOURCES) $(wildcard *.h) $(MGDIR)/mongoose.h link.ld Makefile
|
||||
arm-none-eabi-gcc $(SOURCES) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
flash: firmware.bin
|
||||
@@ -36,8 +39,12 @@ cmsis_core:
|
||||
cmsis_h7:
|
||||
git clone -q -c advice.detachedHead=false --depth 1 -b v1.10.4 https://github.com/STMicroelectronics/cmsis_device_h7 $@
|
||||
|
||||
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:
|
||||
cd $(dir $@) && $(MAKE) $(notdir $@)
|
||||
|
||||
clean:
|
||||
rm -rf firmware.* cmsis_*
|
||||
rm -rf firmware.* cmsis_* littlefs
|
||||
Reference in new issue
Block a user