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)
jyijyi
October 2, 2020, 11:21am
3
There is no component_init() function in hellofuji.c.
You should try with the sample app helloworld first.
Hi,
I have several printf() in my program, when app is running, where does the printf() result go?
Thank you,
Jeremy
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. <========
jyijyi
October 2, 2020, 12:01pm
5
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.
jyijyi
October 2, 2020, 12:18pm
7
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)
jyijyi
October 3, 2020, 9:01am
9
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.
jyijyi
October 5, 2020, 6:00am
11
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.
jyijyi
October 5, 2020, 7:16am
13
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.
jyijyi
October 5, 2020, 8:03am
15
In DS, go to the Package Manager perspective
In Window > Preferences, untick the Developer Studio > Package Manager > Work only with baseline packages option
Thanks a lot!.
However, adding toolchain and legato could not be selected in “New → Create legato Application”…
jyijyi
October 5, 2020, 8:16am
17
Please see here, espeacially on step 3( for your case, you need to click “Create” instead of “Duplicate”):
Hi @lichen
First of all, to explain why the latest Legato version available in DS for WP85/WP75 is still 16.10.3, please have a look at the release information for the Legato Framework:
http://legato.io/legato-docs/latest/aboutReleaseInfo.html#releaseInfo_LegatoAFReleases
To summarize: DS proposes by default only the packages matching with products official releases, for each supported module. The last release for WP85/75 is still Release 14, embedding Legato 16.10.3
In the meantime, the Leg…
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”…
jyijyi
October 5, 2020, 8:40am
19
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…