Hello,
I am using my own bare-meta code with cortex A9.
Recently I started using the same package with cortex A8.
But I noticed that calling a function with varibale number of arguments fails somewhere inside (not sure where yet- no printing from the OS).
Int32 BSP_DbgPrintf(CONST CHAR *fmt, ...) {
int int_ret_val; Int32 Channel = BSP_DEBUG;
uint32_t ret_val = 0; va_list args; va_start(args, fmt);
int_ret_val = vsprintf(print_buf, fmt, args); if (int_ret_val >= 0) { BSP_Print(Channel,print_buf); ret_val = 0; } else { ret_val = -1; }
va_end(args);
return ret_val;
}
The crosss compiler is:
arm-eabi-gcc.exe (GCC) 4.8.2
I would like to ask if you have some idea what can cause this function not to work properly ? Is it related to startup scripts (configuring stack pointer) ?
Thanks,
Ran
SO why are you asking on the Keil forum?