Closed sammyne closed 2 years ago
Hi,
You need to make sure CFG_TEE_TA_LOG_LEVEL
is not 0 when building optee_os
(as this would disable any TA logging) and is 2 or higher when building the TA (2 is TRACE_INFO
). In practice just set it to 2 or 3 and rebuild both optee_os
and the TA.
Note, for optee_os
you can check the actual value that was used during the build in the generated conf.mk
in the optee_os
output directory.
Great thanks 😄
Is it possible for me just override CFG_TEE_TA_LOG_LEVEL
in the hello_world example
to something like
CFG_TEE_TA_LOG_LEVEL := 4
and then rebuild TA to make it effective?
I tried it without rebuilding optee_os and failed~ So I just wondering if bringing this update of logging level into effect must rebuild the optee_os?
@jforissier
Besides, setting CFG_TEE_TA_LOG_LEVEL=3
in optee_os/mk/config.mk and rebuilding optee_os and optee_examples doesn't help either = =
Hi @sammyne ,
CFG_TEE_TA_LOG_LEVEL ?= 4
and CFG_TEE_TA_LOG_LEVEL := 4
in optee_examples
have the same effect assuming you don't set this value somewhere else. We normally do not set CFG_
values using :=
because doing so introduces different behaviors with environment variables and command line arguments (CFG_XYZ=y make
vs. make CFG_XYZ=y
).CFG_TEE_TA_LOG_LEVEL
is 1 or higher in optee_os/mk/config.mk
, you should see the TA traces. This value is used when building libutils.a
so if you change it you also need to relink the TA.Do you see the Hello World!
message when you run optee_example_hello_world
with unmodified source code (both optee_os
and optee_examples
unmodified). You should.
Hi @sammyne ,
CFG_TEE_TA_LOG_LEVEL ?= 4
andCFG_TEE_TA_LOG_LEVEL := 4
inoptee_examples
have the same effect assuming you don't set this value somewhere else. We normally do not setCFG_
values using:=
because doing so introduces different behaviors with environment variables and command line arguments (CFG_XYZ=y make
vs.make CFG_XYZ=y
).- As long as
CFG_TEE_TA_LOG_LEVEL
is 1 or higher inoptee_os/mk/config.mk
, you should see the TA traces. This value is used when buildinglibutils.a
so if you change it you also need to relink the TA.Do you see the
Hello World!
message when you runoptee_example_hello_world
with unmodified source code (bothoptee_os
andoptee_examples
unmodified). You should.
I should, but it still failed me= =
Having pulled the project from fresh and building with make CFG_TEE_TA_LOG_LEVEL=3 -j2
still produces no log like Hello World!
for optee_example_hello_world
.
My building goes
build
dirmake run-only
optee_example_hello_world
in the secure world terminal final output goes as
Welcome to Buildroot, type root or test to login
buildroot login: root
# /usr/bin/optee_example_hello_world
Invoking TA to increment 42
TA incremented value to 43
4. run
make run-only
This doesn't rebuild anything at all ... try make run
and it'll rebuild before running.
- run
make run-only
This doesn't rebuild anything at all ... try
make run
and it'll rebuild before running.
In my case, everything is built remotely and then pulled back to a ubuntu 20.04.1 VM in my desktop. Therefore, run make run-only
should be enough.
@jbech-linaro
This issue has been marked as a stale issue because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this issue will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.
https://github.com/linaro-swg/optee_examples/blob/0607ed40746afe4cb8993149a6f275df648f7bad/hello_world/ta/hello_world_ta.c#L132
Hey~ Really appreciate if someone could help me in switching on logging macros like
IMSG
within TA~