Arm Mbed OS support forum

Fatal error C3903U and namespace not found

Hello ,
I am new in mbed world, I was looking for USB MIDI solution and I found a very promising option here so I started experimenting. I have a NUCLEO-F767ZI which i understand is compatible with such library in Mbed OS.

I have created a new project in the online compiler and i have imported the project USB MIDI hello world from simin ford (2011) but if I try to compile it just as it is, I see fatal error C3903U and compilation fails. If I create a new project and I import USBMIDI as a library and again I try to compile I see error:
Error: Unknown type name ‘namespace’ in “extras/mbed-os.lib/rtos/Kernel.h”, Line: 28, Col: 1

So browsing around I kinda understood that there is probably some version problem cause apparently nor project nor the library is compatible with the default version of Mbed is used when you create the project on online compiler… this is at least what I have understood…

My question are:
1)Is what I have understood correct?
2) if yes how can I see the os version a library or project has been created with and how I can choose it in creating a project to ensure compatibility?
3) is there another way to overcome the issue and use the library?

Thanks a lot in advance for any suggestion.

Filippo

Hello,

Usually is good to place a link of the mentioned source.

If you think this one - USBMIDI_HelloWorld, then check line 89 of the usbcore.c file. You will see LPC_USB->... it looks like macros of registers. I think that old library and its example are only for LPC MBED board, so you can’t use it for STM32.

But why you want to use the old one when MbedOS has USBMIDI already integrated - USBMIDI - API references and tutorials | Mbed OS 6 Documentation.

BR, Jan

Hello Johnny K,
thanks a lot for your answer.

The link in the documentation you put is exactly what i have found originally and what interested me.
What mislead me is that when, in a first instance, I have tried to do exactly what is in the example I kind of was expecting to see the USBMIDI class inside the classes list of mbed-os node in the left pane project view on the online compiler. Not being able to find it, I then tried to import cause I concluded USBMIDI was not part of the default library. My bad…

I tried now to compile using the default library example an in fact it compiles so that’s fine.

Thanks a lot again,

Filippo