10 years, 7 months ago.

Porting external libraries to mbed

I looking to port a few external to mbed.

Instead of completely mutilating this code, I would like to uses existing MBED macros to control the inclusion/exclusion of header includes and such.

Any recommendations of a MBED specific macro that I can use?

-Cameron

1 Answer

10 years, 7 months ago.

Hi,

this is copied from one exported project for K64F as an example what macros are defined there:

TARGET_K64F,  TARGET_M4,  TARGET_Freescale,  TARGET_KPSDK_MCUS,  TARGET_KPSDK_CODE,  TOOLCHAIN_ARM_STD,  TOOLCHAIN_ARM,  __CORTEX_M4,  ARM_MATH_CM4,  __FPU_PRESENT=1,  MBED_BUILD_TIMESTAMP=1399028447.87,  __MBED__=1,  CPU_MK64FN1M0VMD12,  TARGET_FF_ARDUINO

The only generic macro I see there is MBED (2 underscores before/after) which is set to 1. I'll ask if this is the right one to be used.

Regards,
0xc0170

Accepted Answer

Hi Martin,

Using MBED seems work well.

Thanks, -Cameron

posted by Cameron Haegle 19 May 2014