mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
Stupid operator new implementation
This commit is contained in:
3
Makefile
3
Makefile
@@ -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
12
lib/cxx_new.cpp
Normal 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*/
|
||||
Reference in New Issue
Block a user