4diac Forte - embox/embox GitHub Wiki
4diac-ide
Download from https://eclipse.dev/4diac/download/
4diac forte on Embox
Configure
You should add the following in mods.conf:
include project.fourdiac.forte
And one of the following C++ implementations:
@Runlevel(2) include embox.lib.cxx.ConstructionSingleApp
include embox.lib.cxx.DestructionStatic(table_size=2048)
include third_party.lib.libgcc_toolchain
include third_party.lib.libstdcxx_toolchain
include embox.lib.cxx.libsupcxx_standalone
or
@Runlevel(2) include embox.lib.cxx.ConstructionSingleApp
include embox.lib.cxx.DestructionStatic(table_size=2048)
include third_party.gcc.gcc_build(gcc_version="13.3.0")
include third_party.gcc.libstdcxx
include third_party.gcc.libsupcxx
Adding your own function blocks
To add new module with FBs you need to create directory YOUR_MODULE_NAME in embox/project/4diac/forte/Embox_FB_lib. It should contain CMakeLists.txt, .cpp and .h file for each FB. For example, we want to add LED_ON and LED_OFF FBs and module name EMBOX_LED. It should contain:
- LED_ON.cpp
- LED_ON.h
- LED_OFF.cpp
- LED_ON.h
- CMakeLists.txt
Text in CMakeLists.txt:
forte_add_module(EMBOX_LED ON "led control on embox")
forte_add_sourcefile_hcpp(LED_OFF)
forte_add_sourcefile_hcpp(LED_ON) # Add it for each FB
More about creating your FBs HERE.
Usage
When Embox loaded enter:
$ forte
To start forte and then it will be possible to load forte program from 4diac IDE using Ethernet (More here). Or start program from BOOT-file stored in embox fs (How to create BOOT-file):
$ forte -f FILENAME.fboot