Based on the following (see below), my understanding is that any
simple application such as a blinky, which does not explicitly create
tasks (e.g. by calling os_task_init), is still runs as an application and
is taken care by the Mynewt RTOS, i.e. It's not a bare metal application
Reasons are:
1: syscfg.yml:
The application configuration, reported by newt seem to suggest
that there the image that would be build will have an OS. Logs below:
<snip from target list>
$ newt target show
targets/my_blinky
app=apps/blinky
bsp=@apache-mynewt-core/hw/bsp/nrf52dk
build_profile=optimized
<snip from target list>
<snip from blinky(my_blinky) configuration>
$ newt target config show my_blinky
* Setting: OS_SCHEDULING
* Description: Whether OS will be started or not
* Value: 1 <--
...
...
* PACKAGE: sys/sysinit
* Setting: SYSINIT_CONSTRAIN_INIT
* Description: Only allow packages to be initialized by sysinit.
* Value: 1 <---
<snip from blinky(my_blinky) configuration>
There is no syscfg.yml file under the package (apps/blinky directory)
to override (If It would have been overriden, it would show up in the
above log as well)
2: The symbols in the ELF file generated by the build system also
has OS related code symbols. logs below:
<snip from nm>
$ pwd
~/bin/targets/my_blinky/app/apps/blinky
$ arm-none-eabi-nm blinky.elf | grep -i os_
200022d8 B g_hal_os_tick
20002300 B g_os_cputime
20001184 b g_os_dev_list
200020dc B g_os_idle_ctr
200021fc B g_os_last_ctx_sw_time
20000100 D g_os_mempool_list
200000e8 D g_os_run_list
20001f78 B g_os_sanity_check_list
200021ec B g_os_sanity_check_mu
200000f0 D g_os_sleep_list
200021e0 B g_os_started
20002200 B g_os_task_list
2000220c B g_os_time
00009b4e t nrf52_os_tick_counter.part.0
00009b8c t nrf52_os_tick_set_ocmp
00008e7c T os_arch_ctx_sw
00008ea2 T os_arch_in_critical
00008ee8 T os_arch_init
...
...
The reason, I want to confirm this is because, I'm trying to port
some simple peripheral application to work under (rather on top
of) Mynewt OS (I think, that this might be a decent enough way
to improve my understanding on both nRF52 peripherals and
Mynewt core).
Please comment.
Thanks,
Amit
--
Sent from Bahamas, while drinking chi-chi and piƱa colada.