Stupid operator new implementation

This commit is contained in:
Romain Goyet
2015-05-20 17:33:47 +02:00
parent aafb121939
commit 2e5e851caa
2 changed files with 14 additions and 1 deletions

View File

@@ -48,7 +48,8 @@ products := boot.elf boot.hex boot.bin
objs += external/freertos/tasks.o external/freertos/list.o external/freertos/queue.o external/freertos/portable/GCC/ARM_CM4F/port.o external/freertos/portable/MemMang/heap_1.o
objs += $(addprefix external/newlib/libc/, string/memset.o string/memcpy.o string/strlen.o)
objs += lib/assert.o lib/errno.o lib/private/mem5.o
lib/private/mem5.o: CFLAGS += -w
objs += lib/assert.o lib/errno.o lib/private/mem5.o lib/cxx_new.o
objs += src/hello.o

12
lib/cxx_new.cpp Normal file
View File

@@ -0,0 +1,12 @@
/*#ifndef LIB_MALLOC_H
#define LIB_MALLOC_H*/
extern "C" {
#include <malloc.h>
}
void * operator new (unsigned int size) {
return malloc(size);
}
/*#endif*/