basecmd: Avoid calling malloc() from main code

Introduce a new board function alloc_chunk() to allocate dynamic
memory.  This allows the board code to implement memory allocations
without using the standard malloc() interface.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2017-05-06 22:29:08 -04:00
parent 8f1d0c2a7c
commit f331936969
6 changed files with 66 additions and 45 deletions

View File

@@ -16,7 +16,8 @@ LDFLAGS-y += --specs=nano.specs --specs=nosys.specs
# Add source files
src-y += sam3x8e/main.c sam3x8e/timer.c sam3x8e/gpio.c
src-y += generic/crc16_ccitt.c generic/armcm_irq.c generic/timer_irq.c
src-y += generic/crc16_ccitt.c generic/alloc.c
src-y += generic/armcm_irq.c generic/timer_irq.c
src-y += ../lib/cmsis-sam3x8e/source/system_sam3xa.c
src-y += ../lib/cmsis-sam3x8e/source/gcc/startup_sam3xa.c
src-$(CONFIG_SERIAL) += sam3x8e/serial.c