[WP7605][SW] Could not show printf()

Back Ground:
I would like to work native C source of Helloworld.
For example, I want to use printf(), instead of “LE_INFO”.

Build and Compile was succeeded, but there is no message of printf() by checking “logread”.
Please see the attached file.
NOTE, this source code is very simple that is only shown printf(), so I think to use another way.

Question:
Could you tell me work around to show the message of printf() ?

Best Regards,

— HirokiComponent.cdef (26 Bytes) HelloFuji (16.2 KB) HelloFuji.adef (110 Bytes) HelloFuji.c (144 Bytes) HelloFuji.wp76xx.update (10.1 KB) .ninja_deps (16 Bytes) .ninja_log (1.4 KB) HelloFuji.wp76xx (10 KB) info.properties (100 Bytes) HelloFuji (16.2 KB) root.cfg (1004 Bytes) build.ninja (8.6 KB) mktool_args (31 Bytes) mktool_environment (13.1 KB) console.log (4.5 KB)

Sorry I missed the attached file, please check follows.

HelloFujidenki.zip (37.4 KB)
console.log (4.5 KB)

There is no component_init() function in hellofuji.c.
You should try with the sample app helloworld first.

I believed that printf() was shown as same with follows.

logread -f | grep “helloWorld”

user.info Legato: INFO | supervisor[465]/supervisor T=main | app.c CreateTmpFs() 1204 | Mounted tmpfs at /legato/systems/current/appsWriteable/helloWorld/tmp.
user.info Legato: INFO | supervisor[465]/supervisor T=main | app.c CreateFileLink() 1504 | Created file link ‘/tmp/legato/serviceDirectoryServer’ to ‘/legato/systems/current/appsWriteable/helloWorld/tmp/legato/serviceDirectoryServer’.
user.info Legato: INFO | supervisor[465]/supervisor T=main | app.c CreateFileLink() 1504 | Created file link ‘/tmp/legato/serviceDirectoryClient’ to ‘/legato/systems/current/appsWriteable/helloWorld/tmp/legato/serviceDirectoryClient’.
user.debug Legato: DBUG | UNKNOWN[1518]/ T=main | _componentMain.c _helloWorldComponent_Init() 26 | Initializing helloWorldComponent component library.
user.info Legato: INFO | helloWorld[1518]/helloWorldComponent T=main | helloWorldComponent.c _helloWorldComponent_COMPONENT_INIT() 5 | Hello, world. <========

Yes, it should if you add printf() in sample application helloworld

Yes, I confirmed helloWorld that was worked fine by using LE_INFO, instead of printf().

There is no component_init() function in hellofuji.c.

I’m sorry I could not understand the above meaning.

If you change the le_info() to printf() in helloworld, does it work?

Please see the following error message.
mkapp was failed by changing printf() from LE_INFO.

printf_console.log (355 Bytes)

are you compiling VScode?
I don’t see any problem to compile with prinf().
Have you done a “make clean” before compilation?

are you compiling VScode?

No, I tested Ubutntu16.04 by using leaf shell.

Have you done a “make clean” before compilation?

“make clean” was failed (male: *** No rule to make target ‘clean’. Stop.)

And I also failed mkapp -t wp76xx helloWorld.adef, it was shown “ninja: error”…

(1) Download leaf shell
(2) leaf setup
(3) Compile toolchain
(4) execute (3)
(5) try to mkapp -t wp76xx helloWorld.adef, but it was failed as above.

seems this is not related to printf(), can you try to comment out printf() and see if you can make clean and mkapp???

I remember you used Developer studio before, you can switch back to Developer studio and see if you can compile first

20201005_ds.log (18.3 KB)

Please check the above console log, my helloWorld project was failed build in developer studio.

BTW, the test module was installed legato 20.04, but DS was 19.02, because there is no selection as 20.04 in DS.

i think you need to install the developer studio again as previously you can build helloworld app.

Here also teaches you how to import new legato package to DS:

Also you can consider to use VSCODE to compile helloworld app.

Thank you for information about installing latest version, but DS could not show any files when I select “leaf-data” for toolchain and legato…

**

Also you can consider to use VSCODE to compile helloworld app.

Currently, I would like to focus on the using leaf or dev studio, because I have never been confirmed VSCODE.

In DS, go to the Package Manager perspective

In Window > Preferences, untick the Developer Studio > Package Manager > Work only with baseline packages option

image

Thanks a lot!.
However, adding toolchain and legato could not be selected in “New → Create legato Application”…

Please see here, espeacially on step 3( for your case, you need to click “Create” instead of “Duplicate”):

you’ll need to select both the new Toolchain and the Application Framework in the Package selection tabs.

you’ll need to select both the new Toolchain and the Application Framework in the Package selection tabs.

Adding toolchain and legato could not see in “Package selection”…

did you really install the toolchain and legato framework?
Maybe you can also see this document and see if there is any missing steps.

DevStudio - Import Leaf Package.docx (394.4 KB)

Thanks, I can setup new toolchain and legato.

However, build error was still happened as follows…