Nuklear/PJSIP Demo

2 views
Skip to first unread message

Maris Engineering

unread,
Apr 25, 2022, 12:05:23 PMApr 25
to Anton Bondarev, embox...@googlegroups.com


I had to install qemu also on my debian (MX 21) platform. For this reason I modified the README (see patch).

Further I also had to install gcc-arm-none-eabi and gdb-arm-none-eabi (of course!). The latter appeared relevant after I followed the instructions on https://github.com/embox/embox/wiki/How-to-flash-and-run-STM32-boards, called from https://github.com/embox/embox/wiki/Nuklear.

The connect to openocd needed a slight modification in the file name:
$ sudo openocd -f /usr/share/openocd/scripts/board/stm32f746g-disco.cfg
I'd suggest to write the tail in the wiki like this: /stm32<xxxx->disco(very).cfg


And instead of arm-none-eabi-gdb build/base/bin/embox I had to invoke gdb-multiarch ;-)
Hm, a few lines later I see the hint regarding this ;-). But it should apply do debian (bullseye).

As a sidenote: I personally am very happy with picocom:
picocom /dev/ttyACM0 -b 115200

Embox seems to occupy 798 kbytes (non-packed) binaries according to the following transcript:
Loading section .text, size 0x817b0 lma 0x8000000
Loading section .ARM.exidx, size 0x8 lma 0x80817b0
Loading section .rodata, size 0x3f060 lma 0x80817c0
Loading section .data, size 0x257c lma 0x80c0820

Using openocd flashing, the total size is reported as quite precisely 1 MB.
$ openocd -f interface/stlink.cfg -f target/stm32f7x.cfg -c init -c "reset halt" -c "flash write_image erase build/base/bin/embox"
Here too the suggestion: target/stm32<xxx>.cfg

Result:
Looks quite good & the display (with a simple demo showing a button and a few other basic gui-elements) pops up within just a little more than a second after powerup. Really behaves like OS-less system. No u-boot; no uClinux unpack to RAM etc. ;-)

When I return to the Nuklear page, I read that I have to run "grfx_rawfb stm32-ts". But the demo seems already running (after repower). The console shows continuing "FPS = 60" lines, without the ability to stop this e.g. using ctrl-C.

========
Now to PJSIP (https://github.com/embox/embox/wiki/PJSIP):

It takes approx. 16 seconds after power-up until the red embox> prompt appears. Can I trace down what is going on during this time?
Is it correct that the backspace key cannot be used to correct typing errors? (but auto-completion works).

The sip application operates when I connect to any SIP phone. The continuous log reminds me of console-based linphone.

Regarding the gui-based client, I'm not understanding just well what you mean at the section "Configure and build Embox".
For qemu, both simple_pjua as well as sip_nuklear point to the same template. The same applies to the stm32f769i platform. Does it mean that both programs are compiled in those configurations?

In that case I'd suggest a change of this section, e.g. as follows:
Choose a supported platform:
* for availability of simple_pjua
> on 32F746GDISCOVERY make confload-project/pjsip/stm32f746g-discovery
* for availability of simple_pjua as well as sip_nuklear
> on qemu-system-i386 make confload-project/pjsip/x86-qemu
> on 32F769IDISCOVERY make confload-project/pjsip/stm32f769i-discovery

Note the correcton in x86-qemu (currently the web page says x86_qemu.

Regards,
Rob

Anton Bondarev

unread,
Apr 25, 2022, 1:57:55 PMApr 25
to Maris Engineering, embox...@googlegroups.com
I had to install qemu also on my debian (MX 21) platform. For this reason I modified the README (see patch).
Thanks, but I don't see any attachment. Did you forget to attach the patch?

I'd suggest to write the tail in the wiki like this: /stm32<xxxx->disco(very).cfg
Thanks, I have modified to /<your stm32 board>.cfg because the same instruction can be used for nucleo_stm32 boards

 And instead of arm-none-eabi-gdb build/base/bin/embox I had to invoke gdb-multiarch ;-)
Hm, a few lines later I see the hint regarding this ;-). But it should apply do debian (bullseye).
Thanks. I've also clarified this place.

As a sidenote: I personally am very happy with picocom:
:) Yes, I'm too:) minicom is only as an example.

Here too the suggestion: target/stm32<xxx>.cfg
Thanks, done
 as a note: it is not necessary to use both 'gdb' and 'openocd' way to flashing. However thanks for checking!:)


Looks quite good & the display (with a simple demo showing a button and a few other basic gui-elements) pops up within just a little more than a second after powerup. Really behaves like OS-less system. No u-boot; no uClinux unpack to RAM etc. ;-)
Yes, the fast start (reloading) is one of Embox advantages as well as small footprint.

 When I return to the Nuklear page, I read that I have to run "grfx_rawfb stm32-ts". But the demo seems already running (after repower). The console shows continuing "FPS = 60" lines, without the ability to stop this e.g. using ctrl-C.
Yes, the demo app starting automatically in current version. You can see it in ./conf/start_script.inc (a current template). YOu also can modify it, comment for example "sip_nuklear /dev/stm32-ts"
 Also it is disabled ctrl-C in a current configuration I think it needs additional memory for this feature
I suggest to use default template for your board (without SIP)
 make confload-platform/stm32/f7/<your board>
You can use backspace and history (CLI), You also can connect with telnet for example
Also in my mind the following demos can be interesting for you (Qt, LVGL, OpenCV)

