Can't compile mbed external library for LPC1768

Hi all,
I’m trying to compile ublox-cellular-base (ublox-cellular-base - Base class for the ublox-xxx-cellular-xxx classes… | Mbed) with PlatformIO but i’m running into issues.

The main is this:

#include "mbed.h"
#include <UbloxCellularBase.h>

int main()
{

}

The first error was:
/home/user/.platformio/packages/framework-mbed/features/FEATURE_COMMON_PAL/nanostack-hal-mbed-cmsis-rtos/arm_hal_random.c:19:10: fatal error: mbedtls/entropy_poll.h: No such file or directory

But it seems to go after I included “mbedtls/platform/inc/platform_mbed.h” in main.cpp

The second error I can’t solve is this:
/home/user/.platformio/packages/framework-mbed/features/FEATURE_COMMON_PAL/nanostack-hal-mbed-cmsis-rtos/ns_event_loop.c:32:34: error: 'MBED_CONF_NANOSTACK_HAL_EVENT_LOOP_THREAD_STACK_SIZE' undeclared here (not in a function); did you mean 'MBED_CONF_LWIP_PPP_THREAD_STACKSIZE'?

I think it has something to do with mbed_config.h and that it’s missing from the project unlike mbed-cli

The third error is:
/home/user/.platformio/packages/framework-mbed/features/FEATURE_COMMON_PAL/nanostack-hal-mbed-cmsis-rtos/arm_hal_timer.cpp:15:8: error: 'EventQueue' does not name a type

My platformio.ini file is this:
[env:ubloxc027]
platform = nxplpc
board = ubloxc027
framework = mbed
build_flags = -D PIO_FRAMEWORK_MBED_RTOS_PRESENT -DPIO_FRAMEWORK_MBED_EVENTS_PRESENT

The same code appears to compile okay with mbed-cli,
Thanks for any help