Tool/software: TI C/C++ Compiler
Hello,
I am trying to access an area of memory from my C-code.
in my .cmd file, i have:
SECTIONS {
.text: {} > SARAM PAGE 0
.switch: {} > SARAM PAGE 0
.bss: block(0x20000) {} > SARAM PAGE 0
.cinit: block(0x20000) {} > SARAM PAGE 0
.pinit: block(0x20000) {} > SARAM PAGE 0
error_buf: block(0x400) {} > SARAM PAGE 0
}
then in my C code, i tried various versions, but here is the one i would think works:
extern char error_buf;
void error_handler (char *fmt, void* params)
{
.......
.......
uint32_t * msg_buf = _symval(&error_buf);
}
But, whatever variations i try, i invariably get the following linker error:
undefined first referenced
symbol in file
--------- ----------------
_error_buf ./src/main.obj
Is there a know pattern for doing just that ? The motivation is to dump an area of memory before exiting the app
Thanks,
Jacques