Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 08:13 Go to next message
NOJA Power is currently offline NOJA PowerFriend
Messages: 19
Registered: May 2020
Junior Member
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 19:04 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1224
Registered: January 2014
Senior Member
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: Mon Jun 14 03:57:18 GMT 2021

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

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

Back to the top