Skip to main content
Visitor II
May 22, 2010
Question

Does COSMIC support Little Endian approach ?

  • May 22, 2010
  • 4 replies
  • 1080 views
Posted on May 22, 2010 at 13:00

Does COSMIC support Little Endian approach ?

    This topic has been closed for replies.

    4 replies

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:08

    (Post deleted)

    jeffrey23Author
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:08

    After doing some experiment, I found that the COSMIC compiler supports the BIG endian approach for STM8S103F3 as default mode. Can it support Little Endian approach ?

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:08

    Why do you care? If you had external peripherals on a bus I could understand but the STM8S103F3 doesn't have an external bus.

    If you need to send/receive data in big-endian order

    http://www.codeproject.com/kb/cpp/endianness.aspx

    to perform the conversion. That's what people have been doing on PC's (80x86's are little-endian) for decades.

    http://www.codeproject.com/kb/cpp/endianness.aspx

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:08

    Hello,

    in addition to the considerations above, it is interesting to underline that, for a micro like stm8, who is capable of multibyte operations (ld.w), the endianness is forced by the micro itself (-> does not depend on the compiler): STM8 is little endian.

    Regards,

    Luca (Cosmic)