Skip to main content



      Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » src/arch/posix/CMakeLists.txt and -DFORTE_LITTLE_ENDIAN(Building for different endian targets from the same code base)
src/arch/posix/CMakeLists.txt and -DFORTE_LITTLE_ENDIAN [message #1827830] Mon, 25 May 2020 04:13 Go to next message
Eclipse UserFriend
Hi,

We have a little endian build (on host compiler platform for dev/test work) and a big endian build (for ColdFire target). For both to co-exist, we moved the -DFORTE_LITTLE_ENDIAN from src/arch/posix/CMakeLists.txt to a "toolchain-${target}.cmake" file.

Then in the "setup-${target}.sh" file the host specific build is executed:
cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=./toolchain-${target}.cmake $NOJA_CMAKE_VARS ../../

What do you think is the best way of handling this endian configuration in the forte code base?

Thanks
Re: src/arch/posix/CMakeLists.txt and -DFORTE_LITTLE_ENDIAN [message #1828154 is a reply to message #1827830] Tue, 02 June 2020 15:04 Go to previous message
Eclipse UserFriend
Hi,

I think that endian handling as so many other things would be best suited as cmake configuration option (maybe in the advanced section), which then generates appropriate code in the forte_config.h. Cmake code in the different architectures could then already check if it is set and even provide sensible default values.
Previous Topic:F_UDINT_TO_USINT function block in forte
Next Topic:Type Export in 4diac 1.12.2
Goto Forum:
  


Current Time: Sat Jul 05 03:38:05 EDT 2025

Powered by FUDForum. Page generated in 0.24562 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top