We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,everybody, I am facing a problem now. I want to specify a veriable in big endian while the whole memory in little endian. You know,it is very easy to achieve this in IAR toolchain by adding a keyword __big_endian, when defining the veriable, but how can i do in MDK? Thanks!
You know,it is very easy to achieve this in IAR toolchain by adding a keyword __big_endian, when defining the veriable, but how can i do in MDK?
I'm afraid, the RealView compiler does not have such facility. You'll have to do it the traditional way: define htonl(), ntohl() and others and use them where appropriate.
Go to 'Options for Target - Target' and check or uncheck the 'Big Endian' checkbox as required. Note that this checkbox is present/enabled only when the selected MCU device supports endianess configuration.
But any "Big Endian" checkbox will not allow a program to have some variables big-endian and some little-endian.