Part Number: TMS320C6678
Tool/software: TI C/C++ Compiler
Hi there,
following two situation lead to different behavior and it is crucial to me to know why:
1.) Code includes a printf statement:
#pragma DATA_SECTION(selfId, ".local_data")
Uint32 selfId;
void main(void) {
selfId = CSL_chipReadReg(CSL_CHIP_DNUM);
printf("selfId = %d\n", selfId);
config_cache(selfId);
....
2.) Code does not include a print statement:
#pragma DATA_SECTION(selfId, ".local_data")
Uint32 selfId;
void main(void) {
selfId = CSL_chipReadReg(CSL_CHIP_DNUM);
config_cache(selfId);
....
In both cases .local_data maps to L2SRAM with L2SRAM defined in platform package as: {name: "L2SRAM",base: 0x00800000,len: 0x00080000,space: "code/data",access: "RWX" }. The same image is uploaded to each core.
Function config_cache asserts that selfId is between 0 and 7. I am getting different results depending on whether I include the printf statement or not:
- For situation 1 (with printf), things work fine, except that I am getting an error like "Invalid CIO command (11) in the CIO buffer at address (0xC02C248) was not recognized. Please check the device and program memory maps.". I guess that is due to the fact that several cores print at once.
- For situation 2 (without printf), the code fails with an assertion error. Function config_cache seems to see some random values
Please help. Thank you very much.