xcc -report behaves strange after including the lib_xcore library

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
vergil19
Member++
Posts: 21
Joined: Thu Jan 20, 2022 3:54 am

xcc -report behaves strange after including the lib_xcore library

Post by vergil19 »

Hey all, I'm a bit confused about something strange I observed when using the XCC compiler. When I try to compile a simple previous example, such as a Hello World in C, using the -report option shows me the cores, channels, timers and memory I'm using, like this:

Code: Select all

//main.c
#include <stdio.h>
int main() {
    printf("Hello World");
    return 0;
}

xcc -target=XK-EVK-XU316 -report src/hello-world/main.c -o bin/hello-world/hello-world.xe
Constraint check for tile[0]:
  Cores available:            8,   used:          1 .  OKAY
  Timers available:          10,   used:          1 .  OKAY
  Chanends available:        32,   used:          0 .  OKAY
  Memory available:       524288,   used:      21368 .  OKAY
    (Stack: 836, Code: 19280, Data: 1252)
Constraints checks PASSED.
However, as soon as I include any lib_xcore related code in the program, the summary immediately becomes incomplete, only showing memory information, like this:

Code: Select all

#include <xcore/hwtimer.h>
#include <stdio.h>
int main() {
    printf("Hello World");
    return 0;
}

xcc -target=XK-EVK-XU316 -report src/hello-world/main.c -o bin/hello-world/hello-world.xe
Constraint check for tile[0]:
  Memory available:       524288,   used:      21368 .  OKAY
    (Stack: 836, Code: 19280, Data: 1252)
Constraints checks PASSED.
What's going on in the compiler? Why does including lib_xcore cause this? In multi-core programming, not being able to actively view the current resource usage makes me feel a little uneasy.
Can someone shed some light on this behavior? Is this a bug or "feature" of the XCC compiler when using the lib_xcore library? How can I get around this and see a full resource usage report with lib_xcore code in my programs?
Any help or pointers would be greatly appreciated! I'm still trying to wrap my head around XMOS and multicore programming.


MyKeys
Active Member
Posts: 33
Joined: Mon Jul 03, 2017 9:41 am

Post by MyKeys »

Bump as I'm also having the same issue.