Sorry for triple post, but ideas keep coming to me
What would be really cool is some sort of abstraction that makes one able to use the EventQueue API to queue events that then run on the other processor
Not sure how feasible this is because, depending on the core architectures, it may not be possible (or allowed by an MPU) for one core to execute function pointers from another core’s memory region.
Perhaps we would need to come up with some C++ magic that lets us use ERPC to create a RPCCallback that is then mapped to a function on the coprocessor side. This RPCCallback could then be placed in an EventQueue-like structure to make multi-process programming on Mbed feel more familiar.
I don’t want to make a new post with nearly equal content. I just checked a little bit of the sources and often it confuses more than it enlightens.
Just as a simple example:
There is a DigitalInOut - but for what? There is no PinDirection InOut and there is no way to set a pin to in and out at the same time.
Then there are low level functions for which multiple wrappers with different names exist, instead of making function overloads with possibly optional parameters.
Next try to use RAII whenever possible (in cpp).
Last but not least the C++ objects are sometimes just wrappers around C functions without some OO background, e.g. I2C.
I agree with @boraozgen. Better unit testing tools and documentation could be a great idea. A way of emulating Mbed OS devices/device in a Linux machine to run Mbed OS in docker would be highly appreciated too.
In addition, in my opinion it would be great to have a more modular design. For example, have options to completely disable network components or storage components to reduce compile times.
@davidAlonso:
In addition, in my opinion it would be great to have a more modular design. For example, have options to completely disable network components or storage components to reduce compile times.
I agree. Fortunately, the design is already modular in some extent. At the present we can use the .mbedignore file for some sort of configuration (an example is available here). Nevertheless, it would be nice if we can include/exclude the modules using the mbed_app.json configuration file.
I am aware of .mbedignore importance, but in some cases it is really hard to isolate dependencies due to cross-dependencies between modules. I can’t remember the exact case, but I remember trying to remove high-level modules (such as TCP/IP connectivity) and adding other ones (such as storage) and it was nearly impossible because some modules depends on other which were excluded. I don’t know if you have had similar issues, but if you don’t believe me I can try to reproduce again…
An official package manager support, such as Conan or Cargo, would be great too. This can be useful to distribute binaries and libraries instead of just source code.
for some reason Wifi drivers for ESP8266 (probably also for the rest modules) not support Server feature. In the Restrictions of ESP8266 driver is note about UDP server but nothing about TCP.
@andypowers Next month it will be one year of this topic, is there any result from this discussion?