Hi Chris,

I think cases like the one you described are usually solved by adding a
> new setting to the driver package (e.g., `TSL2591_CONFIG`).  If that
> setting is enabled, the driver package depends on `sys/config`, e.g.,
>
>     pkg.deps.TSL2591_CONFIG:
>         - '@apache-mynewt-core/sys/config'


That seems like a sensible choice, and allows control over config settings
at a package level. Thanks.

I don't know if this helps in your particular case, but you can specify
> "-f <path>" to use a local file for internal flash (assuming the app
> calls `mcu_sim_parse_args()` in main).  If you specify the name of an
> existing file, the simulator will reuse its contents.


Wasn’t aware of this param but makes testing config persistance and file IO
across resets easier. Thanks for pointing the additional flag out.

I’m going to try to put together a simulation of the TSL2591 just as a
proof of concept to emulate a device where you can’t easily generate
repeatable external conditions. There is an accelerometer option for the
sim in tee sensor code but I think it’s useful to have an example that
compares against a real device.

K.

Reply via email to