Making changes to mbed OS libs

Is it possible to access the mbed OS libs from inside the online compiler and make changes?

It’s been a while since I’ve used the online IDE (I use Mbed Studio now) but I don’t think you can. If you’re limited to using the online compiler I think you could fork Mbed OS, make any changes externally and then import your forked version of Mbed OS into the compiler program. Alternatively, if you’re able to use Mbed Studio, it’s very easy to modify Mbed OS source.

Adam

Cheers. Ill look into getting mbed Studio. I see that it can flash directly to the board, but is it possible to export a bin file, and do the transfer manually?

Side question: Do you know if mbed OS 5 supports the LAN8720 PHY chip on the LPCxpresso1769? I know on earlier versions it was necessary to change the driver in the TARGET folder by swapping two files. Is this possible to do in mbed Studio?

Cheers

You absolutely can - that’s how I work. By default I believe the output directory for the binary is, from your program’s root directory: BUILD/TARGET_NAME/COMPILER/myprogram.bin. So, for example, using ARMC6 compiler with a NUCLEO_L073RZ the directory would be: BUILD/NUCLEO_L073RZ/ARMC6/myprogram.bin

Unfortunately I’ve absolutely no idea! I’d imagine if it was possible previously then it will still be possible. To what extent you’d need to make changes to Mbed OS I’m not sure…

The files in question are in feature/netsocket/emaac-drivers/TARGET_NXP_EMAC/TARGET_LPCTARGET

How would I go about accessing and modifying them from within mbed Studio?
Cheers

So once you have a program open in Mbed Studio you should see, on the left hand side where the program’s files and folders are listed, a little arrow and a cog next to mbed-os. Simply click the arrow to expand Mbed OS and navigate to feature/netsocket/emaac-drivers/TARGET_NXP_EMAC/TARGET_LPCTARGET and voila! Take a look at the picture below to see what I mean.

Thanks!

mbed Studio on OSX seems to be buggy as hell. The small red x keeps appearing (and disappearing) in my project directory, even though it all seems to compile ok. Have you experienced this?

Finally, please take a look at this thread: https://os.mbed.com/forum/mbed/topic/3684/?page=1#comment-19242

Do you take the comment by Emilio Monti to mean that I should delete the lpc_phy_dp83848.c
file and copy and paste lpc_phy_lan8720.c
into the folder? Very confused at the moment.

Cheers

LPCxpresso compatibility | Mbed

Almost: it is going to require some changes. The official mbed IP networking library is actually using the Ethernet driver from the NXP MCU SW Application Team… As you can see there is a common interface for the PHY: lpc_phy.h The mbed library is using the
lpc_phy_dp83848.c implementation, if you want to use the networking library in the LPCxpresso, you have to swap the implementation with …

No worries!

Mbed Studio as a whole is still in beta so it’s expected to be buggy. That said, I’ve been using it on both Win 10 and OSX for a while and I’ve not noticed any breaking bugs. Anything you find you should absolutely report - the support guys on here are really active and definitely take note!

That’s how it reads to me, yeah. That said, the thread is 7 years old so it would be safe to assume that things have likely changed under the hood in that time and that it may not be such a simple change any more. Then again, it might!

Good luck!

Good luck

1 Like