<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 16, 2022 at 7:15 AM Frank Kühndel <<a href="mailto:frank.kuehndel@embedded-brains.de">frank.kuehndel@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Joel,<br>
<br>
as far as I can remember, the error handling of `spec2modules.py` was<br>
never excellent. Adding `notes: null` to<br>
`spec/acfg/if/posix-timer-face-behavior.yml` fixes your problem:<br></blockquote><div><br></div><div>Thanks! That did it. </div><div><br></div><div>I accidentally added a k to interface and it also gave a mysterious exception.</div><div><br></div><div>Improving the error handling might be a good GSoC project if we can define </div><div>the places a field is required, a field as an enumerated set of values, group</div><div>references are wrong, etc.</div><div><br></div><div>It is going to be hard to write these with crystal ball error diagnosis. :( </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
{{{{<br>
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause<br>
appl-config-option-type: feature-enable<br>
copyrights:<br>
- Copyright (C) 2022 On-Line Applications Research Corporation (OAR)<br>
description: |<br>
If this configuration option is defined, then POSIX timers may<br>
not be created to use the CLOCK_REALTIME. Per POSIX, this is allowed<br>
behavior but per the FACE Technical Standard, using POSIX timers based<br>
on CLOCK_REALTIME (e.g., time of day) is unsafe for real-time safety<br>
systems as setting CLOCK_REALTIME will perturb any active timers.<br>
<br>
If this option is not defined, POSIX timers may be created to use the<br>
CLOCK_REALTIME in compliance with the POSIX specification.<br>
enabled-by: true<br>
index-entries: []<br>
interface-type: appl-config-option<br>
links:<br>
- role: appl-config-group-member<br>
uid: group-face<br>
name: CONFIGURE_POSIX_TIMERS_FACE_BEHAVIOR<br>
notes: null<br>
type: interface<br>
}}}<br>
<br>
Missing non-optional keys, misspelled keys, or keys placed in the wrong<br>
level lead to exceptions in `spec2modules.py` as well as missing values,<br>
or values of wrong type.<br>
<br>
In this particular case, I found the problem by comparing<br>
`spec/acfg/if/posix-timer-face-behavior.yml` to files using<br>
`group-filesystem` (e.g. `spec/acfg/if/filesystem-all.yml`).<br>
<br>
There is a documentation on specification items:<br>
<a href="https://docs.rtems.org/branches/master/eng/req/items.html" rel="noreferrer" target="_blank">https://docs.rtems.org/branches/master/eng/req/items.html</a><br>
<br>
The format for your file `spec/acfg/if/posix-timer-face-behavior.yml` is<br>
described in<br>
<br>
* section "5.2.2.18. Interface Item Type"<br>
* sub-section "5.2.2.20. Application Configuration Option Item Type"<br>
<br>
It states the missing key "notes".<br></blockquote><div><br></div><div>This was my first time wandering into here. Hopefully it gets easier</div><div>over time. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I hope I could help.<br></blockquote><div><br></div><div>I appreciate the help.</div><div><br></div><div>Thanks. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Greetings<br>
Frank<br>
<br>
<br>
<br>
On 8/12/22 23:28, Joel Sherrill wrote:<br>
> Hi<br>
> <br>
> I've just attached the patch as a work in progress since spec2modules.py is<br>
> unhappy with what I've done so far. I'd appreciate some guidance. I checked<br>
> that spec2modules.py ran OK before my changes. I added a group-face and<br>
> hope I did that much right. But something is wrong. Help appreciated.<br>
> <br>
> $ ./spec2modules.py<br>
> Traceback (most recent call last):<br>
> File "./spec2modules.py", line 85, in <module><br>
> main()<br>
> File "./spec2modules.py", line 76, in main<br>
> rtemsspec.applconfig.generate(config["appl-config"], item_cache)<br>
> File "/home/joel/rtems-work/rtems/rtems-central/rtemsspec/applconfig.py",<br>
> line 336, in generate<br>
> _generate(group, options, enabled, sphinx_content)<br>
> File "/home/joel/rtems-work/rtems/rtems-central/rtemsspec/applconfig.py",<br>
> line 264, in _generate<br>
> content.add_option_notes(content.substitute(item["notes"]))<br>
> File "/home/joel/rtems-work/rtems/rtems-central/rtemsspec/items.py", line<br>
> 210, in __getitem__<br>
> return self._data[key]<br>
> KeyError: 'notes'<br>
> <br>
> Thanks.<br>
> <br>
> --joel<br>
<br>
-- <br>
embedded brains GmbH<br>
Herr Frank KÜHNDEL<br>
Dornierstr. 4<br>
82178 Puchheim<br>
Germany<br>
email: <a href="mailto:frank.kuehndel@embedded-brains.de" target="_blank">frank.kuehndel@embedded-brains.de</a><br>
phone: +49-89-18 94 741 - 23<br>
mobile: +49-176-15 22 06 - 11<br>
fax: +49-89-18 94 741 - 08<br>
<br>
Registergericht: Amtsgericht München<br>
Registernummer: HRB 157899<br>
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler<br>
Unsere Datenschutzerklärung finden Sie hier:<br>
<a href="https://embedded-brains.de/datenschutzerklaerung/" rel="noreferrer" target="_blank">https://embedded-brains.de/datenschutzerklaerung/</a><br>
<br>
</blockquote></div></div>