OpenThread API: undefined reference to otThreadGetMaxAllowedChildren() - nrf52

I have the problem with compilation. After adding function call
otThreadGetMaxAllowedChildren() in the openthread/examples/apps/cli/main.c I got an error:
openthread/examples/apps/cli/main.c:228: undefined reference to `otThreadGetMaxAllowedChildren'
Similary, the same issue with otThreadGetChildInfoByIndex():
openthread/examples/apps/cli/main.c:204: undefined reference to `otThreadGetChildInfoByIndex'
I have added -DOPENTHREAD_FTD=1 flag, but error still occurs.
Any idea what should I do to make compilation successful?

The otThreadGetChildInfoByIndex() is only available for FTD builds.
You should either:
Disable MTD and RCP in your build options, or
Wrap your child table code with #if OPENTHREAD_FTD.
You can refer to the CLI code for example usage.

Related

STM32Cube: FreeRTOS 10.0.1 and CMSIS v2 generate warnings

I'm using STM32Cube to generate an IAR EW 8.2 project with FreeRTOS 10.0.1 and CMSISv2 API's. When I clean up the project and build again, I get the following warnings
Warning[Pe177]: variable "hTask" was declared but never referenced
Warning[Pe177]: variable "hTimer" was declared but never referenced
Warning[Pe177]: variable "hEventGroup" was declared but never referenced
Warning[Pe177]: variable "hSemaphore" was declared but never referenced
Warning[Pe177]: variable "hQueue" was declared but never referenced
I know that these warnings should not affect my code but I would be interested if this warnings are always there or if they depend on my settings.
These are warnings being generated by IAR's compiler. They'll go away after those variables are used. If they aren't used. . . get rid of them and the warnings will also go away ;-) Dead code is never a good thing to keep around! Specifically, you should really consider treating warnings more like errors, since it will force a cleaner code base.
If you really want to supress warnings, you can mask individual warnings in IAR:
1. Select Project-->Options-->Compiler tab
2. Select Suppress these diagnostics and specify your desired warning
3. Click OK.

vscode auto import with already exists code

Sometimes i have already predefined code and i want functions to autoimport with Quick Fix action is it possible ?
VS Code is conservative when checking JavaScript code. Variables such as beforeSaveWarrior may be a global defined somewhere else (this is a surprisingly common pattern in JavaScript land). This means that using an undefined variable such as beforeSaveWarrior is not considered an error by default.
To show undefined variables as errors and get quick fixes that import them, you need to enable semantic checking in your Js file. The easiest way to to do this is to add // #ts-check at the top of your JavaScript file. Now undefined variables such as beforeSaveWarrior will be marked as errors. The lightbulb for the error should include a fix that adds the import

Babel 7 Upgrading creating error: "TypeError: Cannot assign to read only property 'exports' of object '#<Object>'"

I'm in the process of upgrading from babel 6 to babel 7. Some of my old tests using chai, sinon, and enzyme come up with the following error:
TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
I do have some code that is using "require" instead of "export" and I know that the babel 7 documentation says that you might need to use "require().default" instead. But that doesn't seem to be helping.(Or I just need to finish putting defaults everywhere and calling them before any the errors will go away). Does anyone else have experience with this issue?
Try not to mix require / module.exports and import / export, ensure to be consistent with one.

LinqPad error with Rx.NET Observable

I'm trying to run Rx.NET inside LinqPad. I added the Rx.NET DLLs as you see in the picture.
The error that I'm seeing is
CS0103 The name 'Observable' does not exist in the current context.
How can I fix this error?
Ensure you have added the required namespaces in the "Additional Namespace Imports" tab (accessible via Ctrl-Shift-M).
For Observable you need System.Reactive.Linq.

Eclipse debug can't find fields

I'm using the Eclipse debugger and can't inspect/watch field values or results of field.method() calls. I've encountered the problem in both Juno and now in Indigo. At first I could resolve the issue by wiping out my .metadata and rebuilding, but now the problem occurs even with a fresh build.
A specific error: I create a Deflater object deflater = new Deflater();,
set some input deflater.setInput(buffer, 0, bufferPosition);,
then try to inspect functionality by highlighting a section of code deflater.needsInput()
and doing a right-click->Inspect. The error reads: "Cannot find the field deflater for the object apps.TestCore$Tests (id=27)".
The error only occurs when the field belongs to an inner class (In this case "Tests"); when the variable is local or the class is not an inner class, everything seems to be working. Hovering over the variable "deflater" shows the contents drill-down just like it should. Highlighting "deflater" and doing an Inspect gives the error, and using the Expressions view to inspect the variable/call methods on the variable gives the same error.
Please help; this is making my debugging life very difficult, as I have to use println() for anything more complex than a hover inspection can provide.
This is not remote debugging - just local to my system.