Use arduino malloc library and switch to none Clibrary instead of semihost.