cortex-m1 newlib-nano printf not works
Hello!
I am using launchpad's toolchain for developing SW for cortex-m1 device.
I try to use newlib-nano to print data in that manner:
printf("a");
There is no luck.
Program not start at all.
There is some weird instructions in Reset_Handler while debugging program.
For using that library I implement _write() function:
int _write(int file, char *ptr, int len) {
int n;
switch (file) {
case STDOUT_FILENO: /*stdout*/
for (n = 0; n < len; n++) {
}
break;
case STDERR_FILENO: /* stderr */
for (n = 0; n < len; n++) {
}
break;
default:
errno = EBADF;
return -1;
}
return len;
}
toolchain's version is:
arm-none-
compiler command:
arm-none-eabi-gcc -std=c99 -DUSE_STDPERIPH
linker command:
arm-none-eabi-gcc -nostartfiles -mcpu=cortex-m1 -mthumb -T../MDR1986BE1T.ld -nostartfiles -Xlinker --gc-sections -Wl,--gc-sections -Wl,-Map=
Content of MAP file:
c:/users/
c:/users/
c:/users/
.....
What I do wrong? Explain me please.
Question information
- Language:
- English Edit question
- Status:
- Expired
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: