camkes icon indicating copy to clipboard operation
camkes copied to clipboard

Turn on KernelExportPMCUser in picotcp apps

Open protoben opened this issue 2 years ago • 1 comments

When trying to build picotcp_single_component for x86_64, I get the following linker errors:

/nix/store/8fp4y8kvs8ydswag15cx1dspgbpz10yi-gcc-arm-embedded-11.3.rel1/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/
bin/ld: CMakeFiles/bench.instance.bin.dir/bench/camkes.environment.c.obj: in function `component_control_main':
/home/user/camkes-manifest/picotcp_single_component/bench/camkes.environment.c:34: undefined reference to `run'
/nix/store/8fp4y8kvs8ydswag15cx1dspgbpz10yi-gcc-arm-embedded-11.3.rel1/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/
bin/ld: CMakeFiles/bench.instance.bin.dir/bench/idle_seL4RPCCall_0.c.obj: in function `idle__run':
/home/user/camkes-manifest/picotcp_single_component/bench/idle_seL4RPCCall_0.c:396: undefined reference to `idle_start'
/nix/store/8fp4y8kvs8ydswag15cx1dspgbpz10yi-gcc-arm-embedded-11.3.rel1/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/
bin/ld: /home/user/camkes-manifest/picotcp_single_component/bench/idle_seL4RPCCall_0.c:431: undefined reference to `idle_stop'

These seem to occur because BenchUtiliz from global_components is not being linked in. Relatedly, I get this message when running cmake: BenchUtiliz not available, as KernelExportPMCUser is OFF.

This branch turns KernelExportPMCUser on in both picoserver examples, which allows linking to complete successfully.

protoben avatar Jan 19 '23 20:01 protoben

We were running into similar issues. But it seems preferrable if there is a solution that does not require BechUtils as hard dependency. Unfortunately, I did not find the time so far to put a PR together.

axel-h avatar Jan 19 '23 21:01 axel-h