src: Import and run lang_main
This is the bare minimum needed to run this on real hardware.
This commit is contained in:
parent
21540fba13
commit
95e5f728b4
2 changed files with 9 additions and 1 deletions
|
@ -19,6 +19,10 @@ set(MBED_APP_JSON_PATH mbed_app.json)
|
|||
include(mbed-os/tools/cmake/app.cmake)
|
||||
add_subdirectory(mbed-os)
|
||||
|
||||
# Load TardisLang
|
||||
set(BUILD_TARDISLANG_APP OFF CACHE INTERNAL "")
|
||||
add_subdirectory(lang)
|
||||
|
||||
# Create SNTP project
|
||||
project(sntp)
|
||||
file(GLOB SNTP_FILES "${PROJECT_SOURCE_DIR}/third_party/sntp/*.cpp")
|
||||
|
@ -31,7 +35,7 @@ project(Tardis)
|
|||
file(GLOB SRC_FILES "${PROJECT_SOURCE_DIR}/src/*.cpp")
|
||||
add_executable(Tardis ${SRC_FILES})
|
||||
target_include_directories(Tardis PRIVATE "${PROJECT_SOURCE_DIR}/include")
|
||||
target_link_libraries(Tardis PRIVATE mbed-netsocket mbed-os mbed-storage-qspif mbed-usb-msd mbed-storage-littlefs-v2 sntp)
|
||||
target_link_libraries(Tardis PRIVATE mbed-netsocket mbed-os mbed-storage-qspif mbed-usb-msd mbed-storage-littlefs-v2 sntp TardisLang)
|
||||
target_compile_options(Tardis PRIVATE -Wall -Wextra -Wpedantic -Werror)
|
||||
mbed_set_post_build(Tardis)
|
||||
|
||||
|
|
|
@ -43,6 +43,8 @@ void setup_tracing(void) {
|
|||
}
|
||||
#endif
|
||||
|
||||
extern "C" int lang_main(void);
|
||||
|
||||
int main() {
|
||||
setup_tracing();
|
||||
|
||||
|
@ -59,6 +61,8 @@ int main() {
|
|||
network_init();
|
||||
network_connect();
|
||||
|
||||
lang_main();
|
||||
|
||||
while (true) {
|
||||
int presses = waitForPresses(600s);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue