Hi Chris, Thanks for the insight on this. Yes, that's an interesting side effect. I'm inclined to agree with you that we leave blinky as-is for the release. I'll think about some possible wording for the Tutorials pages around blinky to indicate that it is, indeed, a "hello world" and that we will go into adding, extending, and customizing apps in later tutorials rather than encouraging people to try to do to much with the blinky app itself.
I have some thoughts on adding packages, etc. to apps as well which I will save for another time. There may be some ways to make newt smarter about package additions based on syscfg.yml contents of an app. Best regards, dg > On Nov 11, 2016, at 1:53 PM, Christopher Collins <[email protected]> wrote: > > Hi David, > > That is an interesting find. The problem is that blinky does not set a > default eventq for taskless packages to use. If a package requires an > event queue, and none has been designated, it triggers a crash with a > failed assert. > > Blinky in its original state doesn't crash because it doesn't use any > packages that require an event queue. Blinky doesn't actually create an > event queue at all; its task handler is just a simple blink-and-sleep > loop. > > I am a bit conflicted about what to do here. On one hand, blinky is the > "hello world" of Mynewt, so it is good to keep it as simple as possible. > Adding event queue processing to its task handler, or an additional > task, would be at odds with this goal. On the other hand, blinky is > also meant to be a playground or sandbox for new users, it should be > easy to add new packages. > > Since we are hoping to release soon, I'm inclined to say let's keep > blinky how it is for now. We can figure out the right solution for the > next release. I'm certainly open to hearing opposing viewpoints, > though. > > Thanks, > Chris > > On Fri, Nov 11, 2016 at 01:18:07PM -0500, David G. Simmons wrote: >> I've gotten the blinky app up on the Arduino Zero Pro, and just for fun, I >> enabled the Console and shell, hooked it up to my FT232H and got ... >> >> 200976:Assert ; failed in os_eventq.c:314 >> 200976:Unhandled interrupt (2), exception sp 0x20007f48 >> 200976: r0:0x00000000 r1:0x00000000 r2:0x80000000 r3:0xe000ed00 >> 200976: r4:0x00000000 r5:0x0000013a r6:0x00016200 r7:0x00000003 >> 200976: r8:0x000927c0 r9:0x0000ca61 r10:0xbffd8dd3 r11:0xd6beeff1 >> 200976:r12:0xfffff7fe lr:0x0000d1bd pc:0x0000d1ca psr:0x8100001b >> 200976:ICSR:0x0440f002 >> >> Now, the blinky app is still running just fine, but from os_eventq.c, line >> 314: >> >> if (*evq == NULL) { >> eventq_dflt = os_eventq_dflt_get(); >> if (eventq_dflt != NULL) { >> os_eventq_designate(evq, eventq_dflt, start_ev); >> } >> >> /* The system is misconfigured if there is still no parent eventq. >> The >> * application should have explicitly specified a parent queue for >> each >> * package, or indicated a default. >> */ >> assert(*evq != NULL); -- David G. Simmons (919) 534-5099 Web <https://davidgs.com/> • Blog <https://davidgs.com/davidgs_blog> • Linkedin <http://linkedin.com/in/davidgsimmons> • Twitter <http://twitter.com/TechEvangelist1> • GitHub <http://github.com/davidgs> /** Message digitally signed for security and authenticity. * If you cannot read the PGP.sig attachment, please go to * http://www.gnupg.com/ <http://www.gnupg.com/> Secure your email!!! * Public key available at keyserver.pgp.com <http://keyserver.pgp.com/> **/ ♺ This email uses 100% recycled electrons. Don't blow it by printing! There are only 2 hard things in computer science: Cache invalidation, naming things, and off-by-one errors.
