Example of setting up malloc heap on extram

This commit is contained in:
Toby Jaffey 2025-12-11 20:35:11 +00:00
parent 7fae8c129f
commit f27ed6213c
5 changed files with 369 additions and 0 deletions

12
apps/heap/Makefile Normal file
View file

@ -0,0 +1,12 @@
TOPDIR=../..
PROJECT:=$(shell basename ${PWD})
HEAP_SIZE=$(shell echo "1024 * 512" | bc)
OPT=-Os
CFLAGS=-DHEAP_SIZE=${HEAP_SIZE}
SRCS=${PROJECT}.c ${TOPDIR}/apps/crt0.S malloc_freelist.c
HOST_EXTRA=-e ${HEAP_SIZE} -i 100000
all: all_common
test: test_common
clean: clean_common
include ${TOPDIR}/apps/makefile.common