4 Commits

3 changed files with 10 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
MEMORY
{
ram (wxa!ri) : ORIGIN = 0x00000000, LENGTH = 128K
rom (rxai!w) : ORIGIN = 0x1000E000, LENGTH = 2k
rom (rxai!w) : ORIGIN = 0x10080000, LENGTH = 8k
flash (rxai!w) : ORIGIN = 0x20000000, LENGTH = 16M
dram (wxa!ri) : ORIGIN = 0x40000000, LENGTH = 2048M
}

View File

@@ -24,7 +24,7 @@
#define PERIPH(TYPE, ADDR) ((volatile TYPE*)(ADDR))
// values from memory_map.ld
#define XIP_START_LOC 0x30000000
#define XIP_START_LOC 0x20000000
#define RAM_START_LOC 0x00000000
#define APB_BASE 0x10000000

View File

@@ -4,10 +4,12 @@
extern ssize_t _bsp_write(int, const void*, size_t);
int __wrap_puts(const char* s) {
const char* str = s;
while(*str)
str++;
return _bsp_write(STDOUT_FILENO, s, str - s);
int __wrap_puts(const char* s) {
if(!s) return -1;
const char* str = s;
while(*str)
++str;
*(char*)str='\n';
return _bsp_write(STDOUT_FILENO, s, (str - s)+1);
}
weak_under_alias(puts);
weak_under_alias(puts);