/* mbed Microcontroller Library * Copyright (c) 2019 ARM Limited * SPDX-License-Identifier: Apache-2.0 */ #if !MBED_TEST_MODE #include "mbed.h" // NOLINT #include "mbed_trace.h" // #include "static_scheduling/bike_system.hpp" #include "FlashIAPBlockDevice.h" #include "static_scheduling_with_event/bike_system.hpp" #include "update-client/usb_serial_uc.hpp" #if defined(MBED_CONF_MBED_TRACE_ENABLE) #define TRACE_GROUP "MAIN" #endif // MBED_CONF_MBED_TRACE_ENAB int main() { #if defined(MBED_CONF_MBED_TRACE_ENABLE) mbed_trace_init(); #endif tr_info("Start"); FlashIAPBlockDevice flashIAPBlockDevice(MBED_ROM_START, MBED_ROM_SIZE); update_client::USBSerialUC usbSerialUpdateClient(flashIAPBlockDevice); update_client::UCErrorCode rc = usbSerialUpdateClient.start(); if (rc != update_client::UCErrorCode::UC_ERR_NONE) { tr_error("Cannot initialize update client: %d", rc); } else { tr_info("Update client started"); } // static_scheduling::BikeSystem bikeSystem; static_scheduling_with_event::BikeSystem bikeSystem; tr_debug("Starting Bike System"); // bikeSystem.startWithEventQueue(); bikeSystem.start(); while (true) { } } #endif // MBED_TEST_MODE