[Help Wanted] Mbed CE: A community fork of Mbed OS

Hi,
I have a question/problem.
The cmake line

add_subdirectory(mbed-os) # Load Mbed OS build targets.  Must be added before any other subdirectories

Definitely this will not add all sub-directories.

Now, if I need to use some drivers, the compilation will fail.
take this example and try to run the hello world.

#include "mbed.h"
#include "EthernetInterface.h"
#include "TCPSocket.h"

int main()
{
	while(true) 
	{
		printf("Hello world from Mbed CE!\n");
		ThisThread::sleep_for(1s);
	}

	// main() is expected to loop forever.
	// If main() actually returns the processor will halt
	return 0;
}

I don’t know how this cmake thing works. since there is no make file … I dont know where to check if the directories adds or not and how to write the include.
thanks for your help.

Ahh, you need to add

target_link_libraries(YourApplication mbed-netsocket)

to your application. This is something we are working on documenting.

1 Like

Hi Jamie,
Thank you very much.
I would like to make them as variables.
So this is my version.


#define libraries you are using here . 
set(LIB1 mbed-netsocket)
set(LIB2 mbed-os)

# Combine the libraries into one variable
set(LIBRARIES_TO_LINK ${LIB1} ${LIB2})

#Keep files inside /src directory
file(GLOB_RECURSE SOURCES
     src/*.cpp
     src/*.h
)

#Project name is based on the previous definition
project(MyProject) 

add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME} ${LIBRARIES_TO_LINK}) # Can also link to mbed-baremetal here

Thanks again,
BR

1 Like

Hello,

i would like to introduce another new part of our project MbedCE. We made a new organization Mbed-CE Libraries & Examples which could replace Components | Mbed which is not maintained like everything else.

I prepared 5 repos where each hold one library. Each is already converted (by me or someone else, info should be in header file.) and prepared for MbedCE at this moment. However it is possible to use these libraries also with current MbedOS 6+ without any changes, just import them into KeilStudio directly from repo.

We will try to add more libraries but this will take a time. We will be also happy if someone will join to help or share own library and so on.

BR, Jan

4 Likes

I have a repo with current Mbed-CE and some test apps using a Webserver, MQTT, SDIO, Modbus and Fingerprint Sensor.
The webserver is roughly working, but needs further imporvements. Its using worker threads for the client connections, but maybe the event based approach from ESPAsyncWebserver is better. MQTT is working fine, TFTP server also.
For health reasons, I’m currently not able to work on this stuff, but the current state can be found here:

Hope it helps someone.

2 Likes

Got a new documentation project to share with you guys!

In the times I’ve designed projects using Mbed OS, a major pain point has been selecting an MCU which supports the features I need. Example: if I need an MCU that supports asynchronous SPI, Ethernet, and a true random number generator, what are my options? Finding candidates isn’t easy.

Now sure, I guess I could do some sort of parametric search online, but that can be difficult to do in a vendor-neutral way, and it also won’t warn me about features which exist in a chip’s silicon but aren’t supported by Mbed. That info exists in targets.json5, but it isn’t easy to understand unless (a) you are well briefed on Mbed internal terminology, like the difference between DEVICE_SPI and DEVICE_SPI_ASYNCH, and (b) you have the patience to go up through the inheritance hierarchy and check each level for its declarations. Clearly, this json file is designed to be parsed by a machine, not a person!

Well, I decided to create a machine to parse it and generate something a bit easier for humans like us to read. Basically, it’s a set of scripts which read the json5 file and generate some cross-reference tables which show each target and the drivers it supports. To make the information even more understandable, I also documented each driver with a description and organized the targets into families, so e.g. all the STM32H7 targets are shown together. Additionally, I set it up to connect to the CMSIS device pack database, so for any target which defines a device_name property, it can automatically pull the MCU vendor name, RAM size, and flash size.

You can see the first version of this site online now: here’s the list of targets and the list of drivers. These are still pretty rudimentary (I have only the most basic experience with web programming), but I hope that they will be useful to anyone in the same position trying to choose the right MCU for a purpose or understand what specific things in Mbed do!

The next step forward will be to integrate this site with the testing system, so that it’s possible to see results of test runs in the web UI and to see a matrix of which tests test which features and which tests test which targets.

4 Likes

Hello,

Thanks, you’ve created a really handy machine for comparing MCU families.
Are all these targets Mbed CE compatible?
I guess we’ll be able to see this information with the integration of the test system.

For the driver list I noticed that it was always given in the same order on the Mbed CE MCU Target Families page for each target family.
However, when you go to the family page, the order of the drivers sometimes changes.
This is the case, for example, with the K64F or RP2024 target family, which doesn’t have Analog Inputs at the top of the list as it does on the index.

Thanks again Jamie, you’re really doing a great job with Mbed CE.

1 Like

Yes, all of these targets are Mbed CE compatible, although I can’t guarantee that every single one actually works as there are quite a lot of targets I haven’t gotten the chance yet to test with. Huh I will look into the ordering issue!

1 Like

Hello again! As an update, I’ve now integrated support for the Arduino Nicla Sense ME into Mbed CE. This board was actually quite easy to support as it’s very similar to the NRF52832 board already supported, and it includes an Mbed interface chip on-board (no more messing around with bootloaders this time!). Martino from Arduino was kind enough to send me a dev unit to test with as well.

For more info on this target, check the info page here: MCU Info Page: Arduino Nicla Sense ME · mbed-ce/mbed-os Wiki · GitHub

I have also compiled some Arduino core files that you can use to compile for this target, and the other Arduino ones, in Arduino IDE: Release Release v1.1.0 · mbed-ce/ArduinoCore-mbed-ce · GitHub
Feel free to check it out if you’d like to try building for Mbed directly from the Arduino toolset!

4 Likes

Just wanted to let you guys know, I created a new roadmap to track the significant changes we are working on in Mbed CE! Please check it out if you’re interested in the progress we’ve made so far and in the things that could use more help!

4 Likes

Also, regarding the EoL announcement, I am a bit disheartened, but not too surprised. It seemed like all the life had gone out of Mbed OS development back in early 2022, and the official version has just been on life support since then. I had always suspected that they were going to take it off of life support at some point… Also, I did have a bit of warning that something like this might occur from ARM, though I was sworn to secrecy on that front until an actual announcement was made. There was a bit of an effort to try and save the project internally, but it seems like it didn’t win out.
So yeah, not surprised, but disappointed.

4 Likes