Other Parts Discussed in Thread: SYSBIOS
Hi,
I'm developing a multi-core C6678 application using the Multicore Application Deployment tools. I've been having some trouble with booting the main application, so I have a simple test app using the same build tools which just boots two cores: one writes to the UART and the other toggles a GPIO pin. This boots OK and works fine. I can load symbols using the GEL file generated by the MAD tools and step through either or both cores. So far so good.
What is odd is that printf() doesn't work: I get the error
[C66xx_0] Invalid CIO command (0). Memory map prevented reading of target memory at 0x00000000
So I've dug a bit further, and found that the __CIOBUF_ symbol pointing to the CIO buffer is being loaded as 0x000000 (eg. as shown by typing its name into a memory browser). The "real" CIO buf is at 0x801c78, in both the original ELF map AND the prelink-adjusted image; the prelinker isn't moving it. (I've looked in the prelinker XML output and the address seems right). Memory inspection shows that printf is stufing output there. If I load a single-core ELF image then the symbol loads OK.
I then find that if I boot the MAD image but change the symbol loading command from
GEL_SymbolAddELFRel("c:/Projects/.../testapp","","",0x800000,0x801800,0x801A00,0x801B50,0x801D9C,0x88000000,0x9E00B9E0,0x82000000,0x0);
to
GEL_SymbolAddELFRel("c:/Projects/.../testapp","","",0x800000,0x801800,0x801A00,0x801B50,0x801D9C,0x88000000,0x9E00B9E0,0x82000000,0x801c78);
that the __CIOBUF_ symbol is now correct, AND printf suddenly starts working.
This suggests that somehow __CIOBUF_ is being treated as being part of ELF segment 8 (PT_DYNAMIC) for which the last parameter above is a relocation offset. But this segment does not have any substantive content in this executable, and all the map files etc. show that the section .cio should be in segment 3. Why would the debugger do this? And why would it do this when loading symbols with GEL_SymbolAddELFRel, but not when loading an ELF .out directly.
CCS version is 5.2.1.00018, C6000 toolchain is 7.4.1, MAD is from mcsdk_2_01_00_03.
I'd love to fix this as printf() would be very useful in debug generally, and it also makes me nervous that there's some underlying fault in my MAD configuration.
Gordon