{"id":48353469,"url":"https://github.com/eclipse-4diac/4diac-fbe","last_synced_at":"2026-04-05T10:04:31.044Z","repository":{"id":159221221,"uuid":"605930888","full_name":"eclipse-4diac/4diac-fbe","owner":"eclipse-4diac","description":"Build and cross-compilation environment for 4diac FORTE.","archived":false,"fork":false,"pushed_at":"2026-03-10T19:32:59.000Z","size":140,"stargazers_count":10,"open_issues_count":2,"forks_count":13,"subscribers_count":5,"default_branch":"release","last_synced_at":"2026-03-11T01:12:12.830Z","etag":null,"topics":["4diac","4diac-forte","build-system","cross-compilation","distributed-automation","eclipse-4diac","embedded-systems","iec-61499","industrial-automation","runtime"],"latest_commit_sha":null,"homepage":"https://eclipse.dev/4diac/4diac_fbe/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclipse-4diac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE.md","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-24T08:00:51.000Z","updated_at":"2026-03-10T19:31:10.000Z","dependencies_parsed_at":"2024-06-28T08:42:48.864Z","dependency_job_id":"5e21f79e-532d-41be-b600-13a32c193dc2","html_url":"https://github.com/eclipse-4diac/4diac-fbe","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/eclipse-4diac/4diac-fbe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-4diac%2F4diac-fbe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-4diac%2F4diac-fbe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-4diac%2F4diac-fbe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-4diac%2F4diac-fbe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-4diac","download_url":"https://codeload.github.com/eclipse-4diac/4diac-fbe/tar.gz/refs/heads/release","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-4diac%2F4diac-fbe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31431454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T08:13:15.228Z","status":"ssl_error","status_checked_at":"2026-04-05T08:13:11.839Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["4diac","4diac-forte","build-system","cross-compilation","distributed-automation","eclipse-4diac","embedded-systems","iec-61499","industrial-automation","runtime"],"created_at":"2026-04-05T10:04:30.296Z","updated_at":"2026-04-05T10:04:31.035Z","avatar_url":"https://github.com/eclipse-4diac.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"4diac FORTE Build System (4diac-fbe)\n==========================================================\n\n[![Build Status](https://ci.eclipse.org/4diac/job/FORTE_DEVELOP_via_FBE/lastCompletedBuild/badge/icon?style=flat-square\u0026subject=4diac%20FORTE%20on%20develop%20branch)](https://ci.eclipse.org/4diac/job/FORTE_DEVELOP_via_FBE/lastCompletedBuild/)\n\nThis repository contains a build environment for building 4diac FORTE, the\nrun-time engine of the 4diac IEC 61499 implementation.  Part of its workflow\nis code generation and recompilation of 4diac FORTE, and this environment provides\nthe means to do this with as little effort as possible.\n\nFurthermore, you can manage multiple builds for multiple target platforms.  As\nof this writing, it works on Linux and Windows hosts.  There should be no\nfundamental issues getting this to work on macOS, but no one did so.  Supported\ntargets are Linux (x86, ARM, MIPS, …) and Windows as well; again macOS should be\neasy to add, others might need some more work.\n\nCross-compilation is built-in: you can generate binaries for all supported\nplatforms on a single build host.\n\nThe 4diac FORTE executable built by this build environment will have all optional\nfeatures enabled: OPC-UA, MQTT, modbus, and with an extra setup step also\nopenPOWERLINK.  It does not enable platform-specific features like OPC (no -UA)\nby default, but different builds can have different target-specific\nconfiguration options.\n\nAll resulting executables will be statically linked, so there is nothing to\ndeploy beyond the actual executable file, and it will not depend on any system\npackages/features.  Exception: Windows targets will depend on system DLLs that\nprobably come with Windows since XP, maybe even earlier.  Full-featured\nexecutable size is around 4MB, this varies slightly across targets.\n\n\nInstallation\n============\n\nThe easiest way to install 4diac-fbe is through an official release: Check out\nthe `release` branch of `4diac-fbe` including all subrepositories, e.g. using\nthe `--recursive` flag of the git command line client. That's all.\n\nIMPORTANT NOTE for Windows users: By default, Windows has a rather short file\nname length limit.  It is therefore recommended to use an installation\ndirectory close to the root of your drive, like `D:\\4diac-fbe`. Also, avoid\na path containing whitespace.\n\nThe first time you run the compile script, the build environment will be set\nup by securely downloading and installing a binary release of\n`4diac-toolchains`.  If cross-compiling 4diac FORTE for a new target for the\nfirst time, the build environment will download an appropriate cross-compiler\nfrom the current `4diac-toolchains` release.\n\n\nUpdating\n--------\n\nIf you run this from the git `release` branch, simply update the repo and all\nsubrepositories in place. In case there were significant toolchain updates,\nrun `toolchains/etc/bootstrap/clean.sh` to trigger downloading a new\ntoolchain release.\n\n\nUsage\n=====\n\n\nCompiling a runtime executable\n------------------------------\n\nBuilds are executed by `./compile.cmd`.  This is both, a Linux/Mac shell\nscript and a valid Windows batch file.  It allows single-doubleclick-builds\nwith no console interaction on Windows. If run in this way, all configurations\nare built (see below). The final binaries will be created at\n`build/\u003cconfig-name\u003e/output/bin`.\n\nBy default, all build output is recorded in one log file per package and the\nconsole just displays a concise progress report. Log files are located in\n`build/\u003cconfig-name\u003e/forte.log` and `build/\u003cconfig-name\u003e/cget/build/*.log`.\nIf you want a detailed output of all activities, pass `-v` to `compile.cmd`\nand you will get verbose build output instead of log files.\n\nIn order to start over, `./clean.cmd` allows quick resetting of your build\noutput. If run without arguments, it will trigger rebuilding all 4diac FORTE\nbinaries but not their dependencies. Use the `--all` flag to also rebuild\ndependencies. Pass a single config name to just rebuild that config. Note that\nif a rebuild fails without `clean.cmd` but succeeds with it, that is considered\na bug: there should never be a reason to clean build output, consider reporting\nthis as a bug.\n\nIn order to override which 4diac FORTE version is built, you can just clone the\ngit branch/commit of your choice into subdirectory `4diac-forte`. This will\noverride the shipped version. Some provision is made to be compatible with\nvarious versions (release, freeze, develop), but there may be compile errors\nwith unusual versions. Feel free to ask for help in that case.\n\nYou can also build executables outside the `4diac-fbe` directory.  In your\ndesired target directory, create a subdirectory `configurations` just like\nthe one in `4diac-fbe` and call `compile.cmd` with your target directory as the\ncurrent working directory. This will create the `build` directory in this\nlocation instead of the `4diac-fbe` directory, allowing you to reuse a single\n4diac-fbe installation for multiple projects. If you want to use a custom\n4diac-forte source tree or custom dependencies, you can add `4diac-forte` and\n`dependencies` subdirectories as needed, which will override the default code\nshipped with 4diac-fbe.\n\n\nConfiguration management\n------------------------\n\nBy default, the build script will build 4diac FORTE for all configurations present in\nsubdirectory `configurations`.  Every time the script is called, it will\nupdate all builds with the exact same configuration.  The resulting executables\nare located in subdirectory `build/\u003cconfig-name\u003e/output`.\n\nYou may customize builds by copying and modifying the template configuration\nfile `configurations/inc/config-template.txt` to the parent directory\n`configurations`. By default, all configurations present in there will be\nbuilt. To temporarily disable a configuration, rename it so that it does not\nend in `.txt` anymore.\n\nIf you want to build just a single configuration, specify its base name on the\ncommand line.  Example: `./compile.cmd native-toolchain` only builds the\ndefault version configured through `configurations/native-toolchain.txt`.\n\nIn order to manage complex sets of configurations, you can organize them in\nsubdirectories. Configurations in a subdirectory will not be built by default.\nTo process an entire subdirectory instead of the default set of configurations,\nspecify its name on the command line, e.g. `./compile.cmd configurations/test`.\nNote that configuration names must still be unique, even when separated into\ndifferent directories (i.e. no two files with the same name in different\nconfiguration directories).\n\nLook at the template `configurations/inc/config-template.txt` for a thorough\nconfiguration example. Usually, you won't need many options. Subdirectory\n`configurations/tests` should be useful as further examples.\n\n\nCross Compilation\n-----------------\n\nYou can select a cross-compiled build by setting `ARCH` in the build\nconfiguration file (see above).  If cross-compiling 4diac FORTE for a new\ntarget architecture for the first time, the build environment will download\nan appropriate cross-compiler from the current `4diac-toolchains` release.\nSee `toolchains/etc/crosscompilers.sha256` for a list of pre-built\ncrosscompilers for the current release.\n\nCross-compilers are based on a triple configuration. Take\n**x86_64-linux-musl** as an example:\n\n- The first part (**x86_64**) represents the CPU architecture.  \n- The second part (**linux**) specifies the operating system.  \n- The third part (**musl**) specifies the calling convention, which might\n  also involve hardware specific details.\n\nThe most popular targets are:\n\n- **Windows:** `x86_64-w64-mingw32`\n- **Linux:** `x86_64-linux-musl`\n- **macOS:** `aarch64-apple-darwin20.2`  \n- **Raspberry Pi:** (recent 64-bit versions) `aarch64-linux-musl`\n\nThe full list of supported targets varies from release to release and between\nhost platforms. See file `toolchains/etc/crosscompilers.sha256` to check which\ntargets your release supports\n\n\nAdding generated function blocks\n--------------------------------\n\nWhen designing new Basic Function Blocks, Composite Function Blocks or Service\nFunction Blocks, the runtime has to be re-compiled to include code generated by\n4DIAC-IDE.  This is the original reason this build system was created.\n\nTo add your own blocks, place the code generated by 4DIAC-IDE into\na subdirectory below `modules`.\n\nNote: Previous versions of FBE tried to do a three-way merge for edited files.\nThis feature has been discontinued in favour of new and upcoming features of\n4diac IDE.\n\n\nAdding custom 4diac FORTE modules\n---------------------------------\n\nIf you write custom 4diac FORTE modules, also put them into their own\nsubdirectories below `modules`. You can configure a different external\nmodules directory by using the `FBE_EXTERNAL_MODULES_DIR`\nconfiguration option.\n\nYou can place the type definition files for 4diac IDE into subdirectory\n`types`. The idea is that you copy the contents of the `types` directory\ninto new 4diac IDE projects to get access to all custom modules.\n\nThe git repository has been set up to ignore all modules by default. If you\nwant to add modules to a local branch or fork, put the following `.gitignore`\nfile into your module directory:\n\n``\n!*\n``\n\nThat way you can selectively manage modules in subrepos or local branches and\nleave other modules unmanaged as needed.\n\n\nAdding external code\n--------------------\n\nIf your code has additional dependencies, put them as `cget` recipes into\nsubdirectory `dependencies/recipes`, then add the package name to the `DEPS`\nsetting in the build configuration file (see above). In the configuration file,\nyou can also add any additional CMake settings required for your code, for\nexample additional compiler flags in `EXTRA_COMPILER_FLAGS` or additional\ndependency packages in `DEPS`. See `configurations/native-toolchain.txt`\nfor some common examples.\n\nFor well-known external libraries, you might find `cget` recipes at\nhttps://github.com/pfultz2/cget-recipes/tree/master/recipes/ -- but be aware\nthat some of these will need manual adaptions for static linking.\n\nIf you have to use pre-built external libraries (e.g. due to proprietary code or\nhuge external packages that take a lot of effort to build), you will need a\ntoolchain based on the GNU C library instead of the default MUSL-based\ntoolchains. These contain `-gnu` in their name and support dynamic linking,\nbut the drawback is more complicated distribution. The build system tries to\ncreate a self-contained `bin` directory containing all dependency files, but\nthe result still might not be sufficient to run on a different system. This\ndepends on many details, you have been warned. Avoid it if you can.\n\n\nDebugging Compile Problems\n--------------------------\n\nIf you have unexplainable compiler errors or missing include files or things\nlike that, you can use the option `./compile.cmd -d ...` to force the build to\nbe single-threaded and output the individual compiler command lines. This helps\nyou to get more readable error output and check that all appropriate search paths\nand compiler options have been set. NOTE: you must `clean.cmd` the build directory\nevery time you switch between verbose builds and normal builds.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-4diac%2F4diac-fbe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-4diac%2F4diac-fbe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-4diac%2F4diac-fbe/lists"}