Skip to main content
Visitor II
January 11, 2011
Question

Howto use 'ORG' directive on STM8S?

  • January 11, 2011
  • 2 replies
  • 1570 views
Posted on January 11, 2011 at 03:41

Howto use 'ORG' directive on STM8S?

    This topic has been closed for replies.

    2 replies

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

    What's the ''org'' for? Just remove it, and if, as you say, you link that segment at 0x8080 you will end up with the code you require.

    By the way, it looks like you want to jump at the beginning of the startup: the examples provided with the compiler show how to do that in C (reset vector)

    e_zhui2Author
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:11

    We have a customiszed bootloader from 0x8000 ~ 0x807f, the main code is from 0x8080, and we don't use interrupt vector.

    So we have to put a 'trampoline' instruction @ 8080.

    Seems 'org' doesn't have the same effect like others.

    A small (4 bytes) segment can wrap the jump instruction. It works.

    Thanks...