It takes approx. 16 seconds after power-up until the red embox> prompt appears. Can I trace down what is going on during this time?
Yes, you can debug with gdb all parts of systems. May be this delay needs for a ethernet connection or somsing else.


Is it correct that the backspace key cannot be used to correct typing errors? (but auto-completion works).
Not it is weird. I try to reproduce the trouble. You can you different templates, as I wrote above

For qemu, both simple_pjua as well as sip_nuklear point to the same template. The same applies to the stm32f769i platform. Does it mean that both programs are compiled in those configurations?
Thanks. It is yet another mistake :)
the applications set up in 'mods.conf' file for example in project/pjsip/stm32f769i-discovery-sip-nuklear I see
//include project.pjsip.cmd.simple_pjsua_imported

include project.pjsip.cmd.sip_nuklear

only the GUI version ( 'simple_pjsua_imported' is commented). It is possible to compile both apps but for current version I have corrected the wiki page

Note the correcton in x86-qemu (currently the web page says x86_qemu.
Thanks. Done

Thanks a lot for your corrections!

Best regards,
Anton

 

пн, 25 апр. 2022 г. в 18:45, Maris Engineering <ma...@maris-ee.eu>:

Maris Engineering

unread,
Apr 26, 2022, 6:20:20 AMApr 26
to Anton Bondarev, embox...@googlegroups.com
Oh, the patch!
I just created it now. I was so focused on the other stuff I wrote in the email that I forgot the patch.

Regarding the website updates: Now it is clear that the section "choose a supported platform" simply had erroneous references in the sip_nuklear section.

Thanks, too - I'll return to you later. Only one remark at this time:

I'm considering it as a little drawback that doing another confload results in writing stuff to a fixed subdirectory, in this case conf. It overwrites e.g. an existing simple_pjsua_sip_account.inc (as a workaround I saved a backup of this).
Could you imagine that each config results in output to a folder name à la conf/project/pjsip/x86-qemu? I.e. using the same path structure as the confload directories are structured.
And even to have builds also be created into distinct (sub)folders? The latter would allow to quickly switch eg. from testing in qemu and target, with subsequent makes.

Rob
--
Maris Engineering
Kämergasse 27
D-52349 Düren
phone +49 2421 2999580
+31 85 0602030
http://maris-ee.eu
http://smpsdesign.eu
0001-add-qemu-stuff-to-apt-install.patch

Anton Bondarev

unread,
Apr 26, 2022, 9:09:50 AMApr 26
to Maris Engineering, embox...@googlegroups.com
Thanks for the patch.
As I see you suggest to add 'qemu qemu-system' into the packages list. We didn't add it earlier because qemu is not necessary package for work with STM32 for example. But I'm agree it is better to add them into a particular section

As for 'conf' folder. Yes, we discussed similar way to use current configuration, it is possible to create link to the current template folder, but we decided that it is very useful if a developer can create a custom template exactly for his purpose and store it. It's possible to create your own 'project'. I mean you can use external folder to store: templates, aps, and other modules etc. You should use
make ext_conf for this purpose, see make help
You can see an example in the article ( https://anton-bondarev.medium.com/add-modbus-to-embox-rtos-and-use-it-on-stm32-and-not-only-on-them-d7ce41a060f0 ) section "Add the project to Embox as external repo"

Best regards,
Anton

вт, 26 апр. 2022 г. в 13:13, Maris Engineering <ma...@maris-ee.eu>:

Maris Engineering

unread,
Apr 26, 2022, 12:18:52 PMApr 26
to Anton Bondarev, embox...@googlegroups.com
On Tue, 26 Apr 2022 15:09:37 +0200, Anton Bondarev <anton.bon...@gmail.com> wrote:

As I see you suggest to add 'qemu qemu-system' into the packages list. We didn't add it earlier because qemu is not necessary package for work with STM32 for example. But I'm agree it is better to add them into a particular section.

That's fully plausible, of course. For me, I experimented with qemu also in order to gain *first* experiences with it.

The qemu builds seem to suffer of the problem of crash when I enter exit at the command prompt. As a result I have to kill the bash session, and restart a new console window:

ASSERTION FAILED on CPU 0
at /home_old/rob/git/embox/src/kernel/task/multi/multi.c:351
in function task_start_exit

task_self() != task_kernel_task()

Please also find attached another patch that fixes a problem using ./scripts/qemu/auto_qemu.
But without fix it seems however - at first glance -, that no problems occur on execution in qemu.

Regards,
Rob

0001-fix-too-many-arguments-in-script-due-to-space-charac.patch

Anton Bondarev

unread,
Apr 27, 2022, 4:58:17 AMApr 27
to Maris Engineering, embox...@googlegroups.com
Thanks for the patch.
I clean auto_qemu a little, however I don't sure that variables in bash must be in ""
if [ "$graphic_lines" = "-nographic" ]; then
as you suggested

Also I can not reproduce the assertion, but I admit that it is a possible situation.

Regards,
Anton
 

вт, 26 апр. 2022 г. в 19:18, Maris Engineering <ma...@maris-ee.eu>:

Maris Engineering

unread,
Apr 27, 2022, 5:17:37 AMApr 27
to Anton Bondarev, embox...@googlegroups.com
Well, regarding the quotes:
If you use the quotes, the warning upon script run is no longer present. Because the warning text is a bit vague, I searched the internet and found this entry: https://unix.stackexchange.com/questions/531477/if-condition-in-bash-getting-too-many-arguments
And indeed, the variable is assigned a string with a space character.

Regards,
Rob
Reply all
Reply to author
Forward
0 new messages